31 myViewportLOD =
"full"_UTsh;
35 myNameAttrib =
"name"_UTsh;
36 myPackedFragments =
true;
38 myTransferAttributes =
""_UTsh;
39 myTransferGroups =
""_UTsh;
52 if (myViewportLOD != src.myViewportLOD)
return false;
53 if (myCreatePath != src.myCreatePath)
return false;
54 if (myPath != src.myPath)
return false;
55 if (myPackByName != src.myPackByName)
return false;
56 if (myNameAttrib != src.myNameAttrib)
return false;
57 if (myPackedFragments != src.myPackedFragments)
return false;
58 if (myPivot != src.myPivot)
return false;
59 if (myTransferAttributes != src.myTransferAttributes)
return false;
60 if (myTransferGroups != src.myTransferGroups)
return false;
73 myViewportLOD =
"full"_UTsh;
75 graph->
evalOpParm(myViewportLOD, nodeidx,
"viewportlod", time, 0);
78 graph->
evalOpParm(myCreatePath, nodeidx,
"createpath", time, 0);
80 if (
true && ( (getCreatePath()) ) )
81 graph->
evalOpParm(myPath, nodeidx,
"path", time, 0);
84 graph->
evalOpParm(myPackByName, nodeidx,
"packbyname", time, 0);
85 myNameAttrib =
"name"_UTsh;
86 if (
true && ( (getPackByName()) ) )
87 graph->
evalOpParm(myNameAttrib, nodeidx,
"nameattribute", time, 0);
88 myPackedFragments =
true;
90 graph->
evalOpParm(myPackedFragments, nodeidx,
"packedfragments", time, 0);
93 graph->
evalOpParm(myPivot, nodeidx,
"pivot", time, 0);
94 myTransferAttributes =
""_UTsh;
96 graph->
evalOpParm(myTransferAttributes, nodeidx,
"transfer_attributes", time, 0);
97 myTransferGroups =
""_UTsh;
99 graph->
evalOpParm(myTransferGroups, nodeidx,
"transfer_groups", time, 0);
115 template <
typename T>
122 if (idx.
size() != instance.
size()+1)
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 { doGetParmValue(idx, instance, value); }
179 { doGetParmValue(idx, instance, value); }
181 { doGetParmValue(idx, instance, value); }
183 { doGetParmValue(idx, instance, value); }
185 { doGetParmValue(idx, instance, value); }
187 { doGetParmValue(idx, instance, value); }
189 template <
typename T>
196 if (idx.
size() != instance.
size()+1)
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); }
242 { doSetParmValue(idx, instance, value); }
244 { doSetParmValue(idx, instance, value); }
246 { doSetParmValue(idx, instance, value); }
248 { doSetParmValue(idx, instance, value); }
250 { doSetParmValue(idx, instance, value); }
252 { doSetParmValue(idx, instance, value); }
268 if (fieldnum.
size() < 1)
273 return "viewportlod";
281 return "nameattribute";
283 return "packedfragments";
287 return "transfer_attributes";
289 return "transfer_groups";
297 if (fieldnum.
size() < 1)
298 return PARM_UNSUPPORTED;
357 loadData(is, rampdata);
375 int typelen = colon - data.
buffer();
389 {
int64 iv =
v; UTwrite(os, &iv); }
391 { UTwrite<fpreal64>(os, &
v); }
393 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
395 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
396 UTwrite<fpreal64>(os, &v.
z()); }
398 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
399 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
411 if (s) s->save(ostr);
413 saveData(os, result);
420 ostr << s->getDataTypeToken();
425 saveData(os, result);
429 void save(std::ostream &os)
const
433 saveData(os, myViewportLOD);
434 saveData(os, myCreatePath);
435 saveData(os, myPath);
436 saveData(os, myPackByName);
437 saveData(os, myNameAttrib);
438 saveData(os, myPackedFragments);
439 saveData(os, myPivot);
440 saveData(os, myTransferAttributes);
441 saveData(os, myTransferGroups);
454 loadData(is, myViewportLOD);
455 loadData(is, myCreatePath);
456 loadData(is, myPath);
457 loadData(is, myPackByName);
458 loadData(is, myNameAttrib);
459 loadData(is, myPackedFragments);
460 loadData(is, myPivot);
461 loadData(is, myTransferAttributes);
462 loadData(is, myTransferGroups);
472 if (!thissop)
return getViewportLOD();
474 OP_Utils::evalOpParm(result, thissop,
"viewportlod", cookparms.
getCookTime(), 0);
482 if (!thissop)
return getCreatePath();
484 OP_Utils::evalOpParm(result, thissop,
"createpath", cookparms.
getCookTime(), 0);
492 if (!thissop)
return getPath();
494 OP_Utils::evalOpParm(result, thissop,
"path", cookparms.
getCookTime(), 0);
502 if (!thissop)
return getPackByName();
504 OP_Utils::evalOpParm(result, thissop,
"packbyname", cookparms.
getCookTime(), 0);
512 if (!thissop)
return getNameAttrib();
514 OP_Utils::evalOpParm(result, thissop,
"nameattribute", cookparms.
getCookTime(), 0);
522 if (!thissop)
return getPackedFragments();
524 OP_Utils::evalOpParm(result, thissop,
"packedfragments", cookparms.
getCookTime(), 0);
532 if (!thissop)
return getPivot();
534 OP_Utils::evalOpParm(result, thissop,
"pivot", cookparms.
getCookTime(), 0);
542 if (!thissop)
return getTransferAttributes();
544 OP_Utils::evalOpParm(result, thissop,
"transfer_attributes", cookparms.
getCookTime(), 0);
552 if (!thissop)
return getTransferGroups();
554 OP_Utils::evalOpParm(result, thissop,
"transfer_groups", cookparms.
getCookTime(), 0);
564 bool myPackedFragments;
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
const UT_StringHolder & getPath() const
void copyFrom(const OP_NodeParms *src) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
bool opPackedFragments(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void saveData(std::ostream &os, UT_Matrix4D v)
SOP_Node * getNode() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool operator!=(const SOP_PackParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setNameAttrib(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
UT_StringHolder opNameAttrib(const SOP_NodeVerb::CookParms &cookparms) const
exint bread(int32 *buffer, exint asize=1)
void save(std::ostream &os) const
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void setPackByName(bool val)
static void saveData(std::ostream &os, UT_Vector3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
const OP_Context & context() const
void setCreatePath(bool val)
constexpr SYS_FORCE_INLINE T & z() noexcept
static void loadData(UT_IStream &is, UT_Matrix4D &v)
SYS_FORCE_INLINE const char * buffer() const
UT_StringHolder opViewportLOD(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opTransferGroups(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
**But if you need a result
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void saveData(std::ostream &os, fpreal64 v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
constexpr SYS_FORCE_INLINE T & x() noexcept
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
bool isParmColorRamp(exint idx) const override
static void saveData(std::ostream &os, UT_Vector4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &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
bool operator==(const SOP_PackParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void saveData(std::ostream &os, int64 v)
const OP_GraphProxy * graph() const
static void loadData(UT_IStream &is, bool &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void loadData(UT_IStream &is, UT_StringHolder &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setViewportLOD(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setTransferAttributes(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector4D &v)
exint getNestNumParms(TempIndex idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
bool load(UT_IStream &is)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void saveData(std::ostream &os, UT_Matrix3D v)
UT_StringHolder opTransferAttributes(const SOP_NodeVerb::CookParms &cookparms) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setPath(const UT_StringHolder &val)
void saveBinary(std::ostream &os) const
Save string to binary stream.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
GT_API const UT_StringHolder version
const char * getNestParmName(TempIndex fieldnum) const override
const UT_StringHolder & getViewportLOD() const
bool opCreatePath(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getNameAttrib() const
bool getPackByName() const
static void saveData(std::ostream &os, UT_Matrix2D v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
void coerceValue(T &result, const S &src) const
int64 opPivot(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getTransferGroups() const
DEP_MicroNode * depnode() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
Utility class for containing a color ramp.
static void saveData(std::ostream &os, UT_Vector2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
constexpr SYS_FORCE_INLINE T & w() noexcept
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setTransferGroups(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_StringHolder s)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void setPackedFragments(bool val)
fpreal getCookTime() const
const char * findChar(int c) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, UT_Vector4I &v)
bool getCreatePath() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void loadFromOpSubclass(const LoadParms &loadparms) override
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void loadData(UT_IStream &is, int64 &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
bool opPackByName(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
ParmType getNestParmType(TempIndex fieldnum) const override
UT_StringHolder opPath(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
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)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
bool getPackedFragments() const
const UT_StringHolder & getTransferAttributes() const