20 using namespace UT::Literal;
23 namespace SOP_ConnectivityEnums
46 myAttribname =
"class"_sh;
48 myPrefix =
"piece"_sh;
49 myCreatevarmap =
false;
63 if (myConnecttype != src.myConnecttype)
return false;
64 if (myAttribname != src.myAttribname)
return false;
65 if (myAttribType != src.myAttribType)
return false;
66 if (myPrefix != src.myPrefix)
return false;
67 if (myCreatevarmap != src.myCreatevarmap)
return false;
68 if (myVarname != src.myVarname)
return false;
69 if (mySeamgroup != src.mySeamgroup)
return false;
70 if (myByuv != src.myByuv)
return false;
71 if (myUVAttrib != src.myUVAttrib)
return false;
88 graph->
evalOpParm(myConnecttype, nodeidx,
"connecttype", time, 0);
89 myAttribname =
"class"_sh;
91 graph->
evalOpParm(myAttribname, nodeidx,
"attribname", time, 0);
94 graph->
evalOpParm(myAttribType, nodeidx,
"attribtype", time, 0);
95 myPrefix =
"piece"_sh;
96 if (
true && ( (!(((
int64(getAttribType())!=1))||((
int64(getAttribType())!=1)))) ) )
97 graph->
evalOpParm(myPrefix, nodeidx,
"prefix", time, 0);
98 myCreatevarmap =
false;
100 graph->
evalOpParm(myCreatevarmap, nodeidx,
"createvarmap", time, 0);
102 if (
true && ( (!(((getCreatevarmap()==0)))) ) )
103 graph->
evalOpParm(myVarname, nodeidx,
"varname", time, 0);
105 if (
true && ( (!(((
int64(getConnecttype())==0)))) ) )
106 graph->
evalOpParm(mySeamgroup, nodeidx,
"seamgroup", time, 0);
108 if (
true && ( (!(((
int64(getConnecttype())==0))||((getSeamgroup()!=
"")))) ) )
109 graph->
evalOpParm(myByuv, nodeidx,
"byuv", time, 0);
110 myUVAttrib =
"uv"_sh;
111 if (
true && ( (!(((
int64(getConnecttype())==0))||((getSeamgroup()!=
""))||((getByuv()==0)))) ) )
112 graph->
evalOpParm(myUVAttrib, nodeidx,
"uvattrib", time, 0);
128 template <
typename T>
135 if (idx.
size() != instance.
size()+1)
140 coerceValue(value, myConnecttype);
143 coerceValue(value, myAttribname);
146 coerceValue(value, myAttribType);
149 coerceValue(value, myPrefix);
152 coerceValue(value, myCreatevarmap);
155 coerceValue(value, myVarname);
158 coerceValue(value, mySeamgroup);
161 coerceValue(value, myByuv);
164 coerceValue(value, myUVAttrib);
171 { doGetParmValue(idx, instance, value); }
173 { doGetParmValue(idx, instance, value); }
175 { doGetParmValue(idx, instance, value); }
177 { doGetParmValue(idx, instance, value); }
179 { doGetParmValue(idx, instance, value); }
181 { doGetParmValue(idx, instance, value); }
183 { doGetParmValue(idx, instance, value); }
185 { doGetParmValue(idx, instance, value); }
187 { doGetParmValue(idx, instance, value); }
189 { doGetParmValue(idx, instance, value); }
191 { doGetParmValue(idx, instance, value); }
193 template <
typename T>
200 if (idx.
size() != instance.
size()+1)
205 coerceValue(myConnecttype, value);
208 coerceValue(myAttribname, value);
211 coerceValue(myAttribType, value);
214 coerceValue(myPrefix, value);
217 coerceValue(myCreatevarmap, value);
220 coerceValue(myVarname, value);
223 coerceValue(mySeamgroup, value);
226 coerceValue(myByuv, value);
229 coerceValue(myUVAttrib, value);
236 { doSetParmValue(idx, instance, value); }
238 { doSetParmValue(idx, instance, value); }
240 { doSetParmValue(idx, instance, value); }
242 { doSetParmValue(idx, instance, value); }
244 { doSetParmValue(idx, instance, value); }
246 { doSetParmValue(idx, instance, value); }
248 { doSetParmValue(idx, instance, value); }
250 { doSetParmValue(idx, instance, value); }
252 { doSetParmValue(idx, instance, value); }
254 { doSetParmValue(idx, instance, value); }
256 { doSetParmValue(idx, instance, value); }
272 if (fieldnum.
size() < 1)
277 return "connecttype";
285 return "createvarmap";
301 if (fieldnum.
size() < 1)
302 return PARM_UNSUPPORTED;
325 return PARM_UNSUPPORTED;
361 loadData(is, rampdata);
379 int typelen = colon - data.
buffer();
393 {
int64 iv =
v; UTwrite(os, &iv); }
395 { UTwrite<fpreal64>(os, &
v); }
397 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
399 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
400 UTwrite<fpreal64>(os, &v.
z()); }
402 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
403 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
415 if (s) s->save(ostr);
417 saveData(os, result);
424 ostr << s->getDataTypeToken();
429 saveData(os, result);
433 void save(std::ostream &os)
const
437 saveData(os, myConnecttype);
438 saveData(os, myAttribname);
439 saveData(os, myAttribType);
440 saveData(os, myPrefix);
441 saveData(os, myCreatevarmap);
442 saveData(os, myVarname);
443 saveData(os, mySeamgroup);
444 saveData(os, myByuv);
445 saveData(os, myUVAttrib);
458 loadData(is, myConnecttype);
459 loadData(is, myAttribname);
460 loadData(is, myAttribType);
461 loadData(is, myPrefix);
462 loadData(is, myCreatevarmap);
463 loadData(is, myVarname);
464 loadData(is, mySeamgroup);
465 loadData(is, myByuv);
466 loadData(is, myUVAttrib);
476 if (!thissop)
return getConnecttype();
478 OP_Utils::evalOpParm(result, thissop,
"connecttype", cookparms.
getCookTime(), 0);
486 if (!thissop)
return getAttribname();
488 OP_Utils::evalOpParm(result, thissop,
"attribname", cookparms.
getCookTime(), 0);
496 if (!thissop)
return getAttribType();
498 OP_Utils::evalOpParm(result, thissop,
"attribtype", cookparms.
getCookTime(), 0);
506 if (!thissop)
return getPrefix();
508 OP_Utils::evalOpParm(result, thissop,
"prefix", cookparms.
getCookTime(), 0);
516 if (!thissop)
return getCreatevarmap();
518 OP_Utils::evalOpParm(result, thissop,
"createvarmap", cookparms.
getCookTime(), 0);
526 if (!thissop)
return getVarname();
528 OP_Utils::evalOpParm(result, thissop,
"varname", cookparms.
getCookTime(), 0);
536 if (!thissop)
return getSeamgroup();
538 OP_Utils::evalOpParm(result, thissop,
"seamgroup", cookparms.
getCookTime(), 0);
546 if (!thissop)
return getByuv();
548 OP_Utils::evalOpParm(result, thissop,
"byuv", cookparms.
getCookTime(), 0);
556 if (!thissop)
return getUVAttrib();
558 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
static void loadData(UT_IStream &is, UT_Vector3I &v)
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
void setCreatevarmap(bool val)
GLuint const GLfloat * val
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
bool load(UT_IStream &is)
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() 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
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
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
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
typedef INT(WINAPI *PFNWGLGETGPUINFOAMDPROC)(UINT id
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.
void setAttribType(AttribType val)
GLint GLenum GLsizei GLint GLsizei const void * data
static void loadData(UT_IStream &is, UT_Vector4I &v)
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
~SOP_ConnectivityParms() override
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
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
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
DEP_MicroNode * depnode() const
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
void copyFrom(const SOP_NodeParms *src) 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
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)
GLdouble GLdouble GLdouble r
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
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
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
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
GLsizei const GLfloat * value
const OP_Context & context() 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)
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)