39 myPrimIDAttr =
""_UTsh;
52 if (myBlend != src.myBlend)
return false;
53 if (myDoPos != src.myDoPos)
return false;
54 if (myDoClr != src.myDoClr)
return false;
55 if (myDoNml != src.myDoNml)
return false;
56 if (myDoUVW != src.myDoUVW)
return false;
57 if (myDoVoxel != src.myDoVoxel)
return false;
58 if (myDoSlerp != src.myDoSlerp)
return false;
59 if (myPtIDAttr != src.myPtIDAttr)
return false;
60 if (myPrimIDAttr != src.myPrimIDAttr)
return false;
75 graph->
evalOpParm(myBlend, nodeidx,
"blend", time, 0);
78 graph->
evalOpParm(myDoPos, nodeidx,
"dopos", time, 0);
81 graph->
evalOpParm(myDoClr, nodeidx,
"doclr", time, 0);
84 graph->
evalOpParm(myDoNml, nodeidx,
"donml", time, 0);
87 graph->
evalOpParm(myDoUVW, nodeidx,
"douvw", time, 0);
90 graph->
evalOpParm(myDoVoxel, nodeidx,
"dovoxel", time, 0);
93 graph->
evalOpParm(myDoSlerp, nodeidx,
"doslerp", time, 0);
96 graph->
evalOpParm(myPtIDAttr, nodeidx,
"ptidattr", time, 0);
97 myPrimIDAttr =
""_UTsh;
99 graph->
evalOpParm(myPrimIDAttr, nodeidx,
"primidattr", 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)
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, myBlend);
434 saveData(os, myDoPos);
435 saveData(os, myDoClr);
436 saveData(os, myDoNml);
437 saveData(os, myDoUVW);
438 saveData(os, myDoVoxel);
439 saveData(os, myDoSlerp);
440 saveData(os, myPtIDAttr);
441 saveData(os, myPrimIDAttr);
454 loadData(is, myBlend);
455 loadData(is, myDoPos);
456 loadData(is, myDoClr);
457 loadData(is, myDoNml);
458 loadData(is, myDoUVW);
459 loadData(is, myDoVoxel);
460 loadData(is, myDoSlerp);
461 loadData(is, myPtIDAttr);
462 loadData(is, myPrimIDAttr);
472 if (!thissop)
return getBlend();
474 OP_Utils::evalOpParm(result, thissop,
"blend", cookparms.
getCookTime(), 0);
482 if (!thissop)
return getDoPos();
484 OP_Utils::evalOpParm(result, thissop,
"dopos", cookparms.
getCookTime(), 0);
492 if (!thissop)
return getDoClr();
494 OP_Utils::evalOpParm(result, thissop,
"doclr", cookparms.
getCookTime(), 0);
502 if (!thissop)
return getDoNml();
504 OP_Utils::evalOpParm(result, thissop,
"donml", cookparms.
getCookTime(), 0);
512 if (!thissop)
return getDoUVW();
514 OP_Utils::evalOpParm(result, thissop,
"douvw", cookparms.
getCookTime(), 0);
522 if (!thissop)
return getDoVoxel();
524 OP_Utils::evalOpParm(result, thissop,
"dovoxel", cookparms.
getCookTime(), 0);
532 if (!thissop)
return getDoSlerp();
534 OP_Utils::evalOpParm(result, thissop,
"doslerp", cookparms.
getCookTime(), 0);
542 if (!thissop)
return getPtIDAttr();
544 OP_Utils::evalOpParm(result, thissop,
"ptidattr", cookparms.
getCookTime(), 0);
552 if (!thissop)
return getPrimIDAttr();
554 OP_Utils::evalOpParm(result, thissop,
"primidattr", cookparms.
getCookTime(), 0);
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void saveData(std::ostream &os, int64 v)
static void saveData(std::ostream &os, UT_Vector4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void saveData(std::ostream &os, UT_Matrix2D v)
void loadFromOpSubclass(const LoadParms &loadparms) override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
SOP_Node * getNode() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void saveData(std::ostream &os, UT_StringHolder s)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setDoSlerp(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
bool operator==(const SOP_SBlendParms &src) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
const OP_Context & context() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
constexpr SYS_FORCE_INLINE T & z() noexcept
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void saveData(std::ostream &os, bool v)
SYS_FORCE_INLINE const char * buffer() const
exint getNestNumParms(TempIndex idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
An output stream object that owns its own string buffer storage.
**But if you need a result
static void loadData(UT_IStream &is, bool &v)
T clampMinValue(fpreal minvalue, const T &src) const
bool opDoClr(const SOP_NodeVerb::CookParms &cookparms) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
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, UT_Matrix4D v)
constexpr SYS_FORCE_INLINE T & x() noexcept
static void saveData(std::ostream &os, fpreal64 v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void loadData(UT_IStream &is, int64 &v)
UT_StringHolder opPtIDAttr(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
fpreal64 opBlend(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
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
void setBlend(fpreal64 val)
static void saveData(std::ostream &os, UT_Matrix3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
const OP_GraphProxy * graph() const
bool load(UT_IStream &is)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
UT_StringHolder opPrimIDAttr(const SOP_NodeVerb::CookParms &cookparms) const
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
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void saveData(std::ostream &os, UT_Vector2D v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
fpreal64 getBlend() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void setDoVoxel(bool val)
void setPtIDAttr(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void loadData(UT_IStream &is, UT_Vector3I &v)
void coerceValue(T &result, const S &src) const
void setPrimIDAttr(const UT_StringHolder &val)
bool opDoPos(const SOP_NodeVerb::CookParms &cookparms) const
DEP_MicroNode * depnode() const
Utility class for containing a color ramp.
void save(std::ostream &os) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
constexpr SYS_FORCE_INLINE T & w() noexcept
static void loadData(UT_IStream &is, UT_StringHolder &v)
const UT_StringHolder & getPrimIDAttr() const
static void loadData(UT_IStream &is, fpreal64 &v)
bool isParmColorRamp(exint idx) const override
fpreal getCookTime() const
const UT_StringHolder & getPtIDAttr() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
const char * findChar(int c) const
bool operator!=(const SOP_SBlendParms &src) const
bool opDoUVW(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
void copyFrom(const OP_NodeParms *src) override
constexpr SYS_FORCE_INLINE T & y() noexcept
bool opDoNml(const SOP_NodeVerb::CookParms &cookparms) const
bool opDoSlerp(const SOP_NodeVerb::CookParms &cookparms) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
ParmType getNestParmType(TempIndex fieldnum) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
bool opDoVoxel(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector3D v)
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept
const char * getNestParmName(TempIndex fieldnum) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const