23 namespace SOP_ConnectivityEnums
34 using namespace UT::Literal;
51 using namespace UT::Literal;
70 myPrimitiveIncludeGroup =
""_UTsh;
71 myPointIncludeGroup =
""_UTsh;
72 myAttribname =
"class"_UTsh;
74 myPrefix =
"piece"_UTsh;
75 myCreatevarmap =
false;
77 mySeamgroup =
""_UTsh;
79 myUVAttrib =
"uv"_UTsh;
92 if (myConnecttype != src.myConnecttype)
return false;
93 if (myPrimitiveIncludeGroup != src.myPrimitiveIncludeGroup)
return false;
94 if (myPointIncludeGroup != src.myPointIncludeGroup)
return false;
95 if (myAttribname != src.myAttribname)
return false;
96 if (myAttribType != src.myAttribType)
return false;
97 if (myPrefix != src.myPrefix)
return false;
98 if (myCreatevarmap != src.myCreatevarmap)
return false;
99 if (myVarname != src.myVarname)
return false;
100 if (mySeamgroup != src.mySeamgroup)
return false;
101 if (myByuv != src.myByuv)
return false;
102 if (myUVAttrib != src.myUVAttrib)
return false;
119 graph->
evalOpParm(myConnecttype, nodeidx,
"connecttype", time, 0);
120 myPrimitiveIncludeGroup =
""_UTsh;
122 graph->
evalOpParm(myPrimitiveIncludeGroup, nodeidx,
"primincgroup", time, 0);
123 myPointIncludeGroup =
""_UTsh;
124 if (
true && ( (
true&&!(((
int64(getConnecttype())!=0)))) ) )
125 graph->
evalOpParm(myPointIncludeGroup, nodeidx,
"pointincgroup", time, 0);
126 myAttribname =
"class"_UTsh;
128 graph->
evalOpParm(myAttribname, nodeidx,
"attribname", time, 0);
131 graph->
evalOpParm(myAttribType, nodeidx,
"attribtype", time, 0);
132 myPrefix =
"piece"_UTsh;
133 if (
true && ( (
true&&!(((
int64(getAttribType())!=1))||((
int64(getAttribType())!=1)))) ) )
134 graph->
evalOpParm(myPrefix, nodeidx,
"prefix", time, 0);
135 myCreatevarmap =
false;
137 graph->
evalOpParm(myCreatevarmap, nodeidx,
"createvarmap", time, 0);
139 if (
true && ( (
true&&!(((getCreatevarmap()==0)))) ) )
140 graph->
evalOpParm(myVarname, nodeidx,
"varname", time, 0);
141 mySeamgroup =
""_UTsh;
142 if (
true && ( (
true&&!(((
int64(getConnecttype())==0)))) ) )
143 graph->
evalOpParm(mySeamgroup, nodeidx,
"seamgroup", time, 0);
145 if (
true && ( (
true&&!(((
int64(getConnecttype())==0))||((getSeamgroup()!=
"")))) ) )
146 graph->
evalOpParm(myByuv, nodeidx,
"byuv", time, 0);
147 myUVAttrib =
"uv"_UTsh;
148 if (
true && ( (
true&&!(((
int64(getConnecttype())==0))||((getSeamgroup()!=
""))||((getByuv()==0)))) ) )
149 graph->
evalOpParm(myUVAttrib, nodeidx,
"uvattrib", time, 0);
165 template <
typename T>
172 if (idx.
size() != instance.
size()+1)
177 coerceValue(value, myConnecttype);
180 coerceValue(value, myPrimitiveIncludeGroup);
183 coerceValue(value, myPointIncludeGroup);
186 coerceValue(value, myAttribname);
189 coerceValue(value, myAttribType);
192 coerceValue(value, myPrefix);
195 coerceValue(value, myCreatevarmap);
198 coerceValue(value, myVarname);
201 coerceValue(value, mySeamgroup);
204 coerceValue(value, myByuv);
207 coerceValue(value, myUVAttrib);
223 { doGetParmValue(idx, instance, value); }
225 { doGetParmValue(idx, instance, value); }
227 { doGetParmValue(idx, instance, value); }
229 { doGetParmValue(idx, instance, value); }
231 { doGetParmValue(idx, instance, value); }
233 { doGetParmValue(idx, instance, value); }
235 { doGetParmValue(idx, instance, value); }
237 { doGetParmValue(idx, instance, value); }
239 { doGetParmValue(idx, instance, value); }
241 { doGetParmValue(idx, instance, value); }
243 { doGetParmValue(idx, instance, value); }
245 template <
typename T>
252 if (idx.
size() != instance.
size()+1)
257 coerceValue(myConnecttype, clampMinValue(0, clampMaxValue(1, value ) ));
260 coerceValue(myPrimitiveIncludeGroup, ( ( value ) ));
263 coerceValue(myPointIncludeGroup, ( ( value ) ));
266 coerceValue(myAttribname, ( ( value ) ));
269 coerceValue(myAttribType, clampMinValue(0, clampMaxValue(1, value ) ));
272 coerceValue(myPrefix, ( ( value ) ));
275 coerceValue(myCreatevarmap, ( ( value ) ));
278 coerceValue(myVarname, ( ( value ) ));
281 coerceValue(mySeamgroup, ( ( value ) ));
284 coerceValue(myByuv, ( ( value ) ));
287 coerceValue(myUVAttrib, ( ( value ) ));
294 { doSetParmValue(idx, instance, value); }
296 { doSetParmValue(idx, instance, value); }
298 { doSetParmValue(idx, instance, value); }
300 { doSetParmValue(idx, instance, value); }
302 { doSetParmValue(idx, instance, value); }
304 { doSetParmValue(idx, instance, value); }
306 { doSetParmValue(idx, instance, value); }
308 { doSetParmValue(idx, instance, value); }
310 { doSetParmValue(idx, instance, value); }
312 { doSetParmValue(idx, instance, value); }
314 { doSetParmValue(idx, instance, value); }
330 if (fieldnum.
size() < 1)
335 return "connecttype";
337 return "primincgroup";
339 return "pointincgroup";
347 return "createvarmap";
363 if (fieldnum.
size() < 1)
364 return PARM_UNSUPPORTED;
391 return PARM_UNSUPPORTED;
427 loadData(is, rampdata);
445 int typelen = colon - data.
buffer();
459 {
int64 iv =
v; UTwrite(os, &iv); }
461 { UTwrite<fpreal64>(os, &
v); }
463 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
465 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
466 UTwrite<fpreal64>(os, &v.
z()); }
468 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
469 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
481 if (s) s->save(ostr);
483 saveData(os, result);
490 ostr << s->getDataTypeToken();
495 saveData(os, result);
499 void save(std::ostream &os)
const
503 saveData(os, myConnecttype);
504 saveData(os, myPrimitiveIncludeGroup);
505 saveData(os, myPointIncludeGroup);
506 saveData(os, myAttribname);
507 saveData(os, myAttribType);
508 saveData(os, myPrefix);
509 saveData(os, myCreatevarmap);
510 saveData(os, myVarname);
511 saveData(os, mySeamgroup);
512 saveData(os, myByuv);
513 saveData(os, myUVAttrib);
526 loadData(is, myConnecttype);
527 loadData(is, myPrimitiveIncludeGroup);
528 loadData(is, myPointIncludeGroup);
529 loadData(is, myAttribname);
530 loadData(is, myAttribType);
531 loadData(is, myPrefix);
532 loadData(is, myCreatevarmap);
533 loadData(is, myVarname);
534 loadData(is, mySeamgroup);
535 loadData(is, myByuv);
536 loadData(is, myUVAttrib);
546 if (!thissop)
return getConnecttype();
548 OP_Utils::evalOpParm(result, thissop,
"connecttype", cookparms.
getCookTime(), 0);
556 if (!thissop)
return getPrimitiveIncludeGroup();
558 OP_Utils::evalOpParm(result, thissop,
"primincgroup", cookparms.
getCookTime(), 0);
566 if (!thissop)
return getPointIncludeGroup();
568 OP_Utils::evalOpParm(result, thissop,
"pointincgroup", cookparms.
getCookTime(), 0);
576 if (!thissop)
return getAttribname();
578 OP_Utils::evalOpParm(result, thissop,
"attribname", cookparms.
getCookTime(), 0);
586 if (!thissop)
return getAttribType();
588 OP_Utils::evalOpParm(result, thissop,
"attribtype", cookparms.
getCookTime(), 0);
596 if (!thissop)
return getPrefix();
598 OP_Utils::evalOpParm(result, thissop,
"prefix", cookparms.
getCookTime(), 0);
606 if (!thissop)
return getCreatevarmap();
608 OP_Utils::evalOpParm(result, thissop,
"createvarmap", cookparms.
getCookTime(), 0);
616 if (!thissop)
return getVarname();
618 OP_Utils::evalOpParm(result, thissop,
"varname", cookparms.
getCookTime(), 0);
626 if (!thissop)
return getSeamgroup();
628 OP_Utils::evalOpParm(result, thissop,
"seamgroup", cookparms.
getCookTime(), 0);
636 if (!thissop)
return getByuv();
638 OP_Utils::evalOpParm(result, thissop,
"byuv", cookparms.
getCookTime(), 0);
646 if (!thissop)
return getUVAttrib();
648 OP_Utils::evalOpParm(result, thissop,
"uvattrib", cookparms.
getCookTime(), 0);
const UT_StringHolder & getAttribname() const
void save(std::ostream &os) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void saveData(std::ostream &os, UT_Vector2D v)
SOP_Node * getNode() const
static void saveData(std::ostream &os, int64 v)
bool opCreatevarmap(const SOP_NodeVerb::CookParms &cookparms) const
void setPointIncludeGroup(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector3I &v)
bool isParmColorRamp(exint idx) const override
static void loadData(UT_IStream &is, bool &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
exint bread(int32 *buffer, exint asize=1)
void setConnecttype(Connecttype val)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
const UT_StringHolder & getPrimitiveIncludeGroup() const
void setCreatevarmap(bool val)
void setPrimitiveIncludeGroup(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
bool load(UT_IStream &is)
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
ParmType getNestParmType(TempIndex fieldnum) const override
static void saveData(std::ostream &os, fpreal64 v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
An output stream object that owns its own string buffer storage.
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
**But if you need a result
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void saveData(std::ostream &os, UT_Matrix4D v)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void loadData(UT_IStream &is, UT_Vector2D &v)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
Connecttype opConnecttype(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
UT_StringHolder opPointIncludeGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
bool operator==(const SOP_ConnectivityParms &src) const
void setSeamgroup(const UT_StringHolder &val)
bool getCreatevarmap() const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setUVAttrib(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
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
void setAttribType(AttribType val)
static void loadData(UT_IStream &is, UT_Vector4I &v)
const OP_GraphProxy * graph() const
const UT_StringHolder & getPointIncludeGroup() const
UT_StringHolder opPrimitiveIncludeGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void saveData(std::ostream &os, UT_StringHolder s)
static void saveData(std::ostream &os, bool v)
exint getNestNumParms(TempIndex idx) const override
SYS_FORCE_INLINE UT_StringHolder getToken(Connecttype enum_value)
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
const UT_StringHolder & getSeamgroup() const
UT_StringHolder opUVAttrib(const SOP_NodeVerb::CookParms &cookparms) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
UT_StringHolder opAttribname(const SOP_NodeVerb::CookParms &cookparms) const
bool operator!=(const SOP_ConnectivityParms &src) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
const UT_StringHolder & getVarname() const
GT_API const UT_StringHolder version
UT_StringHolder opVarname(const SOP_NodeVerb::CookParms &cookparms) const
void loadFromOpSubclass(const LoadParms &loadparms) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
bool opByuv(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_SharedPtr< UT_Ramp > s)
const char * getNestParmName(TempIndex fieldnum) const override
AttribType opAttribType(const SOP_NodeVerb::CookParms &cookparms) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
const UT_StringHolder & getUVAttrib() const
DEP_MicroNode * depnode() const
LeafData & operator=(const LeafData &)=delete
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
Utility class for containing a color ramp.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void saveData(std::ostream &os, UT_Vector4D v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
constexpr SYS_FORCE_INLINE T & w() noexcept
static void saveData(std::ostream &os, UT_Vector3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
fpreal getCookTime() const
AttribType getAttribType() const
const char * findChar(int c) const
static void loadData(UT_IStream &is, int64 &v)
void setPrefix(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
Connecttype getConnecttype() const
constexpr SYS_FORCE_INLINE T & y() noexcept
void setAttribname(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setVarname(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
const UT_StringHolder & getPrefix() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
UT_StringHolder opPrefix(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
UT_StringHolder opSeamgroup(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void copyFrom(const OP_NodeParms *src) override
constexpr SYS_FORCE_INLINE T & x() noexcept