23 namespace SOP_BoneDeformEnums
36 using namespace UT::Literal;
57 mySkeletonRootPath =
""_UTsh;
58 myDeformAttrib =
"boneCapture"_UTsh;
60 myDualQuaternionBlendAttrib =
""_UTsh;
61 myBoneTransformPath =
""_UTsh;
62 myBoneTransformTargetPath =
""_UTsh;
63 myBoneTransformRegionPath =
""_UTsh;
64 myOtherAttribs =
"*"_UTsh;
66 myDeleteCaptureAttrib =
true;
67 myDeletePointColors =
false;
81 if (myGroup != src.myGroup)
return false;
82 if (mySkeletonRootPath != src.mySkeletonRootPath)
return false;
83 if (myDeformAttrib != src.myDeformAttrib)
return false;
84 if (myMethod != src.myMethod)
return false;
85 if (myDualQuaternionBlendAttrib != src.myDualQuaternionBlendAttrib)
return false;
86 if (myBoneTransformPath != src.myBoneTransformPath)
return false;
87 if (myBoneTransformTargetPath != src.myBoneTransformTargetPath)
return false;
88 if (myBoneTransformRegionPath != src.myBoneTransformRegionPath)
return false;
89 if (myOtherAttribs != src.myOtherAttribs)
return false;
90 if (myDoNormals != src.myDoNormals)
return false;
91 if (myDeleteCaptureAttrib != src.myDeleteCaptureAttrib)
return false;
92 if (myDeletePointColors != src.myDeletePointColors)
return false;
93 if (myUseOpenCL != src.myUseOpenCL)
return false;
112 graph->
evalOpParm(myGroup, nodeidx,
"group", time, graph->
isDirect()?
nullptr:depnode);
113 mySkeletonRootPath =
""_UTsh;
115 graph->
evalOpParm(mySkeletonRootPath, nodeidx,
"skelrootpath", time, graph->
isDirect()?
nullptr:depnode);
116 myDeformAttrib =
"boneCapture"_UTsh;
118 graph->
evalOpParm(myDeformAttrib, nodeidx,
"deformattrib", time, graph->
isDirect()?
nullptr:depnode);
121 graph->
evalOpParm(myMethod, nodeidx,
"method", time, graph->
isDirect()?
nullptr:depnode);
122 myDualQuaternionBlendAttrib =
""_UTsh;
123 if (
true && ( (
true&&!(((
int64(getMethod())!=2)))) ) )
124 graph->
evalOpParm(myDualQuaternionBlendAttrib, nodeidx,
"dqblendattrib", time, graph->
isDirect()?
nullptr:depnode);
125 myBoneTransformPath =
""_UTsh;
127 graph->
evalOpParm(myBoneTransformPath, nodeidx,
"bonetransformpath", time, graph->
isDirect()?
nullptr:depnode);
128 myBoneTransformTargetPath =
""_UTsh;
129 if (
true && ( (
true&&!(((getBoneTransformPath()==
"")))) ) )
130 graph->
evalOpParm(myBoneTransformTargetPath, nodeidx,
"bonetransformtargetpath", time, graph->
isDirect()?
nullptr:depnode);
131 myBoneTransformRegionPath =
""_UTsh;
132 if (
true && ( (
true&&!(((getBoneTransformPath()==
"")))) ) )
133 graph->
evalOpParm(myBoneTransformRegionPath, nodeidx,
"bonetransformregionpath", time, graph->
isDirect()?
nullptr:depnode);
134 myOtherAttribs =
"*"_UTsh;
136 graph->
evalOpParm(myOtherAttribs, nodeidx,
"otherattribs", time, graph->
isDirect()?
nullptr:depnode);
139 graph->
evalOpParm(myDoNormals, nodeidx,
"donormal", time, graph->
isDirect()?
nullptr:depnode);
140 myDeleteCaptureAttrib =
true;
142 graph->
evalOpParm(myDeleteCaptureAttrib, nodeidx,
"deletecaptureattrib", time, graph->
isDirect()?
nullptr:depnode);
143 myDeletePointColors =
false;
145 graph->
evalOpParm(myDeletePointColors, nodeidx,
"deletepointtcolors", time, graph->
isDirect()?
nullptr:depnode);
148 graph->
evalOpParm(myUseOpenCL, nodeidx,
"useopencl", time, graph->
isDirect()?
nullptr:depnode);
164 template <
typename T>
171 if (idx.
size() != instance.
size()+1)
176 coerceValue(value, myGroup);
179 coerceValue(value, mySkeletonRootPath);
182 coerceValue(value, myDeformAttrib);
185 coerceValue(value, myMethod);
188 coerceValue(value, myDualQuaternionBlendAttrib);
191 coerceValue(value, myBoneTransformPath);
194 coerceValue(value, myBoneTransformTargetPath);
197 coerceValue(value, myBoneTransformRegionPath);
200 coerceValue(value, myOtherAttribs);
203 coerceValue(value, myDoNormals);
206 coerceValue(value, myDeleteCaptureAttrib);
209 coerceValue(value, myDeletePointColors);
212 coerceValue(value, myUseOpenCL);
228 { doGetParmValue(idx, instance, value); }
230 { doGetParmValue(idx, instance, value); }
232 { doGetParmValue(idx, instance, value); }
234 { doGetParmValue(idx, instance, value); }
236 { doGetParmValue(idx, instance, value); }
238 { doGetParmValue(idx, instance, value); }
240 { doGetParmValue(idx, instance, value); }
242 { doGetParmValue(idx, instance, value); }
244 { doGetParmValue(idx, instance, value); }
246 { doGetParmValue(idx, instance, value); }
248 { doGetParmValue(idx, instance, value); }
250 template <
typename T>
257 if (idx.
size() != instance.
size()+1)
262 coerceValue(myGroup, ( ( value ) ));
265 coerceValue(mySkeletonRootPath, ( ( value ) ));
268 coerceValue(myDeformAttrib, ( ( value ) ));
271 coerceValue(myMethod, clampMinValue(0, clampMaxValue(3, value ) ));
274 coerceValue(myDualQuaternionBlendAttrib, ( ( value ) ));
277 coerceValue(myBoneTransformPath, ( ( value ) ));
280 coerceValue(myBoneTransformTargetPath, ( ( value ) ));
283 coerceValue(myBoneTransformRegionPath, ( ( value ) ));
286 coerceValue(myOtherAttribs, ( ( value ) ));
289 coerceValue(myDoNormals, ( ( value ) ));
292 coerceValue(myDeleteCaptureAttrib, ( ( value ) ));
295 coerceValue(myDeletePointColors, ( ( value ) ));
298 coerceValue(myUseOpenCL, ( ( value ) ));
305 { doSetParmValue(idx, instance, value); }
307 { doSetParmValue(idx, instance, value); }
309 { doSetParmValue(idx, instance, value); }
311 { doSetParmValue(idx, instance, value); }
313 { doSetParmValue(idx, instance, value); }
315 { doSetParmValue(idx, instance, value); }
317 { doSetParmValue(idx, instance, value); }
319 { doSetParmValue(idx, instance, value); }
321 { doSetParmValue(idx, instance, value); }
323 { doSetParmValue(idx, instance, value); }
325 { doSetParmValue(idx, instance, value); }
341 if (fieldnum.
size() < 1)
348 return "skelrootpath";
350 return "deformattrib";
354 return "dqblendattrib";
356 return "bonetransformpath";
358 return "bonetransformtargetpath";
360 return "bonetransformregionpath";
362 return "otherattribs";
366 return "deletecaptureattrib";
368 return "deletepointtcolors";
378 if (fieldnum.
size() < 1)
379 return PARM_UNSUPPORTED;
410 return PARM_UNSUPPORTED;
446 loadData(is, rampdata);
464 int typelen = colon - data.
buffer();
478 {
int64 iv =
v; UTwrite(os, &iv); }
480 { UTwrite<fpreal64>(os, &
v); }
482 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
484 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
485 UTwrite<fpreal64>(os, &v.
z()); }
487 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
488 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
500 if (s) s->save(ostr);
502 saveData(os, result);
509 ostr << s->getDataTypeToken();
514 saveData(os, result);
518 void save(std::ostream &os)
const
522 saveData(os, myGroup);
523 saveData(os, mySkeletonRootPath);
524 saveData(os, myDeformAttrib);
525 saveData(os, myMethod);
526 saveData(os, myDualQuaternionBlendAttrib);
527 saveData(os, myBoneTransformPath);
528 saveData(os, myBoneTransformTargetPath);
529 saveData(os, myBoneTransformRegionPath);
530 saveData(os, myOtherAttribs);
531 saveData(os, myDoNormals);
532 saveData(os, myDeleteCaptureAttrib);
533 saveData(os, myDeletePointColors);
534 saveData(os, myUseOpenCL);
547 loadData(is, myGroup);
548 loadData(is, mySkeletonRootPath);
549 loadData(is, myDeformAttrib);
550 loadData(is, myMethod);
551 loadData(is, myDualQuaternionBlendAttrib);
552 loadData(is, myBoneTransformPath);
553 loadData(is, myBoneTransformTargetPath);
554 loadData(is, myBoneTransformRegionPath);
555 loadData(is, myOtherAttribs);
556 loadData(is, myDoNormals);
557 loadData(is, myDeleteCaptureAttrib);
558 loadData(is, myDeletePointColors);
559 loadData(is, myUseOpenCL);
569 if (!thissop)
return getGroup();
571 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
579 if (!thissop)
return getSkeletonRootPath();
581 OP_Utils::evalOpParm(result, thissop,
"skelrootpath", cookparms.
getCookTime(), 0);
589 if (!thissop)
return getDeformAttrib();
591 OP_Utils::evalOpParm(result, thissop,
"deformattrib", cookparms.
getCookTime(), 0);
599 if (!thissop)
return getMethod();
601 OP_Utils::evalOpParm(result, thissop,
"method", cookparms.
getCookTime(), 0);
609 if (!thissop)
return getDualQuaternionBlendAttrib();
611 OP_Utils::evalOpParm(result, thissop,
"dqblendattrib", cookparms.
getCookTime(), 0);
619 if (!thissop)
return getBoneTransformPath();
621 OP_Utils::evalOpParm(result, thissop,
"bonetransformpath", cookparms.
getCookTime(), 0);
629 if (!thissop)
return getBoneTransformTargetPath();
631 OP_Utils::evalOpParm(result, thissop,
"bonetransformtargetpath", cookparms.
getCookTime(), 0);
639 if (!thissop)
return getBoneTransformRegionPath();
641 OP_Utils::evalOpParm(result, thissop,
"bonetransformregionpath", cookparms.
getCookTime(), 0);
649 if (!thissop)
return getOtherAttribs();
651 OP_Utils::evalOpParm(result, thissop,
"otherattribs", cookparms.
getCookTime(), 0);
659 if (!thissop)
return getDoNormals();
661 OP_Utils::evalOpParm(result, thissop,
"donormal", cookparms.
getCookTime(), 0);
669 if (!thissop)
return getDeleteCaptureAttrib();
671 OP_Utils::evalOpParm(result, thissop,
"deletecaptureattrib", cookparms.
getCookTime(), 0);
679 if (!thissop)
return getDeletePointColors();
681 OP_Utils::evalOpParm(result, thissop,
"deletepointtcolors", cookparms.
getCookTime(), 0);
689 if (!thissop)
return getUseOpenCL();
691 OP_Utils::evalOpParm(result, thissop,
"useopencl", cookparms.
getCookTime(), 0);
706 bool myDeleteCaptureAttrib;
707 bool myDeletePointColors;
SOP_Node * getNode() const
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
GLsizei const GLfloat * value
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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
virtual UT_StringHolder baseGetSignature() const
fpreal getCookTime() const
const char * findChar(int c) const
exint bread(uint8 *buffer, exint asize=1)
constexpr SYS_FORCE_INLINE T & y() noexcept
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
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