23 namespace SOP_PeakEnums
37 using namespace UT::Literal;
74 if (myGroup != src.myGroup)
return false;
75 if (myGrouptype != src.myGrouptype)
return false;
76 if (myDist != src.myDist)
return false;
77 if (myUpdatenmls != src.myUpdatenmls)
return false;
93 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
96 graph->
evalOpParm(myGrouptype, nodeidx,
"grouptype", time, 0);
99 graph->
evalOpParm(myDist, nodeidx,
"dist", time, 0);
102 graph->
evalOpParm(myUpdatenmls, nodeidx,
"updatenmls", time, 0);
118 template <
typename T>
125 if (idx.
size() != instance.
size()+1)
130 coerceValue(value, myGroup);
133 coerceValue(value, myGrouptype);
136 coerceValue(value, myDist);
139 coerceValue(value, myUpdatenmls);
155 { doGetParmValue(idx, instance, value); }
157 { doGetParmValue(idx, instance, value); }
159 { doGetParmValue(idx, instance, value); }
161 { doGetParmValue(idx, instance, value); }
163 { doGetParmValue(idx, instance, value); }
165 { doGetParmValue(idx, instance, value); }
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 template <
typename T>
184 if (idx.
size() != instance.
size()+1)
189 coerceValue(myGroup, ( ( value ) ));
192 coerceValue(myGrouptype, clampMinValue(0, clampMaxValue(4, value ) ));
195 coerceValue(myDist, ( ( value ) ));
198 coerceValue(myUpdatenmls, ( ( value ) ));
205 { doSetParmValue(idx, instance, value); }
207 { doSetParmValue(idx, instance, value); }
209 { doSetParmValue(idx, instance, value); }
211 { doSetParmValue(idx, instance, value); }
213 { doSetParmValue(idx, instance, value); }
215 { doSetParmValue(idx, instance, value); }
217 { doSetParmValue(idx, instance, value); }
219 { doSetParmValue(idx, instance, value); }
221 { doSetParmValue(idx, instance, value); }
223 { doSetParmValue(idx, instance, value); }
225 { doSetParmValue(idx, instance, value); }
241 if (fieldnum.
size() < 1)
260 if (fieldnum.
size() < 1)
261 return PARM_UNSUPPORTED;
274 return PARM_UNSUPPORTED;
310 loadData(is, rampdata);
328 int typelen = colon - data.
buffer();
342 {
int64 iv =
v; UTwrite(os, &iv); }
344 { UTwrite<fpreal64>(os, &
v); }
346 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
348 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
349 UTwrite<fpreal64>(os, &v.
z()); }
351 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
352 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
364 if (s) s->save(ostr);
366 saveData(os, result);
373 ostr << s->getDataTypeToken();
378 saveData(os, result);
382 void save(std::ostream &os)
const
386 saveData(os, myGroup);
387 saveData(os, myGrouptype);
388 saveData(os, myDist);
389 saveData(os, myUpdatenmls);
402 loadData(is, myGroup);
403 loadData(is, myGrouptype);
404 loadData(is, myDist);
405 loadData(is, myUpdatenmls);
415 if (!thissop)
return getGroup();
417 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
425 if (!thissop)
return getGrouptype();
427 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
435 if (!thissop)
return getDist();
437 OP_Utils::evalOpParm(result, thissop,
"dist", cookparms.
getCookTime(), 0);
445 if (!thissop)
return getUpdatenmls();
447 OP_Utils::evalOpParm(result, thissop,
"updatenmls", cookparms.
getCookTime(), 0);
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void loadData(UT_IStream &is, fpreal64 &v)
SOP_Node * getNode() const
bool isParmColorRamp(exint idx) const override
SYS_FORCE_INLINE UT_StringHolder getToken(Grouptype enum_value)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void saveData(std::ostream &os, int64 v)
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
SYS_FORCE_INLINE const char * buffer() const
static void saveData(std::ostream &os, UT_Vector4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
An output stream object that owns its own string buffer storage.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
**But if you need a result
static void loadData(UT_IStream &is, 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.
static void loadData(UT_IStream &is, UT_Matrix3D &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
fpreal64 opDist(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
bool opUpdatenmls(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void loadData(UT_IStream &is, UT_Vector3I &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void saveData(std::ostream &os, UT_Matrix3D v)
Grouptype opGrouptype(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, fpreal64 v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setGrouptype(Grouptype val)
void setGroup(const UT_StringHolder &val)
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 setDist(fpreal64 val)
const OP_GraphProxy * graph() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
const UT_StringHolder & getGroup() const
bool load(UT_IStream &is)
const char * getNestParmName(TempIndex fieldnum) const override
ParmType getNestParmType(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Matrix4D v)
static void saveData(std::ostream &os, UT_Vector3D v)
void loadFromOpSubclass(const LoadParms &loadparms) override
bool operator==(const SOP_PeakParms &src) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void save(std::ostream &os) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
Grouptype getGrouptype() const
exint getNestNumParms(TempIndex idx) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
GT_API const UT_StringHolder version
bool operator!=(const SOP_PeakParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
DEP_MicroNode * depnode() const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void saveData(std::ostream &os, UT_StringHolder s)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
fpreal getCookTime() const
void setUpdatenmls(bool val)
const char * findChar(int c) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void loadData(UT_IStream &is, int64 &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
void copyFrom(const OP_NodeParms *src) override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void saveData(std::ostream &os, UT_Vector2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
bool getUpdatenmls() const