23 namespace SOP_ReverseEnums
38 using namespace UT::Literal;
76 if (myGroup != src.myGroup)
return false;
77 if (myVtxsort != src.myVtxsort)
return false;
78 if (myVtxuoff != src.myVtxuoff)
return false;
79 if (myVtxvoff != src.myVtxvoff)
return false;
95 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
98 graph->
evalOpParm(myVtxsort, nodeidx,
"vtxsort", time, 0);
100 if (
true && ( (
true&&!(((
int64(getVtxsort())!=5)))) ) )
101 graph->
evalOpParm(myVtxuoff, nodeidx,
"vtxuoff", time, 0);
103 if (
true && ( (
true&&!(((
int64(getVtxsort())!=5)))) ) )
104 graph->
evalOpParm(myVtxvoff, nodeidx,
"vtxvoff", time, 0);
120 template <
typename T>
127 if (idx.
size() != instance.
size()+1)
132 coerceValue(value, myGroup);
135 coerceValue(value, myVtxsort);
138 coerceValue(value, myVtxuoff);
141 coerceValue(value, myVtxvoff);
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 { doGetParmValue(idx, instance, value); }
179 template <
typename T>
186 if (idx.
size() != instance.
size()+1)
191 coerceValue(myGroup, ( ( value ) ));
194 coerceValue(myVtxsort, clampMinValue(0, clampMaxValue(5, value ) ));
197 coerceValue(myVtxuoff, ( ( value ) ));
200 coerceValue(myVtxvoff, ( ( 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); }
227 { doSetParmValue(idx, instance, value); }
243 if (fieldnum.
size() < 1)
262 if (fieldnum.
size() < 1)
263 return PARM_UNSUPPORTED;
276 return PARM_UNSUPPORTED;
312 loadData(is, rampdata);
330 int typelen = colon - data.
buffer();
344 {
int64 iv =
v; UTwrite(os, &iv); }
346 { UTwrite<fpreal64>(os, &
v); }
348 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
350 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
351 UTwrite<fpreal64>(os, &v.
z()); }
353 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
354 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
366 if (s) s->save(ostr);
368 saveData(os, result);
375 ostr << s->getDataTypeToken();
380 saveData(os, result);
384 void save(std::ostream &os)
const
388 saveData(os, myGroup);
389 saveData(os, myVtxsort);
390 saveData(os, myVtxuoff);
391 saveData(os, myVtxvoff);
404 loadData(is, myGroup);
405 loadData(is, myVtxsort);
406 loadData(is, myVtxuoff);
407 loadData(is, myVtxvoff);
417 if (!thissop)
return getGroup();
419 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
427 if (!thissop)
return getVtxsort();
429 OP_Utils::evalOpParm(result, thissop,
"vtxsort", cookparms.
getCookTime(), 0);
437 if (!thissop)
return getVtxuoff();
439 OP_Utils::evalOpParm(result, thissop,
"vtxuoff", cookparms.
getCookTime(), 0);
447 if (!thissop)
return getVtxvoff();
449 OP_Utils::evalOpParm(result, thissop,
"vtxvoff", cookparms.
getCookTime(), 0);
static void saveData(std::ostream &os, UT_Matrix3D v)
void setVtxvoff(int64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void loadData(UT_IStream &is, UT_Vector3D &v)
int64 opVtxuoff(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector4D v)
SOP_Node * getNode() const
exint bread(int32 *buffer, exint asize=1)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
const UT_StringHolder & getGroup() const
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
const OP_Context & context() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void saveData(std::ostream &os, UT_Vector3D v)
An output stream object that owns its own string buffer storage.
**But if you need a result
static void loadData(UT_IStream &is, int64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
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
constexpr SYS_FORCE_INLINE T & x() noexcept
void loadFromOpSubclass(const LoadParms &loadparms) override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void save(std::ostream &os) const
Vtxsort opVtxsort(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
SYS_FORCE_INLINE UT_StringHolder getToken(Vtxsort enum_value)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void saveData(std::ostream &os, bool 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, bool &v)
constexpr SYS_FORCE_INLINE T & z() noexcept
Vtxsort getVtxsort() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
const OP_GraphProxy * graph() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void saveData(std::ostream &os, int64 v)
bool operator==(const SOP_ReverseParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Vector4I &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
bool operator!=(const SOP_ReverseParms &src) const
static void saveData(std::ostream &os, UT_Matrix2D v)
ParmType getNestParmType(TempIndex fieldnum) const override
void setVtxsort(Vtxsort val)
int64 opVtxvoff(const SOP_NodeVerb::CookParms &cookparms) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
bool load(UT_IStream &is)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setVtxuoff(int64 val)
exint getNestNumParms(TempIndex idx) const override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void saveData(std::ostream &os, UT_Matrix4D v)
DEP_MicroNode * depnode() const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setGroup(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
fpreal getCookTime() const
bool isParmColorRamp(exint idx) const override
static void loadData(UT_IStream &is, UT_Vector3I &v)
void copyFrom(const OP_NodeParms *src) override
const char * findChar(int c) const
static void saveData(std::ostream &os, fpreal64 v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void saveData(std::ostream &os, UT_StringHolder s)
constexpr SYS_FORCE_INLINE T & y() noexcept
static void saveData(std::ostream &os, UT_Vector2D v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, UT_Vector2I &v)
SYS_FORCE_INLINE bool isstring() const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
constexpr SYS_FORCE_INLINE T & x() noexcept