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;
83 graph->
evalOpParm(myPrimitives, nodeidx,
"primitives", time, 0);
84 myPrimgroups =
""_UTsh;
85 if (
true && ( (
true&&!(((getPrimitives()==0)))) ) )
86 graph->
evalOpParm(myPrimgroups, nodeidx,
"primgroups", time, 0);
87 myPrimnameprefix =
""_UTsh;
88 if (
true && ( (
true&&!(((getPrimitives()==0)))) ) )
89 graph->
evalOpParm(myPrimnameprefix, nodeidx,
"primnameprefix", time, 0);
92 graph->
evalOpParm(myPoints, nodeidx,
"points", time, 0);
93 myPointgroups =
""_UTsh;
94 if (
true && ( (
true&&!(((getPoints()==0)))) ) )
95 graph->
evalOpParm(myPointgroups, nodeidx,
"pointgroups", time, 0);
96 myPointnameprefix =
""_UTsh;
97 if (
true && ( (
true&&!(((getPoints()==0)))) ) )
98 graph->
evalOpParm(myPointnameprefix, nodeidx,
"pointnameprefix", time, 0);
101 graph->
evalOpParm(myEdges, nodeidx,
"edges", time, 0);
102 myEdgegroups =
""_UTsh;
103 if (
true && ( (
true&&!(((getEdges()==0)))) ) )
104 graph->
evalOpParm(myEdgegroups, nodeidx,
"edgegroups", time, 0);
105 myEdgenameprefix =
""_UTsh;
106 if (
true && ( (
true&&!(((getEdges()==0)))) ) )
107 graph->
evalOpParm(myEdgenameprefix, nodeidx,
"edgenameprefix", time, 0);
108 myGroupnameconflict =
"skipgroup"_UTsh;
110 graph->
evalOpParm(myGroupnameconflict, nodeidx,
"groupnameconflict", time, 0);
113 graph->
evalOpParm(myThreshold, nodeidx,
"threshold", time, 0);
114 myThresholddist = 10;
115 if (
true && ( (
true&&!(((getThreshold()==0)))) ) )
116 graph->
evalOpParm(myThresholddist, nodeidx,
"thresholddist", time, 0);
117 myKeepifempty =
true;
119 graph->
evalOpParm(myKeepifempty, nodeidx,
"keepifempty", time, 0);
135 template <
typename T>
142 if (idx.
size() != instance.
size()+1)
199 { doGetParmValue(idx, instance, value); }
201 { doGetParmValue(idx, instance, value); }
203 { doGetParmValue(idx, instance, value); }
205 { doGetParmValue(idx, instance, value); }
207 { doGetParmValue(idx, instance, value); }
209 { doGetParmValue(idx, instance, value); }
211 { doGetParmValue(idx, instance, value); }
213 { doGetParmValue(idx, instance, value); }
215 { doGetParmValue(idx, instance, value); }
217 { doGetParmValue(idx, instance, value); }
219 { doGetParmValue(idx, instance, value); }
221 template <
typename T>
228 if (idx.
size() != instance.
size()+1)
276 { doSetParmValue(idx, instance, value); }
278 { doSetParmValue(idx, instance, value); }
280 { doSetParmValue(idx, instance, value); }
282 { doSetParmValue(idx, instance, value); }
284 { doSetParmValue(idx, instance, value); }
286 { doSetParmValue(idx, instance, value); }
288 { doSetParmValue(idx, instance, value); }
290 { doSetParmValue(idx, instance, value); }
292 { doSetParmValue(idx, instance, value); }
294 { doSetParmValue(idx, instance, value); }
296 { doSetParmValue(idx, instance, value); }
312 if (fieldnum.
size() < 1)
321 return "primnameprefix";
325 return "pointgroups";
327 return "pointnameprefix";
333 return "edgenameprefix";
335 return "groupnameconflict";
339 return "thresholddist";
341 return "keepifempty";
349 if (fieldnum.
size() < 1)
350 return PARM_UNSUPPORTED;
417 loadData(is, rampdata);
435 int typelen = colon - data.
buffer();
449 {
int64 iv =
v; UTwrite(os, &iv); }
451 { UTwrite<fpreal64>(os, &
v); }
453 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
455 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
456 UTwrite<fpreal64>(os, &v.
z()); }
458 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
459 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
471 if (s) s->save(ostr);
473 saveData(os, result);
480 ostr << s->getDataTypeToken();
485 saveData(os, result);
489 void save(std::ostream &os)
const
493 saveData(os, myPrimitives);
494 saveData(os, myPrimgroups);
495 saveData(os, myPrimnameprefix);
496 saveData(os, myPoints);
497 saveData(os, myPointgroups);
498 saveData(os, myPointnameprefix);
499 saveData(os, myEdges);
500 saveData(os, myEdgegroups);
501 saveData(os, myEdgenameprefix);
502 saveData(os, myGroupnameconflict);
503 saveData(os, myThreshold);
504 saveData(os, myThresholddist);
505 saveData(os, myKeepifempty);
518 loadData(is, myPrimitives);
519 loadData(is, myPrimgroups);
520 loadData(is, myPrimnameprefix);
521 loadData(is, myPoints);
522 loadData(is, myPointgroups);
523 loadData(is, myPointnameprefix);
524 loadData(is, myEdges);
525 loadData(is, myEdgegroups);
526 loadData(is, myEdgenameprefix);
527 loadData(is, myGroupnameconflict);
528 loadData(is, myThreshold);
529 loadData(is, myThresholddist);
530 loadData(is, myKeepifempty);
540 if (!thissop)
return getPrimitives();
542 OP_Utils::evalOpParm(result, thissop,
"primitives", cookparms.
getCookTime(), 0);
550 if (!thissop)
return getPrimgroups();
552 OP_Utils::evalOpParm(result, thissop,
"primgroups", cookparms.
getCookTime(), 0);
560 if (!thissop)
return getPrimnameprefix();
562 OP_Utils::evalOpParm(result, thissop,
"primnameprefix", cookparms.
getCookTime(), 0);
570 if (!thissop)
return getPoints();
572 OP_Utils::evalOpParm(result, thissop,
"points", cookparms.
getCookTime(), 0);
580 if (!thissop)
return getPointgroups();
582 OP_Utils::evalOpParm(result, thissop,
"pointgroups", cookparms.
getCookTime(), 0);
590 if (!thissop)
return getPointnameprefix();
592 OP_Utils::evalOpParm(result, thissop,
"pointnameprefix", cookparms.
getCookTime(), 0);
600 if (!thissop)
return getEdges();
602 OP_Utils::evalOpParm(result, thissop,
"edges", cookparms.
getCookTime(), 0);
610 if (!thissop)
return getEdgegroups();
612 OP_Utils::evalOpParm(result, thissop,
"edgegroups", cookparms.
getCookTime(), 0);
620 if (!thissop)
return getEdgenameprefix();
622 OP_Utils::evalOpParm(result, thissop,
"edgenameprefix", cookparms.
getCookTime(), 0);
630 if (!thissop)
return getGroupnameconflict();
632 OP_Utils::evalOpParm(result, thissop,
"groupnameconflict", cookparms.
getCookTime(), 0);
640 if (!thissop)
return getThreshold();
642 OP_Utils::evalOpParm(result, thissop,
"threshold", cookparms.
getCookTime(), 0);
650 if (!thissop)
return getThresholddist();
652 OP_Utils::evalOpParm(result, thissop,
"thresholddist", cookparms.
getCookTime(), 0);
660 if (!thissop)
return getKeepifempty();
662 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
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)
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
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)
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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)