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;
74 myBind_mask =
"mask"_UTsh;
76 graph->
evalOpParm(myBind_mask, nodeidx,
"bind_mask", time, graph->
isDirect()?
nullptr:depnode);
79 graph->
evalOpParm(myNegatemask, nodeidx,
"negatemask", time, graph->
isDirect()?
nullptr:depnode);
80 myBind_width =
"width"_UTsh;
82 graph->
evalOpParm(myBind_width, nodeidx,
"bind_width", time, graph->
isDirect()?
nullptr:depnode);
83 myBind_alpha =
"alpha"_UTsh;
85 graph->
evalOpParm(myBind_alpha, nodeidx,
"bind_alpha", time, graph->
isDirect()?
nullptr:depnode);
86 myBind_softedge =
"softedge"_UTsh;
88 graph->
evalOpParm(myBind_softedge, nodeidx,
"bind_softedge", time, graph->
isDirect()?
nullptr:depnode);
89 myBind_hit =
"hit"_UTsh;
91 graph->
evalOpParm(myBind_hit, nodeidx,
"bind_hit", time, graph->
isDirect()?
nullptr:depnode);
92 myBind_hitprim =
"hitprim"_UTsh;
94 graph->
evalOpParm(myBind_hitprim, nodeidx,
"bind_hitprim", time, graph->
isDirect()?
nullptr:depnode);
95 myBind_hituv =
"hituv"_UTsh;
97 graph->
evalOpParm(myBind_hituv, nodeidx,
"bind_hituv", time, graph->
isDirect()?
nullptr:depnode);
113 template <
typename T>
120 if (idx.
size() != instance.
size()+1)
162 { doGetParmValue(idx, instance, value); }
164 { doGetParmValue(idx, instance, value); }
166 { doGetParmValue(idx, instance, value); }
168 { doGetParmValue(idx, instance, value); }
170 { doGetParmValue(idx, instance, value); }
172 { doGetParmValue(idx, instance, value); }
174 { doGetParmValue(idx, instance, value); }
176 { doGetParmValue(idx, instance, value); }
178 { doGetParmValue(idx, instance, value); }
180 { doGetParmValue(idx, instance, value); }
182 { doGetParmValue(idx, instance, value); }
184 template <
typename T>
191 if (idx.
size() != instance.
size()+1)
224 { doSetParmValue(idx, instance, value); }
226 { doSetParmValue(idx, instance, value); }
228 { doSetParmValue(idx, instance, value); }
230 { doSetParmValue(idx, instance, value); }
232 { doSetParmValue(idx, instance, value); }
234 { doSetParmValue(idx, instance, value); }
236 { doSetParmValue(idx, instance, value); }
238 { doSetParmValue(idx, instance, value); }
240 { doSetParmValue(idx, instance, value); }
242 { doSetParmValue(idx, instance, value); }
244 { doSetParmValue(idx, instance, value); }
260 if (fieldnum.
size() < 1)
273 return "bind_softedge";
277 return "bind_hitprim";
287 if (fieldnum.
size() < 1)
288 return PARM_UNSUPPORTED;
345 loadData(is, rampdata);
363 int typelen = colon - data.
buffer();
377 {
int64 iv =
v; UTwrite(os, &iv); }
379 { UTwrite<fpreal64>(os, &
v); }
381 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
383 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
384 UTwrite<fpreal64>(os, &v.
z()); }
386 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
387 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
399 if (s) s->save(ostr);
401 saveData(os, result);
408 ostr << s->getDataTypeToken();
413 saveData(os, result);
417 void save(std::ostream &os)
const
421 saveData(os, myBind_mask);
422 saveData(os, myNegatemask);
423 saveData(os, myBind_width);
424 saveData(os, myBind_alpha);
425 saveData(os, myBind_softedge);
426 saveData(os, myBind_hit);
427 saveData(os, myBind_hitprim);
428 saveData(os, myBind_hituv);
441 loadData(is, myBind_mask);
442 loadData(is, myNegatemask);
443 loadData(is, myBind_width);
444 loadData(is, myBind_alpha);
445 loadData(is, myBind_softedge);
446 loadData(is, myBind_hit);
447 loadData(is, myBind_hitprim);
448 loadData(is, myBind_hituv);
458 if (!thissop)
return getBind_mask();
460 OP_Utils::evalOpParm(result, thissop,
"bind_mask", cookparms.
getCookTime(), 0);
468 if (!thissop)
return getNegatemask();
470 OP_Utils::evalOpParm(result, thissop,
"negatemask", cookparms.
getCookTime(), 0);
478 if (!thissop)
return getBind_width();
480 OP_Utils::evalOpParm(result, thissop,
"bind_width", cookparms.
getCookTime(), 0);
488 if (!thissop)
return getBind_alpha();
490 OP_Utils::evalOpParm(result, thissop,
"bind_alpha", cookparms.
getCookTime(), 0);
498 if (!thissop)
return getBind_softedge();
500 OP_Utils::evalOpParm(result, thissop,
"bind_softedge", cookparms.
getCookTime(), 0);
508 if (!thissop)
return getBind_hit();
510 OP_Utils::evalOpParm(result, thissop,
"bind_hit", cookparms.
getCookTime(), 0);
518 if (!thissop)
return getBind_hitprim();
520 OP_Utils::evalOpParm(result, thissop,
"bind_hitprim", cookparms.
getCookTime(), 0);
528 if (!thissop)
return getBind_hituv();
530 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)
GLsizei const GLfloat * value
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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
virtual UT_StringHolder baseGetSignature() const
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)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
static void saveData(std::ostream &os, UT_Vector3D v)
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