32 myToolgroup =
""_UTsh;
33 myCentergroup =
""_UTsh;
34 myCenterprimgroup =
""_UTsh;
35 myToolidname =
"toolid"_UTsh;
38 myClampsurfdist =
true;
41 myInflatetofarthest =
false;
42 myMaxinflateenable =
false;
56 if (myGroup != src.myGroup)
return false;
57 if (myToolgroup != src.myToolgroup)
return false;
58 if (myCentergroup != src.myCentergroup)
return false;
59 if (myCenterprimgroup != src.myCenterprimgroup)
return false;
60 if (myToolidname != src.myToolidname)
return false;
61 if (myCenteroverlap != src.myCenteroverlap)
return false;
62 if (myBlendexponent != src.myBlendexponent)
return false;
63 if (myClampsurfdist != src.myClampsurfdist)
return false;
64 if (myMinsurfdist != src.myMinsurfdist)
return false;
65 if (myTightness != src.myTightness)
return false;
66 if (myInflatetofarthest != src.myInflatetofarthest)
return false;
67 if (myMaxinflateenable != src.myMaxinflateenable)
return false;
68 if (myMaxinflate != src.myMaxinflate)
return false;
83 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
84 myToolgroup =
""_UTsh;
86 graph->
evalOpParm(myToolgroup, nodeidx,
"toolgroup", time, 0);
87 myCentergroup =
""_UTsh;
89 graph->
evalOpParm(myCentergroup, nodeidx,
"centergroup", time, 0);
90 myCenterprimgroup =
""_UTsh;
92 graph->
evalOpParm(myCenterprimgroup, nodeidx,
"centerprimgroup", time, 0);
93 myToolidname =
"toolid"_UTsh;
95 graph->
evalOpParm(myToolidname, nodeidx,
"toolidname", time, 0);
98 graph->
evalOpParm(myCenteroverlap, nodeidx,
"centeroverlap", time, 0);
101 graph->
evalOpParm(myBlendexponent, nodeidx,
"blendexponent", time, 0);
102 myClampsurfdist =
true;
104 graph->
evalOpParm(myClampsurfdist, nodeidx,
"clampsurfdist", time, 0);
106 if (
true && ( (
true&&!(((getClampsurfdist()==0)))) ) )
107 graph->
evalOpParm(myMinsurfdist, nodeidx,
"minsurfdist", time, 0);
110 graph->
evalOpParm(myTightness, nodeidx,
"tightness", time, 0);
111 myInflatetofarthest =
false;
113 graph->
evalOpParm(myInflatetofarthest, nodeidx,
"inflatetofarthest", time, 0);
114 myMaxinflateenable =
false;
116 graph->
evalOpParm(myMaxinflateenable, nodeidx,
"maxinflateenable", time, 0);
118 if (
true && ( (
true&&!(((getMaxinflateenable()==0)))) ) )
119 graph->
evalOpParm(myMaxinflate, nodeidx,
"maxinflate", time, 0);
135 template <
typename T>
142 if (idx.
size() != instance.
size()+1)
199 { doGetParmValue(idx, instance, value); }
201 { doGetParmValue(idx, instance, value); }
203 { doGetParmValue(idx, instance, value); }
205 { doGetParmValue(idx, instance, value); }
207 { doGetParmValue(idx, instance, value); }
209 { doGetParmValue(idx, instance, value); }
211 { doGetParmValue(idx, instance, value); }
213 { doGetParmValue(idx, instance, value); }
215 { doGetParmValue(idx, instance, value); }
217 { doGetParmValue(idx, instance, value); }
219 { doGetParmValue(idx, instance, value); }
221 template <
typename T>
228 if (idx.
size() != instance.
size()+1)
276 { doSetParmValue(idx, instance, value); }
278 { doSetParmValue(idx, instance, value); }
280 { doSetParmValue(idx, instance, value); }
282 { doSetParmValue(idx, instance, value); }
284 { doSetParmValue(idx, instance, value); }
286 { doSetParmValue(idx, instance, value); }
288 { doSetParmValue(idx, instance, value); }
290 { doSetParmValue(idx, instance, value); }
292 { doSetParmValue(idx, instance, value); }
294 { doSetParmValue(idx, instance, value); }
296 { doSetParmValue(idx, instance, value); }
312 if (fieldnum.
size() < 1)
321 return "centergroup";
323 return "centerprimgroup";
327 return "centeroverlap";
329 return "blendexponent";
331 return "clampsurfdist";
333 return "minsurfdist";
337 return "inflatetofarthest";
339 return "maxinflateenable";
349 if (fieldnum.
size() < 1)
350 return PARM_UNSUPPORTED;
417 loadData(is, rampdata);
435 int typelen = colon - data.
buffer();
449 {
int64 iv =
v; UTwrite(os, &iv); }
451 { UTwrite<fpreal64>(os, &
v); }
453 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
455 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
456 UTwrite<fpreal64>(os, &v.
z()); }
458 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
459 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
471 if (s) s->save(ostr);
473 saveData(os, result);
480 ostr << s->getDataTypeToken();
485 saveData(os, result);
489 void save(std::ostream &os)
const
493 saveData(os, myGroup);
494 saveData(os, myToolgroup);
495 saveData(os, myCentergroup);
496 saveData(os, myCenterprimgroup);
497 saveData(os, myToolidname);
498 saveData(os, myCenteroverlap);
499 saveData(os, myBlendexponent);
500 saveData(os, myClampsurfdist);
501 saveData(os, myMinsurfdist);
502 saveData(os, myTightness);
503 saveData(os, myInflatetofarthest);
504 saveData(os, myMaxinflateenable);
505 saveData(os, myMaxinflate);
518 loadData(is, myGroup);
519 loadData(is, myToolgroup);
520 loadData(is, myCentergroup);
521 loadData(is, myCenterprimgroup);
522 loadData(is, myToolidname);
523 loadData(is, myCenteroverlap);
524 loadData(is, myBlendexponent);
525 loadData(is, myClampsurfdist);
526 loadData(is, myMinsurfdist);
527 loadData(is, myTightness);
528 loadData(is, myInflatetofarthest);
529 loadData(is, myMaxinflateenable);
530 loadData(is, myMaxinflate);
540 if (!thissop)
return getGroup();
542 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
550 if (!thissop)
return getToolgroup();
552 OP_Utils::evalOpParm(result, thissop,
"toolgroup", cookparms.
getCookTime(), 0);
560 if (!thissop)
return getCentergroup();
562 OP_Utils::evalOpParm(result, thissop,
"centergroup", cookparms.
getCookTime(), 0);
570 if (!thissop)
return getCenterprimgroup();
572 OP_Utils::evalOpParm(result, thissop,
"centerprimgroup", cookparms.
getCookTime(), 0);
580 if (!thissop)
return getToolidname();
582 OP_Utils::evalOpParm(result, thissop,
"toolidname", cookparms.
getCookTime(), 0);
590 if (!thissop)
return getCenteroverlap();
592 OP_Utils::evalOpParm(result, thissop,
"centeroverlap", cookparms.
getCookTime(), 0);
600 if (!thissop)
return getBlendexponent();
602 OP_Utils::evalOpParm(result, thissop,
"blendexponent", cookparms.
getCookTime(), 0);
610 if (!thissop)
return getClampsurfdist();
612 OP_Utils::evalOpParm(result, thissop,
"clampsurfdist", cookparms.
getCookTime(), 0);
620 if (!thissop)
return getMinsurfdist();
622 OP_Utils::evalOpParm(result, thissop,
"minsurfdist", cookparms.
getCookTime(), 0);
630 if (!thissop)
return getTightness();
632 OP_Utils::evalOpParm(result, thissop,
"tightness", cookparms.
getCookTime(), 0);
640 if (!thissop)
return getInflatetofarthest();
642 OP_Utils::evalOpParm(result, thissop,
"inflatetofarthest", cookparms.
getCookTime(), 0);
650 if (!thissop)
return getMaxinflateenable();
652 OP_Utils::evalOpParm(result, thissop,
"maxinflateenable", cookparms.
getCookTime(), 0);
660 if (!thissop)
return getMaxinflate();
662 OP_Utils::evalOpParm(result, thissop,
"maxinflate", cookparms.
getCookTime(), 0);
674 bool myClampsurfdist;
677 bool myInflatetofarthest;
678 bool myMaxinflateenable;
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
ParmType getNestParmType(TempIndex fieldnum) const override
void setMinsurfdist(fpreal64 val)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
SOP_Node * getNode() const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setMaxinflateenable(bool val)
void copyFrom(const OP_NodeParms *src) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
bool operator!=(const SOP_InflateParms &src) const
static void loadData(UT_IStream &is, fpreal64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
const OP_Context & context() const
const UT_StringHolder & getToolgroup() const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
UT_StringHolder opCentergroup(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, int64 v)
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_Vector4I &v)
**But if you need a result
static void saveData(std::ostream &os, UT_Matrix3D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
fpreal64 opMinsurfdist(const SOP_NodeVerb::CookParms &cookparms) const
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, UT_Matrix4D &value) const override
bool load(UT_IStream &is)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const SOP_InflateParms &src) const
fpreal64 getTightness() const
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setCentergroup(const UT_StringHolder &val)
void setCenterprimgroup(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & x() noexcept
static void loadData(UT_IStream &is, UT_Matrix4D &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
fpreal64 getMaxinflate() const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
constexpr SYS_FORCE_INLINE T & z() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void loadFromOpSubclass(const LoadParms &loadparms) override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
fpreal64 getCenteroverlap() const
const OP_GraphProxy * graph() const
void setClampsurfdist(bool val)
fpreal64 getBlendexponent() const
UT_StringHolder opToolgroup(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setGroup(const UT_StringHolder &val)
fpreal64 getMinsurfdist() const
static void saveData(std::ostream &os, fpreal64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
fpreal64 opCenteroverlap(const SOP_NodeVerb::CookParms &cookparms) const
void setInflatetofarthest(bool val)
const UT_StringHolder & getToolidname() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void saveData(std::ostream &os, UT_Vector3D v)
static void loadData(UT_IStream &is, int64 &v)
const char * getNestParmName(TempIndex fieldnum) const override
bool getInflatetofarthest() const
bool opMaxinflateenable(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
fpreal64 opTightness(const SOP_NodeVerb::CookParms &cookparms) const
void setToolgroup(const UT_StringHolder &val)
const UT_StringHolder & getCenterprimgroup() const
static void saveData(std::ostream &os, UT_StringHolder s)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
bool getMaxinflateenable() const
bool getClampsurfdist() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
bool opInflatetofarthest(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
GT_API const UT_StringHolder version
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void coerceValue(T &result, const S &src) const
bool opClampsurfdist(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getGroup() const
static void saveData(std::ostream &os, UT_Matrix4D v)
void save(std::ostream &os) const
UT_StringHolder opCenterprimgroup(const SOP_NodeVerb::CookParms &cookparms) const
DEP_MicroNode * depnode() const
void setMaxinflate(fpreal64 val)
Utility class for containing a color ramp.
void setCenteroverlap(fpreal64 val)
constexpr SYS_FORCE_INLINE T & w() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void saveData(std::ostream &os, UT_Vector4D v)
UT_StringHolder opToolidname(const SOP_NodeVerb::CookParms &cookparms) const
void setTightness(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
fpreal getCookTime() const
static void loadData(UT_IStream &is, bool &v)
fpreal64 opMaxinflate(const SOP_NodeVerb::CookParms &cookparms) const
const char * findChar(int c) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
bool isParmColorRamp(exint idx) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
static void saveData(std::ostream &os, UT_Vector2D v)
const UT_StringHolder & getCentergroup() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setToolidname(const UT_StringHolder &val)
void setBlendexponent(fpreal64 val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
exint getNestNumParms(TempIndex idx) const override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept
fpreal64 opBlendexponent(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)