38 myRecomputeNormals =
true;
39 myClampStepSize =
true;
52 if (myGroup != src.myGroup)
return false;
53 if (myIterations != src.myIterations)
return false;
54 if (myStepSize != src.myStepSize)
return false;
55 if (myMethod != src.myMethod)
return false;
56 if (mySymmetrize != src.mySymmetrize)
return false;
57 if (mySymmetryAxis != src.mySymmetryAxis)
return false;
58 if (myPinBorder != src.myPinBorder)
return false;
59 if (myRecomputeNormals != src.myRecomputeNormals)
return false;
60 if (myClampStepSize != src.myClampStepSize)
return false;
75 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
78 graph->
evalOpParm(myIterations, nodeidx,
"iterations", time, 0);
81 graph->
evalOpParm(myStepSize, nodeidx,
"stepsize", time, 0);
84 graph->
evalOpParm(myMethod, nodeidx,
"method", time, 0);
87 graph->
evalOpParm(mySymmetrize, nodeidx,
"symmetrize", time, 0);
89 if (
true && ( (getSymmetrize()) ) )
90 graph->
evalOpParm(mySymmetryAxis, nodeidx,
"symmetryaxis", time, 0);
93 graph->
evalOpParm(myPinBorder, nodeidx,
"pinborder", time, 0);
94 myRecomputeNormals =
true;
96 graph->
evalOpParm(myRecomputeNormals, nodeidx,
"updateaffectednmls", time, 0);
97 myClampStepSize =
true;
99 graph->
evalOpParm(myClampStepSize, nodeidx,
"clampstepsize", time, 0);
115 template <
typename T>
122 if (idx.
size() != instance.
size()+1)
167 { doGetParmValue(idx, instance, value); }
169 { doGetParmValue(idx, instance, value); }
171 { doGetParmValue(idx, instance, value); }
173 { doGetParmValue(idx, instance, value); }
175 { doGetParmValue(idx, instance, value); }
177 { doGetParmValue(idx, instance, value); }
179 { doGetParmValue(idx, instance, value); }
181 { doGetParmValue(idx, instance, value); }
183 { doGetParmValue(idx, instance, value); }
185 { doGetParmValue(idx, instance, value); }
187 { doGetParmValue(idx, instance, value); }
189 template <
typename T>
196 if (idx.
size() != instance.
size()+1)
232 { doSetParmValue(idx, instance, value); }
234 { doSetParmValue(idx, instance, value); }
236 { doSetParmValue(idx, instance, value); }
238 { doSetParmValue(idx, instance, value); }
240 { doSetParmValue(idx, instance, value); }
242 { doSetParmValue(idx, instance, value); }
244 { doSetParmValue(idx, instance, value); }
246 { doSetParmValue(idx, instance, value); }
248 { doSetParmValue(idx, instance, value); }
250 { doSetParmValue(idx, instance, value); }
252 { doSetParmValue(idx, instance, value); }
268 if (fieldnum.
size() < 1)
283 return "symmetryaxis";
287 return "updateaffectednmls";
289 return "clampstepsize";
297 if (fieldnum.
size() < 1)
298 return PARM_UNSUPPORTED;
357 loadData(is, rampdata);
375 int typelen = colon - data.
buffer();
389 {
int64 iv =
v; UTwrite(os, &iv); }
391 { UTwrite<fpreal64>(os, &
v); }
393 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
395 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
396 UTwrite<fpreal64>(os, &v.
z()); }
398 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
399 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
411 if (s) s->save(ostr);
413 saveData(os, result);
420 ostr << s->getDataTypeToken();
425 saveData(os, result);
429 void save(std::ostream &os)
const
433 saveData(os, myGroup);
434 saveData(os, myIterations);
435 saveData(os, myStepSize);
436 saveData(os, myMethod);
437 saveData(os, mySymmetrize);
438 saveData(os, mySymmetryAxis);
439 saveData(os, myPinBorder);
440 saveData(os, myRecomputeNormals);
441 saveData(os, myClampStepSize);
454 loadData(is, myGroup);
455 loadData(is, myIterations);
456 loadData(is, myStepSize);
457 loadData(is, myMethod);
458 loadData(is, mySymmetrize);
459 loadData(is, mySymmetryAxis);
460 loadData(is, myPinBorder);
461 loadData(is, myRecomputeNormals);
462 loadData(is, myClampStepSize);
472 if (!thissop)
return getGroup();
474 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
482 if (!thissop)
return getIterations();
484 OP_Utils::evalOpParm(result, thissop,
"iterations", cookparms.
getCookTime(), 0);
492 if (!thissop)
return getStepSize();
494 OP_Utils::evalOpParm(result, thissop,
"stepsize", cookparms.
getCookTime(), 0);
502 if (!thissop)
return getMethod();
504 OP_Utils::evalOpParm(result, thissop,
"method", cookparms.
getCookTime(), 0);
512 if (!thissop)
return getSymmetrize();
514 OP_Utils::evalOpParm(result, thissop,
"symmetrize", cookparms.
getCookTime(), 0);
522 if (!thissop)
return getSymmetryAxis();
524 OP_Utils::evalOpParm(result, thissop,
"symmetryaxis", cookparms.
getCookTime(), 0);
532 if (!thissop)
return getPinBorder();
534 OP_Utils::evalOpParm(result, thissop,
"pinborder", cookparms.
getCookTime(), 0);
542 if (!thissop)
return getRecomputeNormals();
544 OP_Utils::evalOpParm(result, thissop,
"updateaffectednmls", cookparms.
getCookTime(), 0);
552 if (!thissop)
return getClampStepSize();
554 OP_Utils::evalOpParm(result, thissop,
"clampstepsize", cookparms.
getCookTime(), 0);
564 int64 mySymmetryAxis;
566 bool myRecomputeNormals;
567 bool myClampStepSize;
static void loadData(UT_IStream &is, UT_Matrix2D &v)
int64 opMethod(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, bool v)
static void saveData(std::ostream &os, UT_Vector3D v)
SOP_Node * getNode() const
bool getClampStepSize() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
bool load(UT_IStream &is)
static void saveData(std::ostream &os, UT_Vector4D v)
void save(std::ostream &os) const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
const char * getNestParmName(TempIndex fieldnum) const override
void setRecomputeNormals(bool val)
static void saveData(std::ostream &os, UT_Matrix4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
int64 getSymmetryAxis() const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_Matrix3D &v)
**But if you need a result
int64 opSymmetryAxis(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void loadData(UT_IStream &is, UT_Vector4D &v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
exint getNestNumParms(TempIndex idx) const override
bool getRecomputeNormals() const
bool getPinBorder() const
constexpr SYS_FORCE_INLINE T & x() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void saveData(std::ostream &os, UT_Vector2D v)
bool opClampStepSize(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void loadData(UT_IStream &is, UT_Vector3I &v)
bool isParmColorRamp(exint idx) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void loadData(UT_IStream &is, UT_Vector4I &v)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
void setStepSize(fpreal64 val)
bool getSymmetrize() const
constexpr SYS_FORCE_INLINE T & z() noexcept
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
bool opSymmetrize(const SOP_NodeVerb::CookParms &cookparms) const
const OP_GraphProxy * graph() const
void setPinBorder(bool val)
void setSymmetryAxis(int64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void saveData(std::ostream &os, UT_Matrix3D v)
void setClampStepSize(bool val)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setSymmetrize(bool val)
static void loadData(UT_IStream &is, bool &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void loadData(UT_IStream &is, UT_Vector2D &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void saveData(std::ostream &os, UT_StringHolder s)
void saveBinary(std::ostream &os) const
Save string to binary stream.
void setIterations(int64 val)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
GT_API const UT_StringHolder version
void copyFrom(const OP_NodeParms *src) override
void setGroup(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void loadFromOpSubclass(const LoadParms &loadparms) override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void loadData(UT_IStream &is, fpreal64 &v)
void coerceValue(T &result, const S &src) const
void setMethod(int64 val)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
const UT_StringHolder & getGroup() const
DEP_MicroNode * depnode() const
Utility class for containing a color ramp.
bool opPinBorder(const SOP_NodeVerb::CookParms &cookparms) const
bool opRecomputeNormals(const SOP_NodeVerb::CookParms &cookparms) const
int64 opIterations(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & w() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
bool operator!=(const SOP_DeltaMushParms &src) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
fpreal getCookTime() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
const char * findChar(int c) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
fpreal64 opStepSize(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, fpreal64 v)
constexpr SYS_FORCE_INLINE T & y() noexcept
ParmType getNestParmType(TempIndex fieldnum) const override
fpreal64 getStepSize() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
int64 getIterations() const
static void loadData(UT_IStream &is, int64 &v)
OP_NodeParms & operator=(const OP_NodeParms &)=default
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool operator==(const SOP_DeltaMushParms &src) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
constexpr SYS_FORCE_INLINE T & x() noexcept