[Sidefx-houdini-list] Get time from CH_Manager rather than OP_Context in HDK, why?

Edward Lam edward at sidefx.com
Thu Jul 28 11:43:16 EDT 2011


Hi Pablo,

The example might be code that predates the OP_Context::getFloatFrame() 
method which is implemented as:
     return OPgetDirector()->getChannelManager()->getSample(myTime);

OPgetDirector() returns you a node that corresponds to the node path 
"/", ie. it is the root node. As the root, it also has extra 
functionality for the global working path (oppwd), manipulating the 
global node selection, and retrieving the global 
OP_CommandManager/CH_Manager instances. OP_CommandManager is used for 
hscript execution. CH_Manager contains the global animation settings, 
controls scoping of channels, and has methods for querying the curent 
evaluation time as well as methods for time conversion.

I'll augment the HDK documentation for the next major release of Houdini 
with this info.

Regards,
-Edward

On 28/07/2011 7:45 AM, Pablo Giménez wrote:
> Hi all.
> I have been looking in the SParticle example from the HDK, and something I
> spotted inmediatelly is that the current frame is coming from:
> chman = OPgetDirector()->getChannelManager();
> currframe = chman->getSample(context.getTime());
>
> Is the first time I have seen this I usually just use OP_Context to get the
> current time or frame.
> Why this example is using a Channel Manager to ge the time.
> What are exactly directors? And the channel Manager? I have read the
> comments in OP/OP_Director.h
> but is still not really clear waht these nodes are for.
> Thanks
>




More information about the Sidefx-houdini-list mailing list