File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
plugins/image/generator/SeExpr/src Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ class SeExprProcess : public ImageGilProcessor<View>
3434 void multiThreadProcessImages ( const OfxRectI& procWindowRoW );
3535private:
3636 OfxRectD rod;
37+ size_t _time;
3738};
3839
3940}
Original file line number Diff line number Diff line change @@ -18,13 +18,16 @@ void SeExprProcess<View>::setup( const OFX::RenderArguments& args )
1818
1919 rod = _plugin._clipDst ->getCanonicalRod ( args.time );
2020
21+ _time = args.time ;
22+
2123 TUTTLE_TLOG ( TUTTLE_INFO, _params._code );
2224
2325 ImageSynthExpr expr ( _params._code );
2426 expr.vars [" u" ] = ImageSynthExpr::Var ( _params._paramTextureOffset .x );
2527 expr.vars [" v" ] = ImageSynthExpr::Var ( _params._paramTextureOffset .y );
2628 expr.vars [" w" ] = ImageSynthExpr::Var ( rod.x2 - rod.x1 );
2729 expr.vars [" h" ] = ImageSynthExpr::Var ( rod.y2 - rod.y1 );
30+ expr.vars [" frame" ] = ImageSynthExpr::Var ( _time );
2831
2932 bool valid = expr.isValid ();
3033 if ( !valid )
@@ -54,6 +57,7 @@ void SeExprProcess<View>::multiThreadProcessImages( const OfxRectI& procWindowRo
5457 expr.vars [" v" ] = ImageSynthExpr::Var ( _params._paramTextureOffset .y );
5558 expr.vars [" w" ] = ImageSynthExpr::Var ( rod.x2 - rod.x1 );
5659 expr.vars [" h" ] = ImageSynthExpr::Var ( rod.y2 - rod.y1 );
60+ expr.vars [" frame" ] = ImageSynthExpr::Var ( _time );
5761
5862 double one_over_width = 1.0 / procWindowSize.x ;
5963 double one_over_height = 1.0 / procWindowSize.y ;
You can’t perform that action at this time.
0 commit comments