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;
95 myInfluenceGroup =
""_UTsh;
97 graph->
evalOpParm(myInfluenceGroup, nodeidx,
"influencegroup", time, graph->
isDirect()?
nullptr:depnode);
98 mySurfaceGroup =
""_UTsh;
99 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==0)))) ) )
100 graph->
evalOpParm(mySurfaceGroup, nodeidx,
"surfacegroup", time, graph->
isDirect()?
nullptr:depnode);
101 myMaxIterations = 10;
103 graph->
evalOpParm(myMaxIterations, nodeidx,
"maxiterations", time, graph->
isDirect()?
nullptr:depnode);
106 graph->
evalOpParm(myRadius, nodeidx,
"radius", time, graph->
isDirect()?
nullptr:depnode);
107 myUseRadiusAttrib =
true;
109 graph->
evalOpParm(myUseRadiusAttrib, nodeidx,
"useradiusattrib", time, graph->
isDirect()?
nullptr:depnode);
110 myRadiusAttrib =
"pscale"_UTsh;
111 if (
true && ( (
true&&!(((getUseRadiusAttrib()==0)))) ) )
112 graph->
evalOpParm(myRadiusAttrib, nodeidx,
"radiusattrib", time, graph->
isDirect()?
nullptr:depnode);
115 graph->
evalOpParm(myRelaxIn3D, nodeidx,
"relaxin3d", time, graph->
isDirect()?
nullptr:depnode);
117 if (
true && ( (
true&&!(((getRelaxIn3D()==1)))) ) )
118 graph->
evalOpParm(myUseNormals, nodeidx,
"usenormals", time, graph->
isDirect()?
nullptr:depnode);
119 myUseGeometricNormals =
false;
120 if (
true && ( (
true&&!(((getRelaxIn3D()==1))||((getUseNormals()==0)))) ) )
121 graph->
evalOpParm(myUseGeometricNormals, nodeidx,
"usegeometricnormals", time, graph->
isDirect()?
nullptr:depnode);
123 if (
true && ( (
true&&!(((getRelaxIn3D()==1))||((getUseNormals()==1)))) ) )
124 graph->
evalOpParm(myNormal, nodeidx,
"normal", time, graph->
isDirect()?
nullptr:depnode);
125 myUseMaxStepAttrib =
false;
127 graph->
evalOpParm(myUseMaxStepAttrib, nodeidx,
"usemaxstepattrib", time, graph->
isDirect()?
nullptr:depnode);
128 myMaxStepAttrib =
"maxstep"_UTsh;
129 if (
true && ( (
true&&!(((getUseMaxStepAttrib()==0)))) ) )
130 graph->
evalOpParm(myMaxStepAttrib, nodeidx,
"maxstepattrib", time, graph->
isDirect()?
nullptr:depnode);
131 myUsePrimNumAttrib =
false;
132 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==0)))) ) )
133 graph->
evalOpParm(myUsePrimNumAttrib, nodeidx,
"useprimnumattrib", time, graph->
isDirect()?
nullptr:depnode);
134 myPrimNumAttrib =
"sourceprim"_UTsh;
135 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==0))||((getUsePrimNumAttrib()==0)))) ) )
136 graph->
evalOpParm(myPrimNumAttrib, nodeidx,
"primnumattrib", time, graph->
isDirect()?
nullptr:depnode);
137 myUsePrimUVWAttrib =
false;
138 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==0)))) ) )
139 graph->
evalOpParm(myUsePrimUVWAttrib, nodeidx,
"useprimuvwattrib", time, graph->
isDirect()?
nullptr:depnode);
140 myPrimUVWAttrib =
"sourceprimuv"_UTsh;
141 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==0))||((getUsePrimUVWAttrib()==0)))) ) )
142 graph->
evalOpParm(myPrimUVWAttrib, nodeidx,
"primuvwattrib", time, graph->
isDirect()?
nullptr:depnode);
158 template <
typename T>
165 if (idx.
size() != instance.
size()+1)
234 { doGetParmValue(idx, instance, value); }
236 { doGetParmValue(idx, instance, value); }
238 { doGetParmValue(idx, instance, value); }
240 { doGetParmValue(idx, instance, value); }
242 { doGetParmValue(idx, instance, value); }
244 { doGetParmValue(idx, instance, value); }
246 { doGetParmValue(idx, instance, value); }
248 { doGetParmValue(idx, instance, value); }
250 { doGetParmValue(idx, instance, value); }
252 { doGetParmValue(idx, instance, value); }
254 { doGetParmValue(idx, instance, value); }
256 template <
typename T>
263 if (idx.
size() != instance.
size()+1)
323 { doSetParmValue(idx, instance, value); }
325 { doSetParmValue(idx, instance, value); }
327 { doSetParmValue(idx, instance, value); }
329 { doSetParmValue(idx, instance, value); }
331 { doSetParmValue(idx, instance, value); }
333 { doSetParmValue(idx, instance, value); }
335 { doSetParmValue(idx, instance, value); }
337 { doSetParmValue(idx, instance, value); }
339 { doSetParmValue(idx, instance, value); }
341 { doSetParmValue(idx, instance, value); }
343 { doSetParmValue(idx, instance, value); }
359 if (fieldnum.
size() < 1)
366 return "influencegroup";
368 return "surfacegroup";
370 return "maxiterations";
374 return "useradiusattrib";
376 return "radiusattrib";
382 return "usegeometricnormals";
386 return "usemaxstepattrib";
388 return "maxstepattrib";
390 return "useprimnumattrib";
392 return "primnumattrib";
394 return "useprimuvwattrib";
396 return "primuvwattrib";
404 if (fieldnum.
size() < 1)
405 return PARM_UNSUPPORTED;
480 loadData(is, rampdata);
498 int typelen = colon - data.
buffer();
512 {
int64 iv =
v; UTwrite(os, &iv); }
514 { UTwrite<fpreal64>(os, &
v); }
516 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
518 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
519 UTwrite<fpreal64>(os, &v.
z()); }
521 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
522 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
534 if (s) s->save(ostr);
536 saveData(os, result);
543 ostr << s->getDataTypeToken();
548 saveData(os, result);
552 void save(std::ostream &os)
const
556 saveData(os, myGroup);
557 saveData(os, myInfluenceGroup);
558 saveData(os, mySurfaceGroup);
559 saveData(os, myMaxIterations);
560 saveData(os, myRadius);
561 saveData(os, myUseRadiusAttrib);
562 saveData(os, myRadiusAttrib);
563 saveData(os, myRelaxIn3D);
564 saveData(os, myUseNormals);
565 saveData(os, myUseGeometricNormals);
566 saveData(os, myNormal);
567 saveData(os, myUseMaxStepAttrib);
568 saveData(os, myMaxStepAttrib);
569 saveData(os, myUsePrimNumAttrib);
570 saveData(os, myPrimNumAttrib);
571 saveData(os, myUsePrimUVWAttrib);
572 saveData(os, myPrimUVWAttrib);
585 loadData(is, myGroup);
586 loadData(is, myInfluenceGroup);
587 loadData(is, mySurfaceGroup);
588 loadData(is, myMaxIterations);
589 loadData(is, myRadius);
590 loadData(is, myUseRadiusAttrib);
591 loadData(is, myRadiusAttrib);
592 loadData(is, myRelaxIn3D);
593 loadData(is, myUseNormals);
594 loadData(is, myUseGeometricNormals);
595 loadData(is, myNormal);
596 loadData(is, myUseMaxStepAttrib);
597 loadData(is, myMaxStepAttrib);
598 loadData(is, myUsePrimNumAttrib);
599 loadData(is, myPrimNumAttrib);
600 loadData(is, myUsePrimUVWAttrib);
601 loadData(is, myPrimUVWAttrib);
611 if (!thissop)
return getGroup();
613 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
621 if (!thissop)
return getInfluenceGroup();
623 OP_Utils::evalOpParm(result, thissop,
"influencegroup", cookparms.
getCookTime(), 0);
631 if (!thissop)
return getSurfaceGroup();
633 OP_Utils::evalOpParm(result, thissop,
"surfacegroup", cookparms.
getCookTime(), 0);
641 if (!thissop)
return getMaxIterations();
643 OP_Utils::evalOpParm(result, thissop,
"maxiterations", cookparms.
getCookTime(), 0);
651 if (!thissop)
return getRadius();
653 OP_Utils::evalOpParm(result, thissop,
"radius", cookparms.
getCookTime(), 0);
661 if (!thissop)
return getUseRadiusAttrib();
663 OP_Utils::evalOpParm(result, thissop,
"useradiusattrib", cookparms.
getCookTime(), 0);
671 if (!thissop)
return getRadiusAttrib();
673 OP_Utils::evalOpParm(result, thissop,
"radiusattrib", cookparms.
getCookTime(), 0);
681 if (!thissop)
return getRelaxIn3D();
683 OP_Utils::evalOpParm(result, thissop,
"relaxin3d", cookparms.
getCookTime(), 0);
691 if (!thissop)
return getUseNormals();
693 OP_Utils::evalOpParm(result, thissop,
"usenormals", cookparms.
getCookTime(), 0);
701 if (!thissop)
return getUseGeometricNormals();
703 OP_Utils::evalOpParm(result, thissop,
"usegeometricnormals", cookparms.
getCookTime(), 0);
711 if (!thissop)
return getNormal();
713 OP_Utils::evalOpParm(result, thissop,
"normal", cookparms.
getCookTime(), 0);
721 if (!thissop)
return getUseMaxStepAttrib();
723 OP_Utils::evalOpParm(result, thissop,
"usemaxstepattrib", cookparms.
getCookTime(), 0);
731 if (!thissop)
return getMaxStepAttrib();
733 OP_Utils::evalOpParm(result, thissop,
"maxstepattrib", cookparms.
getCookTime(), 0);
741 if (!thissop)
return getUsePrimNumAttrib();
743 OP_Utils::evalOpParm(result, thissop,
"useprimnumattrib", cookparms.
getCookTime(), 0);
751 if (!thissop)
return getPrimNumAttrib();
753 OP_Utils::evalOpParm(result, thissop,
"primnumattrib", cookparms.
getCookTime(), 0);
761 if (!thissop)
return getUsePrimUVWAttrib();
763 OP_Utils::evalOpParm(result, thissop,
"useprimuvwattrib", cookparms.
getCookTime(), 0);
771 if (!thissop)
return getPrimUVWAttrib();
773 OP_Utils::evalOpParm(result, thissop,
"primuvwattrib", cookparms.
getCookTime(), 0);
781 int64 myMaxIterations;
783 bool myUseRadiusAttrib;
787 bool myUseGeometricNormals;
789 bool myUseMaxStepAttrib;
791 bool myUsePrimNumAttrib;
793 bool myUsePrimUVWAttrib;
virtual NodeIdx getInput(NodeIdx idx, OP_InputIdx input, bool markused=false) const =0
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
GLsizei const GLfloat * value
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
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)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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
virtual UT_StringHolder baseGetSignature() const
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
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
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
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