32 myVertexattribs =
""_UTsh;
33 myPointattribs =
""_UTsh;
34 myCreateprimnumattribs =
false;
35 myPrimnumattrib =
"prim"_UTsh;
36 myCreateprimuvattribs =
false;
37 myPrimuvattrib =
"primuv"_UTsh;
50 if (myGroup != src.myGroup)
return false;
51 if (myVertexattribs != src.myVertexattribs)
return false;
52 if (myPointattribs != src.myPointattribs)
return false;
53 if (myCreateprimnumattribs != src.myCreateprimnumattribs)
return false;
54 if (myPrimnumattrib != src.myPrimnumattrib)
return false;
55 if (myCreateprimuvattribs != src.myCreateprimuvattribs)
return false;
56 if (myPrimuvattrib != src.myPrimuvattrib)
return false;
71 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
72 myVertexattribs =
""_UTsh;
74 graph->
evalOpParm(myVertexattribs, nodeidx,
"vertexattribs", time, 0);
75 myPointattribs =
""_UTsh;
77 graph->
evalOpParm(myPointattribs, nodeidx,
"pointattribs", time, 0);
78 myCreateprimnumattribs =
false;
80 graph->
evalOpParm(myCreateprimnumattribs, nodeidx,
"createprimnumattribs", time, 0);
81 myPrimnumattrib =
"prim"_UTsh;
83 graph->
evalOpParm(myPrimnumattrib, nodeidx,
"primnumattrib", time, 0);
84 myCreateprimuvattribs =
false;
86 graph->
evalOpParm(myCreateprimuvattribs, nodeidx,
"createprimuvattribs", time, 0);
87 myPrimuvattrib =
"primuv"_UTsh;
89 graph->
evalOpParm(myPrimuvattrib, nodeidx,
"primuvattrib", time, 0);
105 template <
typename T>
112 if (idx.
size() != instance.
size()+1)
151 { doGetParmValue(idx, instance, value); }
153 { doGetParmValue(idx, instance, value); }
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 template <
typename T>
180 if (idx.
size() != instance.
size()+1)
194 coerceValue(myCreateprimnumattribs, ( ( value ) ));
210 { doSetParmValue(idx, instance, value); }
212 { doSetParmValue(idx, instance, value); }
214 { doSetParmValue(idx, instance, value); }
216 { doSetParmValue(idx, instance, value); }
218 { doSetParmValue(idx, instance, value); }
220 { doSetParmValue(idx, instance, value); }
222 { doSetParmValue(idx, instance, value); }
224 { doSetParmValue(idx, instance, value); }
226 { doSetParmValue(idx, instance, value); }
228 { doSetParmValue(idx, instance, value); }
230 { doSetParmValue(idx, instance, value); }
246 if (fieldnum.
size() < 1)
253 return "vertexattribs";
255 return "pointattribs";
257 return "createprimnumattribs";
259 return "primnumattrib";
261 return "createprimuvattribs";
263 return "primuvattrib";
271 if (fieldnum.
size() < 1)
272 return PARM_UNSUPPORTED;
327 loadData(is, rampdata);
345 int typelen = colon - data.
buffer();
359 {
int64 iv =
v; UTwrite(os, &iv); }
361 { UTwrite<fpreal64>(os, &
v); }
363 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
365 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
366 UTwrite<fpreal64>(os, &v.
z()); }
368 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
369 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
381 if (s) s->save(ostr);
383 saveData(os, result);
390 ostr << s->getDataTypeToken();
395 saveData(os, result);
399 void save(std::ostream &os)
const
403 saveData(os, myGroup);
404 saveData(os, myVertexattribs);
405 saveData(os, myPointattribs);
406 saveData(os, myCreateprimnumattribs);
407 saveData(os, myPrimnumattrib);
408 saveData(os, myCreateprimuvattribs);
409 saveData(os, myPrimuvattrib);
422 loadData(is, myGroup);
423 loadData(is, myVertexattribs);
424 loadData(is, myPointattribs);
425 loadData(is, myCreateprimnumattribs);
426 loadData(is, myPrimnumattrib);
427 loadData(is, myCreateprimuvattribs);
428 loadData(is, myPrimuvattrib);
438 if (!thissop)
return getGroup();
440 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
448 if (!thissop)
return getVertexattribs();
450 OP_Utils::evalOpParm(result, thissop,
"vertexattribs", cookparms.
getCookTime(), 0);
458 if (!thissop)
return getPointattribs();
460 OP_Utils::evalOpParm(result, thissop,
"pointattribs", cookparms.
getCookTime(), 0);
468 if (!thissop)
return getCreateprimnumattribs();
470 OP_Utils::evalOpParm(result, thissop,
"createprimnumattribs", cookparms.
getCookTime(), 0);
478 if (!thissop)
return getPrimnumattrib();
480 OP_Utils::evalOpParm(result, thissop,
"primnumattrib", cookparms.
getCookTime(), 0);
488 if (!thissop)
return getCreateprimuvattribs();
490 OP_Utils::evalOpParm(result, thissop,
"createprimuvattribs", cookparms.
getCookTime(), 0);
498 if (!thissop)
return getPrimuvattrib();
500 OP_Utils::evalOpParm(result, thissop,
"primuvattrib", cookparms.
getCookTime(), 0);
508 bool myCreateprimnumattribs;
510 bool myCreateprimuvattribs;
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void saveData(std::ostream &os, UT_Vector2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
SOP_Node * getNode() const
void setGroup(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setPrimnumattrib(const UT_StringHolder &val)
exint bread(int32 *buffer, exint asize=1)
bool getCreateprimnumattribs() const
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void loadData(UT_IStream &is, fpreal64 &v)
bool opCreateprimuvattribs(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
void setPrimuvattrib(const UT_StringHolder &val)
exint getNestNumParms(TempIndex idx) const override
SYS_FORCE_INLINE const char * buffer() const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
static void saveData(std::ostream &os, UT_Vector4D v)
An output stream object that owns its own string buffer storage.
bool opCreateprimnumattribs(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, int64 &v)
**But if you need a result
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
UT_StringHolder opVertexattribs(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opPointattribs(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
bool getCreateprimuvattribs() const
static void saveData(std::ostream &os, UT_Matrix4D v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, bool &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
void copyFrom(const OP_NodeParms *src) override
const UT_StringHolder & getGroup() const
constexpr SYS_FORCE_INLINE T & z() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void saveData(std::ostream &os, UT_StringHolder s)
const OP_GraphProxy * graph() const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
const char * getNestParmName(TempIndex fieldnum) const override
SOP_FeatherRayCoreParms()
const UT_StringHolder & getPointattribs() const
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
GT_API const UT_StringHolder version
void setCreateprimnumattribs(bool val)
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setPointattribs(const UT_StringHolder &val)
bool operator==(const SOP_FeatherRayCoreParms &src) const
UT_StringHolder opPrimnumattrib(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void coerceValue(T &result, const S &src) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void loadFromOpSubclass(const LoadParms &loadparms) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
DEP_MicroNode * depnode() const
static void loadData(UT_IStream &is, UT_Vector2I &v)
Utility class for containing a color ramp.
static void loadData(UT_IStream &is, UT_Matrix4D &v)
constexpr SYS_FORCE_INLINE T & w() noexcept
static void saveData(std::ostream &os, UT_Vector3D v)
void setVertexattribs(const UT_StringHolder &val)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
UT_StringHolder opPrimuvattrib(const SOP_NodeVerb::CookParms &cookparms) const
fpreal getCookTime() const
bool operator!=(const SOP_FeatherRayCoreParms &src) const
const UT_StringHolder & getPrimnumattrib() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
const char * findChar(int c) const
static void saveData(std::ostream &os, UT_Matrix3D v)
bool isParmColorRamp(exint idx) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
const UT_StringHolder & getPrimuvattrib() const
static void loadData(UT_IStream &is, UT_Vector4D &v)
bool load(UT_IStream &is)
static void saveData(std::ostream &os, bool v)
ParmType getNestParmType(TempIndex fieldnum) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
const UT_StringHolder & getVertexattribs() const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
void setCreateprimuvattribs(bool val)
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void saveData(std::ostream &os, fpreal64 v)
constexpr SYS_FORCE_INLINE T & x() noexcept
void save(std::ostream &os) const