32 myInfluenceGroup =
""_UTsh;
33 mySurfaceGroup =
""_UTsh;
36 myUseRadiusAttrib =
true;
37 myRadiusAttrib =
"pscale"_UTsh;
40 myUseGeometricNormals =
false;
42 myUseMaxStepAttrib =
false;
43 myMaxStepAttrib =
"maxstep"_UTsh;
44 myUsePrimNumAttrib =
false;
45 myPrimNumAttrib =
"sourceprim"_UTsh;
46 myUsePrimUVWAttrib =
false;
47 myPrimUVWAttrib =
"sourceprimuv"_UTsh;
60 if (myGroup != src.myGroup)
return false;
61 if (myInfluenceGroup != src.myInfluenceGroup)
return false;
62 if (mySurfaceGroup != src.mySurfaceGroup)
return false;
63 if (myMaxIterations != src.myMaxIterations)
return false;
64 if (myRadius != src.myRadius)
return false;
65 if (myUseRadiusAttrib != src.myUseRadiusAttrib)
return false;
66 if (myRadiusAttrib != src.myRadiusAttrib)
return false;
67 if (myRelaxIn3D != src.myRelaxIn3D)
return false;
68 if (myUseNormals != src.myUseNormals)
return false;
69 if (myUseGeometricNormals != src.myUseGeometricNormals)
return false;
70 if (myNormal != src.myNormal)
return false;
71 if (myUseMaxStepAttrib != src.myUseMaxStepAttrib)
return false;
72 if (myMaxStepAttrib != src.myMaxStepAttrib)
return false;
73 if (myUsePrimNumAttrib != src.myUsePrimNumAttrib)
return false;
74 if (myPrimNumAttrib != src.myPrimNumAttrib)
return false;
75 if (myUsePrimUVWAttrib != src.myUsePrimUVWAttrib)
return false;
76 if (myPrimUVWAttrib != src.myPrimUVWAttrib)
return false;
91 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
92 myInfluenceGroup =
""_UTsh;
94 graph->
evalOpParm(myInfluenceGroup, nodeidx,
"influencegroup", time, 0);
95 mySurfaceGroup =
""_UTsh;
96 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==0)))) ) )
97 graph->
evalOpParm(mySurfaceGroup, nodeidx,
"surfacegroup", time, 0);
100 graph->
evalOpParm(myMaxIterations, nodeidx,
"maxiterations", time, 0);
103 graph->
evalOpParm(myRadius, nodeidx,
"radius", time, 0);
104 myUseRadiusAttrib =
true;
106 graph->
evalOpParm(myUseRadiusAttrib, nodeidx,
"useradiusattrib", time, 0);
107 myRadiusAttrib =
"pscale"_UTsh;
108 if (
true && ( (
true&&!(((getUseRadiusAttrib()==0)))) ) )
109 graph->
evalOpParm(myRadiusAttrib, nodeidx,
"radiusattrib", time, 0);
112 graph->
evalOpParm(myRelaxIn3D, nodeidx,
"relaxin3d", time, 0);
114 if (
true && ( (
true&&!(((getRelaxIn3D()==1)))) ) )
115 graph->
evalOpParm(myUseNormals, nodeidx,
"usenormals", time, 0);
116 myUseGeometricNormals =
false;
117 if (
true && ( (
true&&!(((getRelaxIn3D()==1))||((getUseNormals()==0)))) ) )
118 graph->
evalOpParm(myUseGeometricNormals, nodeidx,
"usegeometricnormals", time, 0);
120 if (
true && ( (
true&&!(((getRelaxIn3D()==1))||((getUseNormals()==1)))) ) )
121 graph->
evalOpParm(myNormal, nodeidx,
"normal", time, 0);
122 myUseMaxStepAttrib =
false;
124 graph->
evalOpParm(myUseMaxStepAttrib, nodeidx,
"usemaxstepattrib", time, 0);
125 myMaxStepAttrib =
"maxstep"_UTsh;
126 if (
true && ( (
true&&!(((getUseMaxStepAttrib()==0)))) ) )
127 graph->
evalOpParm(myMaxStepAttrib, nodeidx,
"maxstepattrib", time, 0);
128 myUsePrimNumAttrib =
false;
129 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==0)))) ) )
130 graph->
evalOpParm(myUsePrimNumAttrib, nodeidx,
"useprimnumattrib", time, 0);
131 myPrimNumAttrib =
"sourceprim"_UTsh;
132 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==0))||((getUsePrimNumAttrib()==0)))) ) )
133 graph->
evalOpParm(myPrimNumAttrib, nodeidx,
"primnumattrib", time, 0);
134 myUsePrimUVWAttrib =
false;
135 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==0)))) ) )
136 graph->
evalOpParm(myUsePrimUVWAttrib, nodeidx,
"useprimuvwattrib", time, 0);
137 myPrimUVWAttrib =
"sourceprimuv"_UTsh;
138 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==0))||((getUsePrimUVWAttrib()==0)))) ) )
139 graph->
evalOpParm(myPrimUVWAttrib, nodeidx,
"primuvwattrib", time, 0);
155 template <
typename T>
162 if (idx.
size() != instance.
size()+1)
231 { doGetParmValue(idx, instance, value); }
233 { doGetParmValue(idx, instance, value); }
235 { doGetParmValue(idx, instance, value); }
237 { doGetParmValue(idx, instance, value); }
239 { doGetParmValue(idx, instance, value); }
241 { doGetParmValue(idx, instance, value); }
243 { doGetParmValue(idx, instance, value); }
245 { doGetParmValue(idx, instance, value); }
247 { doGetParmValue(idx, instance, value); }
249 { doGetParmValue(idx, instance, value); }
251 { doGetParmValue(idx, instance, value); }
253 template <
typename T>
260 if (idx.
size() != instance.
size()+1)
320 { doSetParmValue(idx, instance, value); }
322 { doSetParmValue(idx, instance, value); }
324 { doSetParmValue(idx, instance, value); }
326 { doSetParmValue(idx, instance, value); }
328 { doSetParmValue(idx, instance, value); }
330 { doSetParmValue(idx, instance, value); }
332 { doSetParmValue(idx, instance, value); }
334 { doSetParmValue(idx, instance, value); }
336 { doSetParmValue(idx, instance, value); }
338 { doSetParmValue(idx, instance, value); }
340 { doSetParmValue(idx, instance, value); }
356 if (fieldnum.
size() < 1)
363 return "influencegroup";
365 return "surfacegroup";
367 return "maxiterations";
371 return "useradiusattrib";
373 return "radiusattrib";
379 return "usegeometricnormals";
383 return "usemaxstepattrib";
385 return "maxstepattrib";
387 return "useprimnumattrib";
389 return "primnumattrib";
391 return "useprimuvwattrib";
393 return "primuvwattrib";
401 if (fieldnum.
size() < 1)
402 return PARM_UNSUPPORTED;
477 loadData(is, rampdata);
495 int typelen = colon - data.
buffer();
509 {
int64 iv =
v; UTwrite(os, &iv); }
511 { UTwrite<fpreal64>(os, &
v); }
513 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
515 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
516 UTwrite<fpreal64>(os, &v.
z()); }
518 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
519 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
531 if (s) s->save(ostr);
533 saveData(os, result);
540 ostr << s->getDataTypeToken();
545 saveData(os, result);
549 void save(std::ostream &os)
const
553 saveData(os, myGroup);
554 saveData(os, myInfluenceGroup);
555 saveData(os, mySurfaceGroup);
556 saveData(os, myMaxIterations);
557 saveData(os, myRadius);
558 saveData(os, myUseRadiusAttrib);
559 saveData(os, myRadiusAttrib);
560 saveData(os, myRelaxIn3D);
561 saveData(os, myUseNormals);
562 saveData(os, myUseGeometricNormals);
563 saveData(os, myNormal);
564 saveData(os, myUseMaxStepAttrib);
565 saveData(os, myMaxStepAttrib);
566 saveData(os, myUsePrimNumAttrib);
567 saveData(os, myPrimNumAttrib);
568 saveData(os, myUsePrimUVWAttrib);
569 saveData(os, myPrimUVWAttrib);
582 loadData(is, myGroup);
583 loadData(is, myInfluenceGroup);
584 loadData(is, mySurfaceGroup);
585 loadData(is, myMaxIterations);
586 loadData(is, myRadius);
587 loadData(is, myUseRadiusAttrib);
588 loadData(is, myRadiusAttrib);
589 loadData(is, myRelaxIn3D);
590 loadData(is, myUseNormals);
591 loadData(is, myUseGeometricNormals);
592 loadData(is, myNormal);
593 loadData(is, myUseMaxStepAttrib);
594 loadData(is, myMaxStepAttrib);
595 loadData(is, myUsePrimNumAttrib);
596 loadData(is, myPrimNumAttrib);
597 loadData(is, myUsePrimUVWAttrib);
598 loadData(is, myPrimUVWAttrib);
608 if (!thissop)
return getGroup();
610 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
618 if (!thissop)
return getInfluenceGroup();
620 OP_Utils::evalOpParm(result, thissop,
"influencegroup", cookparms.
getCookTime(), 0);
628 if (!thissop)
return getSurfaceGroup();
630 OP_Utils::evalOpParm(result, thissop,
"surfacegroup", cookparms.
getCookTime(), 0);
638 if (!thissop)
return getMaxIterations();
640 OP_Utils::evalOpParm(result, thissop,
"maxiterations", cookparms.
getCookTime(), 0);
648 if (!thissop)
return getRadius();
650 OP_Utils::evalOpParm(result, thissop,
"radius", cookparms.
getCookTime(), 0);
658 if (!thissop)
return getUseRadiusAttrib();
660 OP_Utils::evalOpParm(result, thissop,
"useradiusattrib", cookparms.
getCookTime(), 0);
668 if (!thissop)
return getRadiusAttrib();
670 OP_Utils::evalOpParm(result, thissop,
"radiusattrib", cookparms.
getCookTime(), 0);
678 if (!thissop)
return getRelaxIn3D();
680 OP_Utils::evalOpParm(result, thissop,
"relaxin3d", cookparms.
getCookTime(), 0);
688 if (!thissop)
return getUseNormals();
690 OP_Utils::evalOpParm(result, thissop,
"usenormals", cookparms.
getCookTime(), 0);
698 if (!thissop)
return getUseGeometricNormals();
700 OP_Utils::evalOpParm(result, thissop,
"usegeometricnormals", cookparms.
getCookTime(), 0);
708 if (!thissop)
return getNormal();
710 OP_Utils::evalOpParm(result, thissop,
"normal", cookparms.
getCookTime(), 0);
718 if (!thissop)
return getUseMaxStepAttrib();
720 OP_Utils::evalOpParm(result, thissop,
"usemaxstepattrib", cookparms.
getCookTime(), 0);
728 if (!thissop)
return getMaxStepAttrib();
730 OP_Utils::evalOpParm(result, thissop,
"maxstepattrib", cookparms.
getCookTime(), 0);
738 if (!thissop)
return getUsePrimNumAttrib();
740 OP_Utils::evalOpParm(result, thissop,
"useprimnumattrib", cookparms.
getCookTime(), 0);
748 if (!thissop)
return getPrimNumAttrib();
750 OP_Utils::evalOpParm(result, thissop,
"primnumattrib", cookparms.
getCookTime(), 0);
758 if (!thissop)
return getUsePrimUVWAttrib();
760 OP_Utils::evalOpParm(result, thissop,
"useprimuvwattrib", cookparms.
getCookTime(), 0);
768 if (!thissop)
return getPrimUVWAttrib();
770 OP_Utils::evalOpParm(result, thissop,
"primuvwattrib", cookparms.
getCookTime(), 0);
778 int64 myMaxIterations;
780 bool myUseRadiusAttrib;
784 bool myUseGeometricNormals;
786 bool myUseMaxStepAttrib;
788 bool myUsePrimNumAttrib;
790 bool myUsePrimUVWAttrib;
bool getUseMaxStepAttrib() const
static void loadData(UT_IStream &is, fpreal64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
int64 getMaxIterations() const
static void saveData(std::ostream &os, UT_Matrix4D v)
void setRadius(fpreal64 val)
void copyFrom(const OP_NodeParms *src) override
SOP_Node * getNode() const
bool getUsePrimUVWAttrib() const
const UT_StringHolder & getPrimNumAttrib() const
const UT_StringHolder & getPrimUVWAttrib() const
UT_Vector3D opNormal(const SOP_NodeVerb::CookParms &cookparms) const
bool isParmColorRamp(exint idx) const override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setPrimUVWAttrib(const UT_StringHolder &val)
UT_StringHolder opSurfaceGroup(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, int64 &v)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
bool getRelaxIn3D() const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void saveData(std::ostream &os, UT_Vector3D v)
const OP_Context & context() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
constexpr SYS_FORCE_INLINE T & z() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
SYS_FORCE_INLINE const char * buffer() const
void save(std::ostream &os) const
An output stream object that owns its own string buffer storage.
const UT_StringHolder & getSurfaceGroup() const
**But if you need a result
T clampMinValue(fpreal minvalue, const T &src) const
static void saveData(std::ostream &os, UT_Vector2D v)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
UT_StringHolder opPrimUVWAttrib(const SOP_NodeVerb::CookParms &cookparms) const
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void setRadiusAttrib(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_StringHolder s)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
virtual NodeIdx getInput(NodeIdx idx, int input, bool markused=false) const =0
constexpr SYS_FORCE_INLINE T & x() noexcept
bool opUsePrimUVWAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
exint getNestNumParms(TempIndex idx) const override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
constexpr SYS_FORCE_INLINE T & x() noexcept
static void loadData(UT_IStream &is, UT_StringHolder &v)
void loadFromOpSubclass(const LoadParms &loadparms) override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void loadData(UT_IStream &is, UT_Vector2D &v)
bool getUsePrimNumAttrib() const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
bool opUseRadiusAttrib(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void saveData(std::ostream &os, int64 v)
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 setMaxStepAttrib(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Matrix3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setMaxIterations(int64 val)
const OP_GraphProxy * graph() const
bool operator!=(const SOP_RelaxParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setPrimNumAttrib(const UT_StringHolder &val)
ParmType getNestParmType(TempIndex fieldnum) const override
fpreal64 getRadius() const
void setUseNormals(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
UT_StringHolder opInfluenceGroup(const SOP_NodeVerb::CookParms &cookparms) const
bool opRelaxIn3D(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opRadiusAttrib(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getRadiusAttrib() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setInfluenceGroup(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
UT_Vector3T< fpreal64 > UT_Vector3D
bool opUsePrimNumAttrib(const SOP_NodeVerb::CookParms &cookparms) const
bool getUseNormals() const
bool getUseRadiusAttrib() const
UT_StringHolder opPrimNumAttrib(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2I &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_Matrix2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, bool &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, fpreal64 v)
const char * getNestParmName(TempIndex fieldnum) const override
const UT_StringHolder & getInfluenceGroup() const
void setGroup(const UT_StringHolder &val)
bool operator==(const SOP_RelaxParms &src) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
bool load(UT_IStream &is)
void coerceValue(T &result, const S &src) const
void setUsePrimUVWAttrib(bool val)
const UT_StringHolder & getMaxStepAttrib() const
int64 opMaxIterations(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, bool v)
DEP_MicroNode * depnode() const
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
static void saveData(std::ostream &os, UT_Matrix2D v)
fpreal getCookTime() const
fpreal64 opRadius(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setNormal(UT_Vector3D val)
const char * findChar(int c) const
bool opUseNormals(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getGroup() const
bool opUseMaxStepAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void setUseRadiusAttrib(bool val)
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setRelaxIn3D(bool val)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setUseGeometricNormals(bool val)
bool getUseGeometricNormals() const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setUsePrimNumAttrib(bool val)
UT_Vector3D getNormal() const
bool opUseGeometricNormals(const SOP_NodeVerb::CookParms &cookparms) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
UT_StringHolder opMaxStepAttrib(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
void setSurfaceGroup(const UT_StringHolder &val)
void setUseMaxStepAttrib(bool val)
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept