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;
77 graph->
evalOpParm(myNumdivs, nodeidx,
"numdivs", time, graph->
isDirect()?
nullptr:depnode);
78 myConnectpoints =
false;
80 graph->
evalOpParm(myConnectpoints, nodeidx,
"connectpoints", time, graph->
isDirect()?
nullptr:depnode);
82 if (
true && ( (
true&&!(((getConnectpoints()==0)))) ) )
83 graph->
evalOpParm(myClosepath, nodeidx,
"closepath", time, graph->
isDirect()?
nullptr:depnode);
86 graph->
evalOpParm(myTolerance, nodeidx,
"tolerance", time, graph->
isDirect()?
nullptr:depnode);
88 if (
true && ( (
true&&!(((getConnectpoints()==1)))) ) )
89 graph->
evalOpParm(myApplytoall, nodeidx,
"applytoall", time, graph->
isDirect()?
nullptr:depnode);
90 mySharedpoints =
false;
91 if (
true && ( (
true&&!(((getConnectpoints()==1)))) ) )
92 graph->
evalOpParm(mySharedpoints, nodeidx,
"sharedpoints", time, graph->
isDirect()?
nullptr:depnode);
108 template <
typename T>
115 if (idx.
size() != instance.
size()+1)
154 { doGetParmValue(idx, instance, value); }
156 { doGetParmValue(idx, instance, value); }
158 { doGetParmValue(idx, instance, value); }
160 { doGetParmValue(idx, instance, value); }
162 { doGetParmValue(idx, instance, value); }
164 { doGetParmValue(idx, instance, value); }
166 { doGetParmValue(idx, instance, value); }
168 { doGetParmValue(idx, instance, value); }
170 { doGetParmValue(idx, instance, value); }
172 { doGetParmValue(idx, instance, value); }
174 { doGetParmValue(idx, instance, value); }
176 template <
typename T>
183 if (idx.
size() != instance.
size()+1)
213 { doSetParmValue(idx, instance, value); }
215 { doSetParmValue(idx, instance, value); }
217 { doSetParmValue(idx, instance, value); }
219 { doSetParmValue(idx, instance, value); }
221 { doSetParmValue(idx, instance, value); }
223 { doSetParmValue(idx, instance, value); }
225 { doSetParmValue(idx, instance, value); }
227 { doSetParmValue(idx, instance, value); }
229 { doSetParmValue(idx, instance, value); }
231 { doSetParmValue(idx, instance, value); }
233 { doSetParmValue(idx, instance, value); }
249 if (fieldnum.
size() < 1)
258 return "connectpoints";
266 return "sharedpoints";
274 if (fieldnum.
size() < 1)
275 return PARM_UNSUPPORTED;
330 loadData(is, rampdata);
348 int typelen = colon - data.
buffer();
362 {
int64 iv =
v; UTwrite(os, &iv); }
364 { UTwrite<fpreal64>(os, &
v); }
366 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
368 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
369 UTwrite<fpreal64>(os, &v.
z()); }
371 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
372 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
384 if (s) s->save(ostr);
386 saveData(os, result);
393 ostr << s->getDataTypeToken();
398 saveData(os, result);
402 void save(std::ostream &os)
const
406 saveData(os, myGroup);
407 saveData(os, myNumdivs);
408 saveData(os, myConnectpoints);
409 saveData(os, myClosepath);
410 saveData(os, myTolerance);
411 saveData(os, myApplytoall);
412 saveData(os, mySharedpoints);
425 loadData(is, myGroup);
426 loadData(is, myNumdivs);
427 loadData(is, myConnectpoints);
428 loadData(is, myClosepath);
429 loadData(is, myTolerance);
430 loadData(is, myApplytoall);
431 loadData(is, mySharedpoints);
441 if (!thissop)
return getGroup();
443 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
451 if (!thissop)
return getNumdivs();
453 OP_Utils::evalOpParm(result, thissop,
"numdivs", cookparms.
getCookTime(), 0);
461 if (!thissop)
return getConnectpoints();
463 OP_Utils::evalOpParm(result, thissop,
"connectpoints", cookparms.
getCookTime(), 0);
471 if (!thissop)
return getClosepath();
473 OP_Utils::evalOpParm(result, thissop,
"closepath", cookparms.
getCookTime(), 0);
481 if (!thissop)
return getTolerance();
483 OP_Utils::evalOpParm(result, thissop,
"tolerance", cookparms.
getCookTime(), 0);
491 if (!thissop)
return getApplytoall();
493 OP_Utils::evalOpParm(result, thissop,
"applytoall", cookparms.
getCookTime(), 0);
501 if (!thissop)
return getSharedpoints();
503 OP_Utils::evalOpParm(result, thissop,
"sharedpoints", cookparms.
getCookTime(), 0);
510 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)
GLsizei const GLfloat * value
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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)
virtual UT_StringHolder baseGetSignature() const
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
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
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
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