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;
66 myGroupexclude =
false;
80 if (mySplitloc != src.mySplitloc)
return false;
81 if (myPathtype != src.myPathtype)
return false;
82 if (myClose != src.myClose)
return false;
83 if (myAllowfaces != src.myAllowfaces)
return false;
84 if (myQuadcomplete != src.myQuadcomplete)
return false;
85 if (myNumloops != src.myNumloops)
return false;
86 if (myParallellooptoggle != src.myParallellooptoggle)
return false;
87 if (myParallelfliptoggle != src.myParallelfliptoggle)
return false;
88 if (myEdgepercenttoggle != src.myEdgepercenttoggle)
return false;
89 if (myEdgepercent != src.myEdgepercent)
return false;
90 if (myUpdatenorms != src.myUpdatenorms)
return false;
91 if (myGrouptoggle != src.myGrouptoggle)
return false;
92 if (myGroupname != src.myGroupname)
return false;
93 if (myGroupappend != src.myGroupappend)
return false;
94 if (myGroupexclude != src.myGroupexclude)
return false;
95 if (myTolerance != src.myTolerance)
return false;
112 mySplitloc =
""_UTsh;
113 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==1)))) ) )
114 graph->
evalOpParm(mySplitloc, nodeidx,
"splitloc", time, graph->
isDirect()?
nullptr:depnode);
116 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==1)))) ) )
117 graph->
evalOpParm(myPathtype, nodeidx,
"pathtype", time, graph->
isDirect()?
nullptr:depnode);
119 if (
true && ( (
true&&!(((
int64(getPathtype())!=0))||(((graph->
getInput(nodeidx,1)>=0)==1)))) ) )
120 graph->
evalOpParm(myClose, nodeidx,
"close", time, graph->
isDirect()?
nullptr:depnode);
122 if (
true && ( (
true&&!(((
int64(getPathtype())!=0)&&((graph->
getInput(nodeidx,1)>=0)==0)))) ) )
123 graph->
evalOpParm(myAllowfaces, nodeidx,
"allowfaces", time, graph->
isDirect()?
nullptr:depnode);
124 myQuadcomplete =
false;
125 if (
true && ( (
true&&!(((
int64(getPathtype())!=0)&&((graph->
getInput(nodeidx,1)>=0)==0)))) ) )
126 graph->
evalOpParm(myQuadcomplete, nodeidx,
"quadcomplete", time, graph->
isDirect()?
nullptr:depnode);
128 if (
true && ( (
true&&!(((
int64(getPathtype())!=1))||(((graph->
getInput(nodeidx,1)>=0)==1)))) ) )
129 graph->
evalOpParm(myNumloops, nodeidx,
"numloops", time, graph->
isDirect()?
nullptr:depnode);
130 myParallellooptoggle =
false;
131 if (
true && ( (
true&&!(((
int64(getPathtype())!=1))||(((graph->
getInput(nodeidx,1)>=0)==1)))) ) )
132 graph->
evalOpParm(myParallellooptoggle, nodeidx,
"parallellooptoggle", time, graph->
isDirect()?
nullptr:depnode);
133 myParallelfliptoggle =
false;
134 if (
true && ( (
true&&!(((
int64(getPathtype())!=1))||(((graph->
getInput(nodeidx,1)>=0)==1))||((getParallellooptoggle()==0)))) ) )
135 graph->
evalOpParm(myParallelfliptoggle, nodeidx,
"parallelfliptoggle", time, graph->
isDirect()?
nullptr:depnode);
136 myEdgepercenttoggle =
false;
137 if (
true && ( (
true&&!(((
int64(getPathtype())==1)&&((graph->
getInput(nodeidx,1)>=0)==0)&&(
int64(getNumloops())>0)&&(getParallellooptoggle()==0)))) ) )
138 graph->
evalOpParm(myEdgepercenttoggle, nodeidx,
"edgepercenttoggle", time, graph->
isDirect()?
nullptr:depnode);
140 if (
true && ( (
true&&!(((getEdgepercenttoggle()==0))||((
int64(getPathtype())==1)&&((graph->
getInput(nodeidx,1)>=0)==0)&&(
int64(getNumloops())>0)&&(getParallellooptoggle()==0)))) ) )
141 graph->
evalOpParm(myEdgepercent, nodeidx,
"edgepercent", time, graph->
isDirect()?
nullptr:depnode);
142 myUpdatenorms =
true;
144 graph->
evalOpParm(myUpdatenorms, nodeidx,
"updatenorms", time, graph->
isDirect()?
nullptr:depnode);
145 myGrouptoggle =
false;
147 graph->
evalOpParm(myGrouptoggle, nodeidx,
"grouptoggle", time, graph->
isDirect()?
nullptr:depnode);
148 myGroupname =
"splitPathGroup"_UTsh;
149 if (
true && ( (
true&&!(((getGrouptoggle()==0)))) ) )
150 graph->
evalOpParm(myGroupname, nodeidx,
"groupname", time, graph->
isDirect()?
nullptr:depnode);
151 myGroupappend =
false;
152 if (
true && ( (
true&&!(((getGrouptoggle()==0)))) ) )
153 graph->
evalOpParm(myGroupappend, nodeidx,
"groupappend", time, graph->
isDirect()?
nullptr:depnode);
154 myGroupexclude =
false;
155 if (
true && ( (
true&&!(((getGrouptoggle()==0)))) ) )
156 graph->
evalOpParm(myGroupexclude, nodeidx,
"groupexclude", time, graph->
isDirect()?
nullptr:depnode);
159 graph->
evalOpParm(myTolerance, nodeidx,
"tolerance", time, graph->
isDirect()?
nullptr:depnode);
175 template <
typename T>
182 if (idx.
size() != instance.
size()+1)
187 coerceValue(value, mySplitloc);
190 coerceValue(value, myPathtype);
193 coerceValue(value, myClose);
196 coerceValue(value, myAllowfaces);
199 coerceValue(value, myQuadcomplete);
202 coerceValue(value, myNumloops);
205 coerceValue(value, myParallellooptoggle);
208 coerceValue(value, myParallelfliptoggle);
211 coerceValue(value, myEdgepercenttoggle);
214 coerceValue(value, myEdgepercent);
217 coerceValue(value, myUpdatenorms);
220 coerceValue(value, myGrouptoggle);
223 coerceValue(value, myGroupname);
226 coerceValue(value, myGroupappend);
229 coerceValue(value, myGroupexclude);
232 coerceValue(value, myTolerance);
248 { doGetParmValue(idx, instance, value); }
250 { doGetParmValue(idx, instance, value); }
252 { doGetParmValue(idx, instance, value); }
254 { doGetParmValue(idx, instance, value); }
256 { doGetParmValue(idx, instance, value); }
258 { doGetParmValue(idx, instance, value); }
260 { doGetParmValue(idx, instance, value); }
262 { doGetParmValue(idx, instance, value); }
264 { doGetParmValue(idx, instance, value); }
266 { doGetParmValue(idx, instance, value); }
268 { doGetParmValue(idx, instance, value); }
270 template <
typename T>
277 if (idx.
size() != instance.
size()+1)
282 coerceValue(mySplitloc, ( ( value ) ));
285 coerceValue(myPathtype, clampMinValue(0, clampMaxValue(1, value ) ));
288 coerceValue(myClose, ( ( value ) ));
291 coerceValue(myAllowfaces, ( ( value ) ));
294 coerceValue(myQuadcomplete, ( ( value ) ));
297 coerceValue(myNumloops, ( ( value ) ));
300 coerceValue(myParallellooptoggle, ( ( value ) ));
303 coerceValue(myParallelfliptoggle, ( ( value ) ));
306 coerceValue(myEdgepercenttoggle, ( ( value ) ));
309 coerceValue(myEdgepercent, clampMinValue(0, clampMaxValue(1, value ) ));
312 coerceValue(myUpdatenorms, ( ( value ) ));
315 coerceValue(myGrouptoggle, ( ( value ) ));
318 coerceValue(myGroupname, ( ( value ) ));
321 coerceValue(myGroupappend, ( ( value ) ));
324 coerceValue(myGroupexclude, ( ( value ) ));
327 coerceValue(myTolerance, clampMinValue(0, ( value ) ));
334 { doSetParmValue(idx, instance, value); }
336 { doSetParmValue(idx, instance, value); }
338 { doSetParmValue(idx, instance, value); }
340 { doSetParmValue(idx, instance, value); }
342 { doSetParmValue(idx, instance, value); }
344 { doSetParmValue(idx, instance, value); }
346 { doSetParmValue(idx, instance, value); }
348 { doSetParmValue(idx, instance, value); }
350 { doSetParmValue(idx, instance, value); }
352 { doSetParmValue(idx, instance, value); }
354 { doSetParmValue(idx, instance, value); }
370 if (fieldnum.
size() < 1)
383 return "quadcomplete";
387 return "parallellooptoggle";
389 return "parallelfliptoggle";
391 return "edgepercenttoggle";
393 return "edgepercent";
395 return "updatenorms";
397 return "grouptoggle";
401 return "groupappend";
403 return "groupexclude";
413 if (fieldnum.
size() < 1)
414 return PARM_UNSUPPORTED;
451 return PARM_UNSUPPORTED;
487 loadData(is, rampdata);
505 int typelen = colon - data.
buffer();
519 {
int64 iv =
v; UTwrite(os, &iv); }
521 { UTwrite<fpreal64>(os, &
v); }
523 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
525 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
526 UTwrite<fpreal64>(os, &v.
z()); }
528 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
529 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
541 if (s) s->save(ostr);
543 saveData(os, result);
550 ostr << s->getDataTypeToken();
555 saveData(os, result);
559 void save(std::ostream &os)
const
563 saveData(os, mySplitloc);
564 saveData(os, myPathtype);
565 saveData(os, myClose);
566 saveData(os, myAllowfaces);
567 saveData(os, myQuadcomplete);
568 saveData(os, myNumloops);
569 saveData(os, myParallellooptoggle);
570 saveData(os, myParallelfliptoggle);
571 saveData(os, myEdgepercenttoggle);
572 saveData(os, myEdgepercent);
573 saveData(os, myUpdatenorms);
574 saveData(os, myGrouptoggle);
575 saveData(os, myGroupname);
576 saveData(os, myGroupappend);
577 saveData(os, myGroupexclude);
578 saveData(os, myTolerance);
591 loadData(is, mySplitloc);
592 loadData(is, myPathtype);
593 loadData(is, myClose);
594 loadData(is, myAllowfaces);
595 loadData(is, myQuadcomplete);
596 loadData(is, myNumloops);
597 loadData(is, myParallellooptoggle);
598 loadData(is, myParallelfliptoggle);
599 loadData(is, myEdgepercenttoggle);
600 loadData(is, myEdgepercent);
601 loadData(is, myUpdatenorms);
602 loadData(is, myGrouptoggle);
603 loadData(is, myGroupname);
604 loadData(is, myGroupappend);
605 loadData(is, myGroupexclude);
606 loadData(is, myTolerance);
616 if (!thissop)
return getSplitloc();
618 OP_Utils::evalOpParm(result, thissop,
"splitloc", cookparms.
getCookTime(), 0);
626 if (!thissop)
return getPathtype();
628 OP_Utils::evalOpParm(result, thissop,
"pathtype", cookparms.
getCookTime(), 0);
636 if (!thissop)
return getClose();
638 OP_Utils::evalOpParm(result, thissop,
"close", cookparms.
getCookTime(), 0);
646 if (!thissop)
return getAllowfaces();
648 OP_Utils::evalOpParm(result, thissop,
"allowfaces", cookparms.
getCookTime(), 0);
656 if (!thissop)
return getQuadcomplete();
658 OP_Utils::evalOpParm(result, thissop,
"quadcomplete", cookparms.
getCookTime(), 0);
666 if (!thissop)
return getNumloops();
668 OP_Utils::evalOpParm(result, thissop,
"numloops", cookparms.
getCookTime(), 0);
676 if (!thissop)
return getParallellooptoggle();
678 OP_Utils::evalOpParm(result, thissop,
"parallellooptoggle", cookparms.
getCookTime(), 0);
686 if (!thissop)
return getParallelfliptoggle();
688 OP_Utils::evalOpParm(result, thissop,
"parallelfliptoggle", cookparms.
getCookTime(), 0);
696 if (!thissop)
return getEdgepercenttoggle();
698 OP_Utils::evalOpParm(result, thissop,
"edgepercenttoggle", cookparms.
getCookTime(), 0);
706 if (!thissop)
return getEdgepercent();
708 OP_Utils::evalOpParm(result, thissop,
"edgepercent", cookparms.
getCookTime(), 0);
716 if (!thissop)
return getUpdatenorms();
718 OP_Utils::evalOpParm(result, thissop,
"updatenorms", cookparms.
getCookTime(), 0);
726 if (!thissop)
return getGrouptoggle();
728 OP_Utils::evalOpParm(result, thissop,
"grouptoggle", cookparms.
getCookTime(), 0);
736 if (!thissop)
return getGroupname();
738 OP_Utils::evalOpParm(result, thissop,
"groupname", cookparms.
getCookTime(), 0);
746 if (!thissop)
return getGroupappend();
748 OP_Utils::evalOpParm(result, thissop,
"groupappend", cookparms.
getCookTime(), 0);
756 if (!thissop)
return getGroupexclude();
758 OP_Utils::evalOpParm(result, thissop,
"groupexclude", cookparms.
getCookTime(), 0);
766 if (!thissop)
return getTolerance();
768 OP_Utils::evalOpParm(result, thissop,
"tolerance", cookparms.
getCookTime(), 0);
779 bool myParallellooptoggle;
780 bool myParallelfliptoggle;
781 bool myEdgepercenttoggle;
virtual NodeIdx getInput(NodeIdx idx, OP_InputIdx input, bool markused=false) const =0
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
GLsizei const GLfloat * value
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)
constexpr SYS_FORCE_INLINE T & x() noexcept
static void saveData(std::ostream &os, UT_Matrix3D v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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.
bool opGroupexclude(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & w() noexcept
virtual UT_StringHolder baseGetSignature() const
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)
void setGroupexclude(bool val)
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
bool getGroupexclude() const
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)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
Pathtype getPathtype() const
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