20 using namespace UT::Literal;
32 myLimitIterations =
true;
34 myDetailAttributes =
"detail"_sh;
35 myTransferAttributes =
""_sh;
36 myTransferGroups =
""_sh;
37 myApplyStyleSheets =
false;
38 mySceneStyleSheet =
""_sh;
39 myObjectStyleSheet =
""_sh;
49 if (myGroup != src.myGroup)
return false;
50 if (myLimitIterations != src.myLimitIterations)
return false;
51 if (myIterations != src.myIterations)
return false;
52 if (myDetailAttributes != src.myDetailAttributes)
return false;
53 if (myTransferAttributes != src.myTransferAttributes)
return false;
54 if (myTransferGroups != src.myTransferGroups)
return false;
55 if (myApplyStyleSheets != src.myApplyStyleSheets)
return false;
56 if (mySceneStyleSheet != src.mySceneStyleSheet)
return false;
57 if (myObjectStyleSheet != src.myObjectStyleSheet)
return false;
72 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
73 myLimitIterations =
true;
75 graph->
evalOpParm(myLimitIterations, nodeidx,
"limit_iterations", time, 0);
77 if (
true && ( (getLimitIterations()) ) )
78 graph->
evalOpParm(myIterations, nodeidx,
"iterations", time, 0);
79 myDetailAttributes =
"detail"_sh;
81 graph->
evalOpParm(myDetailAttributes, nodeidx,
"detail_attributes", time, 0);
82 myTransferAttributes =
""_sh;
84 graph->
evalOpParm(myTransferAttributes, nodeidx,
"transfer_attributes", time, 0);
85 myTransferGroups =
""_sh;
87 graph->
evalOpParm(myTransferGroups, nodeidx,
"transfer_groups", time, 0);
88 myApplyStyleSheets =
false;
90 graph->
evalOpParm(myApplyStyleSheets, nodeidx,
"apply_style_sheets", time, 0);
91 mySceneStyleSheet =
""_sh;
92 if (
true && ( (getApplyStyleSheets()) ) )
93 graph->
evalOpParm(mySceneStyleSheet, nodeidx,
"scene_style_sheet", time, 0);
94 myObjectStyleSheet =
""_sh;
95 if (
true && ( (getApplyStyleSheets()) ) )
96 graph->
evalOpParm(myObjectStyleSheet, nodeidx,
"obj_style_sheet", time, 0);
112 template <
typename T>
119 if (idx.
size() != instance.
size()+1)
124 coerceValue(value, myGroup);
127 coerceValue(value, myLimitIterations);
130 coerceValue(value, myIterations);
133 coerceValue(value, myDetailAttributes);
136 coerceValue(value, myTransferAttributes);
139 coerceValue(value, myTransferGroups);
142 coerceValue(value, myApplyStyleSheets);
145 coerceValue(value, mySceneStyleSheet);
148 coerceValue(value, myObjectStyleSheet);
155 { doGetParmValue(idx, instance, value); }
157 { doGetParmValue(idx, instance, value); }
159 { doGetParmValue(idx, instance, value); }
161 { doGetParmValue(idx, instance, value); }
163 { doGetParmValue(idx, instance, value); }
165 { doGetParmValue(idx, instance, value); }
167 { doGetParmValue(idx, instance, value); }
169 { doGetParmValue(idx, instance, value); }
171 { doGetParmValue(idx, instance, value); }
173 { doGetParmValue(idx, instance, value); }
175 { doGetParmValue(idx, instance, value); }
177 template <
typename T>
184 if (idx.
size() != instance.
size()+1)
189 coerceValue(myGroup, value);
192 coerceValue(myLimitIterations, value);
195 coerceValue(myIterations, value);
198 coerceValue(myDetailAttributes, value);
201 coerceValue(myTransferAttributes, value);
204 coerceValue(myTransferGroups, value);
207 coerceValue(myApplyStyleSheets, value);
210 coerceValue(mySceneStyleSheet, value);
213 coerceValue(myObjectStyleSheet, value);
220 { doSetParmValue(idx, instance, value); }
222 { doSetParmValue(idx, instance, value); }
224 { doSetParmValue(idx, instance, value); }
226 { doSetParmValue(idx, instance, value); }
228 { doSetParmValue(idx, instance, value); }
230 { doSetParmValue(idx, instance, value); }
232 { doSetParmValue(idx, instance, value); }
234 { doSetParmValue(idx, instance, value); }
236 { doSetParmValue(idx, instance, value); }
238 { doSetParmValue(idx, instance, value); }
240 { doSetParmValue(idx, instance, value); }
256 if (fieldnum.
size() < 1)
263 return "limit_iterations";
267 return "detail_attributes";
269 return "transfer_attributes";
271 return "transfer_groups";
273 return "apply_style_sheets";
275 return "scene_style_sheet";
277 return "obj_style_sheet";
285 if (fieldnum.
size() < 1)
286 return PARM_UNSUPPORTED;
309 return PARM_UNSUPPORTED;
345 loadData(is, rampdata);
363 int typelen = colon - data.
buffer();
377 {
int64 iv =
v; UTwrite(os, &iv); }
379 { UTwrite<fpreal64>(os, &
v); }
381 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
383 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
384 UTwrite<fpreal64>(os, &v.
z()); }
386 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
387 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
399 if (s) s->save(ostr);
401 saveData(os, result);
408 ostr << s->getDataTypeToken();
413 saveData(os, result);
417 void save(std::ostream &os)
const
421 saveData(os, myGroup);
422 saveData(os, myLimitIterations);
423 saveData(os, myIterations);
424 saveData(os, myDetailAttributes);
425 saveData(os, myTransferAttributes);
426 saveData(os, myTransferGroups);
427 saveData(os, myApplyStyleSheets);
428 saveData(os, mySceneStyleSheet);
429 saveData(os, myObjectStyleSheet);
442 loadData(is, myGroup);
443 loadData(is, myLimitIterations);
444 loadData(is, myIterations);
445 loadData(is, myDetailAttributes);
446 loadData(is, myTransferAttributes);
447 loadData(is, myTransferGroups);
448 loadData(is, myApplyStyleSheets);
449 loadData(is, mySceneStyleSheet);
450 loadData(is, myObjectStyleSheet);
460 if (!thissop)
return getGroup();
462 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
470 if (!thissop)
return getLimitIterations();
472 OP_Utils::evalOpParm(result, thissop,
"limit_iterations", cookparms.
getCookTime(), 0);
480 if (!thissop)
return getIterations();
482 OP_Utils::evalOpParm(result, thissop,
"iterations", cookparms.
getCookTime(), 0);
490 if (!thissop)
return getDetailAttributes();
492 OP_Utils::evalOpParm(result, thissop,
"detail_attributes", cookparms.
getCookTime(), 0);
500 if (!thissop)
return getTransferAttributes();
502 OP_Utils::evalOpParm(result, thissop,
"transfer_attributes", cookparms.
getCookTime(), 0);
510 if (!thissop)
return getTransferGroups();
512 OP_Utils::evalOpParm(result, thissop,
"transfer_groups", cookparms.
getCookTime(), 0);
520 if (!thissop)
return getApplyStyleSheets();
522 OP_Utils::evalOpParm(result, thissop,
"apply_style_sheets", cookparms.
getCookTime(), 0);
530 if (!thissop)
return getSceneStyleSheet();
532 OP_Utils::evalOpParm(result, thissop,
"scene_style_sheet", cookparms.
getCookTime(), 0);
540 if (!thissop)
return getObjectStyleSheet();
542 OP_Utils::evalOpParm(result, thissop,
"obj_style_sheet", cookparms.
getCookTime(), 0);
548 bool myLimitIterations;
553 bool myApplyStyleSheets;
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setObjectStyleSheet(const UT_StringHolder &val)
bool load(UT_IStream &is)
SOP_Node * getNode() const
int64 getIterations() const
void save(std::ostream &os) const
static void saveData(std::ostream &os, UT_Matrix2D v)
const UT_StringHolder & getTransferAttributes() const
void loadFromOpSubclass(const LoadParms &loadparms) override
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void loadData(UT_IStream &is, UT_StringHolder &v)
void copyFrom(const SOP_NodeParms *src) override
exint bread(int32 *buffer, exint asize=1)
~SOP_UnpackParms() override
GT_API const UT_StringHolder time
GLuint const GLfloat * val
static void saveData(std::ostream &os, UT_Vector4D v)
void setTransferGroups(const UT_StringHolder &val)
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
An output stream object that owns its own string buffer storage.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
UT_StringHolder opSceneStyleSheet(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void saveData(std::ostream &os, bool v)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
const char * getNestParmName(TempIndex fieldnum) const override
int64 opIterations(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
UT_StringHolder opObjectStyleSheet(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
const UT_StringHolder & getGroup() const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
ParmType getNestParmType(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, bool &v)
GLint GLenum GLsizei GLint GLsizei const void * data
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
bool operator==(const SOP_UnpackParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool getApplyStyleSheets() const
UT_StringHolder opDetailAttributes(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, fpreal64 v)
void setGroup(const UT_StringHolder &val)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
const UT_StringHolder & getTransferGroups() const
exint getNestNumParms(TempIndex idx) const override
void setApplyStyleSheets(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
const UT_StringHolder & getDetailAttributes() const
bool operator!=(const SOP_UnpackParms &src) const
static void loadData(UT_IStream &is, int64 &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
const UT_StringHolder & getObjectStyleSheet() const
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
bool opApplyStyleSheets(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, int64 v)
UT_StringHolder opTransferAttributes(const SOP_NodeVerb::CookParms &cookparms) const
void setTransferAttributes(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setSceneStyleSheet(const UT_StringHolder &val)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
Utility class for containing a color ramp.
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, fpreal64 &v)
GLdouble GLdouble GLdouble r
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
const UT_StringHolder & getSceneStyleSheet() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setDetailAttributes(const UT_StringHolder &val)
fpreal getCookTime() const
void setLimitIterations(bool val)
const char * findChar(int c) const
static void saveData(std::ostream &os, UT_Vector2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void saveData(std::ostream &os, UT_StringHolder s)
void setIterations(int64 val)
static void saveData(std::ostream &os, UT_Matrix3D v)
UT_StringHolder opTransferGroups(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector3D v)
static void saveData(std::ostream &os, UT_Matrix4D v)
GLsizei const GLfloat * value
bool opLimitIterations(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool getLimitIterations() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override