23 namespace SOP_ShapeDiffEnums
50 myOrientAttrib =
""_UTsh;
51 mySkelRootPath =
""_UTsh;
52 myBoneTransformPath =
""_UTsh;
54 myBlendAttrib =
""_UTsh;
57 myVAttribs =
"P"_UTsh;
60 myMaskAttrib =
""_UTsh;
74 if (myDiffType != src.myDiffType)
return false;
75 if (myOrientAttrib != src.myOrientAttrib)
return false;
76 if (mySkelRootPath != src.mySkelRootPath)
return false;
77 if (myBoneTransformPath != src.myBoneTransformPath)
return false;
78 if (mySkinType != src.mySkinType)
return false;
79 if (myBlendAttrib != src.myBlendAttrib)
return false;
80 if (myDoNormal != src.myDoNormal)
return false;
81 if (myDoVAttribs != src.myDoVAttribs)
return false;
82 if (myVAttribs != src.myVAttribs)
return false;
83 if (myDoQAttribs != src.myDoQAttribs)
return false;
84 if (myQAttribs != src.myQAttribs)
return false;
85 if (myMaskAttrib != src.myMaskAttrib)
return false;
86 if (myScaleMask != src.myScaleMask)
return false;
103 graph->
evalOpParm(myDiffType, nodeidx,
"difftype", time, 0);
104 myOrientAttrib =
""_UTsh;
105 if (
true && ( (
true&&!(((
int64(getDiffType())!=2)))) ) )
106 graph->
evalOpParm(myOrientAttrib, nodeidx,
"orientattrib", time, 0);
107 mySkelRootPath =
""_UTsh;
108 if (
true && ( (
true&&!(((
int64(getDiffType())==1))||((
int64(getDiffType())==2)))) ) )
109 graph->
evalOpParm(mySkelRootPath, nodeidx,
"skelrootpath", time, 0);
110 myBoneTransformPath =
""_UTsh;
111 if (
true && ( (
true&&!(((
int64(getDiffType())==1))||((
int64(getDiffType())==2)))) ) )
112 graph->
evalOpParm(myBoneTransformPath, nodeidx,
"bonetransformpath", time, 0);
114 if (
true && ( (
true&&!(((
int64(getDiffType())==1))||((
int64(getDiffType())==2)))) ) )
115 graph->
evalOpParm(mySkinType, nodeidx,
"skintype", time, 0);
116 myBlendAttrib =
""_UTsh;
117 if (
true && ( (
true&&!(((
int64(getSkinType())!=2))||((
int64(getDiffType())==1))||((
int64(getDiffType())==2)))) ) )
118 graph->
evalOpParm(myBlendAttrib, nodeidx,
"blendattrib", time, 0);
121 graph->
evalOpParm(myDoNormal, nodeidx,
"donormal", time, 0);
124 graph->
evalOpParm(myDoVAttribs, nodeidx,
"dovattribs", time, 0);
125 myVAttribs =
"P"_UTsh;
126 if (
true && ( (
true&&!(((getDoVAttribs()==0)))) ) )
127 graph->
evalOpParm(myVAttribs, nodeidx,
"vattribs", time, 0);
128 myDoQAttribs =
false;
130 graph->
evalOpParm(myDoQAttribs, nodeidx,
"doqattribs", time, 0);
131 myQAttribs =
""_UTsh;
132 if (
true && ( (
true&&!(((getDoQAttribs()==0)))) ) )
133 graph->
evalOpParm(myQAttribs, nodeidx,
"qattribs", time, 0);
134 myMaskAttrib =
""_UTsh;
136 graph->
evalOpParm(myMaskAttrib, nodeidx,
"maskattrib", time, 0);
138 if (
true && ( (
true&&!(((getMaskAttrib()==
"''")))) ) )
139 graph->
evalOpParm(myScaleMask, nodeidx,
"scalemask", time, 0);
155 template <
typename T>
162 if (idx.
size() != instance.
size()+1)
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 { doGetParmValue(idx, instance, value); }
233 { doGetParmValue(idx, instance, value); }
235 { doGetParmValue(idx, instance, value); }
237 { doGetParmValue(idx, instance, value); }
239 { doGetParmValue(idx, instance, value); }
241 template <
typename T>
248 if (idx.
size() != instance.
size()+1)
296 { doSetParmValue(idx, instance, value); }
298 { doSetParmValue(idx, instance, value); }
300 { doSetParmValue(idx, instance, value); }
302 { doSetParmValue(idx, instance, value); }
304 { doSetParmValue(idx, instance, value); }
306 { doSetParmValue(idx, instance, value); }
308 { doSetParmValue(idx, instance, value); }
310 { doSetParmValue(idx, instance, value); }
312 { doSetParmValue(idx, instance, value); }
314 { doSetParmValue(idx, instance, value); }
316 { doSetParmValue(idx, instance, value); }
332 if (fieldnum.
size() < 1)
339 return "orientattrib";
341 return "skelrootpath";
343 return "bonetransformpath";
347 return "blendattrib";
369 if (fieldnum.
size() < 1)
370 return PARM_UNSUPPORTED;
420 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
422 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
424 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
437 loadData(is, rampdata);
455 int typelen = colon - data.
buffer();
469 {
int64 iv =
v; UTwrite(os, &iv); }
471 { UTwrite<fpreal64>(os, &
v); }
473 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
475 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
476 UTwrite<fpreal64>(os, &v.
z()); }
478 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
479 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
491 if (s) s->save(ostr);
493 saveData(os, result);
500 ostr << s->getDataTypeToken();
505 saveData(os, result);
509 void save(std::ostream &os)
const
513 saveData(os, myDiffType);
514 saveData(os, myOrientAttrib);
515 saveData(os, mySkelRootPath);
516 saveData(os, myBoneTransformPath);
517 saveData(os, mySkinType);
518 saveData(os, myBlendAttrib);
519 saveData(os, myDoNormal);
520 saveData(os, myDoVAttribs);
521 saveData(os, myVAttribs);
522 saveData(os, myDoQAttribs);
523 saveData(os, myQAttribs);
524 saveData(os, myMaskAttrib);
525 saveData(os, myScaleMask);
538 loadData(is, myDiffType);
539 loadData(is, myOrientAttrib);
540 loadData(is, mySkelRootPath);
541 loadData(is, myBoneTransformPath);
542 loadData(is, mySkinType);
543 loadData(is, myBlendAttrib);
544 loadData(is, myDoNormal);
545 loadData(is, myDoVAttribs);
546 loadData(is, myVAttribs);
547 loadData(is, myDoQAttribs);
548 loadData(is, myQAttribs);
549 loadData(is, myMaskAttrib);
550 loadData(is, myScaleMask);
560 if (!thissop)
return getDiffType();
562 OP_Utils::evalOpParm(result, thissop,
"difftype", cookparms.
getCookTime(), 0);
570 if (!thissop)
return getOrientAttrib();
572 OP_Utils::evalOpParm(result, thissop,
"orientattrib", cookparms.
getCookTime(), 0);
580 if (!thissop)
return getSkelRootPath();
582 OP_Utils::evalOpParm(result, thissop,
"skelrootpath", cookparms.
getCookTime(), 0);
590 if (!thissop)
return getBoneTransformPath();
592 OP_Utils::evalOpParm(result, thissop,
"bonetransformpath", cookparms.
getCookTime(), 0);
600 if (!thissop)
return getSkinType();
602 OP_Utils::evalOpParm(result, thissop,
"skintype", cookparms.
getCookTime(), 0);
610 if (!thissop)
return getBlendAttrib();
612 OP_Utils::evalOpParm(result, thissop,
"blendattrib", cookparms.
getCookTime(), 0);
620 if (!thissop)
return getDoNormal();
622 OP_Utils::evalOpParm(result, thissop,
"donormal", cookparms.
getCookTime(), 0);
630 if (!thissop)
return getDoVAttribs();
632 OP_Utils::evalOpParm(result, thissop,
"dovattribs", cookparms.
getCookTime(), 0);
640 if (!thissop)
return getVAttribs();
642 OP_Utils::evalOpParm(result, thissop,
"vattribs", cookparms.
getCookTime(), 0);
650 if (!thissop)
return getDoQAttribs();
652 OP_Utils::evalOpParm(result, thissop,
"doqattribs", cookparms.
getCookTime(), 0);
660 if (!thissop)
return getQAttribs();
662 OP_Utils::evalOpParm(result, thissop,
"qattribs", cookparms.
getCookTime(), 0);
670 if (!thissop)
return getMaskAttrib();
672 OP_Utils::evalOpParm(result, thissop,
"maskattrib", cookparms.
getCookTime(), 0);
680 if (!thissop)
return getScaleMask();
682 OP_Utils::evalOpParm(result, thissop,
"scalemask", cookparms.
getCookTime(), 0);
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
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
T clampMaxValue(fpreal maxvalue, const T &src) const
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
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
T clampMinValue(fpreal minvalue, const T &src) const
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
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)
void coerceValue(T &result, const S &src) const
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)
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
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)
void setDoVAttribs(bool val)
bool isParmColorRamp(exint idx) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept