23 namespace SOP_GroupDeleteEnums
37 using namespace UT::Literal;
60 using namespace UT::Literal;
95 if (enable != src.
enable)
return false;
96 if (grouptype != src.
grouptype)
return false;
97 if (group != src.
group)
return false;
113 for (
int i = 0; i < list.
entries(); i++)
119 buf.
appendSprintf(
"%s", (list(i).enable) ?
"true" :
"false");
135 myDeletions.setSize(1);
137 mySelectiongroup =
""_UTsh;
138 mySelectiongrouptype = 0;
151 if (myDeletions != src.myDeletions)
return false;
152 if (myRemovegrp != src.myRemovegrp)
return false;
153 if (mySelectiongroup != src.mySelectiongroup)
return false;
154 if (mySelectiongrouptype != src.mySelectiongrouptype)
return false;
175 graph->
evalOpParm(length, nodeidx,
"deletions", time, graph->
isDirect()?
nullptr:depnode);
176 if (length < 0) length = 0;
177 myDeletions.setSize(length);
184 auto && _curentry = myDeletions(i);
186 _curentry.enable =
true;
188 graph->
evalOpParmInst(_curentry.enable, nodeidx,
"enable#", parmidx, offsets, time, graph->
isDirect()?
nullptr:depnode, 2-1);
189 _curentry.grouptype = 0;
190 if (
true && ( (
true&&!(((_curentry.enable==0)))) ) )
191 graph->
evalOpParmInst(_curentry.grouptype, nodeidx,
"grouptype#", parmidx, offsets, time, graph->
isDirect()?
nullptr:depnode, 2-1);
192 _curentry.group =
""_UTsh;
193 if (
true && ( (
true&&!(((_curentry.enable==0)))) ) )
194 graph->
evalOpParmInst(_curentry.group, nodeidx,
"group#", parmidx, offsets, time, graph->
isDirect()?
nullptr:depnode, 2-1);
202 graph->
evalOpParm(myRemovegrp, nodeidx,
"removegrp", time, graph->
isDirect()?
nullptr:depnode);
203 mySelectiongroup =
""_UTsh;
205 graph->
evalOpParm(mySelectiongroup, nodeidx,
"selectiongroup", time, graph->
isDirect()?
nullptr:depnode);
206 mySelectiongrouptype = 0;
208 graph->
evalOpParm(mySelectiongrouptype, nodeidx,
"selectiongrouptype", time, graph->
isDirect()?
nullptr:depnode);
224 template <
typename T>
231 if (idx.
size() != instance.
size()+1)
237 coerceValue(value, myDeletions.entries());
238 else if (instance[0] < myDeletions.entries())
240 auto && _data = myDeletions(instance[0]);
244 coerceValue(value, _data.enable);
247 coerceValue(value, _data.grouptype);
250 coerceValue(value, _data.group);
257 coerceValue(value, myRemovegrp);
260 coerceValue(value, mySelectiongroup);
263 coerceValue(value, mySelectiongrouptype);
279 { doGetParmValue(idx, instance, value); }
281 { doGetParmValue(idx, instance, value); }
283 { doGetParmValue(idx, instance, value); }
285 { doGetParmValue(idx, instance, value); }
287 { doGetParmValue(idx, instance, value); }
289 { doGetParmValue(idx, instance, value); }
291 { doGetParmValue(idx, instance, value); }
293 { doGetParmValue(idx, instance, value); }
295 { doGetParmValue(idx, instance, value); }
297 { doGetParmValue(idx, instance, value); }
299 { doGetParmValue(idx, instance, value); }
301 template <
typename T>
308 if (idx.
size() != instance.
size()+1)
316 coerceValue(newsize, value);
317 if (newsize < 0) newsize = 0;
318 myDeletions.setSize(newsize);
324 myDeletions.setSizeIfNeeded(instance[0]+1);
325 auto && _data = myDeletions(instance[0]);
329 coerceValue(_data.enable, value);
332 coerceValue(_data.grouptype, value);
335 coerceValue(_data.group, value);
342 coerceValue(myRemovegrp, ( ( value ) ));
345 coerceValue(mySelectiongroup, ( ( value ) ));
348 coerceValue(mySelectiongrouptype, clampMinValue(0, clampMaxValue(4, value ) ));
355 { doSetParmValue(idx, instance, value); }
357 { doSetParmValue(idx, instance, value); }
359 { doSetParmValue(idx, instance, value); }
361 { doSetParmValue(idx, instance, value); }
363 { doSetParmValue(idx, instance, value); }
365 { doSetParmValue(idx, instance, value); }
367 { doSetParmValue(idx, instance, value); }
369 { doSetParmValue(idx, instance, value); }
371 { doSetParmValue(idx, instance, value); }
373 { doSetParmValue(idx, instance, value); }
375 { doSetParmValue(idx, instance, value); }
393 if (fieldnum.
size() < 1)
398 if (fieldnum.
size() == 1)
414 return "selectiongroup";
416 return "selectiongrouptype";
424 if (fieldnum.
size() < 1)
425 return PARM_UNSUPPORTED;
429 if (fieldnum.
size() == 1)
430 return PARM_MULTIPARM;
441 return PARM_UNSUPPORTED;
450 return PARM_UNSUPPORTED;
486 loadData(is, rampdata);
504 int typelen = colon - data.
buffer();
518 {
int64 iv =
v; UTwrite(os, &iv); }
520 { UTwrite<fpreal64>(os, &
v); }
522 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
524 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
525 UTwrite<fpreal64>(os, &v.
z()); }
527 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
528 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
540 if (s) s->save(ostr);
542 saveData(os, result);
549 ostr << s->getDataTypeToken();
554 saveData(os, result);
558 void save(std::ostream &os)
const
564 UTwrite(os, &length);
567 auto && _curentry = myDeletions(i);
569 saveData(os, _curentry.enable);
570 saveData(os, _curentry.grouptype);
571 saveData(os, _curentry.group);
575 saveData(os, myRemovegrp);
576 saveData(os, mySelectiongroup);
577 saveData(os, mySelectiongrouptype);
593 myDeletions.setSize(length);
596 auto && _curentry = myDeletions(i);
598 loadData(is, _curentry.enable);
599 loadData(is, _curentry.grouptype);
600 loadData(is, _curentry.group);
604 loadData(is, myRemovegrp);
605 loadData(is, mySelectiongroup);
606 loadData(is, mySelectiongrouptype);
616 if (!thissop)
return getDeletions().entries();
618 OP_Utils::evalOpParm(result, thissop,
"deletions", cookparms.
getCookTime(), 0);
622 {
return opinstDeletions_enable(cookparms, &_idx); }
626 if (!thissop)
return (myDeletions(_idx[0]).enable);
628 _parmidx[1-1] = _idx[1-1] + 1;
631 OP_Utils::evalOpParmInst(result, thissop,
"enable#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
635 {
return opinstDeletions_grouptype(cookparms, &_idx); }
639 if (!thissop)
return (myDeletions(_idx[0]).grouptype);
641 _parmidx[1-1] = _idx[1-1] + 1;
644 OP_Utils::evalOpParmInst(result, thissop,
"grouptype#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
648 {
return opinstDeletions_group(cookparms, &_idx); }
652 if (!thissop)
return (myDeletions(_idx[0]).group);
654 _parmidx[1-1] = _idx[1-1] + 1;
657 OP_Utils::evalOpParmInst(result, thissop,
"group#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
666 if (!thissop)
return getRemovegrp();
668 OP_Utils::evalOpParm(result, thissop,
"removegrp", cookparms.
getCookTime(), 0);
676 if (!thissop)
return getSelectiongroup();
678 OP_Utils::evalOpParm(result, thissop,
"selectiongroup", cookparms.
getCookTime(), 0);
686 if (!thissop)
return getSelectiongrouptype();
688 OP_Utils::evalOpParm(result, thissop,
"selectiongrouptype", cookparms.
getCookTime(), 0);
696 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)
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)
GLsizei const GLfloat * 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
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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
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)
LeafData & operator=(const LeafData &)=delete
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
virtual UT_StringHolder baseGetSignature() const
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)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
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
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE UT_StringHolder getToken(Grouptype enum_value)
bool operator!=(const Deletions &src) const
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