33 myConnectpoints =
false;
37 mySharedpoints =
false;
50 if (myGroup != src.myGroup)
return false;
51 if (myNumdivs != src.myNumdivs)
return false;
52 if (myConnectpoints != src.myConnectpoints)
return false;
53 if (myClosepath != src.myClosepath)
return false;
54 if (myTolerance != src.myTolerance)
return false;
55 if (myApplytoall != src.myApplytoall)
return false;
56 if (mySharedpoints != src.mySharedpoints)
return false;
71 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
74 graph->
evalOpParm(myNumdivs, nodeidx,
"numdivs", time, 0);
75 myConnectpoints =
false;
77 graph->
evalOpParm(myConnectpoints, nodeidx,
"connectpoints", time, 0);
79 if (
true && ( (
true&&!(((getConnectpoints()==0)))) ) )
80 graph->
evalOpParm(myClosepath, nodeidx,
"closepath", time, 0);
83 graph->
evalOpParm(myTolerance, nodeidx,
"tolerance", time, 0);
85 if (
true && ( (
true&&!(((getConnectpoints()==1)))) ) )
86 graph->
evalOpParm(myApplytoall, nodeidx,
"applytoall", time, 0);
87 mySharedpoints =
false;
88 if (
true && ( (
true&&!(((getConnectpoints()==1)))) ) )
89 graph->
evalOpParm(mySharedpoints, nodeidx,
"sharedpoints", time, 0);
105 template <
typename T>
112 if (idx.
size() != instance.
size()+1)
151 { doGetParmValue(idx, instance, value); }
153 { doGetParmValue(idx, instance, value); }
155 { doGetParmValue(idx, instance, value); }
157 { doGetParmValue(idx, instance, value); }
159 { doGetParmValue(idx, instance, value); }
161 { doGetParmValue(idx, instance, value); }
163 { doGetParmValue(idx, instance, value); }
165 { doGetParmValue(idx, instance, value); }
167 { doGetParmValue(idx, instance, value); }
169 { doGetParmValue(idx, instance, value); }
171 { doGetParmValue(idx, instance, value); }
173 template <
typename T>
180 if (idx.
size() != instance.
size()+1)
210 { doSetParmValue(idx, instance, value); }
212 { doSetParmValue(idx, instance, value); }
214 { doSetParmValue(idx, instance, value); }
216 { doSetParmValue(idx, instance, value); }
218 { doSetParmValue(idx, instance, value); }
220 { doSetParmValue(idx, instance, value); }
222 { doSetParmValue(idx, instance, value); }
224 { doSetParmValue(idx, instance, value); }
226 { doSetParmValue(idx, instance, value); }
228 { doSetParmValue(idx, instance, value); }
230 { doSetParmValue(idx, instance, value); }
246 if (fieldnum.
size() < 1)
255 return "connectpoints";
263 return "sharedpoints";
271 if (fieldnum.
size() < 1)
272 return PARM_UNSUPPORTED;
327 loadData(is, rampdata);
345 int typelen = colon - data.
buffer();
359 {
int64 iv =
v; UTwrite(os, &iv); }
361 { UTwrite<fpreal64>(os, &
v); }
363 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
365 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
366 UTwrite<fpreal64>(os, &v.
z()); }
368 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
369 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
381 if (s) s->save(ostr);
383 saveData(os, result);
390 ostr << s->getDataTypeToken();
395 saveData(os, result);
399 void save(std::ostream &os)
const
403 saveData(os, myGroup);
404 saveData(os, myNumdivs);
405 saveData(os, myConnectpoints);
406 saveData(os, myClosepath);
407 saveData(os, myTolerance);
408 saveData(os, myApplytoall);
409 saveData(os, mySharedpoints);
422 loadData(is, myGroup);
423 loadData(is, myNumdivs);
424 loadData(is, myConnectpoints);
425 loadData(is, myClosepath);
426 loadData(is, myTolerance);
427 loadData(is, myApplytoall);
428 loadData(is, mySharedpoints);
438 if (!thissop)
return getGroup();
440 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
448 if (!thissop)
return getNumdivs();
450 OP_Utils::evalOpParm(result, thissop,
"numdivs", cookparms.
getCookTime(), 0);
458 if (!thissop)
return getConnectpoints();
460 OP_Utils::evalOpParm(result, thissop,
"connectpoints", cookparms.
getCookTime(), 0);
468 if (!thissop)
return getClosepath();
470 OP_Utils::evalOpParm(result, thissop,
"closepath", cookparms.
getCookTime(), 0);
478 if (!thissop)
return getTolerance();
480 OP_Utils::evalOpParm(result, thissop,
"tolerance", cookparms.
getCookTime(), 0);
488 if (!thissop)
return getApplytoall();
490 OP_Utils::evalOpParm(result, thissop,
"applytoall", cookparms.
getCookTime(), 0);
498 if (!thissop)
return getSharedpoints();
500 OP_Utils::evalOpParm(result, thissop,
"sharedpoints", cookparms.
getCookTime(), 0);
507 bool myConnectpoints;
static void loadData(UT_IStream &is, UT_Vector2I &v)
exint getNestNumParms(TempIndex idx) const override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void saveData(std::ostream &os, UT_Matrix4D v)
static void saveData(std::ostream &os, UT_Matrix3D v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setApplytoall(bool val)
SOP_Node * getNode() const
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
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, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
bool getConnectpoints() const
static void loadData(UT_IStream &is, int64 &v)
void setGroup(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
bool getSharedpoints() const
const char * getNestParmName(TempIndex fieldnum) const override
SYS_FORCE_INLINE const char * buffer() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void loadData(UT_IStream &is, UT_Vector4D &v)
An output stream object that owns its own string buffer storage.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
**But if you need a result
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
fpreal64 opTolerance(const SOP_NodeVerb::CookParms &cookparms) const
void setNumdivs(int64 val)
T clampMinValue(fpreal minvalue, const T &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void saveData(std::ostream &os, UT_Matrix2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
ParmType getNestParmType(TempIndex fieldnum) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
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 doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
constexpr SYS_FORCE_INLINE T & x() noexcept
void setClosepath(bool val)
static void saveData(std::ostream &os, bool v)
static void saveData(std::ostream &os, UT_Vector2D v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
bool opApplytoall(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
constexpr SYS_FORCE_INLINE T & z() noexcept
const OP_GraphProxy * graph() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void loadFromOpSubclass(const LoadParms &loadparms) override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
bool operator==(const SOP_EdgeDivideParms &src) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
GT_API const UT_StringHolder version
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
bool operator!=(const SOP_EdgeDivideParms &src) const
int64 opNumdivs(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void copyFrom(const OP_NodeParms *src) override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void coerceValue(T &result, const S &src) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void saveData(std::ostream &os, fpreal64 v)
DEP_MicroNode * depnode() const
void setSharedpoints(bool val)
Utility class for containing a color ramp.
bool isParmColorRamp(exint idx) const override
void setConnectpoints(bool val)
fpreal64 getTolerance() const
static void saveData(std::ostream &os, int64 v)
bool opSharedpoints(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & w() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void saveData(std::ostream &os, UT_Vector3D v)
void setTolerance(fpreal64 val)
bool getClosepath() const
fpreal getCookTime() const
const char * findChar(int c) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool opClosepath(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getGroup() const
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
bool load(UT_IStream &is)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
bool getApplytoall() const
UT_StringHolder opGroup(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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void saveData(std::ostream &os, UT_StringHolder s)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
OP_NodeParms & operator=(const OP_NodeParms &)=default
bool opConnectpoints(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void save(std::ostream &os) const
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override