HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_MotionClipBuilder Class Reference

#include <GU_MotionClip.h>

Public Member Functions

 GU_MotionClipBuilder (GU_MotionClipRW *clip)
 
 ~GU_MotionClipBuilder ()
 
bool addSample (fpreal time, const GU_Detail *sample, UT_WorkBuffer &error_msg, GA_AttributeFilter extra_attribs, const GA_PointGroup *pts=nullptr)
 
bool removeSample (fpreal time, UT_WorkBuffer &error_msg)
 

Detailed Description

Used to make a batch of modifications to a motion clip.

It will store the changes in the clip object and then flush them to the clip's evaluator when it is destroyed

Each call to add/removeSample will update the clip's GDP, etc but the evaluator's internal data structures will not be updated until the flush - so we can safely keep evaluating the the clip which we are adding frames, but the new frames will not be reflected in the evaluated animation until this object is destroyed

Note that the evaluator will not be able to unpack attributes until this is destructed

Definition at line 300 of file GU_MotionClip.h.

Constructor & Destructor Documentation

GU_MotionClipBuilder::GU_MotionClipBuilder ( GU_MotionClipRW clip)
inline
Precondition
Clip must outlive this instance

Definition at line 305 of file GU_MotionClip.h.

GU_MotionClipBuilder::~GU_MotionClipBuilder ( )

This will update clip to store the new samples

Member Function Documentation

bool GU_MotionClipBuilder::addSample ( fpreal  time,
const GU_Detail sample,
UT_WorkBuffer error_msg,
GA_AttributeFilter  extra_attribs,
const GA_PointGroup pts = nullptr 
)

Adds a sample/keyframe into the clip at the given time

If the a sample at the given time exists it will be replaced returns false on error

Precondition
Each point's name attrib must correspond to one of the topology's joint names
Sample must either provide a localtransform attribute or have the same topology as our class so we can compute it
bool GU_MotionClipBuilder::removeSample ( fpreal  time,
UT_WorkBuffer error_msg 
)

Removes the sample at time

returns false on error/missing sample


The documentation for this class was generated from the following file: