20 using namespace UT::Literal;
23 namespace SOP_ShapeDiffEnums
50 myOrientAttrib =
""_sh;
51 mySkelRootPath =
""_sh;
52 myBoneTransformPath =
""_sh;
54 myBlendAttrib =
""_sh;
71 if (myDiffType != src.myDiffType)
return false;
72 if (myOrientAttrib != src.myOrientAttrib)
return false;
73 if (mySkelRootPath != src.mySkelRootPath)
return false;
74 if (myBoneTransformPath != src.myBoneTransformPath)
return false;
75 if (mySkinType != src.mySkinType)
return false;
76 if (myBlendAttrib != src.myBlendAttrib)
return false;
77 if (myDoNormal != src.myDoNormal)
return false;
78 if (myDoVAttribs != src.myDoVAttribs)
return false;
79 if (myVAttribs != src.myVAttribs)
return false;
80 if (myDoQAttribs != src.myDoQAttribs)
return false;
81 if (myQAttribs != src.myQAttribs)
return false;
82 if (myMaskAttrib != src.myMaskAttrib)
return false;
83 if (myScaleMask != src.myScaleMask)
return false;
100 graph->
evalOpParm(myDiffType, nodeidx,
"difftype", time, 0);
101 myOrientAttrib =
""_sh;
102 if (
true && ( (!(((
int64(getDiffType())!=2)))) ) )
103 graph->
evalOpParm(myOrientAttrib, nodeidx,
"orientattrib", time, 0);
104 mySkelRootPath =
""_sh;
105 if (
true && ( (!(((
int64(getDiffType())==1))||((
int64(getDiffType())==2)))) ) )
106 graph->
evalOpParm(mySkelRootPath, nodeidx,
"skelrootpath", time, 0);
107 myBoneTransformPath =
""_sh;
108 if (
true && ( (!(((
int64(getDiffType())==1))||((
int64(getDiffType())==2)))) ) )
109 graph->
evalOpParm(myBoneTransformPath, nodeidx,
"bonetransformpath", time, 0);
111 if (
true && ( (!(((
int64(getDiffType())==1))||((
int64(getDiffType())==2)))) ) )
112 graph->
evalOpParm(mySkinType, nodeidx,
"skintype", time, 0);
113 myBlendAttrib =
""_sh;
114 if (
true && ( (!(((
int64(getSkinType())!=2))||((
int64(getDiffType())==1))||((
int64(getDiffType())==2)))) ) )
115 graph->
evalOpParm(myBlendAttrib, nodeidx,
"blendattrib", time, 0);
118 graph->
evalOpParm(myDoNormal, nodeidx,
"donormal", time, 0);
121 graph->
evalOpParm(myDoVAttribs, nodeidx,
"dovattribs", time, 0);
123 if (
true && ( (!(((getDoVAttribs()==0)))) ) )
124 graph->
evalOpParm(myVAttribs, nodeidx,
"vattribs", time, 0);
125 myDoQAttribs =
false;
127 graph->
evalOpParm(myDoQAttribs, nodeidx,
"doqattribs", time, 0);
129 if (
true && ( (!(((getDoQAttribs()==0)))) ) )
130 graph->
evalOpParm(myQAttribs, nodeidx,
"qattribs", time, 0);
131 myMaskAttrib =
""_sh;
133 graph->
evalOpParm(myMaskAttrib, nodeidx,
"maskattrib", time, 0);
135 if (
true && ( (!(((getMaskAttrib()==
"''")))) ) )
136 graph->
evalOpParm(myScaleMask, nodeidx,
"scalemask", time, 0);
152 template <
typename T>
159 if (idx.
size() != instance.
size()+1)
164 coerceValue(value, myDiffType);
167 coerceValue(value, myOrientAttrib);
170 coerceValue(value, mySkelRootPath);
173 coerceValue(value, myBoneTransformPath);
176 coerceValue(value, mySkinType);
179 coerceValue(value, myBlendAttrib);
182 coerceValue(value, myDoNormal);
185 coerceValue(value, myDoVAttribs);
188 coerceValue(value, myVAttribs);
191 coerceValue(value, myDoQAttribs);
194 coerceValue(value, myQAttribs);
197 coerceValue(value, myMaskAttrib);
200 coerceValue(value, myScaleMask);
207 { doGetParmValue(idx, instance, value); }
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 template <
typename T>
236 if (idx.
size() != instance.
size()+1)
241 coerceValue(myDiffType, value);
244 coerceValue(myOrientAttrib, value);
247 coerceValue(mySkelRootPath, value);
250 coerceValue(myBoneTransformPath, value);
253 coerceValue(mySkinType, value);
256 coerceValue(myBlendAttrib, value);
259 coerceValue(myDoNormal, value);
262 coerceValue(myDoVAttribs, value);
265 coerceValue(myVAttribs, value);
268 coerceValue(myDoQAttribs, value);
271 coerceValue(myQAttribs, value);
274 coerceValue(myMaskAttrib, value);
277 coerceValue(myScaleMask, 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); }
302 { doSetParmValue(idx, instance, value); }
304 { doSetParmValue(idx, instance, value); }
320 if (fieldnum.
size() < 1)
327 return "orientattrib";
329 return "skelrootpath";
331 return "bonetransformpath";
335 return "blendattrib";
357 if (fieldnum.
size() < 1)
358 return PARM_UNSUPPORTED;
389 return PARM_UNSUPPORTED;
425 loadData(is, rampdata);
443 int typelen = colon - data.
buffer();
457 {
int64 iv =
v; UTwrite(os, &iv); }
459 { UTwrite<fpreal64>(os, &
v); }
461 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
463 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
464 UTwrite<fpreal64>(os, &v.
z()); }
466 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
467 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
479 if (s) s->save(ostr);
481 saveData(os, result);
488 ostr << s->getDataTypeToken();
493 saveData(os, result);
497 void save(std::ostream &os)
const
501 saveData(os, myDiffType);
502 saveData(os, myOrientAttrib);
503 saveData(os, mySkelRootPath);
504 saveData(os, myBoneTransformPath);
505 saveData(os, mySkinType);
506 saveData(os, myBlendAttrib);
507 saveData(os, myDoNormal);
508 saveData(os, myDoVAttribs);
509 saveData(os, myVAttribs);
510 saveData(os, myDoQAttribs);
511 saveData(os, myQAttribs);
512 saveData(os, myMaskAttrib);
513 saveData(os, myScaleMask);
526 loadData(is, myDiffType);
527 loadData(is, myOrientAttrib);
528 loadData(is, mySkelRootPath);
529 loadData(is, myBoneTransformPath);
530 loadData(is, mySkinType);
531 loadData(is, myBlendAttrib);
532 loadData(is, myDoNormal);
533 loadData(is, myDoVAttribs);
534 loadData(is, myVAttribs);
535 loadData(is, myDoQAttribs);
536 loadData(is, myQAttribs);
537 loadData(is, myMaskAttrib);
538 loadData(is, myScaleMask);
548 if (!thissop)
return getDiffType();
550 OP_Utils::evalOpParm(result, thissop,
"difftype", cookparms.
getCookTime(), 0);
558 if (!thissop)
return getOrientAttrib();
560 OP_Utils::evalOpParm(result, thissop,
"orientattrib", cookparms.
getCookTime(), 0);
568 if (!thissop)
return getSkelRootPath();
570 OP_Utils::evalOpParm(result, thissop,
"skelrootpath", cookparms.
getCookTime(), 0);
578 if (!thissop)
return getBoneTransformPath();
580 OP_Utils::evalOpParm(result, thissop,
"bonetransformpath", cookparms.
getCookTime(), 0);
588 if (!thissop)
return getSkinType();
590 OP_Utils::evalOpParm(result, thissop,
"skintype", cookparms.
getCookTime(), 0);
598 if (!thissop)
return getBlendAttrib();
600 OP_Utils::evalOpParm(result, thissop,
"blendattrib", cookparms.
getCookTime(), 0);
608 if (!thissop)
return getDoNormal();
610 OP_Utils::evalOpParm(result, thissop,
"donormal", cookparms.
getCookTime(), 0);
618 if (!thissop)
return getDoVAttribs();
620 OP_Utils::evalOpParm(result, thissop,
"dovattribs", cookparms.
getCookTime(), 0);
628 if (!thissop)
return getVAttribs();
630 OP_Utils::evalOpParm(result, thissop,
"vattribs", cookparms.
getCookTime(), 0);
638 if (!thissop)
return getDoQAttribs();
640 OP_Utils::evalOpParm(result, thissop,
"doqattribs", cookparms.
getCookTime(), 0);
648 if (!thissop)
return getQAttribs();
650 OP_Utils::evalOpParm(result, thissop,
"qattribs", cookparms.
getCookTime(), 0);
658 if (!thissop)
return getMaskAttrib();
660 OP_Utils::evalOpParm(result, thissop,
"maskattrib", cookparms.
getCookTime(), 0);
668 if (!thissop)
return getScaleMask();
670 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
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
GLuint const GLfloat * val
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
static void saveData(std::ostream &os, UT_Matrix4D v)
void setBlendAttrib(const UT_StringHolder &val)
SkinType getSkinType() const
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
const SOP_GraphProxy * graph() const
bool operator!=(const SOP_ShapeDiffParms &src) const
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
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
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
void copyFrom(const SOP_NodeParms *src) override
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.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
GLint GLenum GLsizei GLint GLsizei const void * data
void setDoQAttribs(bool val)
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
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
DEP_MicroNode * depnode() const
static void loadData(UT_IStream &is, UT_Vector2I &v)
~SOP_ShapeDiffParms() override
const UT_StringHolder & getQAttribs() const
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
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)
Utility class for containing a color ramp.
DiffType getDiffType() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
GLdouble GLdouble GLdouble r
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
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)
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)
GLsizei const GLfloat * value
static void saveData(std::ostream &os, UT_Matrix3D v)
const OP_Context & context() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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)