31 myBasegroup =
""_UTsh;
32 myPatchgroup =
""_UTsh;
33 myMaskgroup =
""_UTsh;
35 myPatchislaplacian =
false;
49 if (myBasegroup != src.myBasegroup)
return false;
50 if (myPatchgroup != src.myPatchgroup)
return false;
51 if (myMaskgroup != src.myMaskgroup)
return false;
52 if (myMaskcutoff != src.myMaskcutoff)
return false;
53 if (myPatchislaplacian != src.myPatchislaplacian)
return false;
54 if (myTolerance != src.myTolerance)
return false;
70 myBasegroup =
""_UTsh;
72 graph->
evalOpParm(myBasegroup, nodeidx,
"basegroup", time, graph->
isDirect()?
nullptr:depnode);
73 myPatchgroup =
""_UTsh;
75 graph->
evalOpParm(myPatchgroup, nodeidx,
"patchgroup", time, graph->
isDirect()?
nullptr:depnode);
76 myMaskgroup =
""_UTsh;
78 graph->
evalOpParm(myMaskgroup, nodeidx,
"maskgroup", time, graph->
isDirect()?
nullptr:depnode);
81 graph->
evalOpParm(myMaskcutoff, nodeidx,
"maskcutoff", time, graph->
isDirect()?
nullptr:depnode);
82 myPatchislaplacian =
false;
84 graph->
evalOpParm(myPatchislaplacian, nodeidx,
"patchislaplacian", time, graph->
isDirect()?
nullptr:depnode);
87 graph->
evalOpParm(myTolerance, nodeidx,
"tolerance", time, graph->
isDirect()?
nullptr:depnode);
103 template <
typename T>
110 if (idx.
size() != instance.
size()+1)
146 { doGetParmValue(idx, instance, value); }
148 { doGetParmValue(idx, instance, value); }
150 { doGetParmValue(idx, instance, value); }
152 { doGetParmValue(idx, instance, value); }
154 { doGetParmValue(idx, instance, value); }
156 { doGetParmValue(idx, instance, value); }
158 { doGetParmValue(idx, instance, value); }
160 { doGetParmValue(idx, instance, value); }
162 { doGetParmValue(idx, instance, value); }
164 { doGetParmValue(idx, instance, value); }
166 { doGetParmValue(idx, instance, value); }
168 template <
typename T>
175 if (idx.
size() != instance.
size()+1)
202 { doSetParmValue(idx, instance, value); }
204 { doSetParmValue(idx, instance, value); }
206 { doSetParmValue(idx, instance, value); }
208 { doSetParmValue(idx, instance, 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); }
238 if (fieldnum.
size() < 1)
251 return "patchislaplacian";
261 if (fieldnum.
size() < 1)
262 return PARM_UNSUPPORTED;
315 loadData(is, rampdata);
333 int typelen = colon - data.
buffer();
347 {
int64 iv =
v; UTwrite(os, &iv); }
349 { UTwrite<fpreal64>(os, &
v); }
351 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
353 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
354 UTwrite<fpreal64>(os, &v.
z()); }
356 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
357 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
369 if (s) s->save(ostr);
371 saveData(os, result);
378 ostr << s->getDataTypeToken();
383 saveData(os, result);
387 void save(std::ostream &os)
const
391 saveData(os, myBasegroup);
392 saveData(os, myPatchgroup);
393 saveData(os, myMaskgroup);
394 saveData(os, myMaskcutoff);
395 saveData(os, myPatchislaplacian);
396 saveData(os, myTolerance);
409 loadData(is, myBasegroup);
410 loadData(is, myPatchgroup);
411 loadData(is, myMaskgroup);
412 loadData(is, myMaskcutoff);
413 loadData(is, myPatchislaplacian);
414 loadData(is, myTolerance);
424 if (!thissop)
return getBasegroup();
426 OP_Utils::evalOpParm(result, thissop,
"basegroup", cookparms.
getCookTime(), 0);
434 if (!thissop)
return getPatchgroup();
436 OP_Utils::evalOpParm(result, thissop,
"patchgroup", cookparms.
getCookTime(), 0);
444 if (!thissop)
return getMaskgroup();
446 OP_Utils::evalOpParm(result, thissop,
"maskgroup", cookparms.
getCookTime(), 0);
454 if (!thissop)
return getMaskcutoff();
456 OP_Utils::evalOpParm(result, thissop,
"maskcutoff", cookparms.
getCookTime(), 0);
464 if (!thissop)
return getPatchislaplacian();
466 OP_Utils::evalOpParm(result, thissop,
"patchislaplacian", cookparms.
getCookTime(), 0);
474 if (!thissop)
return getTolerance();
476 OP_Utils::evalOpParm(result, thissop,
"tolerance", cookparms.
getCookTime(), 0);
485 bool myPatchislaplacian;
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void saveData(std::ostream &os, fpreal64 v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
SOP_Node * getNode() const
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
exint getNestNumParms(TempIndex idx) const override
static void saveData(std::ostream &os, bool v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
const UT_StringHolder & getMaskgroup() const
GLsizei const GLfloat * value
static void loadData(UT_IStream &is, UT_Vector3I &v)
const UT_StringHolder & getPatchgroup() const
const OP_Context & context() const
bool operator!=(const SOP_VolumePatchParms &src) const
constexpr SYS_FORCE_INLINE T & z() noexcept
bool isParmColorRamp(exint idx) const override
SYS_FORCE_INLINE const char * buffer() const
fpreal64 getTolerance() const
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_Vector2I &v)
**But if you need a result
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
void setPatchgroup(const UT_StringHolder &val)
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 getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void save(std::ostream &os) const
void setPatchislaplacian(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & x() noexcept
fpreal64 getMaskcutoff() const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
fpreal64 opMaskcutoff(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void saveData(std::ostream &os, UT_Matrix4D v)
void setBasegroup(const UT_StringHolder &val)
bool operator==(const SOP_VolumePatchParms &src) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
constexpr SYS_FORCE_INLINE T & z() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
const OP_GraphProxy * graph() const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void saveData(std::ostream &os, UT_Matrix3D v)
UT_StringHolder opBasegroup(const SOP_NodeVerb::CookParms &cookparms) const
void copyFrom(const OP_NodeParms *src) override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, bool &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_Matrix4D &value) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
GT_API const UT_StringHolder version
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
bool load(UT_IStream &is)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
UT_StringHolder opMaskgroup(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void saveData(std::ostream &os, UT_Vector2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void coerceValue(T &result, const S &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void saveData(std::ostream &os, UT_Vector3D v)
DEP_MicroNode * depnode() const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
const UT_StringHolder & getBasegroup() const
bool opPatchislaplacian(const SOP_NodeVerb::CookParms &cookparms) const
virtual UT_StringHolder baseGetSignature() const
UT_StringHolder opPatchgroup(const SOP_NodeVerb::CookParms &cookparms) const
fpreal getCookTime() const
fpreal64 opTolerance(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void saveData(std::ostream &os, UT_StringHolder s)
const char * findChar(int c) const
void setMaskcutoff(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, int64 &v)
const char * getNestParmName(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
bool getPatchislaplacian() const
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
void setMaskgroup(const UT_StringHolder &val)
void setTolerance(fpreal64 val)
void loadFromOpSubclass(const LoadParms &loadparms) override
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
ParmType getNestParmType(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
static void loadData(UT_IStream &is, UT_Vector3D &v)