Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Softimage® / XSI SDK / Scripted Operator Update
  RSS 2.0 ATOM  

Scripted Operator Update
Rate this thread
 
30151
 
Permlink of this thread  
avatar
  • Total Posts: 37
  • Joined: 19 February 2008 10:01 AM

Hi guys,
Is there a way to determine what is causing the update of a scop? Whether it is being updated through animation playback or user interaction to be exact?

I am working on a operator cashing implementation that would need this information.

Thanks for the help!



Replies: 0
avatar

An operator is evaluated when one of its port value has changed. If playing the animation doesn’t change those port values, then the operator doesn’t need any update.
You can temporarily put a LogMessage("update") to see each time your SCOP is being evaluated.

Cheers.



Replies: 0
avatar

Hi Christopher,
I’m looking beyond that ...

The idea is to determine whether the operator is in “playback mode” when it IS being evaluated. So I can specify whether to sample the cashed information or to generate new values.

One possible solution would be to check against current evaluation time and if it has changed to assume that there is animation playback going on. However, one can not rely on the evaluation time as it could be different from current scene time and the operator could be evaluated several times per frame during playback which makes this method unstable.

I can always make it so if cashed information exists the operator would use it all the time but that is limiting to the workflow of the operator and I would like to avoid it if possible.

Looks like the ParticleOp example might have a possible solution ... time to dig through some code.

Cheers.



Replies: 0