31 myBind_mask =
"mask"_UTsh;
33 myBind_width =
"width"_UTsh;
34 myBind_alpha =
"alpha"_UTsh;
35 myBind_softedge =
"softedge"_UTsh;
36 myBind_hit =
"hit"_UTsh;
37 myBind_hitprim =
"hitprim"_UTsh;
38 myBind_hituv =
"hituv"_UTsh;
51 if (myBind_mask != src.myBind_mask)
return false;
52 if (myNegatemask != src.myNegatemask)
return false;
53 if (myBind_width != src.myBind_width)
return false;
54 if (myBind_alpha != src.myBind_alpha)
return false;
55 if (myBind_softedge != src.myBind_softedge)
return false;
56 if (myBind_hit != src.myBind_hit)
return false;
57 if (myBind_hitprim != src.myBind_hitprim)
return false;
58 if (myBind_hituv != src.myBind_hituv)
return false;
71 myBind_mask =
"mask"_UTsh;
73 graph->
evalOpParm(myBind_mask, nodeidx,
"bind_mask", time, 0);
76 graph->
evalOpParm(myNegatemask, nodeidx,
"negatemask", time, 0);
77 myBind_width =
"width"_UTsh;
79 graph->
evalOpParm(myBind_width, nodeidx,
"bind_width", time, 0);
80 myBind_alpha =
"alpha"_UTsh;
82 graph->
evalOpParm(myBind_alpha, nodeidx,
"bind_alpha", time, 0);
83 myBind_softedge =
"softedge"_UTsh;
85 graph->
evalOpParm(myBind_softedge, nodeidx,
"bind_softedge", time, 0);
86 myBind_hit =
"hit"_UTsh;
88 graph->
evalOpParm(myBind_hit, nodeidx,
"bind_hit", time, 0);
89 myBind_hitprim =
"hitprim"_UTsh;
91 graph->
evalOpParm(myBind_hitprim, nodeidx,
"bind_hitprim", time, 0);
92 myBind_hituv =
"hituv"_UTsh;
94 graph->
evalOpParm(myBind_hituv, nodeidx,
"bind_hituv", time, 0);
110 template <
typename T>
117 if (idx.
size() != instance.
size()+1)
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 { doGetParmValue(idx, instance, value); }
181 template <
typename T>
188 if (idx.
size() != instance.
size()+1)
221 { doSetParmValue(idx, instance, value); }
223 { doSetParmValue(idx, instance, value); }
225 { doSetParmValue(idx, instance, value); }
227 { doSetParmValue(idx, instance, value); }
229 { doSetParmValue(idx, instance, value); }
231 { doSetParmValue(idx, instance, value); }
233 { doSetParmValue(idx, instance, value); }
235 { doSetParmValue(idx, instance, value); }
237 { doSetParmValue(idx, instance, value); }
239 { doSetParmValue(idx, instance, value); }
241 { doSetParmValue(idx, instance, value); }
257 if (fieldnum.
size() < 1)
270 return "bind_softedge";
274 return "bind_hitprim";
284 if (fieldnum.
size() < 1)
285 return PARM_UNSUPPORTED;
342 loadData(is, rampdata);
360 int typelen = colon - data.
buffer();
374 {
int64 iv =
v; UTwrite(os, &iv); }
376 { UTwrite<fpreal64>(os, &
v); }
378 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
380 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
381 UTwrite<fpreal64>(os, &v.
z()); }
383 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
384 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
396 if (s) s->save(ostr);
398 saveData(os, result);
405 ostr << s->getDataTypeToken();
410 saveData(os, result);
414 void save(std::ostream &os)
const
418 saveData(os, myBind_mask);
419 saveData(os, myNegatemask);
420 saveData(os, myBind_width);
421 saveData(os, myBind_alpha);
422 saveData(os, myBind_softedge);
423 saveData(os, myBind_hit);
424 saveData(os, myBind_hitprim);
425 saveData(os, myBind_hituv);
438 loadData(is, myBind_mask);
439 loadData(is, myNegatemask);
440 loadData(is, myBind_width);
441 loadData(is, myBind_alpha);
442 loadData(is, myBind_softedge);
443 loadData(is, myBind_hit);
444 loadData(is, myBind_hitprim);
445 loadData(is, myBind_hituv);
455 if (!thissop)
return getBind_mask();
457 OP_Utils::evalOpParm(result, thissop,
"bind_mask", cookparms.
getCookTime(), 0);
465 if (!thissop)
return getNegatemask();
467 OP_Utils::evalOpParm(result, thissop,
"negatemask", cookparms.
getCookTime(), 0);
475 if (!thissop)
return getBind_width();
477 OP_Utils::evalOpParm(result, thissop,
"bind_width", cookparms.
getCookTime(), 0);
485 if (!thissop)
return getBind_alpha();
487 OP_Utils::evalOpParm(result, thissop,
"bind_alpha", cookparms.
getCookTime(), 0);
495 if (!thissop)
return getBind_softedge();
497 OP_Utils::evalOpParm(result, thissop,
"bind_softedge", cookparms.
getCookTime(), 0);
505 if (!thissop)
return getBind_hit();
507 OP_Utils::evalOpParm(result, thissop,
"bind_hit", cookparms.
getCookTime(), 0);
515 if (!thissop)
return getBind_hitprim();
517 OP_Utils::evalOpParm(result, thissop,
"bind_hitprim", cookparms.
getCookTime(), 0);
525 if (!thissop)
return getBind_hituv();
527 OP_Utils::evalOpParm(result, thissop,
"bind_hituv", cookparms.
getCookTime(), 0);
void loadFromOpSubclass(const LoadParms &loadparms) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setBind_hituv(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void save(std::ostream &os) const
static void loadData(UT_IStream &is, int64 &v)
SOP_Node * getNode() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, fpreal64 &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
const UT_StringHolder & getBind_width() const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
const UT_StringHolder & getBind_alpha() const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
const UT_StringHolder & getBind_hit() const
bool load(UT_IStream &is)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setBind_mask(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
UT_StringHolder opBind_hituv(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
An output stream object that owns its own string buffer storage.
UT_StringHolder opBind_hit(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const SOP_SurfaceSplatParms &src) const
void setBind_width(const UT_StringHolder &val)
static void saveData(std::ostream &os, int64 v)
**But if you need a result
UT_StringHolder opBind_softedge(const SOP_NodeVerb::CookParms &cookparms) const
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.
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
bool isParmColorRamp(exint idx) const override
const UT_StringHolder & getBind_hituv() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
static void saveData(std::ostream &os, UT_Vector2D v)
constexpr SYS_FORCE_INLINE T & z() noexcept
void setBind_softedge(const UT_StringHolder &val)
const OP_GraphProxy * graph() const
void setBind_hit(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Matrix3D v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
bool getNegatemask() const
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
exint getNestNumParms(TempIndex idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setBind_hitprim(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
UT_StringHolder opBind_alpha(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
const UT_StringHolder & getBind_mask() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
bool opNegatemask(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector4D v)
GT_API const UT_StringHolder version
const UT_StringHolder & getBind_hitprim() const
UT_StringHolder opBind_mask(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void saveData(std::ostream &os, UT_Matrix4D v)
ParmType getNestParmType(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
UT_StringHolder opBind_hitprim(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, fpreal64 v)
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
void coerceValue(T &result, const S &src) const
static void loadData(UT_IStream &is, bool &v)
UT_StringHolder opBind_width(const SOP_NodeVerb::CookParms &cookparms) const
DEP_MicroNode * depnode() const
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
const UT_StringHolder & getBind_softedge() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void copyFrom(const OP_NodeParms *src) override
fpreal getCookTime() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setNegatemask(bool val)
const char * findChar(int c) const
constexpr SYS_FORCE_INLINE T & y() noexcept
static void saveData(std::ostream &os, UT_StringHolder s)
static void saveData(std::ostream &os, UT_Vector3D v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void setBind_alpha(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
bool operator!=(const SOP_SurfaceSplatParms &src) const
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept