[Sidefx-houdini-list] Get time from CH_Manager rather than OP_Context in HDK, why?
pablogipi at gmail.com
Thu Jul 28 13:33:29 EDT 2011
Well more issues I have with frames and time.
I am using all of this to set the start time of a particle system.
Seems that no mather what frame range you have, frame 1 is time 0.
If FPS is 24, frame 0 is time -0.04166
Frame 2 is time 0.04166
Well for me this is little bit weird. I think frame 0 should be time 0.
Frame -1 shoudl be time -0.04166. Frame 1 time 0.04166. And so on ...
What happens is that if you set start frame in a POP Network to be 0, the
sim begins on frame 1, even if your frame range is something like [-10,
I understand that OP_Context.myTime is time based on 0, related to global
start time/frame. So then if your frame range is [-10, 100], frame -10,
should be time 0, not time -0.458.
This is driving me nuts ....
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.
> 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