23 namespace SOP_AttribSortEnums
35 using namespace UT::Literal;
53 using namespace UT::Literal;
76 myIndices =
"indices"_UTsh;
90 if (myClass != src.myClass)
return false;
91 if (myAttrib != src.myAttrib)
return false;
92 if (myComponent != src.myComponent)
return false;
93 if (
myOrder != src.myOrder)
return false;
94 if (myUseindices != src.myUseindices)
return false;
95 if (myIndices != src.myIndices)
return false;
96 if (myUseopencl != src.myUseopencl)
return false;
116 graph->
evalOpParm(myClass, nodeidx,
"class", time, graph->
isDirect()?
nullptr:depnode);
119 graph->
evalOpParm(myAttrib, nodeidx,
"attrib", time, graph->
isDirect()?
nullptr:depnode);
122 graph->
evalOpParm(myComponent, nodeidx,
"component", time, graph->
isDirect()?
nullptr:depnode);
126 myUseindices =
false;
128 graph->
evalOpParm(myUseindices, nodeidx,
"useindices", time, graph->
isDirect()?
nullptr:depnode);
129 myIndices =
"indices"_UTsh;
130 if (
true && ( (
true&&!(((getUseindices()==0)))) ) )
131 graph->
evalOpParm(myIndices, nodeidx,
"indices", time, graph->
isDirect()?
nullptr:depnode);
134 graph->
evalOpParm(myUseopencl, nodeidx,
"useopencl", time, graph->
isDirect()?
nullptr:depnode);
150 template <
typename T>
157 if (idx.
size() != instance.
size()+1)
162 coerceValue(value, myClass);
165 coerceValue(value, myAttrib);
168 coerceValue(value, myComponent);
174 coerceValue(value, myUseindices);
177 coerceValue(value, myIndices);
180 coerceValue(value, myUseopencl);
196 { doGetParmValue(idx, instance, value); }
198 { doGetParmValue(idx, instance, value); }
200 { doGetParmValue(idx, instance, value); }
202 { doGetParmValue(idx, instance, value); }
204 { doGetParmValue(idx, instance, value); }
206 { doGetParmValue(idx, instance, value); }
208 { doGetParmValue(idx, instance, value); }
210 { doGetParmValue(idx, instance, value); }
212 { doGetParmValue(idx, instance, value); }
214 { doGetParmValue(idx, instance, value); }
216 { doGetParmValue(idx, instance, value); }
218 template <
typename T>
225 if (idx.
size() != instance.
size()+1)
230 coerceValue(myClass, clampMinValue(0, clampMaxValue(2, value ) ));
233 coerceValue(myAttrib, ( ( value ) ));
236 coerceValue(myComponent, ( ( value ) ));
239 coerceValue(
myOrder, clampMinValue(0, clampMaxValue(1, value ) ));
242 coerceValue(myUseindices, ( ( value ) ));
245 coerceValue(myIndices, ( ( value ) ));
248 coerceValue(myUseopencl, ( ( value ) ));
255 { doSetParmValue(idx, instance, value); }
257 { doSetParmValue(idx, instance, value); }
259 { doSetParmValue(idx, instance, value); }
261 { doSetParmValue(idx, instance, value); }
263 { doSetParmValue(idx, instance, value); }
265 { doSetParmValue(idx, instance, value); }
267 { doSetParmValue(idx, instance, value); }
269 { doSetParmValue(idx, instance, value); }
271 { doSetParmValue(idx, instance, value); }
273 { doSetParmValue(idx, instance, value); }
275 { doSetParmValue(idx, instance, value); }
291 if (fieldnum.
size() < 1)
316 if (fieldnum.
size() < 1)
317 return PARM_UNSUPPORTED;
336 return PARM_UNSUPPORTED;
372 loadData(is, rampdata);
390 int typelen = colon - data.
buffer();
404 {
int64 iv =
v; UTwrite(os, &iv); }
406 { UTwrite<fpreal64>(os, &
v); }
408 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
410 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
411 UTwrite<fpreal64>(os, &v.
z()); }
413 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
414 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
426 if (s) s->save(ostr);
428 saveData(os, result);
435 ostr << s->getDataTypeToken();
440 saveData(os, result);
444 void save(std::ostream &os)
const
448 saveData(os, myClass);
449 saveData(os, myAttrib);
450 saveData(os, myComponent);
452 saveData(os, myUseindices);
453 saveData(os, myIndices);
454 saveData(os, myUseopencl);
467 loadData(is, myClass);
468 loadData(is, myAttrib);
469 loadData(is, myComponent);
471 loadData(is, myUseindices);
472 loadData(is, myIndices);
473 loadData(is, myUseopencl);
483 if (!thissop)
return getClass();
485 OP_Utils::evalOpParm(result, thissop,
"class", cookparms.
getCookTime(), 0);
486 return Class(result);
493 if (!thissop)
return getAttrib();
495 OP_Utils::evalOpParm(result, thissop,
"attrib", cookparms.
getCookTime(), 0);
503 if (!thissop)
return getComponent();
505 OP_Utils::evalOpParm(result, thissop,
"component", cookparms.
getCookTime(), 0);
513 if (!thissop)
return getOrder();
515 OP_Utils::evalOpParm(result, thissop,
"order", cookparms.
getCookTime(), 0);
516 return Order(result);
523 if (!thissop)
return getUseindices();
525 OP_Utils::evalOpParm(result, thissop,
"useindices", cookparms.
getCookTime(), 0);
533 if (!thissop)
return getIndices();
535 OP_Utils::evalOpParm(result, thissop,
"indices", cookparms.
getCookTime(), 0);
543 if (!thissop)
return getUseopencl();
545 OP_Utils::evalOpParm(result, thissop,
"useopencl", cookparms.
getCookTime(), 0);
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
const UT_StringHolder & getAttrib() const
static void saveData(std::ostream &os, UT_Vector3D v)
SOP_Node * getNode() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
const UT_StringHolder & getIndices() const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
int64 getComponent() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
static void saveData(std::ostream &os, UT_Matrix4D v)
GLsizei const GLfloat * value
static void saveData(std::ostream &os, UT_Matrix2D v)
static void saveData(std::ostream &os, UT_Vector2D v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
const OP_Context & context() const
bool opUseopencl(const SOP_NodeVerb::CookParms &cookparms) const
Order opOrder(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
exint getNestNumParms(TempIndex idx) const override
An output stream object that owns its own string buffer storage.
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
**But if you need a result
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void loadData(UT_IStream &is, UT_Vector4D &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.
constexpr SYS_FORCE_INLINE T & x() noexcept
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void saveData(std::ostream &os, int64 v)
ParmType getNestParmType(TempIndex fieldnum) const override
int64 opComponent(const SOP_NodeVerb::CookParms &cookparms) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void saveData(std::ostream &os, fpreal64 v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool opUseindices(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
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.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
constexpr SYS_FORCE_INLINE T & z() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void loadFromOpSubclass(const LoadParms &loadparms) override
const OP_GraphProxy * graph() const
void setIndices(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_StringHolder &v)
bool operator!=(const SOP_AttribSortParms &src) const
bool isParmColorRamp(exint idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
const char * getNestParmName(TempIndex fieldnum) const override
void save(std::ostream &os) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void setUseindices(bool val)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void saveData(std::ostream &os, bool v)
bool operator==(const SOP_AttribSortParms &src) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void copyFrom(const OP_NodeParms *src) override
static void loadData(UT_IStream &is, fpreal64 &v)
Class opClass(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_StringHolder s)
DEP_MicroNode * depnode() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setAttrib(const UT_StringHolder &val)
static void loadData(UT_IStream &is, bool &v)
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
bool getUseindices() const
constexpr SYS_FORCE_INLINE T & w() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
virtual UT_StringHolder baseGetSignature() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
SYS_FORCE_INLINE UT_StringHolder getToken(Class enum_value)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
fpreal getCookTime() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, int64 &v)
const char * findChar(int c) const
static void saveData(std::ostream &os, UT_Matrix3D v)
bool getUseopencl() const
UT_StringHolder opAttrib(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opIndices(const SOP_NodeVerb::CookParms &cookparms) const
void setComponent(int64 val)
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
bool load(UT_IStream &is)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
SYS_FORCE_INLINE bool isstring() const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void setUseopencl(bool val)
constexpr SYS_FORCE_INLINE T & x() noexcept