20 using namespace UT::Literal;
23 namespace SOP_GroupDeleteEnums
58 if (grouptype != src.
grouptype)
return false;
75 for (
int i = 0; i < list.
entries(); i++)
107 if (myDeletions != src.myDeletions)
return false;
108 if (myRemovegrp != src.myRemovegrp)
return false;
125 graph->
evalOpParm(length, nodeidx,
"deletions", time, 0);
126 myDeletions.entries(length);
130 auto && _curentry = myDeletions(i);
132 myDeletions(i).enable =
true;
135 myDeletions(i).grouptype = 0;
136 if (
true && ( (!(((_curentry.enable==0)))) ) )
137 graph->
evalOpParmInst(myDeletions(i).grouptype, nodeidx,
"grouptype#", &parmidx, time, 0);
138 myDeletions(i).group =
""_sh;
139 if (
true && ( (!(((_curentry.enable==0)))) ) )
148 graph->
evalOpParm(myRemovegrp, nodeidx,
"removegrp", time, 0);
164 template <
typename T>
171 if (idx.
size() != instance.
size()+1)
177 coerceValue(value, myDeletions.entries());
178 else if (instance[0] < myDeletions.entries())
180 auto && _data = myDeletions(instance[0]);
184 coerceValue(value, _data.enable);
187 coerceValue(value, _data.grouptype);
190 coerceValue(value, _data.group);
197 coerceValue(value, myRemovegrp);
204 { doGetParmValue(idx, instance, value); }
206 { doGetParmValue(idx, instance, value); }
208 { doGetParmValue(idx, instance, value); }
210 { doGetParmValue(idx, instance, value); }
212 { doGetParmValue(idx, instance, value); }
214 { doGetParmValue(idx, instance, value); }
216 { doGetParmValue(idx, instance, value); }
218 { doGetParmValue(idx, instance, value); }
220 { doGetParmValue(idx, instance, value); }
222 { doGetParmValue(idx, instance, value); }
224 { doGetParmValue(idx, instance, value); }
226 template <
typename T>
233 if (idx.
size() != instance.
size()+1)
241 coerceValue(newsize, value);
242 myDeletions.setSize(newsize);
246 myDeletions.setSizeIfNeeded(instance[0]+1);
247 auto && _data = myDeletions(instance[0]);
251 coerceValue(_data.enable, value);
254 coerceValue(_data.grouptype, value);
257 coerceValue(_data.group, value);
264 coerceValue(myRemovegrp, value);
271 { doSetParmValue(idx, instance, value); }
273 { doSetParmValue(idx, instance, value); }
275 { doSetParmValue(idx, instance, value); }
277 { doSetParmValue(idx, instance, value); }
279 { doSetParmValue(idx, instance, value); }
281 { doSetParmValue(idx, instance, value); }
283 { doSetParmValue(idx, instance, value); }
285 { doSetParmValue(idx, instance, value); }
287 { doSetParmValue(idx, instance, value); }
289 { doSetParmValue(idx, instance, value); }
291 { doSetParmValue(idx, instance, value); }
309 if (fieldnum.
size() < 1)
314 if (fieldnum.
size() == 1)
336 if (fieldnum.
size() < 1)
337 return PARM_UNSUPPORTED;
341 if (fieldnum.
size() == 1)
342 return PARM_MULTIPARM;
353 return PARM_UNSUPPORTED;
358 return PARM_UNSUPPORTED;
394 loadData(is, rampdata);
412 int typelen = colon - data.
buffer();
426 {
int64 iv =
v; UTwrite(os, &iv); }
428 { UTwrite<fpreal64>(os, &
v); }
430 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
432 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
433 UTwrite<fpreal64>(os, &v.
z()); }
435 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
436 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
448 if (s) s->save(ostr);
450 saveData(os, result);
457 ostr << s->getDataTypeToken();
462 saveData(os, result);
466 void save(std::ostream &os)
const
472 UTwrite(os, &length);
475 saveData(os, myDeletions(i).
enable);
476 saveData(os, myDeletions(i).grouptype);
477 saveData(os, myDeletions(i).
group);
481 saveData(os, myRemovegrp);
497 myDeletions.entries(length);
500 loadData(is, myDeletions(i).
enable);
501 loadData(is, myDeletions(i).grouptype);
502 loadData(is, myDeletions(i).
group);
506 loadData(is, myRemovegrp);
516 if (!thissop)
return getDeletions().entries();
518 OP_Utils::evalOpParm(result, thissop,
"deletions", cookparms.
getCookTime(), 0);
524 if (!thissop)
return (myDeletions(_idx).
enable);
525 int _parmidx = _idx + 1;
527 OP_Utils::evalOpParmInst(result, thissop,
"enable#", &_parmidx, cookparms.
getCookTime(), 0);
533 if (!thissop)
return (myDeletions(_idx).grouptype);
534 int _parmidx = _idx + 1;
536 OP_Utils::evalOpParmInst(result, thissop,
"grouptype#", &_parmidx, cookparms.
getCookTime(), 0);
542 if (!thissop)
return (myDeletions(_idx).
group);
543 int _parmidx = _idx + 1;
545 OP_Utils::evalOpParmInst(result, thissop,
"group#", &_parmidx, cookparms.
getCookTime(), 0);
554 if (!thissop)
return getRemovegrp();
556 OP_Utils::evalOpParm(result, thissop,
"removegrp", cookparms.
getCookTime(), 0);
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_Matrix2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
SOP_Node * getNode() const
const UT_Array< Deletions > & getDeletions() const
bool operator==(const Deletions &src) const
void save(std::ostream &os) const
UT_StringHolder opDeletions_group(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
virtual void evalOpParmInst(int64 &v, NodeIdx node, const char *parmname, int *inst, fpreal time, DEP_MicroNode *depnode) const =0
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
GLuint const GLfloat * val
bool opRemovegrp(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector2D v)
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
void setRemovegrp(bool val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
An output stream object that owns its own string buffer storage.
void copyFrom(const SOP_NodeParms *src) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void loadData(UT_IStream &is, UT_Vector2D &v)
void loadFromOpSubclass(const LoadParms &loadparms) override
bool opDeletions_enable(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
static void saveData(std::ostream &os, UT_Matrix3D v)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
static void saveData(std::ostream &os, bool v)
GLint GLenum GLsizei GLint GLsizei const void * data
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, int64 &v)
exint read(bool *array, exint sz=1)
bool getRemovegrp() const
static void saveData(std::ostream &os, UT_Vector4D v)
static void saveData(std::ostream &os, UT_Vector3D v)
GLuint GLsizei GLsizei * length
int64 opDeletions_grouptype(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setDeletions(const UT_Array< Deletions > &val)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
exint getNestNumParms(TempIndex idx) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void loadData(UT_IStream &is, UT_Vector3D &v)
bool load(UT_IStream &is)
~SOP_GroupDeleteParms() override
bool operator==(const SOP_GroupDeleteParms &src) const
SYS_FORCE_INLINE void strcat(const char *src)
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
exint entries() const
Alias of size(). size() is preferred.
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void loadData(UT_IStream &is, bool &v)
UT_StringHolder createString(const UT_Array< Deletions > &list) const
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
Utility class for containing a color ramp.
static void saveData(std::ostream &os, fpreal64 v)
bool operator!=(const SOP_GroupDeleteParms &src) const
SYS_FORCE_INLINE void append(char character)
GLdouble GLdouble GLdouble r
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
fpreal getCookTime() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
ParmType getNestParmType(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Matrix4D v)
const char * findChar(int c) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
GLenum GLuint GLsizei const GLchar * buf
static void loadData(UT_IStream &is, fpreal64 &v)
GLsizei const GLfloat * value
static void saveData(std::ostream &os, UT_StringHolder s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
const OP_Context & context() const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
SYS_FORCE_INLINE bool isstring() const
bool operator!=(const Deletions &src) const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
exint opDeletions(const SOP_NodeVerb::CookParms &cookparms) const