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

Pablo Giménez pablogipi at gmail.com
Thu Jul 28 13:08:19 EDT 2011


2011/7/28 Edward Lam <edward at sidefx.com>

> 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.
>
Thanks Edward for the info.
 I have been playing with CH_Manager for awhile and now Iam using only it,
becaue it gives me all the time related info I need.
In OP_Context you can currently get only current time or frma I think. Not
things like FPS, sec per sample, etc .. which is in CH_Manager.

>
> 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
>>
>>
> ______________________________**_________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/**mailman/listinfo/sidefx-**houdini-list<https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list>
>



-- 
Un saludo
Best Regards
Pablo Giménez



More information about the Sidefx-houdini-list mailing list