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;
83 myLimitIterations =
true;
85 graph->
evalOpParm(myLimitIterations, nodeidx,
"limit_iterations", time, graph->
isDirect()?
nullptr:depnode);
87 if (
true && ( (getLimitIterations()) ) )
88 graph->
evalOpParm(myIterations, nodeidx,
"iterations", time, graph->
isDirect()?
nullptr:depnode);
89 myDetailAttributes =
"detail"_UTsh;
91 graph->
evalOpParm(myDetailAttributes, nodeidx,
"detail_attributes", time, graph->
isDirect()?
nullptr:depnode);
92 myTransferAttributes =
""_UTsh;
94 graph->
evalOpParm(myTransferAttributes, nodeidx,
"transfer_attributes", time, graph->
isDirect()?
nullptr:depnode);
95 myTransferGroups =
""_UTsh;
97 graph->
evalOpParm(myTransferGroups, nodeidx,
"transfer_groups", time, graph->
isDirect()?
nullptr:depnode);
98 myApplyStyleSheets =
false;
100 graph->
evalOpParm(myApplyStyleSheets, nodeidx,
"apply_style_sheets", time, graph->
isDirect()?
nullptr:depnode);
101 mySceneStyleSheet =
""_UTsh;
102 if (
true && ( (getApplyStyleSheets()) ) )
103 graph->
evalOpParm(mySceneStyleSheet, nodeidx,
"scene_style_sheet", time, graph->
isDirect()?
nullptr:depnode);
104 myObjectStyleSheet =
""_UTsh;
105 if (
true && ( (getApplyStyleSheets()) ) )
106 graph->
evalOpParm(myObjectStyleSheet, nodeidx,
"obj_style_sheet", time, graph->
isDirect()?
nullptr:depnode);
107 myApplyTransform =
true;
109 graph->
evalOpParm(myApplyTransform, nodeidx,
"dotransform", time, graph->
isDirect()?
nullptr:depnode);
110 myConvertPolysoup =
false;
112 graph->
evalOpParm(myConvertPolysoup, nodeidx,
"convertpolysoup", time, graph->
isDirect()?
nullptr:depnode);
128 template <
typename T>
135 if (idx.
size() != instance.
size()+1)
186 { doGetParmValue(idx, instance, value); }
188 { doGetParmValue(idx, instance, value); }
190 { doGetParmValue(idx, instance, value); }
192 { doGetParmValue(idx, instance, value); }
194 { doGetParmValue(idx, instance, value); }
196 { doGetParmValue(idx, instance, value); }
198 { doGetParmValue(idx, instance, value); }
200 { doGetParmValue(idx, instance, value); }
202 { doGetParmValue(idx, instance, value); }
204 { doGetParmValue(idx, instance, value); }
206 { doGetParmValue(idx, instance, value); }
208 template <
typename T>
215 if (idx.
size() != instance.
size()+1)
257 { doSetParmValue(idx, instance, value); }
259 { doSetParmValue(idx, instance, value); }
261 { doSetParmValue(idx, instance, value); }
263 { doSetParmValue(idx, instance, value); }
265 { doSetParmValue(idx, instance, value); }
267 { doSetParmValue(idx, instance, value); }
269 { doSetParmValue(idx, instance, value); }
271 { doSetParmValue(idx, instance, value); }
273 { doSetParmValue(idx, instance, value); }
275 { doSetParmValue(idx, instance, value); }
277 { doSetParmValue(idx, instance, value); }
293 if (fieldnum.
size() < 1)
300 return "limit_iterations";
304 return "detail_attributes";
306 return "transfer_attributes";
308 return "transfer_groups";
310 return "apply_style_sheets";
312 return "scene_style_sheet";
314 return "obj_style_sheet";
316 return "dotransform";
318 return "convertpolysoup";
326 if (fieldnum.
size() < 1)
327 return PARM_UNSUPPORTED;
390 loadData(is, rampdata);
408 int typelen = colon - data.
buffer();
422 {
int64 iv =
v; UTwrite(os, &iv); }
424 { UTwrite<fpreal64>(os, &
v); }
426 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
428 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
429 UTwrite<fpreal64>(os, &v.
z()); }
431 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
432 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
444 if (s) s->save(ostr);
446 saveData(os, result);
453 ostr << s->getDataTypeToken();
458 saveData(os, result);
462 void save(std::ostream &os)
const
466 saveData(os, myGroup);
467 saveData(os, myLimitIterations);
468 saveData(os, myIterations);
469 saveData(os, myDetailAttributes);
470 saveData(os, myTransferAttributes);
471 saveData(os, myTransferGroups);
472 saveData(os, myApplyStyleSheets);
473 saveData(os, mySceneStyleSheet);
474 saveData(os, myObjectStyleSheet);
475 saveData(os, myApplyTransform);
476 saveData(os, myConvertPolysoup);
489 loadData(is, myGroup);
490 loadData(is, myLimitIterations);
491 loadData(is, myIterations);
492 loadData(is, myDetailAttributes);
493 loadData(is, myTransferAttributes);
494 loadData(is, myTransferGroups);
495 loadData(is, myApplyStyleSheets);
496 loadData(is, mySceneStyleSheet);
497 loadData(is, myObjectStyleSheet);
498 loadData(is, myApplyTransform);
499 loadData(is, myConvertPolysoup);
509 if (!thissop)
return getGroup();
511 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
519 if (!thissop)
return getLimitIterations();
521 OP_Utils::evalOpParm(result, thissop,
"limit_iterations", cookparms.
getCookTime(), 0);
529 if (!thissop)
return getIterations();
531 OP_Utils::evalOpParm(result, thissop,
"iterations", cookparms.
getCookTime(), 0);
539 if (!thissop)
return getDetailAttributes();
541 OP_Utils::evalOpParm(result, thissop,
"detail_attributes", cookparms.
getCookTime(), 0);
549 if (!thissop)
return getTransferAttributes();
551 OP_Utils::evalOpParm(result, thissop,
"transfer_attributes", cookparms.
getCookTime(), 0);
559 if (!thissop)
return getTransferGroups();
561 OP_Utils::evalOpParm(result, thissop,
"transfer_groups", cookparms.
getCookTime(), 0);
569 if (!thissop)
return getApplyStyleSheets();
571 OP_Utils::evalOpParm(result, thissop,
"apply_style_sheets", cookparms.
getCookTime(), 0);
579 if (!thissop)
return getSceneStyleSheet();
581 OP_Utils::evalOpParm(result, thissop,
"scene_style_sheet", cookparms.
getCookTime(), 0);
589 if (!thissop)
return getObjectStyleSheet();
591 OP_Utils::evalOpParm(result, thissop,
"obj_style_sheet", cookparms.
getCookTime(), 0);
599 if (!thissop)
return getApplyTransform();
601 OP_Utils::evalOpParm(result, thissop,
"dotransform", cookparms.
getCookTime(), 0);
609 if (!thissop)
return getConvertPolysoup();
611 OP_Utils::evalOpParm(result, thissop,
"convertpolysoup", cookparms.
getCookTime(), 0);
617 bool myLimitIterations;
622 bool myApplyStyleSheets;
625 bool myApplyTransform;
626 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
GLsizei const GLfloat * value
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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
virtual UT_StringHolder baseGetSignature() const
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)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
static void saveData(std::ostream &os, UT_Matrix4D v)
bool opLimitIterations(const SOP_NodeVerb::CookParms &cookparms) const
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