50 if (regex != src.
regex)
return false;
51 if (global != src.
global)
return false;
52 if (from != src.
from)
return false;
53 if (to != src.
to)
return false;
69 for (
int i = 0; i < list.
entries(); i++)
95 myEnableDetail =
false;
96 myDetailAttribList =
""_UTsh;
97 myEnablePrimitives =
true;
98 myPrimAttribList =
""_UTsh;
99 myEnablePoints =
true;
100 myPointAttribList =
""_UTsh;
101 myEnableVertices =
false;
102 myVertexAttribList =
""_UTsh;
103 myFilters.setSize(1);
116 if (myEnableDetail != src.myEnableDetail)
return false;
117 if (myDetailAttribList != src.myDetailAttribList)
return false;
118 if (myEnablePrimitives != src.myEnablePrimitives)
return false;
119 if (myPrimAttribList != src.myPrimAttribList)
return false;
120 if (myEnablePoints != src.myEnablePoints)
return false;
121 if (myPointAttribList != src.myPointAttribList)
return false;
122 if (myEnableVertices != src.myEnableVertices)
return false;
123 if (myVertexAttribList != src.myVertexAttribList)
return false;
124 if (myFilters != src.myFilters)
return false;
137 myEnableDetail =
false;
139 graph->
evalOpParm(myEnableDetail, nodeidx,
"detailattribs", time, 0);
140 myDetailAttribList =
""_UTsh;
141 if (
true && ( (
true&&!(((getEnableDetail()==0)))) ) )
142 graph->
evalOpParm(myDetailAttribList, nodeidx,
"detailattriblist", time, 0);
143 myEnablePrimitives =
true;
145 graph->
evalOpParm(myEnablePrimitives, nodeidx,
"primitiveattribs", time, 0);
146 myPrimAttribList =
""_UTsh;
147 if (
true && ( (
true&&!(((getEnablePrimitives()==0)))) ) )
148 graph->
evalOpParm(myPrimAttribList, nodeidx,
"primattriblist", time, 0);
149 myEnablePoints =
true;
151 graph->
evalOpParm(myEnablePoints, nodeidx,
"pointattribs", time, 0);
152 myPointAttribList =
""_UTsh;
153 if (
true && ( (
true&&!(((getEnablePoints()==0)))) ) )
154 graph->
evalOpParm(myPointAttribList, nodeidx,
"pointattriblist", time, 0);
155 myEnableVertices =
false;
157 graph->
evalOpParm(myEnableVertices, nodeidx,
"vertexattribs", time, 0);
158 myVertexAttribList =
""_UTsh;
159 if (
true && ( (
true&&!(((getEnableVertices()==0)))) ) )
160 graph->
evalOpParm(myVertexAttribList, nodeidx,
"vertexattriblist", time, 0);
164 graph->
evalOpParm(length, nodeidx,
"filters", time, 0);
165 if (length < 0) length = 0;
166 myFilters.setSize(length);
173 auto && _curentry = myFilters(i);
175 _curentry.filter =
true;
177 graph->
evalOpParmInst(_curentry.filter, nodeidx,
"filter#", parmidx, offsets, time, 0, 2-1);
178 _curentry.regex =
false;
179 if (
true && ( (
true&&!(((_curentry.filter==0)))) ) )
180 graph->
evalOpParmInst(_curentry.regex, nodeidx,
"regex#", parmidx, offsets, time, 0, 2-1);
181 _curentry.global =
false;
182 if (
true && ( (
true&&!(((_curentry.filter==0)))) ) )
183 graph->
evalOpParmInst(_curentry.global, nodeidx,
"global#", parmidx, offsets, time, 0, 2-1);
184 _curentry.from =
""_UTsh;
185 if (
true && ( (
true&&!(((_curentry.filter==0)))) ) )
186 graph->
evalOpParmInst(_curentry.from, nodeidx,
"from#", parmidx, offsets, time, 0, 2-1);
187 _curentry.to =
""_UTsh;
188 if (
true && ( (
true&&!(((_curentry.filter==0)))) ) )
189 graph->
evalOpParmInst(_curentry.to, nodeidx,
"to#", parmidx, offsets, time, 0, 2-1);
210 template <
typename T>
217 if (idx.
size() != instance.
size()+1)
248 else if (instance[0] < myFilters.entries())
250 auto && _data = myFilters(instance[0]);
286 { doGetParmValue(idx, instance, value); }
288 { doGetParmValue(idx, instance, value); }
290 { doGetParmValue(idx, instance, value); }
292 { doGetParmValue(idx, instance, value); }
294 { doGetParmValue(idx, instance, value); }
296 { doGetParmValue(idx, instance, value); }
298 { doGetParmValue(idx, instance, value); }
300 { doGetParmValue(idx, instance, value); }
302 { doGetParmValue(idx, instance, value); }
304 { doGetParmValue(idx, instance, value); }
306 { doGetParmValue(idx, instance, value); }
308 template <
typename T>
315 if (idx.
size() != instance.
size()+1)
348 if (newsize < 0) newsize = 0;
349 myFilters.setSize(newsize);
355 myFilters.setSizeIfNeeded(instance[0]+1);
356 auto && _data = myFilters(instance[0]);
383 { doSetParmValue(idx, instance, value); }
385 { doSetParmValue(idx, instance, value); }
387 { doSetParmValue(idx, instance, value); }
389 { doSetParmValue(idx, instance, value); }
391 { doSetParmValue(idx, instance, value); }
393 { doSetParmValue(idx, instance, value); }
395 { doSetParmValue(idx, instance, value); }
397 { doSetParmValue(idx, instance, value); }
399 { doSetParmValue(idx, instance, value); }
401 { doSetParmValue(idx, instance, value); }
403 { doSetParmValue(idx, instance, value); }
421 if (fieldnum.
size() < 1)
426 return "detailattribs";
428 return "detailattriblist";
430 return "primitiveattribs";
432 return "primattriblist";
434 return "pointattribs";
436 return "pointattriblist";
438 return "vertexattribs";
440 return "vertexattriblist";
442 if (fieldnum.
size() == 1)
466 if (fieldnum.
size() < 1)
467 return PARM_UNSUPPORTED;
487 if (fieldnum.
size() == 1)
488 return PARM_MULTIPARM;
542 loadData(is, rampdata);
560 int typelen = colon - data.
buffer();
574 {
int64 iv =
v; UTwrite(os, &iv); }
576 { UTwrite<fpreal64>(os, &
v); }
578 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
580 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
581 UTwrite<fpreal64>(os, &v.
z()); }
583 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
584 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
596 if (s) s->save(ostr);
598 saveData(os, result);
605 ostr << s->getDataTypeToken();
610 saveData(os, result);
614 void save(std::ostream &os)
const
618 saveData(os, myEnableDetail);
619 saveData(os, myDetailAttribList);
620 saveData(os, myEnablePrimitives);
621 saveData(os, myPrimAttribList);
622 saveData(os, myEnablePoints);
623 saveData(os, myPointAttribList);
624 saveData(os, myEnableVertices);
625 saveData(os, myVertexAttribList);
628 UTwrite(os, &length);
631 auto && _curentry = myFilters(i);
633 saveData(os, _curentry.filter);
634 saveData(os, _curentry.regex);
635 saveData(os, _curentry.global);
636 saveData(os, _curentry.from);
637 saveData(os, _curentry.to);
653 loadData(is, myEnableDetail);
654 loadData(is, myDetailAttribList);
655 loadData(is, myEnablePrimitives);
656 loadData(is, myPrimAttribList);
657 loadData(is, myEnablePoints);
658 loadData(is, myPointAttribList);
659 loadData(is, myEnableVertices);
660 loadData(is, myVertexAttribList);
664 myFilters.setSize(length);
667 auto && _curentry = myFilters(i);
669 loadData(is, _curentry.filter);
670 loadData(is, _curentry.regex);
671 loadData(is, _curentry.global);
672 loadData(is, _curentry.from);
673 loadData(is, _curentry.to);
686 if (!thissop)
return getEnableDetail();
688 OP_Utils::evalOpParm(result, thissop,
"detailattribs", cookparms.
getCookTime(), 0);
696 if (!thissop)
return getDetailAttribList();
698 OP_Utils::evalOpParm(result, thissop,
"detailattriblist", cookparms.
getCookTime(), 0);
706 if (!thissop)
return getEnablePrimitives();
708 OP_Utils::evalOpParm(result, thissop,
"primitiveattribs", cookparms.
getCookTime(), 0);
716 if (!thissop)
return getPrimAttribList();
718 OP_Utils::evalOpParm(result, thissop,
"primattriblist", cookparms.
getCookTime(), 0);
726 if (!thissop)
return getEnablePoints();
728 OP_Utils::evalOpParm(result, thissop,
"pointattribs", cookparms.
getCookTime(), 0);
736 if (!thissop)
return getPointAttribList();
738 OP_Utils::evalOpParm(result, thissop,
"pointattriblist", cookparms.
getCookTime(), 0);
746 if (!thissop)
return getEnableVertices();
748 OP_Utils::evalOpParm(result, thissop,
"vertexattribs", cookparms.
getCookTime(), 0);
756 if (!thissop)
return getVertexAttribList();
758 OP_Utils::evalOpParm(result, thissop,
"vertexattriblist", cookparms.
getCookTime(), 0);
766 if (!thissop)
return getFilters().entries();
768 OP_Utils::evalOpParm(result, thissop,
"filters", cookparms.
getCookTime(), 0);
772 {
return opinstFilters_filter(cookparms, &_idx); }
776 if (!thissop)
return (myFilters(_idx[0]).
filter);
778 _parmidx[1-1] = _idx[1-1] + 0;
781 OP_Utils::evalOpParmInst(result, thissop,
"filter#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
785 {
return opinstFilters_regex(cookparms, &_idx); }
789 if (!thissop)
return (myFilters(_idx[0]).regex);
791 _parmidx[1-1] = _idx[1-1] + 0;
794 OP_Utils::evalOpParmInst(result, thissop,
"regex#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
798 {
return opinstFilters_global(cookparms, &_idx); }
802 if (!thissop)
return (myFilters(_idx[0]).global);
804 _parmidx[1-1] = _idx[1-1] + 0;
807 OP_Utils::evalOpParmInst(result, thissop,
"global#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
811 {
return opinstFilters_from(cookparms, &_idx); }
815 if (!thissop)
return (myFilters(_idx[0]).from);
817 _parmidx[1-1] = _idx[1-1] + 0;
820 OP_Utils::evalOpParmInst(result, thissop,
"from#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
824 {
return opinstFilters_to(cookparms, &_idx); }
828 if (!thissop)
return (myFilters(_idx[0]).to);
830 _parmidx[1-1] = _idx[1-1] + 0;
833 OP_Utils::evalOpParmInst(result, thissop,
"to#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
841 bool myEnablePrimitives;
845 bool myEnableVertices;
bool getEnableVertices() const
UT_StringHolder createString(const UT_Array< Filters > &list) const
GLenum GLuint GLenum GLsizei const GLchar * buf
UT_StringHolder opPrimAttribList(const SOP_NodeVerb::CookParms &cookparms) const
SOP_Node * getNode() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
const UT_StringHolder & getDetailAttribList() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void saveData(std::ostream &os, UT_Vector2D v)
bool opEnablePrimitives(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
bool opFilters_regex(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void loadFromOpSubclass(const LoadParms &loadparms) override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
UT_StringHolder opFilters_to(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
static void loadData(UT_IStream &is, fpreal64 &v)
bool getEnablePoints() const
SYS_FORCE_INLINE const char * buffer() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
GLuint GLsizei GLsizei * length
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setEnableVertices(bool val)
An output stream object that owns its own string buffer storage.
bool opFilters_global(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
static void saveData(std::ostream &os, UT_Matrix2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
**But if you need a result
bool getEnablePrimitives() const
static void loadData(UT_IStream &is, UT_Vector4D &v)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool opinstFilters_filter(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
static void loadData(UT_IStream &is, int64 &v)
void setFilters(const UT_Array< Filters > &val)
static void loadData(UT_IStream &is, UT_StringHolder &v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
GLuint GLsizei const GLuint const GLintptr * offsets
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator!=(const SOP_AttribStringEditParms &src) const
const UT_StringHolder & getPrimAttribList() const
SOP_AttribStringEditParms()
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
exint opFilters(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setPrimAttribList(const UT_StringHolder &val)
UT_StringHolder opVertexAttribList(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_Matrix4D v)
bool opEnableDetail(const SOP_NodeVerb::CookParms &cookparms) 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 loadData(UT_IStream &is, UT_Vector3I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
exint read(bool *array, exint sz=1)
const OP_GraphProxy * graph() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void saveData(std::ostream &os, UT_Matrix3D v)
ParmType getNestParmType(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
const UT_StringHolder & getVertexAttribList() const
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
const char * getNestParmName(TempIndex fieldnum) const override
exint getNestNumParms(TempIndex idx) const override
void setEnableDetail(bool val)
bool getEnableDetail() const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
SYS_FORCE_INLINE void strcat(const char *src)
void saveBinary(std::ostream &os) const
Save string to binary stream.
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
GT_API const UT_StringHolder version
bool opFilters_filter(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
bool opEnableVertices(const SOP_NodeVerb::CookParms &cookparms) const
exint entries() const
Alias of size(). size() is preferred.
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void coerceValue(T &result, const S &src) const
void setPointAttribList(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setEnablePrimitives(bool val)
const UT_Array< Filters > & getFilters() const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
DEP_MicroNode * depnode() const
void save(std::ostream &os) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setEnablePoints(bool val)
Utility class for containing a color ramp.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
constexpr SYS_FORCE_INLINE T & w() noexcept
SYS_FORCE_INLINE void append(char character)
UT_StringHolder opinstFilters_to(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
bool load(UT_IStream &is)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void saveData(std::ostream &os, UT_Vector3D v)
bool operator!=(const Filters &src) const
UT_StringHolder opFilters_from(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
fpreal getCookTime() const
bool opinstFilters_regex(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
const char * findChar(int c) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setVertexAttribList(const UT_StringHolder &val)
UT_StringHolder opinstFilters_from(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
bool opEnablePoints(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_StringHolder s)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
UT_StringHolder opDetailAttribList(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
bool isParmColorRamp(exint idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void loadData(UT_IStream &is, bool &v)
bool operator==(const Filters &src) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
static void saveData(std::ostream &os, bool v)
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
bool operator==(const SOP_AttribStringEditParms &src) const
const UT_StringHolder & getPointAttribList() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool opinstFilters_global(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void copyFrom(const OP_NodeParms *src) override
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
constexpr SYS_FORCE_INLINE T & x() noexcept
static void saveData(std::ostream &os, fpreal64 v)
UT_StringHolder opPointAttribList(const SOP_NodeVerb::CookParms &cookparms) const
void setDetailAttribList(const UT_StringHolder &val)