32 myLimitIterations =
true;
34 myDetailAttributes =
"detail"_UTsh;
35 myTransferAttributes =
""_UTsh;
36 myTransferGroups =
""_UTsh;
37 myApplyStyleSheets =
false;
38 mySceneStyleSheet =
""_UTsh;
39 myObjectStyleSheet =
""_UTsh;
40 myApplyTransform =
true;
41 myConvertPolysoup =
false;
54 if (myGroup != src.myGroup)
return false;
55 if (myLimitIterations != src.myLimitIterations)
return false;
56 if (myIterations != src.myIterations)
return false;
57 if (myDetailAttributes != src.myDetailAttributes)
return false;
58 if (myTransferAttributes != src.myTransferAttributes)
return false;
59 if (myTransferGroups != src.myTransferGroups)
return false;
60 if (myApplyStyleSheets != src.myApplyStyleSheets)
return false;
61 if (mySceneStyleSheet != src.mySceneStyleSheet)
return false;
62 if (myObjectStyleSheet != src.myObjectStyleSheet)
return false;
63 if (myApplyTransform != src.myApplyTransform)
return false;
64 if (myConvertPolysoup != src.myConvertPolysoup)
return false;
79 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
80 myLimitIterations =
true;
82 graph->
evalOpParm(myLimitIterations, nodeidx,
"limit_iterations", time, 0);
84 if (
true && ( (getLimitIterations()) ) )
85 graph->
evalOpParm(myIterations, nodeidx,
"iterations", time, 0);
86 myDetailAttributes =
"detail"_UTsh;
88 graph->
evalOpParm(myDetailAttributes, nodeidx,
"detail_attributes", time, 0);
89 myTransferAttributes =
""_UTsh;
91 graph->
evalOpParm(myTransferAttributes, nodeidx,
"transfer_attributes", time, 0);
92 myTransferGroups =
""_UTsh;
94 graph->
evalOpParm(myTransferGroups, nodeidx,
"transfer_groups", time, 0);
95 myApplyStyleSheets =
false;
97 graph->
evalOpParm(myApplyStyleSheets, nodeidx,
"apply_style_sheets", time, 0);
98 mySceneStyleSheet =
""_UTsh;
99 if (
true && ( (getApplyStyleSheets()) ) )
100 graph->
evalOpParm(mySceneStyleSheet, nodeidx,
"scene_style_sheet", time, 0);
101 myObjectStyleSheet =
""_UTsh;
102 if (
true && ( (getApplyStyleSheets()) ) )
103 graph->
evalOpParm(myObjectStyleSheet, nodeidx,
"obj_style_sheet", time, 0);
104 myApplyTransform =
true;
106 graph->
evalOpParm(myApplyTransform, nodeidx,
"dotransform", time, 0);
107 myConvertPolysoup =
false;
109 graph->
evalOpParm(myConvertPolysoup, nodeidx,
"convertpolysoup", time, 0);
125 template <
typename T>
132 if (idx.
size() != instance.
size()+1)
183 { doGetParmValue(idx, instance, value); }
185 { doGetParmValue(idx, instance, value); }
187 { doGetParmValue(idx, instance, value); }
189 { doGetParmValue(idx, instance, value); }
191 { doGetParmValue(idx, instance, value); }
193 { doGetParmValue(idx, instance, value); }
195 { doGetParmValue(idx, instance, value); }
197 { doGetParmValue(idx, instance, value); }
199 { doGetParmValue(idx, instance, value); }
201 { doGetParmValue(idx, instance, value); }
203 { doGetParmValue(idx, instance, value); }
205 template <
typename T>
212 if (idx.
size() != instance.
size()+1)
254 { doSetParmValue(idx, instance, value); }
256 { doSetParmValue(idx, instance, value); }
258 { doSetParmValue(idx, instance, value); }
260 { doSetParmValue(idx, instance, value); }
262 { doSetParmValue(idx, instance, value); }
264 { doSetParmValue(idx, instance, value); }
266 { doSetParmValue(idx, instance, value); }
268 { doSetParmValue(idx, instance, value); }
270 { doSetParmValue(idx, instance, value); }
272 { doSetParmValue(idx, instance, value); }
274 { doSetParmValue(idx, instance, value); }
290 if (fieldnum.
size() < 1)
297 return "limit_iterations";
301 return "detail_attributes";
303 return "transfer_attributes";
305 return "transfer_groups";
307 return "apply_style_sheets";
309 return "scene_style_sheet";
311 return "obj_style_sheet";
313 return "dotransform";
315 return "convertpolysoup";
323 if (fieldnum.
size() < 1)
324 return PARM_UNSUPPORTED;
387 loadData(is, rampdata);
405 int typelen = colon - data.
buffer();
419 {
int64 iv =
v; UTwrite(os, &iv); }
421 { UTwrite<fpreal64>(os, &
v); }
423 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
425 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
426 UTwrite<fpreal64>(os, &v.
z()); }
428 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
429 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
441 if (s) s->save(ostr);
443 saveData(os, result);
450 ostr << s->getDataTypeToken();
455 saveData(os, result);
459 void save(std::ostream &os)
const
463 saveData(os, myGroup);
464 saveData(os, myLimitIterations);
465 saveData(os, myIterations);
466 saveData(os, myDetailAttributes);
467 saveData(os, myTransferAttributes);
468 saveData(os, myTransferGroups);
469 saveData(os, myApplyStyleSheets);
470 saveData(os, mySceneStyleSheet);
471 saveData(os, myObjectStyleSheet);
472 saveData(os, myApplyTransform);
473 saveData(os, myConvertPolysoup);
486 loadData(is, myGroup);
487 loadData(is, myLimitIterations);
488 loadData(is, myIterations);
489 loadData(is, myDetailAttributes);
490 loadData(is, myTransferAttributes);
491 loadData(is, myTransferGroups);
492 loadData(is, myApplyStyleSheets);
493 loadData(is, mySceneStyleSheet);
494 loadData(is, myObjectStyleSheet);
495 loadData(is, myApplyTransform);
496 loadData(is, myConvertPolysoup);
506 if (!thissop)
return getGroup();
508 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
516 if (!thissop)
return getLimitIterations();
518 OP_Utils::evalOpParm(result, thissop,
"limit_iterations", cookparms.
getCookTime(), 0);
526 if (!thissop)
return getIterations();
528 OP_Utils::evalOpParm(result, thissop,
"iterations", cookparms.
getCookTime(), 0);
536 if (!thissop)
return getDetailAttributes();
538 OP_Utils::evalOpParm(result, thissop,
"detail_attributes", cookparms.
getCookTime(), 0);
546 if (!thissop)
return getTransferAttributes();
548 OP_Utils::evalOpParm(result, thissop,
"transfer_attributes", cookparms.
getCookTime(), 0);
556 if (!thissop)
return getTransferGroups();
558 OP_Utils::evalOpParm(result, thissop,
"transfer_groups", cookparms.
getCookTime(), 0);
566 if (!thissop)
return getApplyStyleSheets();
568 OP_Utils::evalOpParm(result, thissop,
"apply_style_sheets", cookparms.
getCookTime(), 0);
576 if (!thissop)
return getSceneStyleSheet();
578 OP_Utils::evalOpParm(result, thissop,
"scene_style_sheet", cookparms.
getCookTime(), 0);
586 if (!thissop)
return getObjectStyleSheet();
588 OP_Utils::evalOpParm(result, thissop,
"obj_style_sheet", cookparms.
getCookTime(), 0);
596 if (!thissop)
return getApplyTransform();
598 OP_Utils::evalOpParm(result, thissop,
"dotransform", cookparms.
getCookTime(), 0);
606 if (!thissop)
return getConvertPolysoup();
608 OP_Utils::evalOpParm(result, thissop,
"convertpolysoup", cookparms.
getCookTime(), 0);
614 bool myLimitIterations;
619 bool myApplyStyleSheets;
622 bool myApplyTransform;
623 bool myConvertPolysoup;
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setApplyTransform(bool val)
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
bool opApplyTransform(const SOP_NodeVerb::CookParms &cookparms) const
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 OP_NodeParms *src) override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
const OP_Context & context() const
static void saveData(std::ostream &os, UT_Vector4D v)
void setTransferGroups(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
bool isParmColorRamp(exint idx) const override
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
bool opConvertPolysoup(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opSceneStyleSheet(const SOP_NodeVerb::CookParms &cookparms) const
**But if you need a result
void setConvertPolysoup(bool val)
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
constexpr SYS_FORCE_INLINE T & x() noexcept
UT_StringHolder opObjectStyleSheet(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
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)
constexpr SYS_FORCE_INLINE T & z() noexcept
static void loadData(UT_IStream &is, UT_Vector3D &v)
ParmType getNestParmType(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, bool &v)
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
const OP_GraphProxy * graph() const
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)
const UT_StringHolder & getDetailAttributes() const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
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
bool opApplyStyleSheets(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, int64 v)
bool getApplyTransform() const
UT_StringHolder opTransferAttributes(const SOP_NodeVerb::CookParms &cookparms) const
void setTransferAttributes(const UT_StringHolder &val)
void coerceValue(T &result, const S &src) const
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
bool getConvertPolysoup() const
DEP_MicroNode * depnode() const
Utility class for containing a color ramp.
static void loadData(UT_IStream &is, UT_Matrix3D &v)
constexpr SYS_FORCE_INLINE T & w() noexcept
static void loadData(UT_IStream &is, fpreal64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
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)
constexpr SYS_FORCE_INLINE T & y() noexcept
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)
bool opLimitIterations(const SOP_NodeVerb::CookParms &cookparms) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool getLimitIterations() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override