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;
198 myOutgroup =
""_UTsh;
200 graph->
evalOpParm(myOutgroup, nodeidx,
"outgroup", time, graph->
isDirect()?
nullptr:depnode);
203 graph->
evalOpParm(myGroup, nodeidx,
"group", time, graph->
isDirect()?
nullptr:depnode);
206 graph->
evalOpParm(myGrouptype, nodeidx,
"grouptype", time, graph->
isDirect()?
nullptr:depnode);
207 myPathcontroltype = 0;
209 graph->
evalOpParm(myPathcontroltype, nodeidx,
"pathcontroltype", time, graph->
isDirect()?
nullptr:depnode);
212 graph->
evalOpParm(myOperation, nodeidx,
"operation", time, graph->
isDirect()?
nullptr:depnode);
213 myAvoidprevious =
true;
215 graph->
evalOpParm(myAvoidprevious, nodeidx,
"avoidprevious", time, graph->
isDirect()?
nullptr:depnode);
217 if (
true && ( (
true&&!(((
int64(getGrouptype())==2))||((
int64(getGrouptype())==3))||((
int64(getGrouptype())==4)))) ) )
218 graph->
evalOpParm(myEdgestyle, nodeidx,
"edgestyle", time, graph->
isDirect()?
nullptr:depnode);
219 myUseuvattrib =
false;
221 graph->
evalOpParm(myUseuvattrib, nodeidx,
"useuvattrib", time, graph->
isDirect()?
nullptr:depnode);
222 myUvattrib =
"uv"_UTsh;
223 if (
true && ( (
true&&!(((getUseuvattrib()==0)))) ) )
224 graph->
evalOpParm(myUvattrib, nodeidx,
"uvattrib", time, graph->
isDirect()?
nullptr:depnode);
225 myUsecolgroup =
false;
227 graph->
evalOpParm(myUsecolgroup, nodeidx,
"usecolgroup", time, graph->
isDirect()?
nullptr:depnode);
228 myColgroup =
""_UTsh;
229 if (
true && ( (
true&&!(((getUsecolgroup()==0)))) ) )
230 graph->
evalOpParm(myColgroup, nodeidx,
"colgroup", time, graph->
isDirect()?
nullptr:depnode);
232 if (
true && ( (
true&&!(((getUsecolgroup()==0)))) ) )
233 graph->
evalOpParm(myColgrouptype, nodeidx,
"colgrouptype", time, graph->
isDirect()?
nullptr:depnode);
234 myColgroupinvert =
false;
235 if (
true && ( (
true&&!(((getUsecolgroup()==0)))) ) )
236 graph->
evalOpParm(myColgroupinvert, nodeidx,
"colgroupinvert", time, graph->
isDirect()?
nullptr:depnode);
237 myColgrouponbnd =
false;
238 if (
true && ( (
true&&!(((getUsecolgroup()==0))||((getColgroupinvert()==1)))) ) )
239 graph->
evalOpParm(myColgrouponbnd, nodeidx,
"colgrouponbnd", time, graph->
isDirect()?
nullptr:depnode);
255 template <
typename T>
262 if (idx.
size() != instance.
size()+1)
267 coerceValue(value, myOutgroup);
270 coerceValue(value, myGroup);
273 coerceValue(value, myGrouptype);
276 coerceValue(value, myPathcontroltype);
279 coerceValue(value, myOperation);
282 coerceValue(value, myAvoidprevious);
285 coerceValue(value, myEdgestyle);
288 coerceValue(value, myUseuvattrib);
291 coerceValue(value, myUvattrib);
294 coerceValue(value, myUsecolgroup);
297 coerceValue(value, myColgroup);
300 coerceValue(value, myColgrouptype);
303 coerceValue(value, myColgroupinvert);
306 coerceValue(value, myColgrouponbnd);
322 { doGetParmValue(idx, instance, value); }
324 { doGetParmValue(idx, instance, value); }
326 { doGetParmValue(idx, instance, value); }
328 { doGetParmValue(idx, instance, value); }
330 { doGetParmValue(idx, instance, value); }
332 { doGetParmValue(idx, instance, value); }
334 { doGetParmValue(idx, instance, value); }
336 { doGetParmValue(idx, instance, value); }
338 { doGetParmValue(idx, instance, value); }
340 { doGetParmValue(idx, instance, value); }
342 { doGetParmValue(idx, instance, value); }
344 template <
typename T>
351 if (idx.
size() != instance.
size()+1)
356 coerceValue(myOutgroup, ( ( value ) ));
359 coerceValue(myGroup, ( ( value ) ));
362 coerceValue(myGrouptype, clampMinValue(0, clampMaxValue(4, value ) ));
365 coerceValue(myPathcontroltype, clampMinValue(0, clampMaxValue(2, value ) ));
368 coerceValue(myOperation, clampMinValue(0, clampMaxValue(2, value ) ));
371 coerceValue(myAvoidprevious, ( ( value ) ));
374 coerceValue(myEdgestyle, clampMinValue(0, clampMaxValue(2, value ) ));
377 coerceValue(myUseuvattrib, ( ( value ) ));
380 coerceValue(myUvattrib, ( ( value ) ));
383 coerceValue(myUsecolgroup, ( ( value ) ));
386 coerceValue(myColgroup, ( ( value ) ));
389 coerceValue(myColgrouptype, clampMinValue(0, clampMaxValue(4, value ) ));
392 coerceValue(myColgroupinvert, ( ( value ) ));
395 coerceValue(myColgrouponbnd, ( ( value ) ));
402 { doSetParmValue(idx, instance, value); }
404 { doSetParmValue(idx, instance, value); }
406 { doSetParmValue(idx, instance, value); }
408 { doSetParmValue(idx, instance, value); }
410 { doSetParmValue(idx, instance, value); }
412 { doSetParmValue(idx, instance, value); }
414 { doSetParmValue(idx, instance, value); }
416 { doSetParmValue(idx, instance, value); }
418 { doSetParmValue(idx, instance, value); }
420 { doSetParmValue(idx, instance, value); }
422 { doSetParmValue(idx, instance, value); }
438 if (fieldnum.
size() < 1)
449 return "pathcontroltype";
453 return "avoidprevious";
457 return "useuvattrib";
461 return "usecolgroup";
465 return "colgrouptype";
467 return "colgroupinvert";
469 return "colgrouponbnd";
477 if (fieldnum.
size() < 1)
478 return PARM_UNSUPPORTED;
511 return PARM_UNSUPPORTED;
547 loadData(is, rampdata);
565 int typelen = colon - data.
buffer();
579 {
int64 iv =
v; UTwrite(os, &iv); }
581 { UTwrite<fpreal64>(os, &
v); }
583 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
585 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
586 UTwrite<fpreal64>(os, &v.
z()); }
588 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
589 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
601 if (s) s->save(ostr);
603 saveData(os, result);
610 ostr << s->getDataTypeToken();
615 saveData(os, result);
619 void save(std::ostream &os)
const
623 saveData(os, myOutgroup);
624 saveData(os, myGroup);
625 saveData(os, myGrouptype);
626 saveData(os, myPathcontroltype);
627 saveData(os, myOperation);
628 saveData(os, myAvoidprevious);
629 saveData(os, myEdgestyle);
630 saveData(os, myUseuvattrib);
631 saveData(os, myUvattrib);
632 saveData(os, myUsecolgroup);
633 saveData(os, myColgroup);
634 saveData(os, myColgrouptype);
635 saveData(os, myColgroupinvert);
636 saveData(os, myColgrouponbnd);
649 loadData(is, myOutgroup);
650 loadData(is, myGroup);
651 loadData(is, myGrouptype);
652 loadData(is, myPathcontroltype);
653 loadData(is, myOperation);
654 loadData(is, myAvoidprevious);
655 loadData(is, myEdgestyle);
656 loadData(is, myUseuvattrib);
657 loadData(is, myUvattrib);
658 loadData(is, myUsecolgroup);
659 loadData(is, myColgroup);
660 loadData(is, myColgrouptype);
661 loadData(is, myColgroupinvert);
662 loadData(is, myColgrouponbnd);
672 if (!thissop)
return getOutgroup();
674 OP_Utils::evalOpParm(result, thissop,
"outgroup", cookparms.
getCookTime(), 0);
682 if (!thissop)
return getGroup();
684 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
692 if (!thissop)
return getGrouptype();
694 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
702 if (!thissop)
return getPathcontroltype();
704 OP_Utils::evalOpParm(result, thissop,
"pathcontroltype", cookparms.
getCookTime(), 0);
712 if (!thissop)
return getOperation();
714 OP_Utils::evalOpParm(result, thissop,
"operation", cookparms.
getCookTime(), 0);
722 if (!thissop)
return getAvoidprevious();
724 OP_Utils::evalOpParm(result, thissop,
"avoidprevious", cookparms.
getCookTime(), 0);
732 if (!thissop)
return getEdgestyle();
734 OP_Utils::evalOpParm(result, thissop,
"edgestyle", cookparms.
getCookTime(), 0);
742 if (!thissop)
return getUseuvattrib();
744 OP_Utils::evalOpParm(result, thissop,
"useuvattrib", cookparms.
getCookTime(), 0);
752 if (!thissop)
return getUvattrib();
754 OP_Utils::evalOpParm(result, thissop,
"uvattrib", cookparms.
getCookTime(), 0);
762 if (!thissop)
return getUsecolgroup();
764 OP_Utils::evalOpParm(result, thissop,
"usecolgroup", cookparms.
getCookTime(), 0);
772 if (!thissop)
return getColgroup();
774 OP_Utils::evalOpParm(result, thissop,
"colgroup", cookparms.
getCookTime(), 0);
782 if (!thissop)
return getColgrouptype();
784 OP_Utils::evalOpParm(result, thissop,
"colgrouptype", cookparms.
getCookTime(), 0);
792 if (!thissop)
return getColgroupinvert();
794 OP_Utils::evalOpParm(result, thissop,
"colgroupinvert", cookparms.
getCookTime(), 0);
802 if (!thissop)
return getColgrouponbnd();
804 OP_Utils::evalOpParm(result, thissop,
"colgrouponbnd", cookparms.
getCookTime(), 0);
812 int64 myPathcontroltype;
814 bool myAvoidprevious;
820 int64 myColgrouptype;
821 bool myColgroupinvert;
822 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
GLsizei const GLfloat * value
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)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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)
virtual UT_StringHolder baseGetSignature() const
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)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
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)
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