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;
110 graph->
evalOpParm(myGroup, nodeidx,
"group", time, graph->
isDirect()?
nullptr:depnode);
117 graph->
evalOpParm(length, nodeidx,
"nblends", time, graph->
isDirect()?
nullptr:depnode);
118 if (length < 0) length = 0;
119 myNblends.setSize(length);
126 auto && _curentry = myNblends(i);
130 graph->
evalOpParmInst(_curentry.blend, nodeidx,
"blend#", parmidx, offsets, time, graph->
isDirect()?
nullptr:depnode, 2-1);
151 template <
typename T>
158 if (idx.
size() != instance.
size()+1)
171 else if (instance[0] < myNblends.entries())
173 auto && _data = myNblends(instance[0]);
197 { doGetParmValue(idx, instance, value); }
199 { doGetParmValue(idx, instance, value); }
201 { doGetParmValue(idx, instance, value); }
203 { doGetParmValue(idx, instance, value); }
205 { doGetParmValue(idx, instance, value); }
207 { doGetParmValue(idx, instance, value); }
209 { doGetParmValue(idx, instance, value); }
211 { doGetParmValue(idx, instance, value); }
213 { doGetParmValue(idx, instance, value); }
215 { doGetParmValue(idx, instance, value); }
217 { doGetParmValue(idx, instance, value); }
219 template <
typename T>
226 if (idx.
size() != instance.
size()+1)
241 if (newsize < 0) newsize = 0;
242 myNblends.setSize(newsize);
248 myNblends.setSizeIfNeeded(instance[0]+1);
249 auto && _data = myNblends(instance[0]);
264 { doSetParmValue(idx, instance, value); }
266 { doSetParmValue(idx, instance, value); }
268 { doSetParmValue(idx, instance, value); }
270 { doSetParmValue(idx, instance, value); }
272 { doSetParmValue(idx, instance, value); }
274 { doSetParmValue(idx, instance, value); }
276 { doSetParmValue(idx, instance, value); }
278 { doSetParmValue(idx, instance, value); }
280 { doSetParmValue(idx, instance, value); }
282 { doSetParmValue(idx, instance, value); }
284 { doSetParmValue(idx, instance, value); }
302 if (fieldnum.
size() < 1)
311 if (fieldnum.
size() == 1)
327 if (fieldnum.
size() < 1)
328 return PARM_UNSUPPORTED;
336 if (fieldnum.
size() == 1)
337 return PARM_MULTIPARM;
383 loadData(is, rampdata);
401 int typelen = colon - data.
buffer();
415 {
int64 iv =
v; UTwrite(os, &iv); }
417 { UTwrite<fpreal64>(os, &
v); }
419 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
421 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
422 UTwrite<fpreal64>(os, &v.
z()); }
424 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
425 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
437 if (s) s->save(ostr);
439 saveData(os, result);
446 ostr << s->getDataTypeToken();
451 saveData(os, result);
455 void save(std::ostream &os)
const
459 saveData(os, myGroup);
460 saveData(os, myDiff);
463 UTwrite(os, &length);
466 auto && _curentry = myNblends(i);
468 saveData(os, _curentry.blend);
484 loadData(is, myGroup);
485 loadData(is, myDiff);
489 myNblends.setSize(length);
492 auto && _curentry = myNblends(i);
494 loadData(is, _curentry.blend);
507 if (!thissop)
return getGroup();
509 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
517 if (!thissop)
return getDiff();
519 OP_Utils::evalOpParm(result, thissop,
"diff", cookparms.
getCookTime(), 0);
527 if (!thissop)
return getNblends().entries();
529 OP_Utils::evalOpParm(result, thissop,
"nblends", cookparms.
getCookTime(), 0);
533 {
return opinstNblends_blend(cookparms, &_idx); }
537 if (!thissop)
return (myNblends(_idx[0]).
blend);
539 _parmidx[1-1] = _idx[1-1] + 0;
542 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
GLsizei const GLfloat * value
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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)
virtual UT_StringHolder baseGetSignature() const
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
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
static void saveData(std::ostream &os, PRM_DataItemHandle s)
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