23 namespace SOP_InflateEnums
34 using namespace UT::Literal;
53 myToolgroup =
""_UTsh;
54 myCentergroup =
""_UTsh;
55 myCenterprimgroup =
""_UTsh;
57 myEnablemaskattrib = 0;
58 myMaskattrib =
"mask"_UTsh;
59 myToolidname =
"toolid"_UTsh;
62 myClampsurfdist =
true;
65 myInflatetofarthest =
false;
66 myMaxinflateenable =
false;
80 if (myGroup != src.myGroup)
return false;
81 if (myToolgroup != src.myToolgroup)
return false;
82 if (myCentergroup != src.myCentergroup)
return false;
83 if (myCenterprimgroup != src.myCenterprimgroup)
return false;
84 if (myMask != src.myMask)
return false;
85 if (myEnablemaskattrib != src.myEnablemaskattrib)
return false;
86 if (myMaskattrib != src.myMaskattrib)
return false;
87 if (myToolidname != src.myToolidname)
return false;
88 if (myCenteroverlap != src.myCenteroverlap)
return false;
89 if (myBlendexponent != src.myBlendexponent)
return false;
90 if (myClampsurfdist != src.myClampsurfdist)
return false;
91 if (myMinsurfdist != src.myMinsurfdist)
return false;
92 if (myTightness != src.myTightness)
return false;
93 if (myInflatetofarthest != src.myInflatetofarthest)
return false;
94 if (myMaxinflateenable != src.myMaxinflateenable)
return false;
95 if (myMaxinflate != src.myMaxinflate)
return false;
114 graph->
evalOpParm(myGroup, nodeidx,
"group", time, graph->
isDirect()?
nullptr:depnode);
115 myToolgroup =
""_UTsh;
117 graph->
evalOpParm(myToolgroup, nodeidx,
"toolgroup", time, graph->
isDirect()?
nullptr:depnode);
118 myCentergroup =
""_UTsh;
120 graph->
evalOpParm(myCentergroup, nodeidx,
"centergroup", time, graph->
isDirect()?
nullptr:depnode);
121 myCenterprimgroup =
""_UTsh;
123 graph->
evalOpParm(myCenterprimgroup, nodeidx,
"centerprimgroup", time, graph->
isDirect()?
nullptr:depnode);
127 myEnablemaskattrib = 0;
129 graph->
evalOpParm(myEnablemaskattrib, nodeidx,
"enablemaskattrib", time, graph->
isDirect()?
nullptr:depnode);
130 myMaskattrib =
"mask"_UTsh;
131 if (
true && ( (
true&&!(((
int64(getEnablemaskattrib())==0)))) ) )
132 graph->
evalOpParm(myMaskattrib, nodeidx,
"maskattrib", time, graph->
isDirect()?
nullptr:depnode);
133 myToolidname =
"toolid"_UTsh;
135 graph->
evalOpParm(myToolidname, nodeidx,
"toolidname", time, graph->
isDirect()?
nullptr:depnode);
138 graph->
evalOpParm(myCenteroverlap, nodeidx,
"centeroverlap", time, graph->
isDirect()?
nullptr:depnode);
141 graph->
evalOpParm(myBlendexponent, nodeidx,
"blendexponent", time, graph->
isDirect()?
nullptr:depnode);
142 myClampsurfdist =
true;
144 graph->
evalOpParm(myClampsurfdist, nodeidx,
"clampsurfdist", time, graph->
isDirect()?
nullptr:depnode);
146 if (
true && ( (
true&&!(((getClampsurfdist()==0)))) ) )
147 graph->
evalOpParm(myMinsurfdist, nodeidx,
"minsurfdist", time, graph->
isDirect()?
nullptr:depnode);
150 graph->
evalOpParm(myTightness, nodeidx,
"tightness", time, graph->
isDirect()?
nullptr:depnode);
151 myInflatetofarthest =
false;
153 graph->
evalOpParm(myInflatetofarthest, nodeidx,
"inflatetofarthest", time, graph->
isDirect()?
nullptr:depnode);
154 myMaxinflateenable =
false;
156 graph->
evalOpParm(myMaxinflateenable, nodeidx,
"maxinflateenable", time, graph->
isDirect()?
nullptr:depnode);
158 if (
true && ( (
true&&!(((getMaxinflateenable()==0)))) ) )
159 graph->
evalOpParm(myMaxinflate, nodeidx,
"maxinflate", time, graph->
isDirect()?
nullptr:depnode);
175 template <
typename T>
182 if (idx.
size() != instance.
size()+1)
187 coerceValue(value, myGroup);
190 coerceValue(value, myToolgroup);
193 coerceValue(value, myCentergroup);
196 coerceValue(value, myCenterprimgroup);
199 coerceValue(value, myMask);
202 coerceValue(value, myEnablemaskattrib);
205 coerceValue(value, myMaskattrib);
208 coerceValue(value, myToolidname);
211 coerceValue(value, myCenteroverlap);
214 coerceValue(value, myBlendexponent);
217 coerceValue(value, myClampsurfdist);
220 coerceValue(value, myMinsurfdist);
223 coerceValue(value, myTightness);
226 coerceValue(value, myInflatetofarthest);
229 coerceValue(value, myMaxinflateenable);
232 coerceValue(value, myMaxinflate);
248 { doGetParmValue(idx, instance, value); }
250 { doGetParmValue(idx, instance, value); }
252 { doGetParmValue(idx, instance, value); }
254 { doGetParmValue(idx, instance, value); }
256 { doGetParmValue(idx, instance, value); }
258 { doGetParmValue(idx, instance, value); }
260 { doGetParmValue(idx, instance, value); }
262 { doGetParmValue(idx, instance, value); }
264 { doGetParmValue(idx, instance, value); }
266 { doGetParmValue(idx, instance, value); }
268 { doGetParmValue(idx, instance, value); }
270 template <
typename T>
277 if (idx.
size() != instance.
size()+1)
282 coerceValue(myGroup, ( ( value ) ));
285 coerceValue(myToolgroup, ( ( value ) ));
288 coerceValue(myCentergroup, ( ( value ) ));
291 coerceValue(myCenterprimgroup, ( ( value ) ));
294 coerceValue(myMask, ( ( value ) ));
297 coerceValue(myEnablemaskattrib, clampMinValue(0, clampMaxValue(1, value ) ));
300 coerceValue(myMaskattrib, ( ( value ) ));
303 coerceValue(myToolidname, ( ( value ) ));
306 coerceValue(myCenteroverlap, ( ( value ) ));
309 coerceValue(myBlendexponent, ( ( value ) ));
312 coerceValue(myClampsurfdist, ( ( value ) ));
315 coerceValue(myMinsurfdist, ( ( value ) ));
318 coerceValue(myTightness, ( ( value ) ));
321 coerceValue(myInflatetofarthest, ( ( value ) ));
324 coerceValue(myMaxinflateenable, ( ( value ) ));
327 coerceValue(myMaxinflate, ( ( value ) ));
334 { doSetParmValue(idx, instance, value); }
336 { doSetParmValue(idx, instance, value); }
338 { doSetParmValue(idx, instance, value); }
340 { doSetParmValue(idx, instance, value); }
342 { doSetParmValue(idx, instance, value); }
344 { doSetParmValue(idx, instance, value); }
346 { doSetParmValue(idx, instance, value); }
348 { doSetParmValue(idx, instance, value); }
350 { doSetParmValue(idx, instance, value); }
352 { doSetParmValue(idx, instance, value); }
354 { doSetParmValue(idx, instance, value); }
370 if (fieldnum.
size() < 1)
379 return "centergroup";
381 return "centerprimgroup";
385 return "enablemaskattrib";
391 return "centeroverlap";
393 return "blendexponent";
395 return "clampsurfdist";
397 return "minsurfdist";
401 return "inflatetofarthest";
403 return "maxinflateenable";
413 if (fieldnum.
size() < 1)
414 return PARM_UNSUPPORTED;
451 return PARM_UNSUPPORTED;
487 loadData(is, rampdata);
505 int typelen = colon - data.
buffer();
519 {
int64 iv =
v; UTwrite(os, &iv); }
521 { UTwrite<fpreal64>(os, &
v); }
523 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
525 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
526 UTwrite<fpreal64>(os, &v.
z()); }
528 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
529 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
541 if (s) s->save(ostr);
543 saveData(os, result);
550 ostr << s->getDataTypeToken();
555 saveData(os, result);
559 void save(std::ostream &os)
const
563 saveData(os, myGroup);
564 saveData(os, myToolgroup);
565 saveData(os, myCentergroup);
566 saveData(os, myCenterprimgroup);
567 saveData(os, myMask);
568 saveData(os, myEnablemaskattrib);
569 saveData(os, myMaskattrib);
570 saveData(os, myToolidname);
571 saveData(os, myCenteroverlap);
572 saveData(os, myBlendexponent);
573 saveData(os, myClampsurfdist);
574 saveData(os, myMinsurfdist);
575 saveData(os, myTightness);
576 saveData(os, myInflatetofarthest);
577 saveData(os, myMaxinflateenable);
578 saveData(os, myMaxinflate);
591 loadData(is, myGroup);
592 loadData(is, myToolgroup);
593 loadData(is, myCentergroup);
594 loadData(is, myCenterprimgroup);
595 loadData(is, myMask);
596 loadData(is, myEnablemaskattrib);
597 loadData(is, myMaskattrib);
598 loadData(is, myToolidname);
599 loadData(is, myCenteroverlap);
600 loadData(is, myBlendexponent);
601 loadData(is, myClampsurfdist);
602 loadData(is, myMinsurfdist);
603 loadData(is, myTightness);
604 loadData(is, myInflatetofarthest);
605 loadData(is, myMaxinflateenable);
606 loadData(is, myMaxinflate);
616 if (!thissop)
return getGroup();
618 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
626 if (!thissop)
return getToolgroup();
628 OP_Utils::evalOpParm(result, thissop,
"toolgroup", cookparms.
getCookTime(), 0);
636 if (!thissop)
return getCentergroup();
638 OP_Utils::evalOpParm(result, thissop,
"centergroup", cookparms.
getCookTime(), 0);
646 if (!thissop)
return getCenterprimgroup();
648 OP_Utils::evalOpParm(result, thissop,
"centerprimgroup", cookparms.
getCookTime(), 0);
656 if (!thissop)
return getMask();
658 OP_Utils::evalOpParm(result, thissop,
"mask", cookparms.
getCookTime(), 0);
666 if (!thissop)
return getEnablemaskattrib();
668 OP_Utils::evalOpParm(result, thissop,
"enablemaskattrib", cookparms.
getCookTime(), 0);
676 if (!thissop)
return getMaskattrib();
678 OP_Utils::evalOpParm(result, thissop,
"maskattrib", cookparms.
getCookTime(), 0);
686 if (!thissop)
return getToolidname();
688 OP_Utils::evalOpParm(result, thissop,
"toolidname", cookparms.
getCookTime(), 0);
696 if (!thissop)
return getCenteroverlap();
698 OP_Utils::evalOpParm(result, thissop,
"centeroverlap", cookparms.
getCookTime(), 0);
706 if (!thissop)
return getBlendexponent();
708 OP_Utils::evalOpParm(result, thissop,
"blendexponent", cookparms.
getCookTime(), 0);
716 if (!thissop)
return getClampsurfdist();
718 OP_Utils::evalOpParm(result, thissop,
"clampsurfdist", cookparms.
getCookTime(), 0);
726 if (!thissop)
return getMinsurfdist();
728 OP_Utils::evalOpParm(result, thissop,
"minsurfdist", cookparms.
getCookTime(), 0);
736 if (!thissop)
return getTightness();
738 OP_Utils::evalOpParm(result, thissop,
"tightness", cookparms.
getCookTime(), 0);
746 if (!thissop)
return getInflatetofarthest();
748 OP_Utils::evalOpParm(result, thissop,
"inflatetofarthest", cookparms.
getCookTime(), 0);
756 if (!thissop)
return getMaxinflateenable();
758 OP_Utils::evalOpParm(result, thissop,
"maxinflateenable", cookparms.
getCookTime(), 0);
766 if (!thissop)
return getMaxinflate();
768 OP_Utils::evalOpParm(result, thissop,
"maxinflate", cookparms.
getCookTime(), 0);
778 int64 myEnablemaskattrib;
783 bool myClampsurfdist;
786 bool myInflatetofarthest;
787 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
GLsizei const GLfloat * value
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
UT_StringHolder opMaskattrib(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix3D v)
void setMaskattrib(const UT_StringHolder &val)
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)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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 setEnablemaskattrib(Enablemaskattrib val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
Enablemaskattrib getEnablemaskattrib() const
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.
Enablemaskattrib opEnablemaskattrib(const SOP_NodeVerb::CookParms &cookparms) const
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
void setMask(fpreal64 val)
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
fpreal64 opMask(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE UT_StringHolder getToken(Enablemaskattrib enum_value)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
const UT_StringHolder & getMaskattrib() 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)
LeafData & operator=(const LeafData &)=delete
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)
virtual UT_StringHolder baseGetSignature() const
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)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
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)
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)
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)