23 namespace SOP_VolumeMixEnums
44 using namespace UT::Literal;
101 if (myGroup != src.myGroup)
return false;
102 if (myMixgrp != src.myMixgrp)
return false;
103 if (myMixmethod != src.myMixmethod)
return false;
104 if (myRange != src.myRange)
return false;
105 if (myBlend != src.myBlend)
return false;
106 if (myExpr != src.myExpr)
return false;
107 if (myDstpreadd != src.myDstpreadd)
return false;
108 if (myDstpremul != src.myDstpremul)
return false;
109 if (mySrcpreadd != src.mySrcpreadd)
return false;
110 if (mySrcpremul != src.mySrcpremul)
return false;
111 if (myPostadd != src.myPostadd)
return false;
112 if (myPostmul != src.myPostmul)
return false;
113 if (myDoclampmin != src.myDoclampmin)
return false;
114 if (myClampmin != src.myClampmin)
return false;
115 if (myDoclampmax != src.myDoclampmax)
return false;
116 if (myClampmax != src.myClampmax)
return false;
117 if (myExpandvdb != src.myExpandvdb)
return false;
136 graph->
evalOpParm(myGroup, nodeidx,
"group", time, graph->
isDirect()?
nullptr:depnode);
139 graph->
evalOpParm(myMixgrp, nodeidx,
"mixgrp", time, graph->
isDirect()?
nullptr:depnode);
142 graph->
evalOpParm(myMixmethod, nodeidx,
"mixmethod", time, graph->
isDirect()?
nullptr:depnode);
144 if (
true && ( (
true&&!(((
int64(getMixmethod())!=9)))) ) )
145 graph->
evalOpParm(myRange, nodeidx,
"range", time, graph->
isDirect()?
nullptr:depnode);
147 if (
true && ( (
true&&!(((
int64(getMixmethod())!=10)))) ) )
148 graph->
evalOpParm(myBlend, nodeidx,
"blend", time, graph->
isDirect()?
nullptr:depnode);
150 if (
true && ( (
true&&!(((
int64(getMixmethod())!=11)))) ) )
154 graph->
evalOpParm(myDstpreadd, nodeidx,
"dstpreadd", time, graph->
isDirect()?
nullptr:depnode);
157 graph->
evalOpParm(myDstpremul, nodeidx,
"dstpremul", time, graph->
isDirect()?
nullptr:depnode);
160 graph->
evalOpParm(mySrcpreadd, nodeidx,
"srcpreadd", time, graph->
isDirect()?
nullptr:depnode);
163 graph->
evalOpParm(mySrcpremul, nodeidx,
"srcpremul", time, graph->
isDirect()?
nullptr:depnode);
166 graph->
evalOpParm(myPostadd, nodeidx,
"postadd", time, graph->
isDirect()?
nullptr:depnode);
169 graph->
evalOpParm(myPostmul, nodeidx,
"postmul", time, graph->
isDirect()?
nullptr:depnode);
170 myDoclampmin =
false;
172 graph->
evalOpParm(myDoclampmin, nodeidx,
"doclampmin", time, graph->
isDirect()?
nullptr:depnode);
174 if (
true && ( (
true&&!(((getDoclampmin()==0)))) ) )
175 graph->
evalOpParm(myClampmin, nodeidx,
"clampmin", time, graph->
isDirect()?
nullptr:depnode);
176 myDoclampmax =
false;
178 graph->
evalOpParm(myDoclampmax, nodeidx,
"doclampmax", time, graph->
isDirect()?
nullptr:depnode);
180 if (
true && ( (
true&&!(((getDoclampmax()==0)))) ) )
181 graph->
evalOpParm(myClampmax, nodeidx,
"clampmax", time, graph->
isDirect()?
nullptr:depnode);
184 graph->
evalOpParm(myExpandvdb, nodeidx,
"expandvdb", time, graph->
isDirect()?
nullptr:depnode);
200 template <
typename T>
207 if (idx.
size() != instance.
size()+1)
212 coerceValue(value, myGroup);
215 coerceValue(value, myMixgrp);
218 coerceValue(value, myMixmethod);
221 coerceValue(value, myRange);
224 coerceValue(value, myBlend);
227 coerceValue(value, myExpr);
230 coerceValue(value, myDstpreadd);
233 coerceValue(value, myDstpremul);
236 coerceValue(value, mySrcpreadd);
239 coerceValue(value, mySrcpremul);
242 coerceValue(value, myPostadd);
245 coerceValue(value, myPostmul);
248 coerceValue(value, myDoclampmin);
251 coerceValue(value, myClampmin);
254 coerceValue(value, myDoclampmax);
257 coerceValue(value, myClampmax);
260 coerceValue(value, myExpandvdb);
276 { doGetParmValue(idx, instance, value); }
278 { doGetParmValue(idx, instance, value); }
280 { doGetParmValue(idx, instance, value); }
282 { doGetParmValue(idx, instance, value); }
284 { doGetParmValue(idx, instance, value); }
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 template <
typename T>
305 if (idx.
size() != instance.
size()+1)
310 coerceValue(myGroup, ( ( value ) ));
313 coerceValue(myMixgrp, ( ( value ) ));
316 coerceValue(myMixmethod, clampMinValue(0, clampMaxValue(11, value ) ));
319 coerceValue(myRange, ( ( value ) ));
322 coerceValue(myBlend, ( ( value ) ));
325 coerceValue(myExpr, ( ( value ) ));
328 coerceValue(myDstpreadd, ( ( value ) ));
331 coerceValue(myDstpremul, ( ( value ) ));
334 coerceValue(mySrcpreadd, ( ( value ) ));
337 coerceValue(mySrcpremul, ( ( value ) ));
340 coerceValue(myPostadd, ( ( value ) ));
343 coerceValue(myPostmul, ( ( value ) ));
346 coerceValue(myDoclampmin, ( ( value ) ));
349 coerceValue(myClampmin, ( ( value ) ));
352 coerceValue(myDoclampmax, ( ( value ) ));
355 coerceValue(myClampmax, ( ( value ) ));
358 coerceValue(myExpandvdb, ( ( value ) ));
365 { doSetParmValue(idx, instance, value); }
367 { doSetParmValue(idx, instance, value); }
369 { doSetParmValue(idx, instance, value); }
371 { doSetParmValue(idx, instance, value); }
373 { doSetParmValue(idx, instance, value); }
375 { doSetParmValue(idx, instance, value); }
377 { doSetParmValue(idx, instance, value); }
379 { doSetParmValue(idx, instance, value); }
381 { doSetParmValue(idx, instance, value); }
383 { doSetParmValue(idx, instance, value); }
385 { doSetParmValue(idx, instance, value); }
401 if (fieldnum.
size() < 1)
446 if (fieldnum.
size() < 1)
447 return PARM_UNSUPPORTED;
486 return PARM_UNSUPPORTED;
522 loadData(is, rampdata);
540 int typelen = colon - data.
buffer();
554 {
int64 iv =
v; UTwrite(os, &iv); }
556 { UTwrite<fpreal64>(os, &
v); }
558 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
560 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
561 UTwrite<fpreal64>(os, &v.
z()); }
563 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
564 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
576 if (s) s->save(ostr);
578 saveData(os, result);
585 ostr << s->getDataTypeToken();
590 saveData(os, result);
594 void save(std::ostream &os)
const
598 saveData(os, myGroup);
599 saveData(os, myMixgrp);
600 saveData(os, myMixmethod);
601 saveData(os, myRange);
602 saveData(os, myBlend);
603 saveData(os, myExpr);
604 saveData(os, myDstpreadd);
605 saveData(os, myDstpremul);
606 saveData(os, mySrcpreadd);
607 saveData(os, mySrcpremul);
608 saveData(os, myPostadd);
609 saveData(os, myPostmul);
610 saveData(os, myDoclampmin);
611 saveData(os, myClampmin);
612 saveData(os, myDoclampmax);
613 saveData(os, myClampmax);
614 saveData(os, myExpandvdb);
627 loadData(is, myGroup);
628 loadData(is, myMixgrp);
629 loadData(is, myMixmethod);
630 loadData(is, myRange);
631 loadData(is, myBlend);
632 loadData(is, myExpr);
633 loadData(is, myDstpreadd);
634 loadData(is, myDstpremul);
635 loadData(is, mySrcpreadd);
636 loadData(is, mySrcpremul);
637 loadData(is, myPostadd);
638 loadData(is, myPostmul);
639 loadData(is, myDoclampmin);
640 loadData(is, myClampmin);
641 loadData(is, myDoclampmax);
642 loadData(is, myClampmax);
643 loadData(is, myExpandvdb);
653 if (!thissop)
return getGroup();
655 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
663 if (!thissop)
return getMixgrp();
665 OP_Utils::evalOpParm(result, thissop,
"mixgrp", cookparms.
getCookTime(), 0);
673 if (!thissop)
return getMixmethod();
675 OP_Utils::evalOpParm(result, thissop,
"mixmethod", cookparms.
getCookTime(), 0);
683 if (!thissop)
return getRange();
685 OP_Utils::evalOpParm(result, thissop,
"range", cookparms.
getCookTime(), 0);
693 if (!thissop)
return getBlend();
695 OP_Utils::evalOpParm(result, thissop,
"blend", cookparms.
getCookTime(), 0);
703 if (!thissop)
return getExpr();
705 OP_Utils::evalOpParm(result, thissop,
"expr", cookparms.
getCookTime(), 0);
713 if (!thissop)
return getDstpreadd();
715 OP_Utils::evalOpParm(result, thissop,
"dstpreadd", cookparms.
getCookTime(), 0);
723 if (!thissop)
return getDstpremul();
725 OP_Utils::evalOpParm(result, thissop,
"dstpremul", cookparms.
getCookTime(), 0);
733 if (!thissop)
return getSrcpreadd();
735 OP_Utils::evalOpParm(result, thissop,
"srcpreadd", cookparms.
getCookTime(), 0);
743 if (!thissop)
return getSrcpremul();
745 OP_Utils::evalOpParm(result, thissop,
"srcpremul", cookparms.
getCookTime(), 0);
753 if (!thissop)
return getPostadd();
755 OP_Utils::evalOpParm(result, thissop,
"postadd", cookparms.
getCookTime(), 0);
763 if (!thissop)
return getPostmul();
765 OP_Utils::evalOpParm(result, thissop,
"postmul", cookparms.
getCookTime(), 0);
773 if (!thissop)
return getDoclampmin();
775 OP_Utils::evalOpParm(result, thissop,
"doclampmin", cookparms.
getCookTime(), 0);
783 if (!thissop)
return getClampmin();
785 OP_Utils::evalOpParm(result, thissop,
"clampmin", cookparms.
getCookTime(), 0);
793 if (!thissop)
return getDoclampmax();
795 OP_Utils::evalOpParm(result, thissop,
"doclampmax", cookparms.
getCookTime(), 0);
803 if (!thissop)
return getClampmax();
805 OP_Utils::evalOpParm(result, thissop,
"clampmax", cookparms.
getCookTime(), 0);
813 if (!thissop)
return getExpandvdb();
815 OP_Utils::evalOpParm(result, thissop,
"expandvdb", cookparms.
getCookTime(), 0);
fpreal64 getDstpremul() const
static void saveData(std::ostream &os, UT_Matrix3D v)
void setMixgrp(const UT_StringHolder &val)
Mixmethod getMixmethod() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
SOP_Node * getNode() const
void setRange(UT_Vector2D val)
static void saveData(std::ostream &os, UT_StringHolder s)
void setGroup(const UT_StringHolder &val)
bool load(UT_IStream &is)
Mixmethod opMixmethod(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opClampmax(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
bool getDoclampmin() const
const char * getNestParmName(TempIndex fieldnum) const override
void setMixmethod(Mixmethod val)
fpreal64 getPostadd() const
exint bread(int32 *buffer, exint asize=1)
bool opDoclampmin(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
UT_Vector2T< fpreal64 > UT_Vector2D
GLsizei const GLfloat * value
const UT_StringHolder & getMixgrp() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void loadData(UT_IStream &is, UT_Vector2D &v)
const OP_Context & context() const
bool operator!=(const SOP_VolumeMixParms &src) const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
void setSrcpreadd(fpreal64 val)
fpreal64 opClampmin(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
void setExpandvdb(bool val)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
**But if you need a result
static void loadData(UT_IStream &is, UT_StringHolder &v)
fpreal64 opDstpremul(const SOP_NodeVerb::CookParms &cookparms) const
void setSrcpremul(fpreal64 val)
exint getNestNumParms(TempIndex idx) const override
static void saveData(std::ostream &os, fpreal64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
fpreal64 opDstpreadd(const SOP_NodeVerb::CookParms &cookparms) 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.
fpreal64 getSrcpremul() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setClampmax(fpreal64 val)
constexpr SYS_FORCE_INLINE T & x() noexcept
void setBlend(fpreal64 val)
void setClampmin(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
bool opExpandvdb(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector2D opRange(const SOP_NodeVerb::CookParms &cookparms) const
void loadFromOpSubclass(const LoadParms &loadparms) override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & x() noexcept
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void save(std::ostream &os) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void saveData(std::ostream &os, UT_Vector2D v)
bool isParmColorRamp(exint idx) const override
bool opDoclampmax(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
void copyFrom(const OP_NodeParms *src) override
fpreal64 getClampmax() const
constexpr SYS_FORCE_INLINE T & z() noexcept
fpreal64 getClampmin() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
const OP_GraphProxy * graph() const
static void saveData(std::ostream &os, UT_Vector4D v)
fpreal64 getBlend() const
void setDstpremul(fpreal64 val)
bool operator==(const SOP_VolumeMixParms &src) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
fpreal64 opBlend(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void loadData(UT_IStream &is, fpreal64 &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setDoclampmax(bool val)
void setPostadd(fpreal64 val)
fpreal64 opSrcpreadd(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector3D v)
fpreal64 getDstpreadd() const
bool getDoclampmax() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
UT_StringHolder opMixgrp(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
const UT_StringHolder & getGroup() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, bool &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
DEP_MicroNode * depnode() const
static void saveData(std::ostream &os, UT_Matrix4D v)
static void loadData(UT_IStream &is, int64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
bool getExpandvdb() const
void setDstpreadd(fpreal64 val)
constexpr SYS_FORCE_INLINE T & w() noexcept
fpreal64 opSrcpremul(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opExpr(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
virtual UT_StringHolder baseGetSignature() const
void setExpr(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
fpreal64 getPostmul() const
void setDoclampmin(bool val)
SYS_FORCE_INLINE UT_StringHolder getToken(Mixmethod enum_value)
static void saveData(std::ostream &os, int64 v)
fpreal getCookTime() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void loadData(UT_IStream &is, UT_Vector4I &v)
const char * findChar(int c) const
static void saveData(std::ostream &os, UT_Matrix2D v)
UT_Vector2D getRange() const
fpreal64 opPostmul(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
ParmType getNestParmType(TempIndex fieldnum) const override
fpreal64 getSrcpreadd() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
fpreal64 opPostadd(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setPostmul(fpreal64 val)
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
SYS_FORCE_INLINE bool isstring() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept