32 myPrimgroups =
""_UTsh;
33 myPrimnameprefix =
""_UTsh;
35 myPointgroups =
""_UTsh;
36 myPointnameprefix =
""_UTsh;
38 myEdgegroups =
""_UTsh;
39 myEdgenameprefix =
""_UTsh;
40 myGroupnameconflict =
"skipgroup"_UTsh;
56 if (myPrimitives != src.myPrimitives)
return false;
57 if (myPrimgroups != src.myPrimgroups)
return false;
58 if (myPrimnameprefix != src.myPrimnameprefix)
return false;
59 if (myPoints != src.myPoints)
return false;
60 if (myPointgroups != src.myPointgroups)
return false;
61 if (myPointnameprefix != src.myPointnameprefix)
return false;
62 if (myEdges != src.myEdges)
return false;
63 if (myEdgegroups != src.myEdgegroups)
return false;
64 if (myEdgenameprefix != src.myEdgenameprefix)
return false;
65 if (myGroupnameconflict != src.myGroupnameconflict)
return false;
66 if (myThreshold != src.myThreshold)
return false;
67 if (myThresholddist != src.myThresholddist)
return false;
68 if (myKeepifempty != src.myKeepifempty)
return false;
86 graph->
evalOpParm(myPrimitives, nodeidx,
"primitives", time, graph->
isDirect()?
nullptr:depnode);
87 myPrimgroups =
""_UTsh;
88 if (
true && ( (
true&&!(((getPrimitives()==0)))) ) )
89 graph->
evalOpParm(myPrimgroups, nodeidx,
"primgroups", time, graph->
isDirect()?
nullptr:depnode);
90 myPrimnameprefix =
""_UTsh;
91 if (
true && ( (
true&&!(((getPrimitives()==0)))) ) )
92 graph->
evalOpParm(myPrimnameprefix, nodeidx,
"primnameprefix", time, graph->
isDirect()?
nullptr:depnode);
95 graph->
evalOpParm(myPoints, nodeidx,
"points", time, graph->
isDirect()?
nullptr:depnode);
96 myPointgroups =
""_UTsh;
97 if (
true && ( (
true&&!(((getPoints()==0)))) ) )
98 graph->
evalOpParm(myPointgroups, nodeidx,
"pointgroups", time, graph->
isDirect()?
nullptr:depnode);
99 myPointnameprefix =
""_UTsh;
100 if (
true && ( (
true&&!(((getPoints()==0)))) ) )
101 graph->
evalOpParm(myPointnameprefix, nodeidx,
"pointnameprefix", time, graph->
isDirect()?
nullptr:depnode);
104 graph->
evalOpParm(myEdges, nodeidx,
"edges", time, graph->
isDirect()?
nullptr:depnode);
105 myEdgegroups =
""_UTsh;
106 if (
true && ( (
true&&!(((getEdges()==0)))) ) )
107 graph->
evalOpParm(myEdgegroups, nodeidx,
"edgegroups", time, graph->
isDirect()?
nullptr:depnode);
108 myEdgenameprefix =
""_UTsh;
109 if (
true && ( (
true&&!(((getEdges()==0)))) ) )
110 graph->
evalOpParm(myEdgenameprefix, nodeidx,
"edgenameprefix", time, graph->
isDirect()?
nullptr:depnode);
111 myGroupnameconflict =
"skipgroup"_UTsh;
113 graph->
evalOpParm(myGroupnameconflict, nodeidx,
"groupnameconflict", time, graph->
isDirect()?
nullptr:depnode);
116 graph->
evalOpParm(myThreshold, nodeidx,
"threshold", time, graph->
isDirect()?
nullptr:depnode);
117 myThresholddist = 10;
118 if (
true && ( (
true&&!(((getThreshold()==0)))) ) )
119 graph->
evalOpParm(myThresholddist, nodeidx,
"thresholddist", time, graph->
isDirect()?
nullptr:depnode);
120 myKeepifempty =
true;
122 graph->
evalOpParm(myKeepifempty, nodeidx,
"keepifempty", time, graph->
isDirect()?
nullptr:depnode);
138 template <
typename T>
145 if (idx.
size() != instance.
size()+1)
202 { doGetParmValue(idx, instance, value); }
204 { doGetParmValue(idx, instance, value); }
206 { doGetParmValue(idx, instance, value); }
208 { doGetParmValue(idx, instance, value); }
210 { doGetParmValue(idx, instance, value); }
212 { doGetParmValue(idx, instance, value); }
214 { doGetParmValue(idx, instance, value); }
216 { doGetParmValue(idx, instance, value); }
218 { doGetParmValue(idx, instance, value); }
220 { doGetParmValue(idx, instance, value); }
222 { doGetParmValue(idx, instance, value); }
224 template <
typename T>
231 if (idx.
size() != instance.
size()+1)
279 { doSetParmValue(idx, instance, value); }
281 { doSetParmValue(idx, instance, value); }
283 { doSetParmValue(idx, instance, value); }
285 { doSetParmValue(idx, instance, value); }
287 { doSetParmValue(idx, instance, value); }
289 { doSetParmValue(idx, instance, value); }
291 { doSetParmValue(idx, instance, value); }
293 { doSetParmValue(idx, instance, value); }
295 { doSetParmValue(idx, instance, value); }
297 { doSetParmValue(idx, instance, value); }
299 { doSetParmValue(idx, instance, value); }
315 if (fieldnum.
size() < 1)
324 return "primnameprefix";
328 return "pointgroups";
330 return "pointnameprefix";
336 return "edgenameprefix";
338 return "groupnameconflict";
342 return "thresholddist";
344 return "keepifempty";
352 if (fieldnum.
size() < 1)
353 return PARM_UNSUPPORTED;
420 loadData(is, rampdata);
438 int typelen = colon - data.
buffer();
452 {
int64 iv =
v; UTwrite(os, &iv); }
454 { UTwrite<fpreal64>(os, &
v); }
456 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
458 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
459 UTwrite<fpreal64>(os, &v.
z()); }
461 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
462 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
474 if (s) s->save(ostr);
476 saveData(os, result);
483 ostr << s->getDataTypeToken();
488 saveData(os, result);
492 void save(std::ostream &os)
const
496 saveData(os, myPrimitives);
497 saveData(os, myPrimgroups);
498 saveData(os, myPrimnameprefix);
499 saveData(os, myPoints);
500 saveData(os, myPointgroups);
501 saveData(os, myPointnameprefix);
502 saveData(os, myEdges);
503 saveData(os, myEdgegroups);
504 saveData(os, myEdgenameprefix);
505 saveData(os, myGroupnameconflict);
506 saveData(os, myThreshold);
507 saveData(os, myThresholddist);
508 saveData(os, myKeepifempty);
521 loadData(is, myPrimitives);
522 loadData(is, myPrimgroups);
523 loadData(is, myPrimnameprefix);
524 loadData(is, myPoints);
525 loadData(is, myPointgroups);
526 loadData(is, myPointnameprefix);
527 loadData(is, myEdges);
528 loadData(is, myEdgegroups);
529 loadData(is, myEdgenameprefix);
530 loadData(is, myGroupnameconflict);
531 loadData(is, myThreshold);
532 loadData(is, myThresholddist);
533 loadData(is, myKeepifempty);
543 if (!thissop)
return getPrimitives();
545 OP_Utils::evalOpParm(result, thissop,
"primitives", cookparms.
getCookTime(), 0);
553 if (!thissop)
return getPrimgroups();
555 OP_Utils::evalOpParm(result, thissop,
"primgroups", cookparms.
getCookTime(), 0);
563 if (!thissop)
return getPrimnameprefix();
565 OP_Utils::evalOpParm(result, thissop,
"primnameprefix", cookparms.
getCookTime(), 0);
573 if (!thissop)
return getPoints();
575 OP_Utils::evalOpParm(result, thissop,
"points", cookparms.
getCookTime(), 0);
583 if (!thissop)
return getPointgroups();
585 OP_Utils::evalOpParm(result, thissop,
"pointgroups", cookparms.
getCookTime(), 0);
593 if (!thissop)
return getPointnameprefix();
595 OP_Utils::evalOpParm(result, thissop,
"pointnameprefix", cookparms.
getCookTime(), 0);
603 if (!thissop)
return getEdges();
605 OP_Utils::evalOpParm(result, thissop,
"edges", cookparms.
getCookTime(), 0);
613 if (!thissop)
return getEdgegroups();
615 OP_Utils::evalOpParm(result, thissop,
"edgegroups", cookparms.
getCookTime(), 0);
623 if (!thissop)
return getEdgenameprefix();
625 OP_Utils::evalOpParm(result, thissop,
"edgenameprefix", cookparms.
getCookTime(), 0);
633 if (!thissop)
return getGroupnameconflict();
635 OP_Utils::evalOpParm(result, thissop,
"groupnameconflict", cookparms.
getCookTime(), 0);
643 if (!thissop)
return getThreshold();
645 OP_Utils::evalOpParm(result, thissop,
"threshold", cookparms.
getCookTime(), 0);
653 if (!thissop)
return getThresholddist();
655 OP_Utils::evalOpParm(result, thissop,
"thresholddist", cookparms.
getCookTime(), 0);
663 if (!thissop)
return getKeepifempty();
665 OP_Utils::evalOpParm(result, thissop,
"keepifempty", cookparms.
getCookTime(), 0);
void save(std::ostream &os) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void saveData(std::ostream &os, UT_StringHolder s)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
SOP_Node * getNode() const
const UT_StringHolder & getGroupnameconflict() const
UT_StringHolder opPointgroups(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setGroupnameconflict(const UT_StringHolder &val)
void copyFrom(const OP_NodeParms *src) override
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
bool opPoints(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
static void saveData(std::ostream &os, UT_Vector4D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
bool opEdges(const SOP_NodeVerb::CookParms &cookparms) const
GLsizei const GLfloat * value
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, int64 &v)
const OP_Context & context() const
void setPrimitives(bool val)
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
UT_StringHolder opGroupnameconflict(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
UT_StringHolder opPointnameprefix(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
void setThreshold(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
fpreal64 getThresholddist() const
**But if you need a result
T clampMinValue(fpreal minvalue, const T &src) const
bool isParmColorRamp(exint idx) 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.
UT_StringHolder opPrimnameprefix(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void loadData(UT_IStream &is, fpreal64 &v)
const UT_StringHolder & getPrimgroups() const
constexpr SYS_FORCE_INLINE T & x() noexcept
void setEdgegroups(const UT_StringHolder &val)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
UT_StringHolder opEdgenameprefix(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
const UT_StringHolder & getPointnameprefix() const
void setEdgenameprefix(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
fpreal64 opThresholddist(const SOP_NodeVerb::CookParms &cookparms) const
bool opKeepifempty(const SOP_NodeVerb::CookParms &cookparms) const
bool opThreshold(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
const UT_StringHolder & getPrimnameprefix() const
constexpr SYS_FORCE_INLINE T & z() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
const OP_GraphProxy * graph() const
void loadFromOpSubclass(const LoadParms &loadparms) override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setPrimgroups(const UT_StringHolder &val)
ParmType getNestParmType(TempIndex fieldnum) const override
bool load(UT_IStream &is)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void loadData(UT_IStream &is, UT_StringHolder &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
bool operator==(const SOP_GroupTransferParms &src) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
const UT_StringHolder & getEdgenameprefix() const
GT_API const UT_StringHolder version
bool getThreshold() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void saveData(std::ostream &os, UT_Vector2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
UT_StringHolder opPrimgroups(const SOP_NodeVerb::CookParms &cookparms) const
void coerceValue(T &result, const S &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
DEP_MicroNode * depnode() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setPointgroups(const UT_StringHolder &val)
Utility class for containing a color ramp.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void saveData(std::ostream &os, UT_Matrix4D v)
constexpr SYS_FORCE_INLINE T & w() noexcept
const UT_StringHolder & getPointgroups() const
virtual UT_StringHolder baseGetSignature() const
void setThresholddist(fpreal64 val)
bool operator!=(const SOP_GroupTransferParms &src) const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
fpreal getCookTime() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void saveData(std::ostream &os, bool v)
static void saveData(std::ostream &os, UT_Matrix2D v)
const char * findChar(int c) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void loadData(UT_IStream &is, UT_Vector3D &v)
UT_StringHolder opEdgegroups(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, int64 v)
bool getKeepifempty() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
exint getNestNumParms(TempIndex idx) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void setKeepifempty(bool val)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
const UT_StringHolder & getEdgegroups() const
bool getPrimitives() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
bool opPrimitives(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
void setPointnameprefix(const UT_StringHolder &val)
SYS_FORCE_INLINE bool isstring() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setPrimnameprefix(const UT_StringHolder &val)
OP_NodeParms & operator=(const OP_NodeParms &)=default
static void saveData(std::ostream &os, fpreal64 v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
const char * getNestParmName(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Vector3D v)
constexpr SYS_FORCE_INLINE T & x() noexcept
static void loadData(UT_IStream &is, bool &v)