23 namespace SOP_ConnectivityEnums
46 myPrimitiveIncludeGroup =
""_UTsh;
47 myPointIncludeGroup =
""_UTsh;
48 myAttribname =
"class"_UTsh;
50 myPrefix =
"piece"_UTsh;
51 myCreatevarmap =
false;
53 mySeamgroup =
""_UTsh;
55 myUVAttrib =
"uv"_UTsh;
68 if (myConnecttype != src.myConnecttype)
return false;
69 if (myPrimitiveIncludeGroup != src.myPrimitiveIncludeGroup)
return false;
70 if (myPointIncludeGroup != src.myPointIncludeGroup)
return false;
71 if (myAttribname != src.myAttribname)
return false;
72 if (myAttribType != src.myAttribType)
return false;
73 if (myPrefix != src.myPrefix)
return false;
74 if (myCreatevarmap != src.myCreatevarmap)
return false;
75 if (myVarname != src.myVarname)
return false;
76 if (mySeamgroup != src.mySeamgroup)
return false;
77 if (myByuv != src.myByuv)
return false;
78 if (myUVAttrib != src.myUVAttrib)
return false;
95 graph->
evalOpParm(myConnecttype, nodeidx,
"connecttype", time, 0);
96 myPrimitiveIncludeGroup =
""_UTsh;
98 graph->
evalOpParm(myPrimitiveIncludeGroup, nodeidx,
"primincgroup", time, 0);
99 myPointIncludeGroup =
""_UTsh;
100 if (
true && ( (
true&&!(((
int64(getConnecttype())!=0)))) ) )
101 graph->
evalOpParm(myPointIncludeGroup, nodeidx,
"pointincgroup", time, 0);
102 myAttribname =
"class"_UTsh;
104 graph->
evalOpParm(myAttribname, nodeidx,
"attribname", time, 0);
107 graph->
evalOpParm(myAttribType, nodeidx,
"attribtype", time, 0);
108 myPrefix =
"piece"_UTsh;
109 if (
true && ( (
true&&!(((
int64(getAttribType())!=1))||((
int64(getAttribType())!=1)))) ) )
110 graph->
evalOpParm(myPrefix, nodeidx,
"prefix", time, 0);
111 myCreatevarmap =
false;
113 graph->
evalOpParm(myCreatevarmap, nodeidx,
"createvarmap", time, 0);
115 if (
true && ( (
true&&!(((getCreatevarmap()==0)))) ) )
116 graph->
evalOpParm(myVarname, nodeidx,
"varname", time, 0);
117 mySeamgroup =
""_UTsh;
118 if (
true && ( (
true&&!(((
int64(getConnecttype())==0)))) ) )
119 graph->
evalOpParm(mySeamgroup, nodeidx,
"seamgroup", time, 0);
121 if (
true && ( (
true&&!(((
int64(getConnecttype())==0))||((getSeamgroup()!=
"")))) ) )
122 graph->
evalOpParm(myByuv, nodeidx,
"byuv", time, 0);
123 myUVAttrib =
"uv"_UTsh;
124 if (
true && ( (
true&&!(((
int64(getConnecttype())==0))||((getSeamgroup()!=
""))||((getByuv()==0)))) ) )
125 graph->
evalOpParm(myUVAttrib, nodeidx,
"uvattrib", time, 0);
141 template <
typename T>
148 if (idx.
size() != instance.
size()+1)
199 { doGetParmValue(idx, instance, value); }
201 { doGetParmValue(idx, instance, value); }
203 { doGetParmValue(idx, instance, value); }
205 { doGetParmValue(idx, instance, value); }
207 { doGetParmValue(idx, instance, value); }
209 { doGetParmValue(idx, instance, value); }
211 { doGetParmValue(idx, instance, value); }
213 { doGetParmValue(idx, instance, value); }
215 { doGetParmValue(idx, instance, value); }
217 { doGetParmValue(idx, instance, value); }
219 { doGetParmValue(idx, instance, value); }
221 template <
typename T>
228 if (idx.
size() != instance.
size()+1)
236 coerceValue(myPrimitiveIncludeGroup, ( ( value ) ));
270 { doSetParmValue(idx, instance, value); }
272 { doSetParmValue(idx, instance, value); }
274 { doSetParmValue(idx, instance, value); }
276 { doSetParmValue(idx, instance, value); }
278 { doSetParmValue(idx, instance, value); }
280 { doSetParmValue(idx, instance, value); }
282 { doSetParmValue(idx, instance, value); }
284 { doSetParmValue(idx, instance, value); }
286 { doSetParmValue(idx, instance, value); }
288 { doSetParmValue(idx, instance, value); }
290 { doSetParmValue(idx, instance, value); }
306 if (fieldnum.
size() < 1)
311 return "connecttype";
313 return "primincgroup";
315 return "pointincgroup";
323 return "createvarmap";
339 if (fieldnum.
size() < 1)
340 return PARM_UNSUPPORTED;
386 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
388 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
390 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
403 loadData(is, rampdata);
421 int typelen = colon - data.
buffer();
435 {
int64 iv =
v; UTwrite(os, &iv); }
437 { UTwrite<fpreal64>(os, &
v); }
439 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
441 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
442 UTwrite<fpreal64>(os, &v.
z()); }
444 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
445 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
457 if (s) s->save(ostr);
459 saveData(os, result);
466 ostr << s->getDataTypeToken();
471 saveData(os, result);
475 void save(std::ostream &os)
const
479 saveData(os, myConnecttype);
480 saveData(os, myPrimitiveIncludeGroup);
481 saveData(os, myPointIncludeGroup);
482 saveData(os, myAttribname);
483 saveData(os, myAttribType);
484 saveData(os, myPrefix);
485 saveData(os, myCreatevarmap);
486 saveData(os, myVarname);
487 saveData(os, mySeamgroup);
488 saveData(os, myByuv);
489 saveData(os, myUVAttrib);
502 loadData(is, myConnecttype);
503 loadData(is, myPrimitiveIncludeGroup);
504 loadData(is, myPointIncludeGroup);
505 loadData(is, myAttribname);
506 loadData(is, myAttribType);
507 loadData(is, myPrefix);
508 loadData(is, myCreatevarmap);
509 loadData(is, myVarname);
510 loadData(is, mySeamgroup);
511 loadData(is, myByuv);
512 loadData(is, myUVAttrib);
522 if (!thissop)
return getConnecttype();
524 OP_Utils::evalOpParm(result, thissop,
"connecttype", cookparms.
getCookTime(), 0);
532 if (!thissop)
return getPrimitiveIncludeGroup();
534 OP_Utils::evalOpParm(result, thissop,
"primincgroup", cookparms.
getCookTime(), 0);
542 if (!thissop)
return getPointIncludeGroup();
544 OP_Utils::evalOpParm(result, thissop,
"pointincgroup", cookparms.
getCookTime(), 0);
552 if (!thissop)
return getAttribname();
554 OP_Utils::evalOpParm(result, thissop,
"attribname", cookparms.
getCookTime(), 0);
562 if (!thissop)
return getAttribType();
564 OP_Utils::evalOpParm(result, thissop,
"attribtype", cookparms.
getCookTime(), 0);
572 if (!thissop)
return getPrefix();
574 OP_Utils::evalOpParm(result, thissop,
"prefix", cookparms.
getCookTime(), 0);
582 if (!thissop)
return getCreatevarmap();
584 OP_Utils::evalOpParm(result, thissop,
"createvarmap", cookparms.
getCookTime(), 0);
592 if (!thissop)
return getVarname();
594 OP_Utils::evalOpParm(result, thissop,
"varname", cookparms.
getCookTime(), 0);
602 if (!thissop)
return getSeamgroup();
604 OP_Utils::evalOpParm(result, thissop,
"seamgroup", cookparms.
getCookTime(), 0);
612 if (!thissop)
return getByuv();
614 OP_Utils::evalOpParm(result, thissop,
"byuv", cookparms.
getCookTime(), 0);
622 if (!thissop)
return getUVAttrib();
624 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)
T clampMaxValue(fpreal maxvalue, const T &src) const
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)
T clampMinValue(fpreal minvalue, const T &src) const
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
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)
void coerceValue(T &result, const S &src) const
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
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
OP_NodeParms & operator=(const OP_NodeParms &)=default
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