57 for (
int i = 0; i < list.
entries(); i++)
90 if (myGroup != src.myGroup)
return false;
91 if (myDiff != src.myDiff)
return false;
92 if (myNblends != src.myNblends)
return false;
107 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
110 graph->
evalOpParm(myDiff, nodeidx,
"diff", time, 0);
114 graph->
evalOpParm(length, nodeidx,
"nblends", time, 0);
115 if (length < 0) length = 0;
116 myNblends.setSize(length);
123 auto && _curentry = myNblends(i);
127 graph->
evalOpParmInst(_curentry.blend, nodeidx,
"blend#", parmidx, offsets, time, 0, 2-1);
148 template <
typename T>
155 if (idx.
size() != instance.
size()+1)
168 else if (instance[0] < myNblends.entries())
170 auto && _data = myNblends(instance[0]);
194 { doGetParmValue(idx, instance, value); }
196 { doGetParmValue(idx, instance, value); }
198 { doGetParmValue(idx, instance, value); }
200 { doGetParmValue(idx, instance, value); }
202 { doGetParmValue(idx, instance, value); }
204 { doGetParmValue(idx, instance, value); }
206 { doGetParmValue(idx, instance, value); }
208 { doGetParmValue(idx, instance, value); }
210 { doGetParmValue(idx, instance, value); }
212 { doGetParmValue(idx, instance, value); }
214 { doGetParmValue(idx, instance, value); }
216 template <
typename T>
223 if (idx.
size() != instance.
size()+1)
238 if (newsize < 0) newsize = 0;
239 myNblends.setSize(newsize);
245 myNblends.setSizeIfNeeded(instance[0]+1);
246 auto && _data = myNblends(instance[0]);
261 { doSetParmValue(idx, instance, value); }
263 { doSetParmValue(idx, instance, value); }
265 { doSetParmValue(idx, instance, value); }
267 { doSetParmValue(idx, instance, value); }
269 { doSetParmValue(idx, instance, value); }
271 { doSetParmValue(idx, instance, value); }
273 { doSetParmValue(idx, instance, value); }
275 { doSetParmValue(idx, instance, value); }
277 { doSetParmValue(idx, instance, value); }
279 { doSetParmValue(idx, instance, value); }
281 { doSetParmValue(idx, instance, value); }
299 if (fieldnum.
size() < 1)
308 if (fieldnum.
size() == 1)
324 if (fieldnum.
size() < 1)
325 return PARM_UNSUPPORTED;
333 if (fieldnum.
size() == 1)
334 return PARM_MULTIPARM;
380 loadData(is, rampdata);
398 int typelen = colon - data.
buffer();
412 {
int64 iv =
v; UTwrite(os, &iv); }
414 { UTwrite<fpreal64>(os, &
v); }
416 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
418 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
419 UTwrite<fpreal64>(os, &v.
z()); }
421 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
422 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
434 if (s) s->save(ostr);
436 saveData(os, result);
443 ostr << s->getDataTypeToken();
448 saveData(os, result);
452 void save(std::ostream &os)
const
456 saveData(os, myGroup);
457 saveData(os, myDiff);
460 UTwrite(os, &length);
463 auto && _curentry = myNblends(i);
465 saveData(os, _curentry.blend);
481 loadData(is, myGroup);
482 loadData(is, myDiff);
486 myNblends.setSize(length);
489 auto && _curentry = myNblends(i);
491 loadData(is, _curentry.blend);
504 if (!thissop)
return getGroup();
506 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
514 if (!thissop)
return getDiff();
516 OP_Utils::evalOpParm(result, thissop,
"diff", cookparms.
getCookTime(), 0);
524 if (!thissop)
return getNblends().entries();
526 OP_Utils::evalOpParm(result, thissop,
"nblends", cookparms.
getCookTime(), 0);
530 {
return opinstNblends_blend(cookparms, &_idx); }
534 if (!thissop)
return (myNblends(_idx[0]).
blend);
536 _parmidx[1-1] = _idx[1-1] + 0;
539 OP_Utils::evalOpParmInst(result, thissop,
"blend#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void saveData(std::ostream &os, UT_Vector2D v)
bool operator!=(const SOP_WireBlendParms &src) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
GLenum GLuint GLenum GLsizei const GLchar * buf
static void saveData(std::ostream &os, fpreal64 v)
static void saveData(std::ostream &os, UT_StringHolder s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
SOP_Node * getNode() const
static void saveData(std::ostream &os, UT_Vector3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
const UT_Array< Nblends > & getNblends() const
static void saveData(std::ostream &os, UT_Matrix3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
static void saveData(std::ostream &os, UT_Matrix2D v)
SYS_FORCE_INLINE const char * buffer() const
GLuint GLsizei GLsizei * length
static void loadData(UT_IStream &is, UT_Vector2D &v)
An output stream object that owns its own string buffer storage.
**But if you need a result
UT_StringHolder createString(const UT_Array< Nblends > &list) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
bool load(UT_IStream &is)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
const char * getNestParmName(TempIndex fieldnum) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
GLuint GLsizei const GLuint const GLintptr * offsets
constexpr SYS_FORCE_INLINE T & x() noexcept
exint getNestNumParms(TempIndex idx) const override
vint4 blend(const vint4 &a, const vint4 &b, const vbool4 &mask)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void setGroup(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
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
bool operator==(const Nblends &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
fpreal64 opNblends_blend(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
exint read(bool *array, exint sz=1)
const OP_GraphProxy * graph() const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &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_Matrix4D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void loadData(UT_IStream &is, bool &v)
ParmType getNestParmType(TempIndex fieldnum) const override
const UT_StringHolder & getGroup() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
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
static void saveData(std::ostream &os, int64 v)
exint entries() const
Alias of size(). size() is preferred.
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
bool opDiff(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
fpreal64 opinstNblends_blend(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void coerceValue(T &result, const S &src) const
static void loadData(UT_IStream &is, fpreal64 &v)
static void saveData(std::ostream &os, UT_Matrix4D v)
DEP_MicroNode * depnode() const
Utility class for containing a color ramp.
static void loadData(UT_IStream &is, UT_Vector4I &v)
constexpr SYS_FORCE_INLINE T & w() noexcept
SYS_FORCE_INLINE void append(char character)
static void saveData(std::ostream &os, bool v)
fpreal getCookTime() const
const char * findChar(int c) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void save(std::ostream &os) const
void copyFrom(const OP_NodeParms *src) override
bool operator==(const SOP_WireBlendParms &src) const
constexpr SYS_FORCE_INLINE T & y() noexcept
void loadFromOpSubclass(const LoadParms &loadparms) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setNblends(const UT_Array< Nblends > &val)
bool isParmColorRamp(exint idx) const override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
static void loadData(UT_IStream &is, UT_StringHolder &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
bool operator!=(const Nblends &src) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, int64 &v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
exint opNblends(const SOP_NodeVerb::CookParms &cookparms) const