23 namespace SOP_GroupCombineEnums
121 if (grouptype != src.
grouptype)
return false;
122 if (group != src.
group)
return false;
123 if (negate_a != src.
negate_a)
return false;
124 if (group_a != src.
group_a)
return false;
125 if (op_ab != src.
op_ab)
return false;
126 if (negate_b != src.
negate_b)
return false;
127 if (group_b != src.
group_b)
return false;
128 if (op_bc != src.
op_bc)
return false;
129 if (negate_c != src.
negate_c)
return false;
130 if (group_c != src.
group_c)
return false;
131 if (op_cd != src.
op_cd)
return false;
132 if (negate_d != src.
negate_d)
return false;
133 if (group_d != src.
group_d)
return false;
149 for (
int i = 0; i < list.
entries(); i++)
191 myNumcombine.setSize(1);
204 if (myNumcombine != src.myNumcombine)
return false;
228 graph->
evalOpParm(length, nodeidx,
"numcombine", time, 0);
229 if (length < 0) length = 0;
230 myNumcombine.setSize(length);
237 auto && _curentry = myNumcombine(i);
239 _curentry.grouptype = 0;
241 graph->
evalOpParmInst(_curentry.grouptype, nodeidx,
"grouptype#", parmidx, offsets, time, 0, 2-1);
242 _curentry.group =
""_UTsh;
244 graph->
evalOpParmInst(_curentry.group, nodeidx,
"group#", parmidx, offsets, time, 0, 2-1);
245 _curentry.negate_a = 0;
247 graph->
evalOpParmInst(_curentry.negate_a, nodeidx,
"negate_a#", parmidx, offsets, time, 0, 2-1);
248 _curentry.group_a =
""_UTsh;
250 graph->
evalOpParmInst(_curentry.group_a, nodeidx,
"group_a#", parmidx, offsets, time, 0, 2-1);
253 graph->
evalOpParmInst(_curentry.op_ab, nodeidx,
"op_ab#", parmidx, offsets, time, 0, 2-1);
254 _curentry.negate_b = 0;
255 if (
true && ( (
true&&!(((_curentry.op_ab==0)))) ) )
256 graph->
evalOpParmInst(_curentry.negate_b, nodeidx,
"negate_b#", parmidx, offsets, time, 0, 2-1);
257 _curentry.group_b =
""_UTsh;
258 if (
true && ( (
true&&!(((_curentry.op_ab==0)))) ) )
259 graph->
evalOpParmInst(_curentry.group_b, nodeidx,
"group_b#", parmidx, offsets, time, 0, 2-1);
262 graph->
evalOpParmInst(_curentry.op_bc, nodeidx,
"op_bc#", parmidx, offsets, time, 0, 2-1);
263 _curentry.negate_c = 0;
264 if (
true && ( (
true&&!(((_curentry.op_bc==0)))) ) )
265 graph->
evalOpParmInst(_curentry.negate_c, nodeidx,
"negate_c#", parmidx, offsets, time, 0, 2-1);
266 _curentry.group_c =
""_UTsh;
267 if (
true && ( (
true&&!(((_curentry.op_bc==0)))) ) )
268 graph->
evalOpParmInst(_curentry.group_c, nodeidx,
"group_c#", parmidx, offsets, time, 0, 2-1);
271 graph->
evalOpParmInst(_curentry.op_cd, nodeidx,
"op_cd#", parmidx, offsets, time, 0, 2-1);
272 _curentry.negate_d = 0;
273 if (
true && ( (
true&&!(((_curentry.op_cd==0)))) ) )
274 graph->
evalOpParmInst(_curentry.negate_d, nodeidx,
"negate_d#", parmidx, offsets, time, 0, 2-1);
275 _curentry.group_d =
""_UTsh;
276 if (
true && ( (
true&&!(((_curentry.op_cd==0)))) ) )
277 graph->
evalOpParmInst(_curentry.group_d, nodeidx,
"group_d#", parmidx, offsets, time, 0, 2-1);
282 myNumcombine.clear();
298 template <
typename T>
305 if (idx.
size() != instance.
size()+1)
312 else if (instance[0] < myNumcombine.entries())
314 auto && _data = myNumcombine(instance[0]);
374 { doGetParmValue(idx, instance, value); }
376 { doGetParmValue(idx, instance, value); }
378 { doGetParmValue(idx, instance, value); }
380 { doGetParmValue(idx, instance, value); }
382 { doGetParmValue(idx, instance, value); }
384 { doGetParmValue(idx, instance, value); }
386 { doGetParmValue(idx, instance, value); }
388 { doGetParmValue(idx, instance, value); }
390 { doGetParmValue(idx, instance, value); }
392 { doGetParmValue(idx, instance, value); }
394 { doGetParmValue(idx, instance, value); }
396 template <
typename T>
403 if (idx.
size() != instance.
size()+1)
412 if (newsize < 0) newsize = 0;
413 myNumcombine.setSize(newsize);
419 myNumcombine.setSizeIfNeeded(instance[0]+1);
420 auto && _data = myNumcombine(instance[0]);
471 { doSetParmValue(idx, instance, value); }
473 { doSetParmValue(idx, instance, value); }
475 { doSetParmValue(idx, instance, value); }
477 { doSetParmValue(idx, instance, value); }
479 { doSetParmValue(idx, instance, value); }
481 { doSetParmValue(idx, instance, value); }
483 { doSetParmValue(idx, instance, value); }
485 { doSetParmValue(idx, instance, value); }
487 { doSetParmValue(idx, instance, value); }
489 { doSetParmValue(idx, instance, value); }
491 { doSetParmValue(idx, instance, value); }
509 if (fieldnum.
size() < 1)
514 if (fieldnum.
size() == 1)
554 if (fieldnum.
size() < 1)
555 return PARM_UNSUPPORTED;
559 if (fieldnum.
size() == 1)
560 return PARM_MULTIPARM;
613 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
615 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
617 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
630 loadData(is, rampdata);
648 int typelen = colon - data.
buffer();
662 {
int64 iv =
v; UTwrite(os, &iv); }
664 { UTwrite<fpreal64>(os, &
v); }
666 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
668 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
669 UTwrite<fpreal64>(os, &v.
z()); }
671 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
672 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
684 if (s) s->save(ostr);
686 saveData(os, result);
693 ostr << s->getDataTypeToken();
698 saveData(os, result);
702 void save(std::ostream &os)
const
708 UTwrite(os, &length);
711 auto && _curentry = myNumcombine(i);
713 saveData(os, _curentry.grouptype);
714 saveData(os, _curentry.group);
715 saveData(os, _curentry.negate_a);
716 saveData(os, _curentry.group_a);
717 saveData(os, _curentry.op_ab);
718 saveData(os, _curentry.negate_b);
719 saveData(os, _curentry.group_b);
720 saveData(os, _curentry.op_bc);
721 saveData(os, _curentry.negate_c);
722 saveData(os, _curentry.group_c);
723 saveData(os, _curentry.op_cd);
724 saveData(os, _curentry.negate_d);
725 saveData(os, _curentry.group_d);
744 myNumcombine.setSize(length);
747 auto && _curentry = myNumcombine(i);
749 loadData(is, _curentry.grouptype);
750 loadData(is, _curentry.group);
751 loadData(is, _curentry.negate_a);
752 loadData(is, _curentry.group_a);
753 loadData(is, _curentry.op_ab);
754 loadData(is, _curentry.negate_b);
755 loadData(is, _curentry.group_b);
756 loadData(is, _curentry.op_bc);
757 loadData(is, _curentry.negate_c);
758 loadData(is, _curentry.group_c);
759 loadData(is, _curentry.op_cd);
760 loadData(is, _curentry.negate_d);
761 loadData(is, _curentry.group_d);
774 if (!thissop)
return getNumcombine().entries();
776 OP_Utils::evalOpParm(result, thissop,
"numcombine", cookparms.
getCookTime(), 0);
780 {
return opinstNumcombine_grouptype(cookparms, &_idx); }
784 if (!thissop)
return (myNumcombine(_idx[0]).grouptype);
786 _parmidx[1-1] = _idx[1-1] + 1;
789 OP_Utils::evalOpParmInst(result, thissop,
"grouptype#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
793 {
return opinstNumcombine_group(cookparms, &_idx); }
797 if (!thissop)
return (myNumcombine(_idx[0]).group);
799 _parmidx[1-1] = _idx[1-1] + 1;
802 OP_Utils::evalOpParmInst(result, thissop,
"group#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
806 {
return opinstNumcombine_negate_a(cookparms, &_idx); }
810 if (!thissop)
return (myNumcombine(_idx[0]).negate_a);
812 _parmidx[1-1] = _idx[1-1] + 1;
815 OP_Utils::evalOpParmInst(result, thissop,
"negate_a#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
819 {
return opinstNumcombine_group_a(cookparms, &_idx); }
823 if (!thissop)
return (myNumcombine(_idx[0]).group_a);
825 _parmidx[1-1] = _idx[1-1] + 1;
828 OP_Utils::evalOpParmInst(result, thissop,
"group_a#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
832 {
return opinstNumcombine_op_ab(cookparms, &_idx); }
836 if (!thissop)
return (myNumcombine(_idx[0]).op_ab);
838 _parmidx[1-1] = _idx[1-1] + 1;
841 OP_Utils::evalOpParmInst(result, thissop,
"op_ab#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
845 {
return opinstNumcombine_negate_b(cookparms, &_idx); }
849 if (!thissop)
return (myNumcombine(_idx[0]).negate_b);
851 _parmidx[1-1] = _idx[1-1] + 1;
854 OP_Utils::evalOpParmInst(result, thissop,
"negate_b#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
858 {
return opinstNumcombine_group_b(cookparms, &_idx); }
862 if (!thissop)
return (myNumcombine(_idx[0]).group_b);
864 _parmidx[1-1] = _idx[1-1] + 1;
867 OP_Utils::evalOpParmInst(result, thissop,
"group_b#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
871 {
return opinstNumcombine_op_bc(cookparms, &_idx); }
875 if (!thissop)
return (myNumcombine(_idx[0]).op_bc);
877 _parmidx[1-1] = _idx[1-1] + 1;
880 OP_Utils::evalOpParmInst(result, thissop,
"op_bc#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
884 {
return opinstNumcombine_negate_c(cookparms, &_idx); }
888 if (!thissop)
return (myNumcombine(_idx[0]).negate_c);
890 _parmidx[1-1] = _idx[1-1] + 1;
893 OP_Utils::evalOpParmInst(result, thissop,
"negate_c#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
897 {
return opinstNumcombine_group_c(cookparms, &_idx); }
901 if (!thissop)
return (myNumcombine(_idx[0]).group_c);
903 _parmidx[1-1] = _idx[1-1] + 1;
906 OP_Utils::evalOpParmInst(result, thissop,
"group_c#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
910 {
return opinstNumcombine_op_cd(cookparms, &_idx); }
914 if (!thissop)
return (myNumcombine(_idx[0]).op_cd);
916 _parmidx[1-1] = _idx[1-1] + 1;
919 OP_Utils::evalOpParmInst(result, thissop,
"op_cd#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
923 {
return opinstNumcombine_negate_d(cookparms, &_idx); }
927 if (!thissop)
return (myNumcombine(_idx[0]).negate_d);
929 _parmidx[1-1] = _idx[1-1] + 1;
932 OP_Utils::evalOpParmInst(result, thissop,
"negate_d#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
936 {
return opinstNumcombine_group_d(cookparms, &_idx); }
940 if (!thissop)
return (myNumcombine(_idx[0]).group_d);
942 _parmidx[1-1] = _idx[1-1] + 1;
945 OP_Utils::evalOpParmInst(result, thissop,
"group_d#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
UT_StringHolder opNumcombine_group_a(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
UT_StringHolder opinstNumcombine_group_b(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
GLenum GLuint GLenum GLsizei const GLchar * buf
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
int64 opinstNumcombine_negate_a(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
SOP_Node * getNode() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
int64 opNumcombine_op_bc(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void saveData(std::ostream &os, UT_Matrix3D v)
bool operator==(const Numcombine &src) const
static void saveData(std::ostream &os, UT_Vector4D v)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
UT_StringHolder opNumcombine_group_c(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
static void saveData(std::ostream &os, int64 v)
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
SYS_FORCE_INLINE const char * buffer() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
GLuint GLsizei GLsizei * length
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_StringHolder &v)
int64 opinstNumcombine_grouptype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
static void saveData(std::ostream &os, bool v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
**But if you need a result
int64 opinstNumcombine_op_ab(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
bool isParmColorRamp(exint idx) const override
int64 opinstNumcombine_negate_c(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) 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.
bool load(UT_IStream &is)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void saveData(std::ostream &os, UT_Vector3D v)
constexpr SYS_FORCE_INLINE T & x() noexcept
UT_StringHolder opNumcombine_group(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void save(std::ostream &os) const
GLuint GLsizei const GLuint const GLintptr * offsets
constexpr SYS_FORCE_INLINE T & x() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void saveData(std::ostream &os, UT_Vector2D v)
const UT_Array< Numcombine > & getNumcombine() const
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
int64 opNumcombine_negate_b(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
int64 opinstNumcombine_negate_b(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
bool operator==(const SOP_GroupCombineParms &src) const
void loadFromOpSubclass(const LoadParms &loadparms) override
UT_StringHolder opNumcombine_group_b(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
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
exint opNumcombine(const SOP_NodeVerb::CookParms &cookparms) const
int64 opNumcombine_grouptype(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
int64 opNumcombine_negate_a(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
exint read(bool *array, exint sz=1)
const OP_GraphProxy * graph() const
void copyFrom(const OP_NodeParms *src) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
const char * getNestParmName(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
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
bool operator!=(const Numcombine &src) const
UT_StringHolder createString(const UT_Array< Numcombine > &list) const
UT_StringHolder opinstNumcombine_group(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, int64 &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void loadData(UT_IStream &is, bool &v)
SYS_FORCE_INLINE void strcat(const char *src)
void saveBinary(std::ostream &os) const
Save string to binary stream.
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setNumcombine(const UT_Array< Numcombine > &val)
GT_API const UT_StringHolder version
exint entries() const
Alias of size(). size() is preferred.
static void saveData(std::ostream &os, fpreal64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, UT_StringHolder s)
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
ParmType getNestParmType(TempIndex fieldnum) const override
void coerceValue(T &result, const S &src) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
DEP_MicroNode * depnode() const
Utility class for containing a color ramp.
static void saveData(std::ostream &os, UT_Matrix2D v)
constexpr SYS_FORCE_INLINE T & w() noexcept
SYS_FORCE_INLINE void append(char character)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
int64 opNumcombine_op_cd(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
fpreal getCookTime() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
const char * findChar(int c) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
int64 opinstNumcombine_negate_d(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
UT_StringHolder opinstNumcombine_group_a(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
int64 opinstNumcombine_op_cd(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void loadData(UT_IStream &is, UT_Vector2D &v)
exint getNestNumParms(TempIndex idx) const override
bool operator!=(const SOP_GroupCombineParms &src) const
constexpr SYS_FORCE_INLINE T & y() noexcept
int64 opinstNumcombine_op_bc(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
UT_StringHolder opNumcombine_group_d(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
UT_StringHolder opinstNumcombine_group_d(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
int64 opNumcombine_op_ab(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
int64 opNumcombine_negate_c(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
static void saveData(std::ostream &os, UT_Matrix4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
int64 opNumcombine_negate_d(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
constexpr SYS_FORCE_INLINE T & x() noexcept
UT_StringHolder opinstNumcombine_group_c(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const