33 myIndexattrib =
"guides"_UTsh;
34 myWeightattrib =
"weights"_UTsh;
49 if (myGroup != src.myGroup)
return false;
50 if (myMaxIterations != src.myMaxIterations)
return false;
51 if (myIndexattrib != src.myIndexattrib)
return false;
52 if (myWeightattrib != src.myWeightattrib)
return false;
53 if (myDiffTol != src.myDiffTol)
return false;
54 if (myVerbose != src.myVerbose)
return false;
69 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
72 graph->
evalOpParm(myMaxIterations, nodeidx,
"maxiter", time, 0);
73 myIndexattrib =
"guides"_UTsh;
75 graph->
evalOpParm(myIndexattrib, nodeidx,
"indexattrib", time, 0);
76 myWeightattrib =
"weights"_UTsh;
78 graph->
evalOpParm(myWeightattrib, nodeidx,
"weightattrib", time, 0);
81 graph->
evalOpParm(myDiffTol, nodeidx,
"difftol", time, 0);
84 graph->
evalOpParm(myVerbose, nodeidx,
"verbose", time, 0);
100 template <
typename T>
107 if (idx.
size() != instance.
size()+1)
143 { doGetParmValue(idx, instance, value); }
145 { doGetParmValue(idx, instance, value); }
147 { doGetParmValue(idx, instance, value); }
149 { doGetParmValue(idx, instance, value); }
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 template <
typename T>
172 if (idx.
size() != instance.
size()+1)
199 { doSetParmValue(idx, instance, value); }
201 { doSetParmValue(idx, instance, value); }
203 { doSetParmValue(idx, instance, value); }
205 { doSetParmValue(idx, instance, 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); }
235 if (fieldnum.
size() < 1)
244 return "indexattrib";
246 return "weightattrib";
258 if (fieldnum.
size() < 1)
259 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, myMaxIterations);
390 saveData(os, myIndexattrib);
391 saveData(os, myWeightattrib);
392 saveData(os, myDiffTol);
393 saveData(os, myVerbose);
406 loadData(is, myGroup);
407 loadData(is, myMaxIterations);
408 loadData(is, myIndexattrib);
409 loadData(is, myWeightattrib);
410 loadData(is, myDiffTol);
411 loadData(is, myVerbose);
421 if (!thissop)
return getGroup();
423 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
431 if (!thissop)
return getMaxIterations();
433 OP_Utils::evalOpParm(result, thissop,
"maxiter", cookparms.
getCookTime(), 0);
441 if (!thissop)
return getIndexattrib();
443 OP_Utils::evalOpParm(result, thissop,
"indexattrib", cookparms.
getCookTime(), 0);
451 if (!thissop)
return getWeightattrib();
453 OP_Utils::evalOpParm(result, thissop,
"weightattrib", cookparms.
getCookTime(), 0);
461 if (!thissop)
return getDiffTol();
463 OP_Utils::evalOpParm(result, thissop,
"difftol", cookparms.
getCookTime(), 0);
471 if (!thissop)
return getVerbose();
473 OP_Utils::evalOpParm(result, thissop,
"verbose", cookparms.
getCookTime(), 0);
479 int64 myMaxIterations;
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void loadData(UT_IStream &is, bool &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void loadFromOpSubclass(const LoadParms &loadparms) override
const char * getNestParmName(TempIndex fieldnum) const override
SOP_Node * getNode() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void saveData(std::ostream &os, UT_Vector4D v)
static void saveData(std::ostream &os, UT_Vector3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void saveData(std::ostream &os, int64 v)
SOP_WeightArrayBiharmonicParms()
exint bread(int32 *buffer, exint asize=1)
static void loadData(UT_IStream &is, UT_Vector3I &v)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
bool load(UT_IStream &is)
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
bool operator!=(const SOP_WeightArrayBiharmonicParms &src) const
static void saveData(std::ostream &os, bool v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
fpreal64 opDiffTol(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, UT_Matrix4D v)
int64 opMaxIterations(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void saveData(std::ostream &os, UT_Matrix2D v)
void setMaxIterations(int64 val)
**But if you need a result
T clampMinValue(fpreal minvalue, const T &src) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
bool operator==(const SOP_WeightArrayBiharmonicParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, UT_Vector2D v)
static void saveData(std::ostream &os, UT_StringHolder s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
static void loadData(UT_IStream &is, UT_Vector3D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
UT_StringHolder opIndexattrib(const SOP_NodeVerb::CookParms &cookparms) const
void setDiffTol(fpreal64 val)
constexpr SYS_FORCE_INLINE T & x() noexcept
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool isParmColorRamp(exint idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setIndexattrib(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void loadData(UT_IStream &is, UT_Vector2I &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, fpreal64 &v)
constexpr SYS_FORCE_INLINE T & z() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
const OP_GraphProxy * graph() const
bool opVerbose(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opWeightattrib(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
int64 getMaxIterations() const
void save(std::ostream &os) const
void setVerbose(bool val)
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void saveData(std::ostream &os, fpreal64 v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
exint getNestNumParms(TempIndex idx) const override
static void loadData(UT_IStream &is, int64 &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
static void loadData(UT_IStream &is, UT_Matrix4D &v)
GT_API const UT_StringHolder version
void setGroup(const UT_StringHolder &val)
ParmType getNestParmType(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setWeightattrib(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void coerceValue(T &result, const S &src) const
DEP_MicroNode * depnode() const
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
void copyFrom(const OP_NodeParms *src) override
fpreal getCookTime() const
const UT_StringHolder & getIndexattrib() const
const char * findChar(int c) const
const UT_StringHolder & getWeightattrib() const
fpreal64 getDiffTol() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void loadData(UT_IStream &is, UT_Vector4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
const UT_StringHolder & getGroup() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void saveData(std::ostream &os, UT_Matrix3D v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
constexpr SYS_FORCE_INLINE T & x() noexcept