Skip to content

Commit 05dd578

Browse files
SeExpr: support temporal generation
issue #243
1 parent c867902 commit 05dd578

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

plugins/image/generator/SeExpr/src/SeExprProcess.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class SeExprProcess : public ImageGilProcessor<View>
3434
void multiThreadProcessImages( const OfxRectI& procWindowRoW );
3535
private:
3636
OfxRectD rod;
37+
size_t _time;
3738
};
3839

3940
}

plugins/image/generator/SeExpr/src/SeExprProcess.tcc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)