23 namespace SOP_BoneDeformEnums
36 using namespace UT::Literal;
57 mySkeletonRootPath =
""_UTsh;
59 myDualQuaternionBlendAttrib =
""_UTsh;
60 myBoneTransformPath =
""_UTsh;
61 myBoneTransformTargetPath =
""_UTsh;
62 myBoneTransformRegionPath =
""_UTsh;
63 myOtherAttribs =
"*"_UTsh;
65 myDeleteCaptureAttrib =
true;
66 myDeletePointColors =
false;
79 if (myGroup != src.myGroup)
return false;
80 if (mySkeletonRootPath != src.mySkeletonRootPath)
return false;
81 if (myMethod != src.myMethod)
return false;
82 if (myDualQuaternionBlendAttrib != src.myDualQuaternionBlendAttrib)
return false;
83 if (myBoneTransformPath != src.myBoneTransformPath)
return false;
84 if (myBoneTransformTargetPath != src.myBoneTransformTargetPath)
return false;
85 if (myBoneTransformRegionPath != src.myBoneTransformRegionPath)
return false;
86 if (myOtherAttribs != src.myOtherAttribs)
return false;
87 if (myDoNormals != src.myDoNormals)
return false;
88 if (myDeleteCaptureAttrib != src.myDeleteCaptureAttrib)
return false;
89 if (myDeletePointColors != src.myDeletePointColors)
return false;
105 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
106 mySkeletonRootPath =
""_UTsh;
108 graph->
evalOpParm(mySkeletonRootPath, nodeidx,
"skelrootpath", time, 0);
111 graph->
evalOpParm(myMethod, nodeidx,
"method", time, 0);
112 myDualQuaternionBlendAttrib =
""_UTsh;
113 if (
true && ( (
true&&!(((
int64(getMethod())!=2)))) ) )
114 graph->
evalOpParm(myDualQuaternionBlendAttrib, nodeidx,
"dqblendattrib", time, 0);
115 myBoneTransformPath =
""_UTsh;
117 graph->
evalOpParm(myBoneTransformPath, nodeidx,
"bonetransformpath", time, 0);
118 myBoneTransformTargetPath =
""_UTsh;
119 if (
true && ( (
true&&!(((getBoneTransformPath()==
"")))) ) )
120 graph->
evalOpParm(myBoneTransformTargetPath, nodeidx,
"bonetransformtargetpath", time, 0);
121 myBoneTransformRegionPath =
""_UTsh;
122 if (
true && ( (
true&&!(((getBoneTransformPath()==
"")))) ) )
123 graph->
evalOpParm(myBoneTransformRegionPath, nodeidx,
"bonetransformregionpath", time, 0);
124 myOtherAttribs =
"*"_UTsh;
126 graph->
evalOpParm(myOtherAttribs, nodeidx,
"otherattribs", time, 0);
129 graph->
evalOpParm(myDoNormals, nodeidx,
"donormal", time, 0);
130 myDeleteCaptureAttrib =
true;
132 graph->
evalOpParm(myDeleteCaptureAttrib, nodeidx,
"deletecaptureattrib", time, 0);
133 myDeletePointColors =
false;
135 graph->
evalOpParm(myDeletePointColors, nodeidx,
"deletepointtcolors", time, 0);
151 template <
typename T>
158 if (idx.
size() != instance.
size()+1)
163 coerceValue(value, myGroup);
166 coerceValue(value, mySkeletonRootPath);
169 coerceValue(value, myMethod);
172 coerceValue(value, myDualQuaternionBlendAttrib);
175 coerceValue(value, myBoneTransformPath);
178 coerceValue(value, myBoneTransformTargetPath);
181 coerceValue(value, myBoneTransformRegionPath);
184 coerceValue(value, myOtherAttribs);
187 coerceValue(value, myDoNormals);
190 coerceValue(value, myDeleteCaptureAttrib);
193 coerceValue(value, myDeletePointColors);
209 { doGetParmValue(idx, instance, value); }
211 { doGetParmValue(idx, instance, value); }
213 { doGetParmValue(idx, instance, value); }
215 { doGetParmValue(idx, instance, value); }
217 { doGetParmValue(idx, instance, value); }
219 { doGetParmValue(idx, instance, value); }
221 { doGetParmValue(idx, instance, value); }
223 { doGetParmValue(idx, instance, value); }
225 { doGetParmValue(idx, instance, value); }
227 { doGetParmValue(idx, instance, value); }
229 { doGetParmValue(idx, instance, value); }
231 template <
typename T>
238 if (idx.
size() != instance.
size()+1)
243 coerceValue(myGroup, ( ( value ) ));
246 coerceValue(mySkeletonRootPath, ( ( value ) ));
249 coerceValue(myMethod, clampMinValue(0, clampMaxValue(3, value ) ));
252 coerceValue(myDualQuaternionBlendAttrib, ( ( value ) ));
255 coerceValue(myBoneTransformPath, ( ( value ) ));
258 coerceValue(myBoneTransformTargetPath, ( ( value ) ));
261 coerceValue(myBoneTransformRegionPath, ( ( value ) ));
264 coerceValue(myOtherAttribs, ( ( value ) ));
267 coerceValue(myDoNormals, ( ( value ) ));
270 coerceValue(myDeleteCaptureAttrib, ( ( value ) ));
273 coerceValue(myDeletePointColors, ( ( value ) ));
280 { doSetParmValue(idx, instance, value); }
282 { doSetParmValue(idx, instance, value); }
284 { doSetParmValue(idx, instance, value); }
286 { doSetParmValue(idx, instance, value); }
288 { doSetParmValue(idx, instance, value); }
290 { doSetParmValue(idx, instance, value); }
292 { doSetParmValue(idx, instance, value); }
294 { doSetParmValue(idx, instance, value); }
296 { doSetParmValue(idx, instance, value); }
298 { doSetParmValue(idx, instance, value); }
300 { doSetParmValue(idx, instance, value); }
316 if (fieldnum.
size() < 1)
323 return "skelrootpath";
327 return "dqblendattrib";
329 return "bonetransformpath";
331 return "bonetransformtargetpath";
333 return "bonetransformregionpath";
335 return "otherattribs";
339 return "deletecaptureattrib";
341 return "deletepointtcolors";
349 if (fieldnum.
size() < 1)
350 return PARM_UNSUPPORTED;
377 return PARM_UNSUPPORTED;
413 loadData(is, rampdata);
431 int typelen = colon - data.
buffer();
445 {
int64 iv =
v; UTwrite(os, &iv); }
447 { UTwrite<fpreal64>(os, &
v); }
449 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
451 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
452 UTwrite<fpreal64>(os, &v.
z()); }
454 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
455 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
467 if (s) s->save(ostr);
469 saveData(os, result);
476 ostr << s->getDataTypeToken();
481 saveData(os, result);
485 void save(std::ostream &os)
const
489 saveData(os, myGroup);
490 saveData(os, mySkeletonRootPath);
491 saveData(os, myMethod);
492 saveData(os, myDualQuaternionBlendAttrib);
493 saveData(os, myBoneTransformPath);
494 saveData(os, myBoneTransformTargetPath);
495 saveData(os, myBoneTransformRegionPath);
496 saveData(os, myOtherAttribs);
497 saveData(os, myDoNormals);
498 saveData(os, myDeleteCaptureAttrib);
499 saveData(os, myDeletePointColors);
512 loadData(is, myGroup);
513 loadData(is, mySkeletonRootPath);
514 loadData(is, myMethod);
515 loadData(is, myDualQuaternionBlendAttrib);
516 loadData(is, myBoneTransformPath);
517 loadData(is, myBoneTransformTargetPath);
518 loadData(is, myBoneTransformRegionPath);
519 loadData(is, myOtherAttribs);
520 loadData(is, myDoNormals);
521 loadData(is, myDeleteCaptureAttrib);
522 loadData(is, myDeletePointColors);
532 if (!thissop)
return getGroup();
534 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
542 if (!thissop)
return getSkeletonRootPath();
544 OP_Utils::evalOpParm(result, thissop,
"skelrootpath", cookparms.
getCookTime(), 0);
552 if (!thissop)
return getMethod();
554 OP_Utils::evalOpParm(result, thissop,
"method", cookparms.
getCookTime(), 0);
562 if (!thissop)
return getDualQuaternionBlendAttrib();
564 OP_Utils::evalOpParm(result, thissop,
"dqblendattrib", cookparms.
getCookTime(), 0);
572 if (!thissop)
return getBoneTransformPath();
574 OP_Utils::evalOpParm(result, thissop,
"bonetransformpath", cookparms.
getCookTime(), 0);
582 if (!thissop)
return getBoneTransformTargetPath();
584 OP_Utils::evalOpParm(result, thissop,
"bonetransformtargetpath", cookparms.
getCookTime(), 0);
592 if (!thissop)
return getBoneTransformRegionPath();
594 OP_Utils::evalOpParm(result, thissop,
"bonetransformregionpath", cookparms.
getCookTime(), 0);
602 if (!thissop)
return getOtherAttribs();
604 OP_Utils::evalOpParm(result, thissop,
"otherattribs", cookparms.
getCookTime(), 0);
612 if (!thissop)
return getDoNormals();
614 OP_Utils::evalOpParm(result, thissop,
"donormal", cookparms.
getCookTime(), 0);
622 if (!thissop)
return getDeleteCaptureAttrib();
624 OP_Utils::evalOpParm(result, thissop,
"deletecaptureattrib", cookparms.
getCookTime(), 0);
632 if (!thissop)
return getDeletePointColors();
634 OP_Utils::evalOpParm(result, thissop,
"deletepointtcolors", cookparms.
getCookTime(), 0);
648 bool myDeleteCaptureAttrib;
649 bool myDeletePointColors;
SOP_Node * getNode() const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
An output stream object that owns its own string buffer storage.
**But if you need a result
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
constexpr SYS_FORCE_INLINE T & x() noexcept
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
constexpr SYS_FORCE_INLINE T & z() noexcept
const OP_GraphProxy * graph() const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
fpreal getCookTime() const
const char * findChar(int c) const
constexpr SYS_FORCE_INLINE T & y() noexcept
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept