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;
76 myViewportLOD =
"full"_UTsh;
78 graph->
evalOpParm(myViewportLOD, nodeidx,
"viewportlod", time, graph->
isDirect()?
nullptr:depnode);
81 graph->
evalOpParm(myCreatePath, nodeidx,
"createpath", time, graph->
isDirect()?
nullptr:depnode);
83 if (
true && ( (getCreatePath()) ) )
87 graph->
evalOpParm(myPackByName, nodeidx,
"packbyname", time, graph->
isDirect()?
nullptr:depnode);
88 myNameAttrib =
"name"_UTsh;
89 if (
true && ( (getPackByName()) ) )
90 graph->
evalOpParm(myNameAttrib, nodeidx,
"nameattribute", time, graph->
isDirect()?
nullptr:depnode);
91 myPackedFragments =
true;
93 graph->
evalOpParm(myPackedFragments, nodeidx,
"packedfragments", time, graph->
isDirect()?
nullptr:depnode);
97 myTransferAttributes =
""_UTsh;
99 graph->
evalOpParm(myTransferAttributes, nodeidx,
"transfer_attributes", time, graph->
isDirect()?
nullptr:depnode);
100 myTransferGroups =
""_UTsh;
102 graph->
evalOpParm(myTransferGroups, nodeidx,
"transfer_groups", time, graph->
isDirect()?
nullptr:depnode);
118 template <
typename T>
125 if (idx.
size() != instance.
size()+1)
170 { doGetParmValue(idx, instance, value); }
172 { doGetParmValue(idx, instance, value); }
174 { doGetParmValue(idx, instance, value); }
176 { doGetParmValue(idx, instance, value); }
178 { doGetParmValue(idx, instance, value); }
180 { doGetParmValue(idx, instance, value); }
182 { doGetParmValue(idx, instance, value); }
184 { doGetParmValue(idx, instance, value); }
186 { doGetParmValue(idx, instance, value); }
188 { doGetParmValue(idx, instance, value); }
190 { doGetParmValue(idx, instance, value); }
192 template <
typename T>
199 if (idx.
size() != instance.
size()+1)
235 { doSetParmValue(idx, instance, value); }
237 { doSetParmValue(idx, instance, value); }
239 { doSetParmValue(idx, instance, value); }
241 { doSetParmValue(idx, instance, value); }
243 { doSetParmValue(idx, instance, value); }
245 { doSetParmValue(idx, instance, value); }
247 { doSetParmValue(idx, instance, value); }
249 { doSetParmValue(idx, instance, value); }
251 { doSetParmValue(idx, instance, value); }
253 { doSetParmValue(idx, instance, value); }
255 { doSetParmValue(idx, instance, value); }
271 if (fieldnum.
size() < 1)
276 return "viewportlod";
284 return "nameattribute";
286 return "packedfragments";
290 return "transfer_attributes";
292 return "transfer_groups";
300 if (fieldnum.
size() < 1)
301 return PARM_UNSUPPORTED;
360 loadData(is, rampdata);
378 int typelen = colon - data.
buffer();
392 {
int64 iv =
v; UTwrite(os, &iv); }
394 { UTwrite<fpreal64>(os, &
v); }
396 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
398 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
399 UTwrite<fpreal64>(os, &v.
z()); }
401 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
402 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
414 if (s) s->save(ostr);
416 saveData(os, result);
423 ostr << s->getDataTypeToken();
428 saveData(os, result);
432 void save(std::ostream &os)
const
436 saveData(os, myViewportLOD);
437 saveData(os, myCreatePath);
438 saveData(os, myPath);
439 saveData(os, myPackByName);
440 saveData(os, myNameAttrib);
441 saveData(os, myPackedFragments);
442 saveData(os, myPivot);
443 saveData(os, myTransferAttributes);
444 saveData(os, myTransferGroups);
457 loadData(is, myViewportLOD);
458 loadData(is, myCreatePath);
459 loadData(is, myPath);
460 loadData(is, myPackByName);
461 loadData(is, myNameAttrib);
462 loadData(is, myPackedFragments);
463 loadData(is, myPivot);
464 loadData(is, myTransferAttributes);
465 loadData(is, myTransferGroups);
475 if (!thissop)
return getViewportLOD();
477 OP_Utils::evalOpParm(result, thissop,
"viewportlod", cookparms.
getCookTime(), 0);
485 if (!thissop)
return getCreatePath();
487 OP_Utils::evalOpParm(result, thissop,
"createpath", cookparms.
getCookTime(), 0);
495 if (!thissop)
return getPath();
497 OP_Utils::evalOpParm(result, thissop,
"path", cookparms.
getCookTime(), 0);
505 if (!thissop)
return getPackByName();
507 OP_Utils::evalOpParm(result, thissop,
"packbyname", cookparms.
getCookTime(), 0);
515 if (!thissop)
return getNameAttrib();
517 OP_Utils::evalOpParm(result, thissop,
"nameattribute", cookparms.
getCookTime(), 0);
525 if (!thissop)
return getPackedFragments();
527 OP_Utils::evalOpParm(result, thissop,
"packedfragments", cookparms.
getCookTime(), 0);
535 if (!thissop)
return getPivot();
537 OP_Utils::evalOpParm(result, thissop,
"pivot", cookparms.
getCookTime(), 0);
545 if (!thissop)
return getTransferAttributes();
547 OP_Utils::evalOpParm(result, thissop,
"transfer_attributes", cookparms.
getCookTime(), 0);
555 if (!thissop)
return getTransferGroups();
557 OP_Utils::evalOpParm(result, thissop,
"transfer_groups", cookparms.
getCookTime(), 0);
567 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
GLsizei const GLfloat * value
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
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_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)
virtual UT_StringHolder baseGetSignature() const
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)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
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
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