[Sidefx-houdini-list] Get time from CH_Manager rather than OP_Context in HDK, why?
pablogipi at gmail.com
Thu Jul 28 13:16:50 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);
BTW how can I get the current time using only CH_Manager, I am now using:
now = context.myTime + chman->getGlobalStart();
But I havent seen any method in CH_Manager to get the same values as
> 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.
> 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
>> 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.
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
More information about the Sidefx-houdini-list