23 namespace SOP_GroupFindPathEnums
37 using namespace UT::Literal;
58 using namespace UT::Literal;
77 using namespace UT::Literal;
96 using namespace UT::Literal;
117 using namespace UT::Literal;
118 switch (enum_value) {
138 myOutgroup =
""_UTsh;
141 myPathcontroltype = 0;
143 myAvoidprevious =
true;
145 myUseuvattrib =
false;
146 myUvattrib =
"uv"_UTsh;
147 myUsecolgroup =
false;
148 myColgroup =
""_UTsh;
150 myColgroupinvert =
false;
151 myColgrouponbnd =
false;
164 if (myOutgroup != src.myOutgroup)
return false;
165 if (myGroup != src.myGroup)
return false;
166 if (myGrouptype != src.myGrouptype)
return false;
167 if (myPathcontroltype != src.myPathcontroltype)
return false;
168 if (myOperation != src.myOperation)
return false;
169 if (myAvoidprevious != src.myAvoidprevious)
return false;
170 if (myEdgestyle != src.myEdgestyle)
return false;
171 if (myUseuvattrib != src.myUseuvattrib)
return false;
172 if (myUvattrib != src.myUvattrib)
return false;
173 if (myUsecolgroup != src.myUsecolgroup)
return false;
174 if (myColgroup != src.myColgroup)
return false;
175 if (myColgrouptype != src.myColgrouptype)
return false;
176 if (myColgroupinvert != src.myColgroupinvert)
return false;
177 if (myColgrouponbnd != src.myColgrouponbnd)
return false;
195 myOutgroup =
""_UTsh;
197 graph->
evalOpParm(myOutgroup, nodeidx,
"outgroup", time, 0);
200 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
203 graph->
evalOpParm(myGrouptype, nodeidx,
"grouptype", time, 0);
204 myPathcontroltype = 0;
206 graph->
evalOpParm(myPathcontroltype, nodeidx,
"pathcontroltype", time, 0);
209 graph->
evalOpParm(myOperation, nodeidx,
"operation", time, 0);
210 myAvoidprevious =
true;
212 graph->
evalOpParm(myAvoidprevious, nodeidx,
"avoidprevious", time, 0);
214 if (
true && ( (
true&&!(((
int64(getGrouptype())==2))||((
int64(getGrouptype())==3))||((
int64(getGrouptype())==4)))) ) )
215 graph->
evalOpParm(myEdgestyle, nodeidx,
"edgestyle", time, 0);
216 myUseuvattrib =
false;
218 graph->
evalOpParm(myUseuvattrib, nodeidx,
"useuvattrib", time, 0);
219 myUvattrib =
"uv"_UTsh;
220 if (
true && ( (
true&&!(((getUseuvattrib()==0)))) ) )
221 graph->
evalOpParm(myUvattrib, nodeidx,
"uvattrib", time, 0);
222 myUsecolgroup =
false;
224 graph->
evalOpParm(myUsecolgroup, nodeidx,
"usecolgroup", time, 0);
225 myColgroup =
""_UTsh;
226 if (
true && ( (
true&&!(((getUsecolgroup()==0)))) ) )
227 graph->
evalOpParm(myColgroup, nodeidx,
"colgroup", time, 0);
229 if (
true && ( (
true&&!(((getUsecolgroup()==0)))) ) )
230 graph->
evalOpParm(myColgrouptype, nodeidx,
"colgrouptype", time, 0);
231 myColgroupinvert =
false;
232 if (
true && ( (
true&&!(((getUsecolgroup()==0)))) ) )
233 graph->
evalOpParm(myColgroupinvert, nodeidx,
"colgroupinvert", time, 0);
234 myColgrouponbnd =
false;
235 if (
true && ( (
true&&!(((getUsecolgroup()==0))||((getColgroupinvert()==1)))) ) )
236 graph->
evalOpParm(myColgrouponbnd, nodeidx,
"colgrouponbnd", time, 0);
252 template <
typename T>
259 if (idx.
size() != instance.
size()+1)
264 coerceValue(value, myOutgroup);
267 coerceValue(value, myGroup);
270 coerceValue(value, myGrouptype);
273 coerceValue(value, myPathcontroltype);
276 coerceValue(value, myOperation);
279 coerceValue(value, myAvoidprevious);
282 coerceValue(value, myEdgestyle);
285 coerceValue(value, myUseuvattrib);
288 coerceValue(value, myUvattrib);
291 coerceValue(value, myUsecolgroup);
294 coerceValue(value, myColgroup);
297 coerceValue(value, myColgrouptype);
300 coerceValue(value, myColgroupinvert);
303 coerceValue(value, myColgrouponbnd);
319 { doGetParmValue(idx, instance, value); }
321 { doGetParmValue(idx, instance, value); }
323 { doGetParmValue(idx, instance, value); }
325 { doGetParmValue(idx, instance, value); }
327 { doGetParmValue(idx, instance, value); }
329 { doGetParmValue(idx, instance, value); }
331 { doGetParmValue(idx, instance, value); }
333 { doGetParmValue(idx, instance, value); }
335 { doGetParmValue(idx, instance, value); }
337 { doGetParmValue(idx, instance, value); }
339 { doGetParmValue(idx, instance, value); }
341 template <
typename T>
348 if (idx.
size() != instance.
size()+1)
353 coerceValue(myOutgroup, ( ( value ) ));
356 coerceValue(myGroup, ( ( value ) ));
359 coerceValue(myGrouptype, clampMinValue(0, clampMaxValue(4, value ) ));
362 coerceValue(myPathcontroltype, clampMinValue(0, clampMaxValue(2, value ) ));
365 coerceValue(myOperation, clampMinValue(0, clampMaxValue(2, value ) ));
368 coerceValue(myAvoidprevious, ( ( value ) ));
371 coerceValue(myEdgestyle, clampMinValue(0, clampMaxValue(2, value ) ));
374 coerceValue(myUseuvattrib, ( ( value ) ));
377 coerceValue(myUvattrib, ( ( value ) ));
380 coerceValue(myUsecolgroup, ( ( value ) ));
383 coerceValue(myColgroup, ( ( value ) ));
386 coerceValue(myColgrouptype, clampMinValue(0, clampMaxValue(4, value ) ));
389 coerceValue(myColgroupinvert, ( ( value ) ));
392 coerceValue(myColgrouponbnd, ( ( value ) ));
399 { doSetParmValue(idx, instance, value); }
401 { doSetParmValue(idx, instance, value); }
403 { doSetParmValue(idx, instance, value); }
405 { doSetParmValue(idx, instance, value); }
407 { doSetParmValue(idx, instance, value); }
409 { doSetParmValue(idx, instance, value); }
411 { doSetParmValue(idx, instance, value); }
413 { doSetParmValue(idx, instance, value); }
415 { doSetParmValue(idx, instance, value); }
417 { doSetParmValue(idx, instance, value); }
419 { doSetParmValue(idx, instance, value); }
435 if (fieldnum.
size() < 1)
446 return "pathcontroltype";
450 return "avoidprevious";
454 return "useuvattrib";
458 return "usecolgroup";
462 return "colgrouptype";
464 return "colgroupinvert";
466 return "colgrouponbnd";
474 if (fieldnum.
size() < 1)
475 return PARM_UNSUPPORTED;
508 return PARM_UNSUPPORTED;
544 loadData(is, rampdata);
562 int typelen = colon - data.
buffer();
576 {
int64 iv =
v; UTwrite(os, &iv); }
578 { UTwrite<fpreal64>(os, &
v); }
580 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
582 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
583 UTwrite<fpreal64>(os, &v.
z()); }
585 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
586 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
598 if (s) s->save(ostr);
600 saveData(os, result);
607 ostr << s->getDataTypeToken();
612 saveData(os, result);
616 void save(std::ostream &os)
const
620 saveData(os, myOutgroup);
621 saveData(os, myGroup);
622 saveData(os, myGrouptype);
623 saveData(os, myPathcontroltype);
624 saveData(os, myOperation);
625 saveData(os, myAvoidprevious);
626 saveData(os, myEdgestyle);
627 saveData(os, myUseuvattrib);
628 saveData(os, myUvattrib);
629 saveData(os, myUsecolgroup);
630 saveData(os, myColgroup);
631 saveData(os, myColgrouptype);
632 saveData(os, myColgroupinvert);
633 saveData(os, myColgrouponbnd);
646 loadData(is, myOutgroup);
647 loadData(is, myGroup);
648 loadData(is, myGrouptype);
649 loadData(is, myPathcontroltype);
650 loadData(is, myOperation);
651 loadData(is, myAvoidprevious);
652 loadData(is, myEdgestyle);
653 loadData(is, myUseuvattrib);
654 loadData(is, myUvattrib);
655 loadData(is, myUsecolgroup);
656 loadData(is, myColgroup);
657 loadData(is, myColgrouptype);
658 loadData(is, myColgroupinvert);
659 loadData(is, myColgrouponbnd);
669 if (!thissop)
return getOutgroup();
671 OP_Utils::evalOpParm(result, thissop,
"outgroup", cookparms.
getCookTime(), 0);
679 if (!thissop)
return getGroup();
681 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
689 if (!thissop)
return getGrouptype();
691 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
699 if (!thissop)
return getPathcontroltype();
701 OP_Utils::evalOpParm(result, thissop,
"pathcontroltype", cookparms.
getCookTime(), 0);
709 if (!thissop)
return getOperation();
711 OP_Utils::evalOpParm(result, thissop,
"operation", cookparms.
getCookTime(), 0);
719 if (!thissop)
return getAvoidprevious();
721 OP_Utils::evalOpParm(result, thissop,
"avoidprevious", cookparms.
getCookTime(), 0);
729 if (!thissop)
return getEdgestyle();
731 OP_Utils::evalOpParm(result, thissop,
"edgestyle", cookparms.
getCookTime(), 0);
739 if (!thissop)
return getUseuvattrib();
741 OP_Utils::evalOpParm(result, thissop,
"useuvattrib", cookparms.
getCookTime(), 0);
749 if (!thissop)
return getUvattrib();
751 OP_Utils::evalOpParm(result, thissop,
"uvattrib", cookparms.
getCookTime(), 0);
759 if (!thissop)
return getUsecolgroup();
761 OP_Utils::evalOpParm(result, thissop,
"usecolgroup", cookparms.
getCookTime(), 0);
769 if (!thissop)
return getColgroup();
771 OP_Utils::evalOpParm(result, thissop,
"colgroup", cookparms.
getCookTime(), 0);
779 if (!thissop)
return getColgrouptype();
781 OP_Utils::evalOpParm(result, thissop,
"colgrouptype", cookparms.
getCookTime(), 0);
789 if (!thissop)
return getColgroupinvert();
791 OP_Utils::evalOpParm(result, thissop,
"colgroupinvert", cookparms.
getCookTime(), 0);
799 if (!thissop)
return getColgrouponbnd();
801 OP_Utils::evalOpParm(result, thissop,
"colgrouponbnd", cookparms.
getCookTime(), 0);
809 int64 myPathcontroltype;
811 bool myAvoidprevious;
817 int64 myColgrouptype;
818 bool myColgroupinvert;
819 bool myColgrouponbnd;
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void loadData(UT_IStream &is, UT_Vector4D &v)
void copyFrom(const OP_NodeParms *src) override
void setAvoidprevious(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
Edgestyle getEdgestyle() const
const char * getNestParmName(TempIndex fieldnum) const override
SOP_Node * getNode() const
Grouptype opGrouptype(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void saveData(std::ostream &os, UT_Vector2D v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
Pathcontroltype getPathcontroltype() const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
bool getColgrouponbnd() const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
bool opAvoidprevious(const SOP_NodeVerb::CookParms &cookparms) const
void setColgroup(const UT_StringHolder &val)
const OP_Context & context() const
static void loadData(UT_IStream &is, int64 &v)
constexpr SYS_FORCE_INLINE T & z() noexcept
Grouptype getGrouptype() const
Operation opOperation(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
bool getUseuvattrib() const
static void saveData(std::ostream &os, bool v)
void setPathcontroltype(Pathcontroltype val)
An output stream object that owns its own string buffer storage.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setEdgestyle(Edgestyle val)
void setOperation(Operation val)
**But if you need a result
bool getAvoidprevious() const
void setUseuvattrib(bool val)
const UT_StringHolder & getUvattrib() const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
bool opColgrouponbnd(const SOP_NodeVerb::CookParms &cookparms) const
Colgrouptype opColgrouptype(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void saveData(std::ostream &os, fpreal64 v)
const UT_StringHolder & getGroup() const
static void saveData(std::ostream &os, UT_Matrix4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const SOP_GroupFindPathParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setGroup(const UT_StringHolder &val)
void setGrouptype(Grouptype val)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void loadData(UT_IStream &is, UT_Vector2I &v)
ParmType getNestParmType(TempIndex fieldnum) const override
bool isParmColorRamp(exint idx) const override
const UT_StringHolder & getColgroup() const
void setColgrouponbnd(bool val)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
UT_StringHolder opOutgroup(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
constexpr SYS_FORCE_INLINE T & z() noexcept
bool getColgroupinvert() const
bool opUsecolgroup(const SOP_NodeVerb::CookParms &cookparms) const
const OP_GraphProxy * graph() const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void saveData(std::ostream &os, UT_StringHolder s)
exint getNestNumParms(TempIndex idx) const override
UT_StringHolder opColgroup(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_Matrix2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
bool operator!=(const SOP_GroupFindPathParms &src) const
Operation getOperation() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void saveData(std::ostream &os, UT_Vector3D v)
static void saveData(std::ostream &os, int64 v)
UT_StringHolder opUvattrib(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE UT_StringHolder getToken(Grouptype enum_value)
void setOutgroup(const UT_StringHolder &val)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
Colgrouptype getColgrouptype() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
bool getUsecolgroup() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
void loadFromOpSubclass(const LoadParms &loadparms) override
GT_API const UT_StringHolder version
static void loadData(UT_IStream &is, UT_Vector3I &v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setUvattrib(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
DEP_MicroNode * depnode() const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, bool &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
fpreal getCookTime() const
static void loadData(UT_IStream &is, fpreal64 &v)
void setUsecolgroup(bool val)
const char * findChar(int c) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
Edgestyle opEdgestyle(const SOP_NodeVerb::CookParms &cookparms) const
bool opUseuvattrib(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void save(std::ostream &os) const
void setColgroupinvert(bool val)
static void saveData(std::ostream &os, UT_Vector4D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
const UT_StringHolder & getOutgroup() const
bool load(UT_IStream &is)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void loadData(UT_IStream &is, UT_Vector3D &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
static void saveData(std::ostream &os, UT_Matrix3D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
void setColgrouptype(Colgrouptype val)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
Pathcontroltype opPathcontroltype(const SOP_NodeVerb::CookParms &cookparms) const
bool opColgroupinvert(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept