HDK
|
#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 recompute_local=false, bool is_key_pose=false, const UT_StringHolder key_pose_attrib="") |
bool | removeSamples (UT_Vector2R range, UT_WorkBuffer &error_msg) |
bool | removeSample (fpreal time, UT_WorkBuffer &error_msg) |
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 603 of file GU_MotionClip.h.
|
inline |
Definition at line 608 of file GU_MotionClip.h.
GU_MotionClipBuilder::~GU_MotionClipBuilder | ( | ) |
This will update clip to store the new samples
bool GU_MotionClipBuilder::addSample | ( | fpreal | time, |
const GU_Detail * | sample, | ||
UT_WorkBuffer & | error_msg, | ||
GA_AttributeFilter | extra_attribs, | ||
const GA_PointGroup * | pts = nullptr , |
||
bool | recompute_local = false , |
||
bool | is_key_pose = false , |
||
const UT_StringHolder | key_pose_attrib = "" |
||
) |
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
bool GU_MotionClipBuilder::removeSample | ( | fpreal | time, |
UT_WorkBuffer & | error_msg | ||
) |
Removes the sample at time
returns false on error/missing sample
bool GU_MotionClipBuilder::removeSamples | ( | UT_Vector2R | range, |
UT_WorkBuffer & | error_msg | ||
) |
Removes all samples within a given inclusive time range. Returns false on error