int updatePreview(int id)
Returns 1 if doingProxy (and the preview was updated), 0 otherwise.
updatePreview causes the proxy preview to be immediately updated with the current contents of the output image. This is useful for animating iterative algorithms in the preview window. At present, FM supports only one proxy preview, so the 'id' argument is ignored.
%ffp ForEveryTile: { // row by row for( y = 0; y < Y; y++ ) { // column by column for( x = 0; x < X; x++ ) { // channel by channel for( z = 0; z < Z; z++ ) { // apply an effect pset( x, y, z, src( x % 100, y % 100, z ) + rnd( -50, 50 ) ); } } // update the progress bar updateProgress( y, Y ); // update the preview // (only in filter dialog) updatePreview( a ); } return true; }
Everyone can add his comments about his experiences with this function here. Tips for using it are welcome, too.