23 namespace SOP_GroupDeleteEnums
65 if (enable != src.
enable)
return false;
66 if (grouptype != src.
grouptype)
return false;
67 if (group != src.
group)
return false;
83 for (
int i = 0; i < list.
entries(); i++)
105 myDeletions.setSize(1);
107 mySelectiongroup =
""_UTsh;
108 mySelectiongrouptype = 0;
121 if (myDeletions != src.myDeletions)
return false;
122 if (myRemovegrp != src.myRemovegrp)
return false;
123 if (mySelectiongroup != src.mySelectiongroup)
return false;
124 if (mySelectiongrouptype != src.mySelectiongrouptype)
return false;
142 graph->
evalOpParm(length, nodeidx,
"deletions", time, 0);
143 if (length < 0) length = 0;
144 myDeletions.setSize(length);
151 auto && _curentry = myDeletions(i);
153 _curentry.enable =
true;
155 graph->
evalOpParmInst(_curentry.enable, nodeidx,
"enable#", parmidx, offsets, time, 0, 2-1);
156 _curentry.grouptype = 0;
157 if (
true && ( (
true&&!(((_curentry.enable==0)))) ) )
158 graph->
evalOpParmInst(_curentry.grouptype, nodeidx,
"grouptype#", parmidx, offsets, time, 0, 2-1);
159 _curentry.group =
""_UTsh;
160 if (
true && ( (
true&&!(((_curentry.enable==0)))) ) )
161 graph->
evalOpParmInst(_curentry.group, nodeidx,
"group#", parmidx, offsets, time, 0, 2-1);
169 graph->
evalOpParm(myRemovegrp, nodeidx,
"removegrp", time, 0);
170 mySelectiongroup =
""_UTsh;
172 graph->
evalOpParm(mySelectiongroup, nodeidx,
"selectiongroup", time, 0);
173 mySelectiongrouptype = 0;
175 graph->
evalOpParm(mySelectiongrouptype, nodeidx,
"selectiongrouptype", time, 0);
191 template <
typename T>
198 if (idx.
size() != instance.
size()+1)
205 else if (instance[0] < myDeletions.entries())
207 auto && _data = myDeletions(instance[0]);
246 { doGetParmValue(idx, instance, value); }
248 { doGetParmValue(idx, instance, value); }
250 { doGetParmValue(idx, instance, value); }
252 { doGetParmValue(idx, instance, value); }
254 { doGetParmValue(idx, instance, value); }
256 { doGetParmValue(idx, instance, value); }
258 { doGetParmValue(idx, instance, value); }
260 { doGetParmValue(idx, instance, value); }
262 { doGetParmValue(idx, instance, value); }
264 { doGetParmValue(idx, instance, value); }
266 { doGetParmValue(idx, instance, value); }
268 template <
typename T>
275 if (idx.
size() != instance.
size()+1)
284 if (newsize < 0) newsize = 0;
285 myDeletions.setSize(newsize);
291 myDeletions.setSizeIfNeeded(instance[0]+1);
292 auto && _data = myDeletions(instance[0]);
322 { doSetParmValue(idx, instance, value); }
324 { doSetParmValue(idx, instance, value); }
326 { doSetParmValue(idx, instance, value); }
328 { doSetParmValue(idx, instance, value); }
330 { doSetParmValue(idx, instance, value); }
332 { doSetParmValue(idx, instance, value); }
334 { doSetParmValue(idx, instance, value); }
336 { doSetParmValue(idx, instance, value); }
338 { doSetParmValue(idx, instance, value); }
340 { doSetParmValue(idx, instance, value); }
342 { doSetParmValue(idx, instance, value); }
360 if (fieldnum.
size() < 1)
365 if (fieldnum.
size() == 1)
381 return "selectiongroup";
383 return "selectiongrouptype";
391 if (fieldnum.
size() < 1)
392 return PARM_UNSUPPORTED;
396 if (fieldnum.
size() == 1)
397 return PARM_MULTIPARM;
436 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
438 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
440 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
453 loadData(is, rampdata);
471 int typelen = colon - data.
buffer();
485 {
int64 iv =
v; UTwrite(os, &iv); }
487 { UTwrite<fpreal64>(os, &
v); }
489 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
491 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
492 UTwrite<fpreal64>(os, &v.
z()); }
494 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
495 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
507 if (s) s->save(ostr);
509 saveData(os, result);
516 ostr << s->getDataTypeToken();
521 saveData(os, result);
525 void save(std::ostream &os)
const
531 UTwrite(os, &length);
534 auto && _curentry = myDeletions(i);
536 saveData(os, _curentry.enable);
537 saveData(os, _curentry.grouptype);
538 saveData(os, _curentry.group);
542 saveData(os, myRemovegrp);
543 saveData(os, mySelectiongroup);
544 saveData(os, mySelectiongrouptype);
560 myDeletions.setSize(length);
563 auto && _curentry = myDeletions(i);
565 loadData(is, _curentry.enable);
566 loadData(is, _curentry.grouptype);
567 loadData(is, _curentry.group);
571 loadData(is, myRemovegrp);
572 loadData(is, mySelectiongroup);
573 loadData(is, mySelectiongrouptype);
583 if (!thissop)
return getDeletions().entries();
585 OP_Utils::evalOpParm(result, thissop,
"deletions", cookparms.
getCookTime(), 0);
589 {
return opinstDeletions_enable(cookparms, &_idx); }
593 if (!thissop)
return (myDeletions(_idx[0]).enable);
595 _parmidx[1-1] = _idx[1-1] + 1;
598 OP_Utils::evalOpParmInst(result, thissop,
"enable#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
602 {
return opinstDeletions_grouptype(cookparms, &_idx); }
606 if (!thissop)
return (myDeletions(_idx[0]).grouptype);
608 _parmidx[1-1] = _idx[1-1] + 1;
611 OP_Utils::evalOpParmInst(result, thissop,
"grouptype#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
615 {
return opinstDeletions_group(cookparms, &_idx); }
619 if (!thissop)
return (myDeletions(_idx[0]).group);
621 _parmidx[1-1] = _idx[1-1] + 1;
624 OP_Utils::evalOpParmInst(result, thissop,
"group#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
633 if (!thissop)
return getRemovegrp();
635 OP_Utils::evalOpParm(result, thissop,
"removegrp", cookparms.
getCookTime(), 0);
643 if (!thissop)
return getSelectiongroup();
645 OP_Utils::evalOpParm(result, thissop,
"selectiongroup", cookparms.
getCookTime(), 0);
653 if (!thissop)
return getSelectiongrouptype();
655 OP_Utils::evalOpParm(result, thissop,
"selectiongrouptype", cookparms.
getCookTime(), 0);
663 int64 mySelectiongrouptype;
GLenum GLuint GLenum GLsizei const GLchar * buf
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
static void saveData(std::ostream &os, PRM_DataItemHandle s)
T clampMaxValue(fpreal maxvalue, const T &src) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void copyFrom(const OP_NodeParms *src) override
Selectiongrouptype getSelectiongrouptype() const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
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
const OP_Context & context() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
void setRemovegrp(bool val)
UT_StringHolder opinstDeletions_group(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
GLuint GLsizei GLsizei * length
void setSelectiongroup(const UT_StringHolder &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 getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
**But if you need a result
T clampMinValue(fpreal minvalue, const T &src) const
UT_StringHolder opSelectiongroup(const SOP_NodeVerb::CookParms &cookparms) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
constexpr SYS_FORCE_INLINE T & x() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
GLuint GLsizei const GLuint const GLintptr * offsets
constexpr SYS_FORCE_INLINE T & x() noexcept
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)
const UT_StringHolder & getSelectiongroup() const
void loadFromOpSubclass(const LoadParms &loadparms) override
static void saveData(std::ostream &os, UT_Matrix3D v)
UT_StringHolder opDeletions_group(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
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
static void saveData(std::ostream &os, bool v)
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)
int64 opinstDeletions_grouptype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
exint read(bool *array, exint sz=1)
const OP_GraphProxy * graph() const
bool getRemovegrp() const
static void saveData(std::ostream &os, UT_Vector4D v)
static void saveData(std::ostream &os, UT_Vector3D v)
bool opDeletions_enable(const SOP_NodeVerb::CookParms &cookparms, int _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
virtual void evalOpParmInst(int64 &v, NodeIdx node, const char *parmname, const int *inst, const int *offsets, fpreal time, DEP_MicroNode *depnode, int nestlevel=1) const =0
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void setSelectiongrouptype(Selectiongrouptype val)
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)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
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
exint entries() const
Alias of size(). size() is preferred.
Selectiongrouptype opSelectiongrouptype(const SOP_NodeVerb::CookParms &cookparms) const
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
void coerceValue(T &result, const S &src) const
const char * getNestParmName(TempIndex fieldnum) const override
int64 opDeletions_grouptype(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void loadData(UT_IStream &is, bool &v)
DEP_MicroNode * depnode() const
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
constexpr SYS_FORCE_INLINE T & w() noexcept
SYS_FORCE_INLINE void append(char character)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
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
bool opinstDeletions_enable(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, fpreal64 &v)
static void saveData(std::ostream &os, UT_StringHolder s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
bool operator!=(const Deletions &src) const
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool isParmColorRamp(exint idx) const override
exint opDeletions(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept