18 using namespace UT::Literal;
21 namespace SOP_GroupRenameEnums
57 if (enable != src.
enable)
return false;
58 if (grouptype != src.
grouptype)
return false;
59 if (group != src.
group)
return false;
60 if (newname != src.
newname)
return false;
105 if (myRenames != src.myRenames)
return false;
118 OP_Utils::evalOpParm(length, node,
"renames", time, 0);
119 myRenames.entries(length);
123 auto && _curentry = myRenames(
i);
126 OP_Utils::evalOpParmInst(myRenames(
i).enable, node,
"enable#", &parmidx, time, 0);
127 else myRenames(
i).enable =
false;
128 if (
true && ( (!(((_curentry.enable==0)))) ) )
129 OP_Utils::evalOpParmInst(myRenames(
i).grouptype, node,
"grouptype#", &parmidx, time, 0);
130 else myRenames(
i).grouptype = 0;
131 if (
true && ( (!(((_curentry.enable==0)))) ) )
132 OP_Utils::evalOpParmInst(myRenames(
i).group, node,
"group#", &parmidx, time, 0);
133 else myRenames(
i).group =
""_sh;
134 if (
true && ( (!(((_curentry.enable==0)))) ) )
135 OP_Utils::evalOpParmInst(myRenames(
i).newname, node,
"newname#", &parmidx, time, 0);
136 else myRenames(
i).newname =
""_sh;
157 template <
typename T>
168 { doGetParmValue(idx, value); }
170 { doGetParmValue(idx, value); }
172 { doGetParmValue(idx, value); }
174 { doGetParmValue(idx, value); }
176 { doGetParmValue(idx, value); }
178 { doGetParmValue(idx, value); }
180 { doGetParmValue(idx, value); }
182 { doGetParmValue(idx, value); }
184 { doGetParmValue(idx, value); }
186 { doGetParmValue(idx, value); }
188 { doGetParmValue(idx, value); }
190 template <
typename T>
201 { doSetParmValue(idx, value); }
203 { doSetParmValue(idx, value); }
205 { doSetParmValue(idx, value); }
207 { doSetParmValue(idx, value); }
209 { doSetParmValue(idx, value); }
211 { doSetParmValue(idx, value); }
213 { doSetParmValue(idx, value); }
215 { doSetParmValue(idx, value); }
217 { doSetParmValue(idx, value); }
219 { doSetParmValue(idx, value); }
221 { doSetParmValue(idx, value); }
245 return PARM_UNSUPPORTED;
264 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
266 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
268 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
281 loadData(is, rampdata);
299 int typelen = colon - data.
buffer();
313 {
int64 iv =
v; UTwrite(os, &iv); }
315 { UTwrite<fpreal64>(os, &
v); }
317 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
319 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
320 UTwrite<fpreal64>(os, &v.
z()); }
322 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
323 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
335 if (s) s->save(ostr);
337 saveData(os, result);
344 ostr << s->getDataTypeToken();
349 saveData(os, result);
353 void save(std::ostream &os)
const
359 UTwrite(os, &length);
362 saveData(os, myRenames(
i).enable);
363 saveData(os, myRenames(
i).grouptype);
364 saveData(os, myRenames(
i).group);
365 saveData(os, myRenames(
i).newname);
384 myRenames.entries(length);
387 loadData(is, myRenames(
i).enable);
388 loadData(is, myRenames(
i).grouptype);
389 loadData(is, myRenames(
i).group);
390 loadData(is, myRenames(
i).newname);
403 if (!thissop)
return getRenames().entries();
405 OP_Utils::evalOpParm(result, thissop,
"renames", cookparms.
getCookTime(), 0);
411 if (!thissop)
return (myRenames(_idx).enable);
412 int _parmidx = _idx + 1;
414 OP_Utils::evalOpParmInst(result, thissop,
"enable#", &_parmidx, cookparms.
getCookTime(), 0);
420 if (!thissop)
return (myRenames(_idx).grouptype);
421 int _parmidx = _idx + 1;
423 OP_Utils::evalOpParmInst(result, thissop,
"grouptype#", &_parmidx, cookparms.
getCookTime(), 0);
429 if (!thissop)
return (myRenames(_idx).group);
430 int _parmidx = _idx + 1;
432 OP_Utils::evalOpParmInst(result, thissop,
"group#", &_parmidx, cookparms.
getCookTime(), 0);
438 if (!thissop)
return (myRenames(_idx).newname);
439 int _parmidx = _idx + 1;
441 OP_Utils::evalOpParmInst(result, thissop,
"newname#", &_parmidx, cookparms.
getCookTime(), 0);
UT_StringHolder opRenames_newname(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
virtual void copyFrom(const SOP_NodeParms *src)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
SOP_Node * getNode() const
void getParmValue(exint idx, UT_Matrix4D &value) const
const UT_Array< Renames > & getRenames() const
void setParmValue(exint idx, const UT_Vector2D &value)
static void loadData(UT_IStream &is, UT_Vector2I &v)
virtual const char * getParmName(exint fieldnum) const
virtual exint getNumParms() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
exint bread(int32 *buffer, exint asize=1)
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
void setParmValue(exint idx, const fpreal &value)
void getParmValue(exint idx, UT_Matrix2D &value) const
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
static void saveData(std::ostream &os, fpreal64 v)
void setRenames(const UT_Array< Renames > &val)
An output stream object that owns its own string buffer storage.
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
static void loadData(UT_IStream &is, UT_Matrix2D &v)
SYS_FORCE_INLINE T & x(void)
virtual void loadFromOpSubclass(const LoadParms &loadparms)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void saveData(std::ostream &os, UT_Vector4D v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
SYS_FORCE_INLINE T & z(void)
void setParmValue(exint idx, const UT_Vector4D &value)
virtual ~SOP_GroupRenameParms()
static void loadData(UT_IStream &is, int64 &v)
UT_StringHolder createString(const UT_Array< Renames > &list) const
UT_StringHolder opRenames_group(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
void setParmValue(exint idx, const UT_Vector3D &value)
void getParmValue(exint idx, UT_Matrix3D &value) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
void append(char character)
SYS_FORCE_INLINE const char * buffer() const
void setParmValue(exint idx, const UT_Matrix2D &value)
void setParmValue(exint idx, const PRM_DataItemHandle &value)
static void saveData(std::ostream &os, UT_Vector2D v)
const OP_Node * node() const
static void saveData(std::ostream &os, UT_Matrix4D v)
bool operator==(const SOP_GroupRenameParms &src) const
exint read(bool *array, exint sz=1)
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
static void loadData(UT_IStream &is, UT_Vector3D &v)
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
void setParmValue(exint idx, const exint &value)
bool opRenames_enable(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
static void saveData(std::ostream &os, bool v)
exint opRenames(const SOP_NodeVerb::CookParms &cookparms) const
void doSetParmValue(exint idx, const T &value)
void saveBinary(std::ostream &os) const
Save string to binary stream.
static void saveData(std::ostream &os, UT_Vector3D v)
DEP_MicroNode * depnode() const
GLenum GLuint GLenum GLsizei const GLchar * buf
exint entries() const
Alias of size(). size() is preferred.
static void loadData(UT_IStream &is, UT_Vector2D &v)
void getParmValue(exint idx, PRM_DataItemHandle &value) const
void getParmValue(exint idx, UT_Vector2D &value) const
SYS_FORCE_INLINE T & y(void)
GLsizei const GLfloat * value
void save(std::ostream &os) const
void strncpy(const char *src, exint maxlen)
void getParmValue(exint idx, UT_Vector4D &value) const
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
void getParmValue(exint idx, UT_StringHolder &value) const
void setParmValue(exint idx, const UT_Matrix4D &value)
void doGetParmValue(exint idx, T &value) const
void setParmValue(exint idx, const UT_StringHolder &value)
Utility class for containing a color ramp.
void setParmValue(exint idx, const UT_Matrix3D &value)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool load(UT_IStream &is)
int64 opRenames_grouptype(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
const char * buffer() const
void getParmValue(exint idx, exint &value) const
GLint GLint GLsizei GLint GLenum GLenum type
fpreal getCookTime() const
void getParmValue(exint idx, fpreal &value) const
void strcat(const char *src)
static void loadData(UT_IStream &is, bool &v)
const OP_Context & context() const
virtual ParmType getParmType(exint fieldnum) const
SYS_FORCE_INLINE bool isstring() const
bool operator==(const Renames &src) const
static void saveData(std::ostream &os, UT_Matrix3D v)
void getParmValue(exint idx, UT_Vector3D &value) const
static void saveData(std::ostream &os, UT_StringHolder s)
GLuint GLsizei GLsizei * length