20 using namespace UT::Literal;
33 myPrimnameprefix =
""_sh;
35 myPointgroups =
""_sh;
36 myPointnameprefix =
""_sh;
39 myEdgenameprefix =
""_sh;
40 myGroupnameconflict =
"skipgroup"_sh;
53 if (myPrimitives != src.myPrimitives)
return false;
54 if (myPrimgroups != src.myPrimgroups)
return false;
55 if (myPrimnameprefix != src.myPrimnameprefix)
return false;
56 if (myPoints != src.myPoints)
return false;
57 if (myPointgroups != src.myPointgroups)
return false;
58 if (myPointnameprefix != src.myPointnameprefix)
return false;
59 if (myEdges != src.myEdges)
return false;
60 if (myEdgegroups != src.myEdgegroups)
return false;
61 if (myEdgenameprefix != src.myEdgenameprefix)
return false;
62 if (myGroupnameconflict != src.myGroupnameconflict)
return false;
63 if (myThreshold != src.myThreshold)
return false;
64 if (myThresholddist != src.myThresholddist)
return false;
65 if (myKeepifempty != src.myKeepifempty)
return false;
80 graph->
evalOpParm(myPrimitives, nodeidx,
"primitives", time, 0);
82 if (
true && ( (!(((getPrimitives()==0)))) ) )
83 graph->
evalOpParm(myPrimgroups, nodeidx,
"primgroups", time, 0);
84 myPrimnameprefix =
""_sh;
85 if (
true && ( (!(((getPrimitives()==0)))) ) )
86 graph->
evalOpParm(myPrimnameprefix, nodeidx,
"primnameprefix", time, 0);
89 graph->
evalOpParm(myPoints, nodeidx,
"points", time, 0);
90 myPointgroups =
""_sh;
91 if (
true && ( (!(((getPoints()==0)))) ) )
92 graph->
evalOpParm(myPointgroups, nodeidx,
"pointgroups", time, 0);
93 myPointnameprefix =
""_sh;
94 if (
true && ( (!(((getPoints()==0)))) ) )
95 graph->
evalOpParm(myPointnameprefix, nodeidx,
"pointnameprefix", time, 0);
98 graph->
evalOpParm(myEdges, nodeidx,
"edges", time, 0);
100 if (
true && ( (!(((getEdges()==0)))) ) )
101 graph->
evalOpParm(myEdgegroups, nodeidx,
"edgegroups", time, 0);
102 myEdgenameprefix =
""_sh;
103 if (
true && ( (!(((getEdges()==0)))) ) )
104 graph->
evalOpParm(myEdgenameprefix, nodeidx,
"edgenameprefix", time, 0);
105 myGroupnameconflict =
"skipgroup"_sh;
107 graph->
evalOpParm(myGroupnameconflict, nodeidx,
"groupnameconflict", time, 0);
110 graph->
evalOpParm(myThreshold, nodeidx,
"threshold", time, 0);
111 myThresholddist = 10;
112 if (
true && ( (!(((getThreshold()==0)))) ) )
113 graph->
evalOpParm(myThresholddist, nodeidx,
"thresholddist", time, 0);
114 myKeepifempty =
true;
116 graph->
evalOpParm(myKeepifempty, nodeidx,
"keepifempty", time, 0);
132 template <
typename T>
139 if (idx.
size() != instance.
size()+1)
144 coerceValue(value, myPrimitives);
147 coerceValue(value, myPrimgroups);
150 coerceValue(value, myPrimnameprefix);
153 coerceValue(value, myPoints);
156 coerceValue(value, myPointgroups);
159 coerceValue(value, myPointnameprefix);
162 coerceValue(value, myEdges);
165 coerceValue(value, myEdgegroups);
168 coerceValue(value, myEdgenameprefix);
171 coerceValue(value, myGroupnameconflict);
174 coerceValue(value, myThreshold);
177 coerceValue(value, myThresholddist);
180 coerceValue(value, myKeepifempty);
187 { doGetParmValue(idx, instance, value); }
189 { doGetParmValue(idx, instance, value); }
191 { doGetParmValue(idx, instance, value); }
193 { doGetParmValue(idx, instance, value); }
195 { doGetParmValue(idx, instance, value); }
197 { doGetParmValue(idx, instance, value); }
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 template <
typename T>
216 if (idx.
size() != instance.
size()+1)
221 coerceValue(myPrimitives, value);
224 coerceValue(myPrimgroups, value);
227 coerceValue(myPrimnameprefix, value);
230 coerceValue(myPoints, value);
233 coerceValue(myPointgroups, value);
236 coerceValue(myPointnameprefix, value);
239 coerceValue(myEdges, value);
242 coerceValue(myEdgegroups, value);
245 coerceValue(myEdgenameprefix, value);
248 coerceValue(myGroupnameconflict, value);
251 coerceValue(myThreshold, value);
254 coerceValue(myThresholddist, value);
257 coerceValue(myKeepifempty, value);
264 { doSetParmValue(idx, instance, value); }
266 { doSetParmValue(idx, instance, value); }
268 { doSetParmValue(idx, instance, value); }
270 { doSetParmValue(idx, instance, value); }
272 { doSetParmValue(idx, instance, value); }
274 { doSetParmValue(idx, instance, value); }
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); }
300 if (fieldnum.
size() < 1)
309 return "primnameprefix";
313 return "pointgroups";
315 return "pointnameprefix";
321 return "edgenameprefix";
323 return "groupnameconflict";
327 return "thresholddist";
329 return "keepifempty";
337 if (fieldnum.
size() < 1)
338 return PARM_UNSUPPORTED;
369 return PARM_UNSUPPORTED;
405 loadData(is, rampdata);
423 int typelen = colon - data.
buffer();
437 {
int64 iv =
v; UTwrite(os, &iv); }
439 { UTwrite<fpreal64>(os, &
v); }
441 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
443 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
444 UTwrite<fpreal64>(os, &v.
z()); }
446 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
447 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
459 if (s) s->save(ostr);
461 saveData(os, result);
468 ostr << s->getDataTypeToken();
473 saveData(os, result);
477 void save(std::ostream &os)
const
481 saveData(os, myPrimitives);
482 saveData(os, myPrimgroups);
483 saveData(os, myPrimnameprefix);
484 saveData(os, myPoints);
485 saveData(os, myPointgroups);
486 saveData(os, myPointnameprefix);
487 saveData(os, myEdges);
488 saveData(os, myEdgegroups);
489 saveData(os, myEdgenameprefix);
490 saveData(os, myGroupnameconflict);
491 saveData(os, myThreshold);
492 saveData(os, myThresholddist);
493 saveData(os, myKeepifempty);
506 loadData(is, myPrimitives);
507 loadData(is, myPrimgroups);
508 loadData(is, myPrimnameprefix);
509 loadData(is, myPoints);
510 loadData(is, myPointgroups);
511 loadData(is, myPointnameprefix);
512 loadData(is, myEdges);
513 loadData(is, myEdgegroups);
514 loadData(is, myEdgenameprefix);
515 loadData(is, myGroupnameconflict);
516 loadData(is, myThreshold);
517 loadData(is, myThresholddist);
518 loadData(is, myKeepifempty);
528 if (!thissop)
return getPrimitives();
530 OP_Utils::evalOpParm(result, thissop,
"primitives", cookparms.
getCookTime(), 0);
538 if (!thissop)
return getPrimgroups();
540 OP_Utils::evalOpParm(result, thissop,
"primgroups", cookparms.
getCookTime(), 0);
548 if (!thissop)
return getPrimnameprefix();
550 OP_Utils::evalOpParm(result, thissop,
"primnameprefix", cookparms.
getCookTime(), 0);
558 if (!thissop)
return getPoints();
560 OP_Utils::evalOpParm(result, thissop,
"points", cookparms.
getCookTime(), 0);
568 if (!thissop)
return getPointgroups();
570 OP_Utils::evalOpParm(result, thissop,
"pointgroups", cookparms.
getCookTime(), 0);
578 if (!thissop)
return getPointnameprefix();
580 OP_Utils::evalOpParm(result, thissop,
"pointnameprefix", cookparms.
getCookTime(), 0);
588 if (!thissop)
return getEdges();
590 OP_Utils::evalOpParm(result, thissop,
"edges", cookparms.
getCookTime(), 0);
598 if (!thissop)
return getEdgegroups();
600 OP_Utils::evalOpParm(result, thissop,
"edgegroups", cookparms.
getCookTime(), 0);
608 if (!thissop)
return getEdgenameprefix();
610 OP_Utils::evalOpParm(result, thissop,
"edgenameprefix", cookparms.
getCookTime(), 0);
618 if (!thissop)
return getGroupnameconflict();
620 OP_Utils::evalOpParm(result, thissop,
"groupnameconflict", cookparms.
getCookTime(), 0);
628 if (!thissop)
return getThreshold();
630 OP_Utils::evalOpParm(result, thissop,
"threshold", cookparms.
getCookTime(), 0);
638 if (!thissop)
return getThresholddist();
640 OP_Utils::evalOpParm(result, thissop,
"thresholddist", cookparms.
getCookTime(), 0);
648 if (!thissop)
return getKeepifempty();
650 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)
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)
bool opEdges(const SOP_NodeVerb::CookParms &cookparms) const
GLuint const GLfloat * val
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, int64 &v)
void setPrimitives(bool val)
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() 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
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
void copyFrom(const SOP_NodeParms *src) override
void setEdgegroups(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
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
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
GLint GLenum GLsizei GLint GLsizei const void * data
static void saveData(std::ostream &os, UT_Matrix3D v)
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
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
~SOP_GroupTransferParms() 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)
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
DEP_MicroNode * depnode() const
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 setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
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)
GLdouble GLdouble GLdouble r
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)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
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
exint getNestNumParms(TempIndex idx) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void setKeepifempty(bool val)
GLsizei const GLfloat * value
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
const OP_Context & context() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
static void loadData(UT_IStream &is, UT_Vector2I &v)
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)
static void saveData(std::ostream &os, fpreal64 v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
const char * getNestParmName(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Vector3D v)
static void loadData(UT_IStream &is, bool &v)