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;
117 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
118 myInvertSelection = 0;
120 graph->
evalOpParm(myInvertSelection, nodeidx,
"invertsel", time, 0);
121 myRecomputeNormals =
false;
123 graph->
evalOpParm(myRecomputeNormals, nodeidx,
"compnorms", time, 0);
124 myRemoveInlinePoints =
true;
126 graph->
evalOpParm(myRemoveInlinePoints, nodeidx,
"reminlinepts", time, 0);
127 myInlineTolerance = 45;
128 if (
true && ( (
true&&!(((getRemoveInlinePoints()==0)))) ) )
129 graph->
evalOpParm(myInlineTolerance, nodeidx,
"coltol", time, 0);
130 myRemoveUnusedPoints =
true;
132 graph->
evalOpParm(myRemoveUnusedPoints, nodeidx,
"remunusedpts", time, 0);
135 graph->
evalOpParm(myBridge, nodeidx,
"bridge", time, 0);
136 myRemoveDegenerateBridges =
false;
138 graph->
evalOpParm(myRemoveDegenerateBridges, nodeidx,
"deldegeneratebridges", time, 0);
139 myBoundaryCurves =
false;
141 graph->
evalOpParm(myBoundaryCurves, nodeidx,
"boundarycurves", time, 0);
157 template <
typename T>
164 if (idx.
size() != instance.
size()+1)
169 coerceValue(value, myGroup);
172 coerceValue(value, myInvertSelection);
175 coerceValue(value, myRecomputeNormals);
178 coerceValue(value, myRemoveInlinePoints);
181 coerceValue(value, myInlineTolerance);
184 coerceValue(value, myRemoveUnusedPoints);
187 coerceValue(value, myBridge);
190 coerceValue(value, myRemoveDegenerateBridges);
193 coerceValue(value, myBoundaryCurves);
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 { doGetParmValue(idx, instance, value); }
223 { doGetParmValue(idx, instance, value); }
225 { doGetParmValue(idx, instance, value); }
227 { doGetParmValue(idx, instance, value); }
229 { doGetParmValue(idx, instance, value); }
231 template <
typename T>
238 if (idx.
size() != instance.
size()+1)
243 coerceValue(myGroup, ( ( value ) ));
246 coerceValue(myInvertSelection, clampMinValue(0, clampMaxValue(1, value ) ));
249 coerceValue(myRecomputeNormals, ( ( value ) ));
252 coerceValue(myRemoveInlinePoints, ( ( value ) ));
255 coerceValue(myInlineTolerance, clampMinValue(0, clampMaxValue(180, value ) ));
258 coerceValue(myRemoveUnusedPoints, ( ( value ) ));
261 coerceValue(myBridge, clampMinValue(0, clampMaxValue(2, value ) ));
264 coerceValue(myRemoveDegenerateBridges, ( ( value ) ));
267 coerceValue(myBoundaryCurves, ( ( 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); }
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); }
310 if (fieldnum.
size() < 1)
321 return "reminlinepts";
325 return "remunusedpts";
329 return "deldegeneratebridges";
331 return "boundarycurves";
339 if (fieldnum.
size() < 1)
340 return PARM_UNSUPPORTED;
363 return PARM_UNSUPPORTED;
399 loadData(is, rampdata);
417 int typelen = colon - data.
buffer();
431 {
int64 iv =
v; UTwrite(os, &iv); }
433 { UTwrite<fpreal64>(os, &
v); }
435 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
437 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
438 UTwrite<fpreal64>(os, &v.
z()); }
440 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
441 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
453 if (s) s->save(ostr);
455 saveData(os, result);
462 ostr << s->getDataTypeToken();
467 saveData(os, result);
471 void save(std::ostream &os)
const
475 saveData(os, myGroup);
476 saveData(os, myInvertSelection);
477 saveData(os, myRecomputeNormals);
478 saveData(os, myRemoveInlinePoints);
479 saveData(os, myInlineTolerance);
480 saveData(os, myRemoveUnusedPoints);
481 saveData(os, myBridge);
482 saveData(os, myRemoveDegenerateBridges);
483 saveData(os, myBoundaryCurves);
496 loadData(is, myGroup);
497 loadData(is, myInvertSelection);
498 loadData(is, myRecomputeNormals);
499 loadData(is, myRemoveInlinePoints);
500 loadData(is, myInlineTolerance);
501 loadData(is, myRemoveUnusedPoints);
502 loadData(is, myBridge);
503 loadData(is, myRemoveDegenerateBridges);
504 loadData(is, myBoundaryCurves);
514 if (!thissop)
return getGroup();
516 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
524 if (!thissop)
return getInvertSelection();
526 OP_Utils::evalOpParm(result, thissop,
"invertsel", cookparms.
getCookTime(), 0);
534 if (!thissop)
return getRecomputeNormals();
536 OP_Utils::evalOpParm(result, thissop,
"compnorms", cookparms.
getCookTime(), 0);
544 if (!thissop)
return getRemoveInlinePoints();
546 OP_Utils::evalOpParm(result, thissop,
"reminlinepts", cookparms.
getCookTime(), 0);
554 if (!thissop)
return getInlineTolerance();
556 OP_Utils::evalOpParm(result, thissop,
"coltol", cookparms.
getCookTime(), 0);
564 if (!thissop)
return getRemoveUnusedPoints();
566 OP_Utils::evalOpParm(result, thissop,
"remunusedpts", cookparms.
getCookTime(), 0);
574 if (!thissop)
return getBridge();
576 OP_Utils::evalOpParm(result, thissop,
"bridge", cookparms.
getCookTime(), 0);
584 if (!thissop)
return getRemoveDegenerateBridges();
586 OP_Utils::evalOpParm(result, thissop,
"deldegeneratebridges", cookparms.
getCookTime(), 0);
594 if (!thissop)
return getBoundaryCurves();
596 OP_Utils::evalOpParm(result, thissop,
"boundarycurves", cookparms.
getCookTime(), 0);
602 int64 myInvertSelection;
603 bool myRecomputeNormals;
604 bool myRemoveInlinePoints;
606 bool myRemoveUnusedPoints;
608 bool myRemoveDegenerateBridges;
609 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
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)
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
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)
bool isParmColorRamp(exint idx) const override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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)