23 namespace SOP_Dissolve_2_0Enums
34 using namespace UT::Literal;
52 using namespace UT::Literal;
72 myInvertSelection = 0;
73 myRecomputeNormals =
false;
74 myRemoveInlinePoints =
true;
75 myInlineTolerance = 45;
76 myRemoveUnusedPoints =
true;
78 myRemoveDegenerateBridges =
false;
79 myBoundaryCurves =
false;
92 if (myGroup != src.myGroup)
return false;
93 if (myInvertSelection != src.myInvertSelection)
return false;
94 if (myRecomputeNormals != src.myRecomputeNormals)
return false;
95 if (myRemoveInlinePoints != src.myRemoveInlinePoints)
return false;
96 if (myInlineTolerance != src.myInlineTolerance)
return false;
97 if (myRemoveUnusedPoints != src.myRemoveUnusedPoints)
return false;
98 if (myBridge != src.myBridge)
return false;
99 if (myRemoveDegenerateBridges != src.myRemoveDegenerateBridges)
return false;
100 if (myBoundaryCurves != src.myBoundaryCurves)
return false;
120 graph->
evalOpParm(myGroup, nodeidx,
"group", time, graph->
isDirect()?
nullptr:depnode);
121 myInvertSelection = 0;
123 graph->
evalOpParm(myInvertSelection, nodeidx,
"invertsel", time, graph->
isDirect()?
nullptr:depnode);
124 myRecomputeNormals =
false;
126 graph->
evalOpParm(myRecomputeNormals, nodeidx,
"compnorms", time, graph->
isDirect()?
nullptr:depnode);
127 myRemoveInlinePoints =
true;
129 graph->
evalOpParm(myRemoveInlinePoints, nodeidx,
"reminlinepts", time, graph->
isDirect()?
nullptr:depnode);
130 myInlineTolerance = 45;
131 if (
true && ( (
true&&!(((getRemoveInlinePoints()==0)))) ) )
132 graph->
evalOpParm(myInlineTolerance, nodeidx,
"coltol", time, graph->
isDirect()?
nullptr:depnode);
133 myRemoveUnusedPoints =
true;
135 graph->
evalOpParm(myRemoveUnusedPoints, nodeidx,
"remunusedpts", time, graph->
isDirect()?
nullptr:depnode);
138 graph->
evalOpParm(myBridge, nodeidx,
"bridge", time, graph->
isDirect()?
nullptr:depnode);
139 myRemoveDegenerateBridges =
false;
141 graph->
evalOpParm(myRemoveDegenerateBridges, nodeidx,
"deldegeneratebridges", time, graph->
isDirect()?
nullptr:depnode);
142 myBoundaryCurves =
false;
144 graph->
evalOpParm(myBoundaryCurves, nodeidx,
"boundarycurves", time, graph->
isDirect()?
nullptr:depnode);
160 template <
typename T>
167 if (idx.
size() != instance.
size()+1)
172 coerceValue(value, myGroup);
175 coerceValue(value, myInvertSelection);
178 coerceValue(value, myRecomputeNormals);
181 coerceValue(value, myRemoveInlinePoints);
184 coerceValue(value, myInlineTolerance);
187 coerceValue(value, myRemoveUnusedPoints);
190 coerceValue(value, myBridge);
193 coerceValue(value, myRemoveDegenerateBridges);
196 coerceValue(value, myBoundaryCurves);
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 { doGetParmValue(idx, instance, value); }
226 { doGetParmValue(idx, instance, value); }
228 { doGetParmValue(idx, instance, value); }
230 { doGetParmValue(idx, instance, value); }
232 { doGetParmValue(idx, instance, value); }
234 template <
typename T>
241 if (idx.
size() != instance.
size()+1)
246 coerceValue(myGroup, ( ( value ) ));
249 coerceValue(myInvertSelection, clampMinValue(0, clampMaxValue(1, value ) ));
252 coerceValue(myRecomputeNormals, ( ( value ) ));
255 coerceValue(myRemoveInlinePoints, ( ( value ) ));
258 coerceValue(myInlineTolerance, clampMinValue(0, clampMaxValue(180, value ) ));
261 coerceValue(myRemoveUnusedPoints, ( ( value ) ));
264 coerceValue(myBridge, clampMinValue(0, clampMaxValue(2, value ) ));
267 coerceValue(myRemoveDegenerateBridges, ( ( value ) ));
270 coerceValue(myBoundaryCurves, ( ( value ) ));
277 { doSetParmValue(idx, instance, value); }
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); }
313 if (fieldnum.
size() < 1)
324 return "reminlinepts";
328 return "remunusedpts";
332 return "deldegeneratebridges";
334 return "boundarycurves";
342 if (fieldnum.
size() < 1)
343 return PARM_UNSUPPORTED;
366 return PARM_UNSUPPORTED;
402 loadData(is, rampdata);
420 int typelen = colon - data.
buffer();
434 {
int64 iv =
v; UTwrite(os, &iv); }
436 { UTwrite<fpreal64>(os, &
v); }
438 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
440 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
441 UTwrite<fpreal64>(os, &v.
z()); }
443 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
444 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
456 if (s) s->save(ostr);
458 saveData(os, result);
465 ostr << s->getDataTypeToken();
470 saveData(os, result);
474 void save(std::ostream &os)
const
478 saveData(os, myGroup);
479 saveData(os, myInvertSelection);
480 saveData(os, myRecomputeNormals);
481 saveData(os, myRemoveInlinePoints);
482 saveData(os, myInlineTolerance);
483 saveData(os, myRemoveUnusedPoints);
484 saveData(os, myBridge);
485 saveData(os, myRemoveDegenerateBridges);
486 saveData(os, myBoundaryCurves);
499 loadData(is, myGroup);
500 loadData(is, myInvertSelection);
501 loadData(is, myRecomputeNormals);
502 loadData(is, myRemoveInlinePoints);
503 loadData(is, myInlineTolerance);
504 loadData(is, myRemoveUnusedPoints);
505 loadData(is, myBridge);
506 loadData(is, myRemoveDegenerateBridges);
507 loadData(is, myBoundaryCurves);
517 if (!thissop)
return getGroup();
519 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
527 if (!thissop)
return getInvertSelection();
529 OP_Utils::evalOpParm(result, thissop,
"invertsel", cookparms.
getCookTime(), 0);
537 if (!thissop)
return getRecomputeNormals();
539 OP_Utils::evalOpParm(result, thissop,
"compnorms", cookparms.
getCookTime(), 0);
547 if (!thissop)
return getRemoveInlinePoints();
549 OP_Utils::evalOpParm(result, thissop,
"reminlinepts", cookparms.
getCookTime(), 0);
557 if (!thissop)
return getInlineTolerance();
559 OP_Utils::evalOpParm(result, thissop,
"coltol", cookparms.
getCookTime(), 0);
567 if (!thissop)
return getRemoveUnusedPoints();
569 OP_Utils::evalOpParm(result, thissop,
"remunusedpts", cookparms.
getCookTime(), 0);
577 if (!thissop)
return getBridge();
579 OP_Utils::evalOpParm(result, thissop,
"bridge", cookparms.
getCookTime(), 0);
587 if (!thissop)
return getRemoveDegenerateBridges();
589 OP_Utils::evalOpParm(result, thissop,
"deldegeneratebridges", cookparms.
getCookTime(), 0);
597 if (!thissop)
return getBoundaryCurves();
599 OP_Utils::evalOpParm(result, thissop,
"boundarycurves", cookparms.
getCookTime(), 0);
605 int64 myInvertSelection;
606 bool myRecomputeNormals;
607 bool myRemoveInlinePoints;
609 bool myRemoveUnusedPoints;
611 bool myRemoveDegenerateBridges;
612 bool myBoundaryCurves;
bool opRemoveDegenerateBridges(const SOP_NodeVerb::CookParms &cookparms) const
InvertSelection getInvertSelection() const
bool getRecomputeNormals() const
SOP_Node * getNode() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, fpreal64 &v)
bool opBoundaryCurves(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void copyFrom(const OP_NodeParms *src) override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
static void saveData(std::ostream &os, bool v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setRecomputeNormals(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
GLsizei const GLfloat * value
fpreal64 getInlineTolerance() const
bool getRemoveInlinePoints() const
void setGroup(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Matrix2D v)
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
bool operator!=(const SOP_Dissolve_2_0Parms &src) const
void setRemoveInlinePoints(bool val)
ParmType getNestParmType(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Vector3D &v)
An output stream object that owns its own string buffer storage.
bool opRecomputeNormals(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector4D v)
**But if you need a result
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void setRemoveUnusedPoints(bool val)
constexpr SYS_FORCE_INLINE T & x() noexcept
void setBoundaryCurves(bool val)
void save(std::ostream &os) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & x() noexcept
bool getRemoveDegenerateBridges() const
void loadFromOpSubclass(const LoadParms &loadparms) override
bool getBoundaryCurves() const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
SYS_FORCE_INLINE UT_StringHolder getToken(InvertSelection enum_value)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
static void saveData(std::ostream &os, PRM_DataItemHandle s)
constexpr SYS_FORCE_INLINE T & z() noexcept
InvertSelection opInvertSelection(const SOP_NodeVerb::CookParms &cookparms) const
const OP_GraphProxy * graph() const
bool load(UT_IStream &is)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
bool getRemoveUnusedPoints() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void loadData(UT_IStream &is, int64 &v)
static void saveData(std::ostream &os, UT_Vector2D v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
Bridge opBridge(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void saveBinary(std::ostream &os) const
Save string to binary stream.
static void saveData(std::ostream &os, UT_StringHolder s)
GT_API const UT_StringHolder version
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
bool operator==(const SOP_Dissolve_2_0Parms &src) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
DEP_MicroNode * depnode() const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
virtual UT_StringHolder baseGetSignature() const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void saveData(std::ostream &os, UT_Matrix4D v)
fpreal getCookTime() const
fpreal64 opInlineTolerance(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
const char * findChar(int c) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
bool opRemoveInlinePoints(const SOP_NodeVerb::CookParms &cookparms) const
bool opRemoveUnusedPoints(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
exint getNestNumParms(TempIndex idx) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
void setRemoveDegenerateBridges(bool val)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
bool isParmColorRamp(exint idx) const override
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
const UT_StringHolder & getGroup() const
void setInlineTolerance(fpreal64 val)
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void saveData(std::ostream &os, fpreal64 v)
static void saveData(std::ostream &os, UT_Vector3D v)
void setBridge(Bridge val)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
void setInvertSelection(InvertSelection val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)