23 namespace SOP_PolySplit2Enums
34 using namespace UT::Literal;
56 myQuadcomplete =
false;
58 myParallellooptoggle =
false;
59 myParallelfliptoggle =
false;
60 myEdgepercenttoggle =
false;
63 myGrouptoggle =
false;
64 myGroupname =
"splitPathGroup"_UTsh;
65 myGroupappend =
false;
79 if (mySplitloc != src.mySplitloc)
return false;
80 if (myPathtype != src.myPathtype)
return false;
81 if (myClose != src.myClose)
return false;
82 if (myAllowfaces != src.myAllowfaces)
return false;
83 if (myQuadcomplete != src.myQuadcomplete)
return false;
84 if (myNumloops != src.myNumloops)
return false;
85 if (myParallellooptoggle != src.myParallellooptoggle)
return false;
86 if (myParallelfliptoggle != src.myParallelfliptoggle)
return false;
87 if (myEdgepercenttoggle != src.myEdgepercenttoggle)
return false;
88 if (myEdgepercent != src.myEdgepercent)
return false;
89 if (myUpdatenorms != src.myUpdatenorms)
return false;
90 if (myGrouptoggle != src.myGrouptoggle)
return false;
91 if (myGroupname != src.myGroupname)
return false;
92 if (myGroupappend != src.myGroupappend)
return false;
93 if (myTolerance != src.myTolerance)
return false;
107 mySplitloc =
""_UTsh;
108 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==1)))) ) )
109 graph->
evalOpParm(mySplitloc, nodeidx,
"splitloc", time, 0);
111 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==1)))) ) )
112 graph->
evalOpParm(myPathtype, nodeidx,
"pathtype", time, 0);
114 if (
true && ( (
true&&!(((
int64(getPathtype())!=0))||(((graph->
getInput(nodeidx,1)>=0)==1)))) ) )
115 graph->
evalOpParm(myClose, nodeidx,
"close", time, 0);
117 if (
true && ( (
true&&!(((
int64(getPathtype())!=0)&&((graph->
getInput(nodeidx,1)>=0)==0)))) ) )
118 graph->
evalOpParm(myAllowfaces, nodeidx,
"allowfaces", time, 0);
119 myQuadcomplete =
false;
120 if (
true && ( (
true&&!(((
int64(getPathtype())!=0)&&((graph->
getInput(nodeidx,1)>=0)==0)))) ) )
121 graph->
evalOpParm(myQuadcomplete, nodeidx,
"quadcomplete", time, 0);
123 if (
true && ( (
true&&!(((
int64(getPathtype())!=1))||(((graph->
getInput(nodeidx,1)>=0)==1)))) ) )
124 graph->
evalOpParm(myNumloops, nodeidx,
"numloops", time, 0);
125 myParallellooptoggle =
false;
126 if (
true && ( (
true&&!(((
int64(getPathtype())!=1))||(((graph->
getInput(nodeidx,1)>=0)==1)))) ) )
127 graph->
evalOpParm(myParallellooptoggle, nodeidx,
"parallellooptoggle", time, 0);
128 myParallelfliptoggle =
false;
129 if (
true && ( (
true&&!(((
int64(getPathtype())!=1))||(((graph->
getInput(nodeidx,1)>=0)==1))||((getParallellooptoggle()==0)))) ) )
130 graph->
evalOpParm(myParallelfliptoggle, nodeidx,
"parallelfliptoggle", time, 0);
131 myEdgepercenttoggle =
false;
132 if (
true && ( (
true&&!(((
int64(getPathtype())==1)&&((graph->
getInput(nodeidx,1)>=0)==0)&&(
int64(getNumloops())>0)&&(getParallellooptoggle()==0)))) ) )
133 graph->
evalOpParm(myEdgepercenttoggle, nodeidx,
"edgepercenttoggle", time, 0);
135 if (
true && ( (
true&&!(((getEdgepercenttoggle()==0))||((
int64(getPathtype())==1)&&((graph->
getInput(nodeidx,1)>=0)==0)&&(
int64(getNumloops())>0)&&(getParallellooptoggle()==0)))) ) )
136 graph->
evalOpParm(myEdgepercent, nodeidx,
"edgepercent", time, 0);
137 myUpdatenorms =
true;
139 graph->
evalOpParm(myUpdatenorms, nodeidx,
"updatenorms", time, 0);
140 myGrouptoggle =
false;
142 graph->
evalOpParm(myGrouptoggle, nodeidx,
"grouptoggle", time, 0);
143 myGroupname =
"splitPathGroup"_UTsh;
144 if (
true && ( (
true&&!(((getGrouptoggle()==0)))) ) )
145 graph->
evalOpParm(myGroupname, nodeidx,
"groupname", time, 0);
146 myGroupappend =
false;
147 if (
true && ( (
true&&!(((getGrouptoggle()==0)))) ) )
148 graph->
evalOpParm(myGroupappend, nodeidx,
"groupappend", time, 0);
151 graph->
evalOpParm(myTolerance, nodeidx,
"tolerance", time, 0);
167 template <
typename T>
174 if (idx.
size() != instance.
size()+1)
179 coerceValue(value, mySplitloc);
182 coerceValue(value, myPathtype);
185 coerceValue(value, myClose);
188 coerceValue(value, myAllowfaces);
191 coerceValue(value, myQuadcomplete);
194 coerceValue(value, myNumloops);
197 coerceValue(value, myParallellooptoggle);
200 coerceValue(value, myParallelfliptoggle);
203 coerceValue(value, myEdgepercenttoggle);
206 coerceValue(value, myEdgepercent);
209 coerceValue(value, myUpdatenorms);
212 coerceValue(value, myGrouptoggle);
215 coerceValue(value, myGroupname);
218 coerceValue(value, myGroupappend);
221 coerceValue(value, myTolerance);
237 { doGetParmValue(idx, instance, value); }
239 { doGetParmValue(idx, instance, value); }
241 { doGetParmValue(idx, instance, value); }
243 { doGetParmValue(idx, instance, value); }
245 { doGetParmValue(idx, instance, value); }
247 { doGetParmValue(idx, instance, value); }
249 { doGetParmValue(idx, instance, value); }
251 { doGetParmValue(idx, instance, value); }
253 { doGetParmValue(idx, instance, value); }
255 { doGetParmValue(idx, instance, value); }
257 { doGetParmValue(idx, instance, value); }
259 template <
typename T>
266 if (idx.
size() != instance.
size()+1)
271 coerceValue(mySplitloc, ( ( value ) ));
274 coerceValue(myPathtype, clampMinValue(0, clampMaxValue(1, value ) ));
277 coerceValue(myClose, ( ( value ) ));
280 coerceValue(myAllowfaces, ( ( value ) ));
283 coerceValue(myQuadcomplete, ( ( value ) ));
286 coerceValue(myNumloops, ( ( value ) ));
289 coerceValue(myParallellooptoggle, ( ( value ) ));
292 coerceValue(myParallelfliptoggle, ( ( value ) ));
295 coerceValue(myEdgepercenttoggle, ( ( value ) ));
298 coerceValue(myEdgepercent, clampMinValue(0, clampMaxValue(1, value ) ));
301 coerceValue(myUpdatenorms, ( ( value ) ));
304 coerceValue(myGrouptoggle, ( ( value ) ));
307 coerceValue(myGroupname, ( ( value ) ));
310 coerceValue(myGroupappend, ( ( value ) ));
313 coerceValue(myTolerance, clampMinValue(0, ( value ) ));
320 { doSetParmValue(idx, instance, value); }
322 { doSetParmValue(idx, instance, value); }
324 { doSetParmValue(idx, instance, value); }
326 { doSetParmValue(idx, instance, value); }
328 { doSetParmValue(idx, instance, value); }
330 { doSetParmValue(idx, instance, value); }
332 { doSetParmValue(idx, instance, value); }
334 { doSetParmValue(idx, instance, value); }
336 { doSetParmValue(idx, instance, value); }
338 { doSetParmValue(idx, instance, value); }
340 { doSetParmValue(idx, instance, value); }
356 if (fieldnum.
size() < 1)
369 return "quadcomplete";
373 return "parallellooptoggle";
375 return "parallelfliptoggle";
377 return "edgepercenttoggle";
379 return "edgepercent";
381 return "updatenorms";
383 return "grouptoggle";
387 return "groupappend";
397 if (fieldnum.
size() < 1)
398 return PARM_UNSUPPORTED;
433 return PARM_UNSUPPORTED;
469 loadData(is, rampdata);
487 int typelen = colon - data.
buffer();
501 {
int64 iv =
v; UTwrite(os, &iv); }
503 { UTwrite<fpreal64>(os, &
v); }
505 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
507 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
508 UTwrite<fpreal64>(os, &v.
z()); }
510 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
511 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
523 if (s) s->save(ostr);
525 saveData(os, result);
532 ostr << s->getDataTypeToken();
537 saveData(os, result);
541 void save(std::ostream &os)
const
545 saveData(os, mySplitloc);
546 saveData(os, myPathtype);
547 saveData(os, myClose);
548 saveData(os, myAllowfaces);
549 saveData(os, myQuadcomplete);
550 saveData(os, myNumloops);
551 saveData(os, myParallellooptoggle);
552 saveData(os, myParallelfliptoggle);
553 saveData(os, myEdgepercenttoggle);
554 saveData(os, myEdgepercent);
555 saveData(os, myUpdatenorms);
556 saveData(os, myGrouptoggle);
557 saveData(os, myGroupname);
558 saveData(os, myGroupappend);
559 saveData(os, myTolerance);
572 loadData(is, mySplitloc);
573 loadData(is, myPathtype);
574 loadData(is, myClose);
575 loadData(is, myAllowfaces);
576 loadData(is, myQuadcomplete);
577 loadData(is, myNumloops);
578 loadData(is, myParallellooptoggle);
579 loadData(is, myParallelfliptoggle);
580 loadData(is, myEdgepercenttoggle);
581 loadData(is, myEdgepercent);
582 loadData(is, myUpdatenorms);
583 loadData(is, myGrouptoggle);
584 loadData(is, myGroupname);
585 loadData(is, myGroupappend);
586 loadData(is, myTolerance);
596 if (!thissop)
return getSplitloc();
598 OP_Utils::evalOpParm(result, thissop,
"splitloc", cookparms.
getCookTime(), 0);
606 if (!thissop)
return getPathtype();
608 OP_Utils::evalOpParm(result, thissop,
"pathtype", cookparms.
getCookTime(), 0);
616 if (!thissop)
return getClose();
618 OP_Utils::evalOpParm(result, thissop,
"close", cookparms.
getCookTime(), 0);
626 if (!thissop)
return getAllowfaces();
628 OP_Utils::evalOpParm(result, thissop,
"allowfaces", cookparms.
getCookTime(), 0);
636 if (!thissop)
return getQuadcomplete();
638 OP_Utils::evalOpParm(result, thissop,
"quadcomplete", cookparms.
getCookTime(), 0);
646 if (!thissop)
return getNumloops();
648 OP_Utils::evalOpParm(result, thissop,
"numloops", cookparms.
getCookTime(), 0);
656 if (!thissop)
return getParallellooptoggle();
658 OP_Utils::evalOpParm(result, thissop,
"parallellooptoggle", cookparms.
getCookTime(), 0);
666 if (!thissop)
return getParallelfliptoggle();
668 OP_Utils::evalOpParm(result, thissop,
"parallelfliptoggle", cookparms.
getCookTime(), 0);
676 if (!thissop)
return getEdgepercenttoggle();
678 OP_Utils::evalOpParm(result, thissop,
"edgepercenttoggle", cookparms.
getCookTime(), 0);
686 if (!thissop)
return getEdgepercent();
688 OP_Utils::evalOpParm(result, thissop,
"edgepercent", cookparms.
getCookTime(), 0);
696 if (!thissop)
return getUpdatenorms();
698 OP_Utils::evalOpParm(result, thissop,
"updatenorms", cookparms.
getCookTime(), 0);
706 if (!thissop)
return getGrouptoggle();
708 OP_Utils::evalOpParm(result, thissop,
"grouptoggle", cookparms.
getCookTime(), 0);
716 if (!thissop)
return getGroupname();
718 OP_Utils::evalOpParm(result, thissop,
"groupname", cookparms.
getCookTime(), 0);
726 if (!thissop)
return getGroupappend();
728 OP_Utils::evalOpParm(result, thissop,
"groupappend", cookparms.
getCookTime(), 0);
736 if (!thissop)
return getTolerance();
738 OP_Utils::evalOpParm(result, thissop,
"tolerance", cookparms.
getCookTime(), 0);
749 bool myParallellooptoggle;
750 bool myParallelfliptoggle;
751 bool myEdgepercenttoggle;
bool opParallelfliptoggle(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_StringHolder s)
const UT_StringHolder & getSplitloc() const
static void loadData(UT_IStream &is, UT_Vector4D &v)
UT_StringHolder opSplitloc(const SOP_NodeVerb::CookParms &cookparms) const
void setEdgepercent(fpreal64 val)
bool opUpdatenorms(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void saveData(std::ostream &os, UT_Matrix2D v)
bool operator!=(const SOP_PolySplit2Parms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setGroupappend(bool val)
SOP_Node * getNode() const
fpreal64 getEdgepercent() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void saveData(std::ostream &os, UT_Vector2D v)
fpreal64 opEdgepercent(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
bool getQuadcomplete() const
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, UT_Vector4D v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
bool opClose(const SOP_NodeVerb::CookParms &cookparms) const
void copyFrom(const OP_NodeParms *src) override
void setNumloops(int64 val)
static void saveData(std::ostream &os, bool v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setAllowfaces(bool val)
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
SYS_FORCE_INLINE const char * buffer() const
void setParallellooptoggle(bool val)
An output stream object that owns its own string buffer storage.
int64 opNumloops(const SOP_NodeVerb::CookParms &cookparms) const
bool opGrouptoggle(const SOP_NodeVerb::CookParms &cookparms) const
bool getUpdatenorms() const
static void loadData(UT_IStream &is, fpreal64 &v)
**But if you need a result
static void saveData(std::ostream &os, UT_Vector3D v)
bool opParallellooptoggle(const SOP_NodeVerb::CookParms &cookparms) const
bool getGroupappend() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) 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.
bool opAllowfaces(const SOP_NodeVerb::CookParms &cookparms) const
void setSplitloc(const UT_StringHolder &val)
virtual NodeIdx getInput(NodeIdx idx, int input, bool markused=false) const =0
constexpr SYS_FORCE_INLINE T & x() noexcept
static void saveData(std::ostream &os, UT_Matrix3D v)
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, bool &v)
SYS_FORCE_INLINE UT_StringHolder getToken(Pathtype enum_value)
static void saveData(std::ostream &os, int64 v)
void setUpdatenorms(bool val)
void setEdgepercenttoggle(bool val)
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
fpreal64 opTolerance(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & z() noexcept
bool opEdgepercenttoggle(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool getParallellooptoggle() const
const OP_GraphProxy * graph() const
void setGrouptoggle(bool val)
bool getGrouptoggle() const
ParmType getNestParmType(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setParallelfliptoggle(bool val)
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
bool opQuadcomplete(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
bool isParmColorRamp(exint idx) const override
void setQuadcomplete(bool val)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool load(UT_IStream &is)
void saveBinary(std::ostream &os) const
Save string to binary stream.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
GT_API const UT_StringHolder version
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
bool getEdgepercenttoggle() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
bool getParallelfliptoggle() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
exint getNestNumParms(TempIndex idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, UT_Vector2D &v)
DEP_MicroNode * depnode() const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
void loadFromOpSubclass(const LoadParms &loadparms) override
int64 getNumloops() const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void saveData(std::ostream &os, UT_Matrix4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
fpreal getCookTime() const
const char * findChar(int c) const
bool opGroupappend(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, int64 &v)
Pathtype opPathtype(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
fpreal64 getTolerance() const
void setPathtype(Pathtype val)
void setTolerance(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void saveData(std::ostream &os, fpreal64 v)
constexpr SYS_FORCE_INLINE T & y() noexcept
UT_StringHolder opGroupname(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
Pathtype getPathtype() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
bool getAllowfaces() const
bool operator==(const SOP_PolySplit2Parms &src) const
constexpr SYS_FORCE_INLINE T & y() noexcept
void save(std::ostream &os) const
SYS_FORCE_INLINE bool isstring() const
const UT_StringHolder & getGroupname() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setGroupname(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector3D &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override