20 using namespace UT::Literal;
23 namespace SOP_GroupCombineEnums
120 if (grouptype != src.
grouptype)
return false;
122 if (negate_a != src.
negate_a)
return false;
123 if (group_a != src.
group_a)
return false;
124 if (op_ab != src.
op_ab)
return false;
125 if (negate_b != src.
negate_b)
return false;
126 if (group_b != src.
group_b)
return false;
127 if (op_bc != src.
op_bc)
return false;
128 if (negate_c != src.
negate_c)
return false;
129 if (group_c != src.
group_c)
return false;
130 if (op_cd != src.
op_cd)
return false;
131 if (negate_d != src.
negate_d)
return false;
132 if (group_d != src.
group_d)
return false;
148 for (
int i = 0; i < list.
entries(); i++)
199 if (myNumcombine != src.myNumcombine)
return false;
223 graph->
evalOpParm(length, nodeidx,
"numcombine", time, 0);
224 myNumcombine.entries(length);
228 auto && _curentry = myNumcombine(i);
230 myNumcombine(i).grouptype = 0;
232 graph->
evalOpParmInst(myNumcombine(i).grouptype, nodeidx,
"grouptype#", &parmidx, time, 0);
233 myNumcombine(i).group =
""_sh;
236 myNumcombine(i).negate_a = 0;
238 graph->
evalOpParmInst(myNumcombine(i).negate_a, nodeidx,
"negate_a#", &parmidx, time, 0);
239 myNumcombine(i).group_a =
""_sh;
241 graph->
evalOpParmInst(myNumcombine(i).group_a, nodeidx,
"group_a#", &parmidx, time, 0);
242 myNumcombine(i).op_ab = 0;
244 graph->
evalOpParmInst(myNumcombine(i).op_ab, nodeidx,
"op_ab#", &parmidx, time, 0);
245 myNumcombine(i).negate_b = 0;
246 if (
true && ( (!(((_curentry.op_ab==0)))) ) )
247 graph->
evalOpParmInst(myNumcombine(i).negate_b, nodeidx,
"negate_b#", &parmidx, time, 0);
248 myNumcombine(i).group_b =
""_sh;
249 if (
true && ( (!(((_curentry.op_ab==0)))) ) )
250 graph->
evalOpParmInst(myNumcombine(i).group_b, nodeidx,
"group_b#", &parmidx, time, 0);
251 myNumcombine(i).op_bc = 0;
253 graph->
evalOpParmInst(myNumcombine(i).op_bc, nodeidx,
"op_bc#", &parmidx, time, 0);
254 myNumcombine(i).negate_c = 0;
255 if (
true && ( (!(((_curentry.op_bc==0)))) ) )
256 graph->
evalOpParmInst(myNumcombine(i).negate_c, nodeidx,
"negate_c#", &parmidx, time, 0);
257 myNumcombine(i).group_c =
""_sh;
258 if (
true && ( (!(((_curentry.op_bc==0)))) ) )
259 graph->
evalOpParmInst(myNumcombine(i).group_c, nodeidx,
"group_c#", &parmidx, time, 0);
260 myNumcombine(i).op_cd = 0;
262 graph->
evalOpParmInst(myNumcombine(i).op_cd, nodeidx,
"op_cd#", &parmidx, time, 0);
263 myNumcombine(i).negate_d = 0;
264 if (
true && ( (!(((_curentry.op_cd==0)))) ) )
265 graph->
evalOpParmInst(myNumcombine(i).negate_d, nodeidx,
"negate_d#", &parmidx, time, 0);
266 myNumcombine(i).group_d =
""_sh;
267 if (
true && ( (!(((_curentry.op_cd==0)))) ) )
268 graph->
evalOpParmInst(myNumcombine(i).group_d, nodeidx,
"group_d#", &parmidx, time, 0);
273 myNumcombine.clear();
289 template <
typename T>
296 if (idx.
size() != instance.
size()+1)
302 coerceValue(value, myNumcombine.entries());
303 else if (instance[0] < myNumcombine.entries())
305 auto && _data = myNumcombine(instance[0]);
309 coerceValue(value, _data.grouptype);
312 coerceValue(value, _data.group);
315 coerceValue(value, _data.negate_a);
318 coerceValue(value, _data.group_a);
321 coerceValue(value, _data.op_ab);
324 coerceValue(value, _data.negate_b);
327 coerceValue(value, _data.group_b);
330 coerceValue(value, _data.op_bc);
333 coerceValue(value, _data.negate_c);
336 coerceValue(value, _data.group_c);
339 coerceValue(value, _data.op_cd);
342 coerceValue(value, _data.negate_d);
345 coerceValue(value, _data.group_d);
356 { doGetParmValue(idx, instance, value); }
358 { doGetParmValue(idx, instance, value); }
360 { doGetParmValue(idx, instance, value); }
362 { doGetParmValue(idx, instance, value); }
364 { doGetParmValue(idx, instance, value); }
366 { doGetParmValue(idx, instance, value); }
368 { doGetParmValue(idx, instance, value); }
370 { doGetParmValue(idx, instance, value); }
372 { doGetParmValue(idx, instance, value); }
374 { doGetParmValue(idx, instance, value); }
376 { doGetParmValue(idx, instance, value); }
378 template <
typename T>
385 if (idx.
size() != instance.
size()+1)
393 coerceValue(newsize, value);
394 myNumcombine.setSize(newsize);
398 myNumcombine.setSizeIfNeeded(instance[0]+1);
399 auto && _data = myNumcombine(instance[0]);
403 coerceValue(_data.grouptype, value);
406 coerceValue(_data.group, value);
409 coerceValue(_data.negate_a, value);
412 coerceValue(_data.group_a, value);
415 coerceValue(_data.op_ab, value);
418 coerceValue(_data.negate_b, value);
421 coerceValue(_data.group_b, value);
424 coerceValue(_data.op_bc, value);
427 coerceValue(_data.negate_c, value);
430 coerceValue(_data.group_c, value);
433 coerceValue(_data.op_cd, value);
436 coerceValue(_data.negate_d, value);
439 coerceValue(_data.group_d, value);
450 { doSetParmValue(idx, instance, value); }
452 { doSetParmValue(idx, instance, value); }
454 { doSetParmValue(idx, instance, value); }
456 { doSetParmValue(idx, instance, value); }
458 { doSetParmValue(idx, instance, value); }
460 { doSetParmValue(idx, instance, value); }
462 { doSetParmValue(idx, instance, value); }
464 { doSetParmValue(idx, instance, value); }
466 { doSetParmValue(idx, instance, value); }
468 { doSetParmValue(idx, instance, value); }
470 { doSetParmValue(idx, instance, value); }
488 if (fieldnum.
size() < 1)
493 if (fieldnum.
size() == 1)
533 if (fieldnum.
size() < 1)
534 return PARM_UNSUPPORTED;
538 if (fieldnum.
size() == 1)
539 return PARM_MULTIPARM;
570 return PARM_UNSUPPORTED;
573 return PARM_UNSUPPORTED;
609 loadData(is, rampdata);
627 int typelen = colon - data.
buffer();
641 {
int64 iv =
v; UTwrite(os, &iv); }
643 { UTwrite<fpreal64>(os, &
v); }
645 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
647 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
648 UTwrite<fpreal64>(os, &v.
z()); }
650 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
651 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
663 if (s) s->save(ostr);
665 saveData(os, result);
672 ostr << s->getDataTypeToken();
677 saveData(os, result);
681 void save(std::ostream &os)
const
687 UTwrite(os, &length);
690 saveData(os, myNumcombine(i).grouptype);
691 saveData(os, myNumcombine(i).
group);
692 saveData(os, myNumcombine(i).negate_a);
693 saveData(os, myNumcombine(i).group_a);
694 saveData(os, myNumcombine(i).op_ab);
695 saveData(os, myNumcombine(i).negate_b);
696 saveData(os, myNumcombine(i).group_b);
697 saveData(os, myNumcombine(i).op_bc);
698 saveData(os, myNumcombine(i).negate_c);
699 saveData(os, myNumcombine(i).group_c);
700 saveData(os, myNumcombine(i).op_cd);
701 saveData(os, myNumcombine(i).negate_d);
702 saveData(os, myNumcombine(i).group_d);
721 myNumcombine.entries(length);
724 loadData(is, myNumcombine(i).grouptype);
725 loadData(is, myNumcombine(i).
group);
726 loadData(is, myNumcombine(i).negate_a);
727 loadData(is, myNumcombine(i).group_a);
728 loadData(is, myNumcombine(i).op_ab);
729 loadData(is, myNumcombine(i).negate_b);
730 loadData(is, myNumcombine(i).group_b);
731 loadData(is, myNumcombine(i).op_bc);
732 loadData(is, myNumcombine(i).negate_c);
733 loadData(is, myNumcombine(i).group_c);
734 loadData(is, myNumcombine(i).op_cd);
735 loadData(is, myNumcombine(i).negate_d);
736 loadData(is, myNumcombine(i).group_d);
749 if (!thissop)
return getNumcombine().entries();
751 OP_Utils::evalOpParm(result, thissop,
"numcombine", cookparms.
getCookTime(), 0);
757 if (!thissop)
return (myNumcombine(_idx).grouptype);
758 int _parmidx = _idx + 1;
760 OP_Utils::evalOpParmInst(result, thissop,
"grouptype#", &_parmidx, cookparms.
getCookTime(), 0);
766 if (!thissop)
return (myNumcombine(_idx).
group);
767 int _parmidx = _idx + 1;
769 OP_Utils::evalOpParmInst(result, thissop,
"group#", &_parmidx, cookparms.
getCookTime(), 0);
775 if (!thissop)
return (myNumcombine(_idx).negate_a);
776 int _parmidx = _idx + 1;
778 OP_Utils::evalOpParmInst(result, thissop,
"negate_a#", &_parmidx, cookparms.
getCookTime(), 0);
784 if (!thissop)
return (myNumcombine(_idx).group_a);
785 int _parmidx = _idx + 1;
787 OP_Utils::evalOpParmInst(result, thissop,
"group_a#", &_parmidx, cookparms.
getCookTime(), 0);
793 if (!thissop)
return (myNumcombine(_idx).op_ab);
794 int _parmidx = _idx + 1;
796 OP_Utils::evalOpParmInst(result, thissop,
"op_ab#", &_parmidx, cookparms.
getCookTime(), 0);
802 if (!thissop)
return (myNumcombine(_idx).negate_b);
803 int _parmidx = _idx + 1;
805 OP_Utils::evalOpParmInst(result, thissop,
"negate_b#", &_parmidx, cookparms.
getCookTime(), 0);
811 if (!thissop)
return (myNumcombine(_idx).group_b);
812 int _parmidx = _idx + 1;
814 OP_Utils::evalOpParmInst(result, thissop,
"group_b#", &_parmidx, cookparms.
getCookTime(), 0);
820 if (!thissop)
return (myNumcombine(_idx).op_bc);
821 int _parmidx = _idx + 1;
823 OP_Utils::evalOpParmInst(result, thissop,
"op_bc#", &_parmidx, cookparms.
getCookTime(), 0);
829 if (!thissop)
return (myNumcombine(_idx).negate_c);
830 int _parmidx = _idx + 1;
832 OP_Utils::evalOpParmInst(result, thissop,
"negate_c#", &_parmidx, cookparms.
getCookTime(), 0);
838 if (!thissop)
return (myNumcombine(_idx).group_c);
839 int _parmidx = _idx + 1;
841 OP_Utils::evalOpParmInst(result, thissop,
"group_c#", &_parmidx, cookparms.
getCookTime(), 0);
847 if (!thissop)
return (myNumcombine(_idx).op_cd);
848 int _parmidx = _idx + 1;
850 OP_Utils::evalOpParmInst(result, thissop,
"op_cd#", &_parmidx, cookparms.
getCookTime(), 0);
856 if (!thissop)
return (myNumcombine(_idx).negate_d);
857 int _parmidx = _idx + 1;
859 OP_Utils::evalOpParmInst(result, thissop,
"negate_d#", &_parmidx, cookparms.
getCookTime(), 0);
865 if (!thissop)
return (myNumcombine(_idx).group_d);
866 int _parmidx = _idx + 1;
868 OP_Utils::evalOpParmInst(result, thissop,
"group_d#", &_parmidx, cookparms.
getCookTime(), 0);
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
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_negate_c(const SOP_NodeVerb::CookParms &cookparms, exint _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)
virtual void evalOpParmInst(int64 &v, NodeIdx node, const char *parmname, int *inst, fpreal time, DEP_MicroNode *depnode) const =0
int64 opNumcombine_op_cd(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
void copyFrom(const SOP_NodeParms *src) override
GLuint const GLfloat * val
static void saveData(std::ostream &os, int64 v)
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
~SOP_GroupCombineParms() override
int64 opNumcombine_op_ab(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
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
const SOP_GraphProxy * graph() const
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_StringHolder &v)
UT_StringHolder opNumcombine_group_a(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
static void saveData(std::ostream &os, bool v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &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.
bool load(UT_IStream &is)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void saveData(std::ostream &os, UT_Vector3D v)
void save(std::ostream &os) const
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)
UT_StringHolder opNumcombine_group_d(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
bool operator==(const SOP_GroupCombineParms &src) const
void loadFromOpSubclass(const LoadParms &loadparms) override
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.
exint opNumcombine(const SOP_NodeVerb::CookParms &cookparms) const
GLint GLenum GLsizei GLint GLsizei const void * data
exint read(bool *array, exint sz=1)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
int64 opNumcombine_negate_b(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
const char * getNestParmName(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
GLuint GLsizei GLsizei * length
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
bool operator!=(const Numcombine &src) const
UT_StringHolder createString(const UT_Array< Numcombine > &list) const
int64 opNumcombine_grouptype(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
int64 opNumcombine_op_bc(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, int64 &v)
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
DEP_MicroNode * depnode() const
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)
int64 opNumcombine_negate_d(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
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
int64 opNumcombine_negate_a(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
UT_StringHolder opNumcombine_group_b(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
UT_StringHolder opNumcombine_group_c(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
Utility class for containing a color ramp.
static void saveData(std::ostream &os, UT_Matrix2D v)
SYS_FORCE_INLINE void append(char character)
GLdouble GLdouble GLdouble r
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
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
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
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
UT_StringHolder opNumcombine_group(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
GLenum GLuint GLsizei const GLchar * buf
GLsizei const GLfloat * value
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
const OP_Context & context() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)