23 namespace SOP_ShapeDiffEnums
36 using namespace UT::Literal;
57 using namespace UT::Literal;
78 myOrientAttrib =
""_UTsh;
79 mySkelRootPath =
""_UTsh;
80 myBoneTransformPath =
""_UTsh;
82 myBlendAttrib =
""_UTsh;
85 myVAttribs =
"P"_UTsh;
88 myMaskAttrib =
""_UTsh;
102 if (myDiffType != src.myDiffType)
return false;
103 if (myOrientAttrib != src.myOrientAttrib)
return false;
104 if (mySkelRootPath != src.mySkelRootPath)
return false;
105 if (myBoneTransformPath != src.myBoneTransformPath)
return false;
106 if (mySkinType != src.mySkinType)
return false;
107 if (myBlendAttrib != src.myBlendAttrib)
return false;
108 if (myDoNormal != src.myDoNormal)
return false;
109 if (myDoVAttribs != src.myDoVAttribs)
return false;
110 if (myVAttribs != src.myVAttribs)
return false;
111 if (myDoQAttribs != src.myDoQAttribs)
return false;
112 if (myQAttribs != src.myQAttribs)
return false;
113 if (myMaskAttrib != src.myMaskAttrib)
return false;
114 if (myScaleMask != src.myScaleMask)
return false;
134 graph->
evalOpParm(myDiffType, nodeidx,
"difftype", time, graph->
isDirect()?
nullptr:depnode);
135 myOrientAttrib =
""_UTsh;
136 if (
true && ( (
true&&!(((
int64(getDiffType())!=2)))) ) )
137 graph->
evalOpParm(myOrientAttrib, nodeidx,
"orientattrib", time, graph->
isDirect()?
nullptr:depnode);
138 mySkelRootPath =
""_UTsh;
139 if (
true && ( (
true&&!(((
int64(getDiffType())==1))||((
int64(getDiffType())==2)))) ) )
140 graph->
evalOpParm(mySkelRootPath, nodeidx,
"skelrootpath", time, graph->
isDirect()?
nullptr:depnode);
141 myBoneTransformPath =
""_UTsh;
142 if (
true && ( (
true&&!(((
int64(getDiffType())==1))||((
int64(getDiffType())==2)))) ) )
143 graph->
evalOpParm(myBoneTransformPath, nodeidx,
"bonetransformpath", time, graph->
isDirect()?
nullptr:depnode);
145 if (
true && ( (
true&&!(((
int64(getDiffType())==1))||((
int64(getDiffType())==2)))) ) )
146 graph->
evalOpParm(mySkinType, nodeidx,
"skintype", time, graph->
isDirect()?
nullptr:depnode);
147 myBlendAttrib =
""_UTsh;
148 if (
true && ( (
true&&!(((
int64(getSkinType())!=2))||((
int64(getDiffType())==1))||((
int64(getDiffType())==2)))) ) )
149 graph->
evalOpParm(myBlendAttrib, nodeidx,
"blendattrib", time, graph->
isDirect()?
nullptr:depnode);
152 graph->
evalOpParm(myDoNormal, nodeidx,
"donormal", time, graph->
isDirect()?
nullptr:depnode);
155 graph->
evalOpParm(myDoVAttribs, nodeidx,
"dovattribs", time, graph->
isDirect()?
nullptr:depnode);
156 myVAttribs =
"P"_UTsh;
157 if (
true && ( (
true&&!(((getDoVAttribs()==0)))) ) )
158 graph->
evalOpParm(myVAttribs, nodeidx,
"vattribs", time, graph->
isDirect()?
nullptr:depnode);
159 myDoQAttribs =
false;
161 graph->
evalOpParm(myDoQAttribs, nodeidx,
"doqattribs", time, graph->
isDirect()?
nullptr:depnode);
162 myQAttribs =
""_UTsh;
163 if (
true && ( (
true&&!(((getDoQAttribs()==0)))) ) )
164 graph->
evalOpParm(myQAttribs, nodeidx,
"qattribs", time, graph->
isDirect()?
nullptr:depnode);
165 myMaskAttrib =
""_UTsh;
167 graph->
evalOpParm(myMaskAttrib, nodeidx,
"maskattrib", time, graph->
isDirect()?
nullptr:depnode);
169 if (
true && ( (
true&&!(((getMaskAttrib()==
"''")))) ) )
170 graph->
evalOpParm(myScaleMask, nodeidx,
"scalemask", time, graph->
isDirect()?
nullptr:depnode);
186 template <
typename T>
193 if (idx.
size() != instance.
size()+1)
198 coerceValue(value, myDiffType);
201 coerceValue(value, myOrientAttrib);
204 coerceValue(value, mySkelRootPath);
207 coerceValue(value, myBoneTransformPath);
210 coerceValue(value, mySkinType);
213 coerceValue(value, myBlendAttrib);
216 coerceValue(value, myDoNormal);
219 coerceValue(value, myDoVAttribs);
222 coerceValue(value, myVAttribs);
225 coerceValue(value, myDoQAttribs);
228 coerceValue(value, myQAttribs);
231 coerceValue(value, myMaskAttrib);
234 coerceValue(value, myScaleMask);
250 { doGetParmValue(idx, instance, value); }
252 { doGetParmValue(idx, instance, value); }
254 { doGetParmValue(idx, instance, value); }
256 { doGetParmValue(idx, instance, value); }
258 { doGetParmValue(idx, instance, value); }
260 { doGetParmValue(idx, instance, value); }
262 { doGetParmValue(idx, instance, value); }
264 { doGetParmValue(idx, instance, value); }
266 { doGetParmValue(idx, instance, value); }
268 { doGetParmValue(idx, instance, value); }
270 { doGetParmValue(idx, instance, value); }
272 template <
typename T>
279 if (idx.
size() != instance.
size()+1)
284 coerceValue(myDiffType, clampMinValue(0, clampMaxValue(3, value ) ));
287 coerceValue(myOrientAttrib, ( ( value ) ));
290 coerceValue(mySkelRootPath, ( ( value ) ));
293 coerceValue(myBoneTransformPath, ( ( value ) ));
296 coerceValue(mySkinType, clampMinValue(0, clampMaxValue(3, value ) ));
299 coerceValue(myBlendAttrib, ( ( value ) ));
302 coerceValue(myDoNormal, ( ( value ) ));
305 coerceValue(myDoVAttribs, ( ( value ) ));
308 coerceValue(myVAttribs, ( ( value ) ));
311 coerceValue(myDoQAttribs, ( ( value ) ));
314 coerceValue(myQAttribs, ( ( value ) ));
317 coerceValue(myMaskAttrib, ( ( value ) ));
320 coerceValue(myScaleMask, ( ( value ) ));
327 { doSetParmValue(idx, instance, value); }
329 { doSetParmValue(idx, instance, value); }
331 { doSetParmValue(idx, instance, value); }
333 { doSetParmValue(idx, instance, value); }
335 { doSetParmValue(idx, instance, value); }
337 { doSetParmValue(idx, instance, value); }
339 { doSetParmValue(idx, instance, value); }
341 { doSetParmValue(idx, instance, value); }
343 { doSetParmValue(idx, instance, value); }
345 { doSetParmValue(idx, instance, value); }
347 { doSetParmValue(idx, instance, value); }
363 if (fieldnum.
size() < 1)
370 return "orientattrib";
372 return "skelrootpath";
374 return "bonetransformpath";
378 return "blendattrib";
400 if (fieldnum.
size() < 1)
401 return PARM_UNSUPPORTED;
432 return PARM_UNSUPPORTED;
468 loadData(is, rampdata);
486 int typelen = colon - data.
buffer();
500 {
int64 iv =
v; UTwrite(os, &iv); }
502 { UTwrite<fpreal64>(os, &
v); }
504 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
506 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
507 UTwrite<fpreal64>(os, &v.
z()); }
509 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
510 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
522 if (s) s->save(ostr);
524 saveData(os, result);
531 ostr << s->getDataTypeToken();
536 saveData(os, result);
540 void save(std::ostream &os)
const
544 saveData(os, myDiffType);
545 saveData(os, myOrientAttrib);
546 saveData(os, mySkelRootPath);
547 saveData(os, myBoneTransformPath);
548 saveData(os, mySkinType);
549 saveData(os, myBlendAttrib);
550 saveData(os, myDoNormal);
551 saveData(os, myDoVAttribs);
552 saveData(os, myVAttribs);
553 saveData(os, myDoQAttribs);
554 saveData(os, myQAttribs);
555 saveData(os, myMaskAttrib);
556 saveData(os, myScaleMask);
569 loadData(is, myDiffType);
570 loadData(is, myOrientAttrib);
571 loadData(is, mySkelRootPath);
572 loadData(is, myBoneTransformPath);
573 loadData(is, mySkinType);
574 loadData(is, myBlendAttrib);
575 loadData(is, myDoNormal);
576 loadData(is, myDoVAttribs);
577 loadData(is, myVAttribs);
578 loadData(is, myDoQAttribs);
579 loadData(is, myQAttribs);
580 loadData(is, myMaskAttrib);
581 loadData(is, myScaleMask);
591 if (!thissop)
return getDiffType();
593 OP_Utils::evalOpParm(result, thissop,
"difftype", cookparms.
getCookTime(), 0);
601 if (!thissop)
return getOrientAttrib();
603 OP_Utils::evalOpParm(result, thissop,
"orientattrib", cookparms.
getCookTime(), 0);
611 if (!thissop)
return getSkelRootPath();
613 OP_Utils::evalOpParm(result, thissop,
"skelrootpath", cookparms.
getCookTime(), 0);
621 if (!thissop)
return getBoneTransformPath();
623 OP_Utils::evalOpParm(result, thissop,
"bonetransformpath", cookparms.
getCookTime(), 0);
631 if (!thissop)
return getSkinType();
633 OP_Utils::evalOpParm(result, thissop,
"skintype", cookparms.
getCookTime(), 0);
641 if (!thissop)
return getBlendAttrib();
643 OP_Utils::evalOpParm(result, thissop,
"blendattrib", cookparms.
getCookTime(), 0);
651 if (!thissop)
return getDoNormal();
653 OP_Utils::evalOpParm(result, thissop,
"donormal", cookparms.
getCookTime(), 0);
661 if (!thissop)
return getDoVAttribs();
663 OP_Utils::evalOpParm(result, thissop,
"dovattribs", cookparms.
getCookTime(), 0);
671 if (!thissop)
return getVAttribs();
673 OP_Utils::evalOpParm(result, thissop,
"vattribs", cookparms.
getCookTime(), 0);
681 if (!thissop)
return getDoQAttribs();
683 OP_Utils::evalOpParm(result, thissop,
"doqattribs", cookparms.
getCookTime(), 0);
691 if (!thissop)
return getQAttribs();
693 OP_Utils::evalOpParm(result, thissop,
"qattribs", cookparms.
getCookTime(), 0);
701 if (!thissop)
return getMaskAttrib();
703 OP_Utils::evalOpParm(result, thissop,
"maskattrib", cookparms.
getCookTime(), 0);
711 if (!thissop)
return getScaleMask();
713 OP_Utils::evalOpParm(result, thissop,
"scalemask", cookparms.
getCookTime(), 0);
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
SYS_FORCE_INLINE UT_StringHolder getToken(DiffType enum_value)
void setScaleMask(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void saveData(std::ostream &os, fpreal64 v)
ParmType getNestParmType(TempIndex fieldnum) const override
void setBoneTransformPath(const UT_StringHolder &val)
SOP_Node * getNode() const
bool getDoVAttribs() const
static void loadData(UT_IStream &is, bool &v)
void setQAttribs(const UT_StringHolder &val)
const UT_StringHolder & getBlendAttrib() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setOrientAttrib(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Vector2D v)
const char * getNestParmName(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
const UT_StringHolder & getVAttribs() const
const UT_StringHolder & getBoneTransformPath() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
exint bread(int32 *buffer, exint asize=1)
static void saveData(std::ostream &os, UT_Vector4D v)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
GLsizei const GLfloat * value
UT_StringHolder opVAttribs(const SOP_NodeVerb::CookParms &cookparms) const
void setSkelRootPath(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
fpreal64 opScaleMask(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opSkelRootPath(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
static void saveData(std::ostream &os, UT_Matrix4D v)
void setBlendAttrib(const UT_StringHolder &val)
SkinType getSkinType() const
constexpr SYS_FORCE_INLINE T & z() noexcept
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
bool opDoQAttribs(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
void loadFromOpSubclass(const LoadParms &loadparms) override
bool operator!=(const SOP_ShapeDiffParms &src) const
void copyFrom(const OP_NodeParms *src) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setDiffType(DiffType val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
exint getNestNumParms(TempIndex idx) const override
An output stream object that owns its own string buffer storage.
void setMaskAttrib(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void saveData(std::ostream &os, bool v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
**But if you need a result
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void save(std::ostream &os) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
UT_StringHolder opBoneTransformPath(const SOP_NodeVerb::CookParms &cookparms) const
DiffType opDiffType(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void loadData(UT_IStream &is, int64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
bool operator==(const SOP_ShapeDiffParms &src) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & x() noexcept
static void saveData(std::ostream &os, int64 v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void loadData(UT_IStream &is, UT_StringHolder &v)
UT_StringHolder opQAttribs(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getSkelRootPath() const
const UT_StringHolder & getMaskAttrib() const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void saveData(std::ostream &os, UT_Matrix2D v)
UT_StringHolder opOrientAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
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
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setDoQAttribs(bool val)
const OP_GraphProxy * graph() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void setDoNormal(bool val)
const UT_StringHolder & getOrientAttrib() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void loadData(UT_IStream &is, fpreal64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setVAttribs(const UT_StringHolder &val)
UT_StringHolder opMaskAttrib(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
fpreal64 getScaleMask() const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
bool getDoQAttribs() const
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
static void loadData(UT_IStream &is, UT_Vector2I &v)
const UT_StringHolder & getQAttribs() const
bool opDoVAttribs(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
UT_StringHolder opBlendAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setSkinType(SkinType val)
bool load(UT_IStream &is)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
DEP_MicroNode * depnode() const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
DiffType getDiffType() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
constexpr SYS_FORCE_INLINE T & w() noexcept
virtual UT_StringHolder baseGetSignature() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
fpreal getCookTime() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void loadData(UT_IStream &is, UT_Vector3I &v)
const char * findChar(int c) const
static void saveData(std::ostream &os, UT_StringHolder s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, UT_Vector3D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
bool opDoNormal(const SOP_NodeVerb::CookParms &cookparms) const
SkinType opSkinType(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
void setDoVAttribs(bool val)
bool isParmColorRamp(exint idx) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept