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;
133 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
136 graph->
evalOpParm(myMixgrp, nodeidx,
"mixgrp", time, 0);
139 graph->
evalOpParm(myMixmethod, nodeidx,
"mixmethod", time, 0);
141 if (
true && ( (
true&&!(((
int64(getMixmethod())!=9)))) ) )
142 graph->
evalOpParm(myRange, nodeidx,
"range", time, 0);
144 if (
true && ( (
true&&!(((
int64(getMixmethod())!=10)))) ) )
145 graph->
evalOpParm(myBlend, nodeidx,
"blend", time, 0);
147 if (
true && ( (
true&&!(((
int64(getMixmethod())!=11)))) ) )
148 graph->
evalOpParm(myExpr, nodeidx,
"expr", time, 0);
151 graph->
evalOpParm(myDstpreadd, nodeidx,
"dstpreadd", time, 0);
154 graph->
evalOpParm(myDstpremul, nodeidx,
"dstpremul", time, 0);
157 graph->
evalOpParm(mySrcpreadd, nodeidx,
"srcpreadd", time, 0);
160 graph->
evalOpParm(mySrcpremul, nodeidx,
"srcpremul", time, 0);
163 graph->
evalOpParm(myPostadd, nodeidx,
"postadd", time, 0);
166 graph->
evalOpParm(myPostmul, nodeidx,
"postmul", time, 0);
167 myDoclampmin =
false;
169 graph->
evalOpParm(myDoclampmin, nodeidx,
"doclampmin", time, 0);
171 if (
true && ( (
true&&!(((getDoclampmin()==0)))) ) )
172 graph->
evalOpParm(myClampmin, nodeidx,
"clampmin", time, 0);
173 myDoclampmax =
false;
175 graph->
evalOpParm(myDoclampmax, nodeidx,
"doclampmax", time, 0);
177 if (
true && ( (
true&&!(((getDoclampmax()==0)))) ) )
178 graph->
evalOpParm(myClampmax, nodeidx,
"clampmax", time, 0);
181 graph->
evalOpParm(myExpandvdb, nodeidx,
"expandvdb", time, 0);
197 template <
typename T>
204 if (idx.
size() != instance.
size()+1)
209 coerceValue(value, myGroup);
212 coerceValue(value, myMixgrp);
215 coerceValue(value, myMixmethod);
218 coerceValue(value, myRange);
221 coerceValue(value, myBlend);
224 coerceValue(value, myExpr);
227 coerceValue(value, myDstpreadd);
230 coerceValue(value, myDstpremul);
233 coerceValue(value, mySrcpreadd);
236 coerceValue(value, mySrcpremul);
239 coerceValue(value, myPostadd);
242 coerceValue(value, myPostmul);
245 coerceValue(value, myDoclampmin);
248 coerceValue(value, myClampmin);
251 coerceValue(value, myDoclampmax);
254 coerceValue(value, myClampmax);
257 coerceValue(value, myExpandvdb);
273 { doGetParmValue(idx, instance, value); }
275 { doGetParmValue(idx, instance, value); }
277 { doGetParmValue(idx, instance, value); }
279 { doGetParmValue(idx, instance, value); }
281 { doGetParmValue(idx, instance, value); }
283 { doGetParmValue(idx, instance, value); }
285 { doGetParmValue(idx, instance, value); }
287 { doGetParmValue(idx, instance, value); }
289 { doGetParmValue(idx, instance, value); }
291 { doGetParmValue(idx, instance, value); }
293 { doGetParmValue(idx, instance, value); }
295 template <
typename T>
302 if (idx.
size() != instance.
size()+1)
307 coerceValue(myGroup, ( ( value ) ));
310 coerceValue(myMixgrp, ( ( value ) ));
313 coerceValue(myMixmethod, clampMinValue(0, clampMaxValue(11, value ) ));
316 coerceValue(myRange, ( ( value ) ));
319 coerceValue(myBlend, ( ( value ) ));
322 coerceValue(myExpr, ( ( value ) ));
325 coerceValue(myDstpreadd, ( ( value ) ));
328 coerceValue(myDstpremul, ( ( value ) ));
331 coerceValue(mySrcpreadd, ( ( value ) ));
334 coerceValue(mySrcpremul, ( ( value ) ));
337 coerceValue(myPostadd, ( ( value ) ));
340 coerceValue(myPostmul, ( ( value ) ));
343 coerceValue(myDoclampmin, ( ( value ) ));
346 coerceValue(myClampmin, ( ( value ) ));
349 coerceValue(myDoclampmax, ( ( value ) ));
352 coerceValue(myClampmax, ( ( value ) ));
355 coerceValue(myExpandvdb, ( ( value ) ));
362 { doSetParmValue(idx, instance, value); }
364 { doSetParmValue(idx, instance, value); }
366 { doSetParmValue(idx, instance, value); }
368 { doSetParmValue(idx, instance, value); }
370 { doSetParmValue(idx, instance, value); }
372 { doSetParmValue(idx, instance, value); }
374 { doSetParmValue(idx, instance, value); }
376 { doSetParmValue(idx, instance, value); }
378 { doSetParmValue(idx, instance, value); }
380 { doSetParmValue(idx, instance, value); }
382 { doSetParmValue(idx, instance, value); }
398 if (fieldnum.
size() < 1)
443 if (fieldnum.
size() < 1)
444 return PARM_UNSUPPORTED;
483 return PARM_UNSUPPORTED;
519 loadData(is, rampdata);
537 int typelen = colon - data.
buffer();
551 {
int64 iv =
v; UTwrite(os, &iv); }
553 { UTwrite<fpreal64>(os, &
v); }
555 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
557 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
558 UTwrite<fpreal64>(os, &v.
z()); }
560 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
561 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
573 if (s) s->save(ostr);
575 saveData(os, result);
582 ostr << s->getDataTypeToken();
587 saveData(os, result);
591 void save(std::ostream &os)
const
595 saveData(os, myGroup);
596 saveData(os, myMixgrp);
597 saveData(os, myMixmethod);
598 saveData(os, myRange);
599 saveData(os, myBlend);
600 saveData(os, myExpr);
601 saveData(os, myDstpreadd);
602 saveData(os, myDstpremul);
603 saveData(os, mySrcpreadd);
604 saveData(os, mySrcpremul);
605 saveData(os, myPostadd);
606 saveData(os, myPostmul);
607 saveData(os, myDoclampmin);
608 saveData(os, myClampmin);
609 saveData(os, myDoclampmax);
610 saveData(os, myClampmax);
611 saveData(os, myExpandvdb);
624 loadData(is, myGroup);
625 loadData(is, myMixgrp);
626 loadData(is, myMixmethod);
627 loadData(is, myRange);
628 loadData(is, myBlend);
629 loadData(is, myExpr);
630 loadData(is, myDstpreadd);
631 loadData(is, myDstpremul);
632 loadData(is, mySrcpreadd);
633 loadData(is, mySrcpremul);
634 loadData(is, myPostadd);
635 loadData(is, myPostmul);
636 loadData(is, myDoclampmin);
637 loadData(is, myClampmin);
638 loadData(is, myDoclampmax);
639 loadData(is, myClampmax);
640 loadData(is, myExpandvdb);
650 if (!thissop)
return getGroup();
652 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
660 if (!thissop)
return getMixgrp();
662 OP_Utils::evalOpParm(result, thissop,
"mixgrp", cookparms.
getCookTime(), 0);
670 if (!thissop)
return getMixmethod();
672 OP_Utils::evalOpParm(result, thissop,
"mixmethod", cookparms.
getCookTime(), 0);
680 if (!thissop)
return getRange();
682 OP_Utils::evalOpParm(result, thissop,
"range", cookparms.
getCookTime(), 0);
690 if (!thissop)
return getBlend();
692 OP_Utils::evalOpParm(result, thissop,
"blend", cookparms.
getCookTime(), 0);
700 if (!thissop)
return getExpr();
702 OP_Utils::evalOpParm(result, thissop,
"expr", cookparms.
getCookTime(), 0);
710 if (!thissop)
return getDstpreadd();
712 OP_Utils::evalOpParm(result, thissop,
"dstpreadd", cookparms.
getCookTime(), 0);
720 if (!thissop)
return getDstpremul();
722 OP_Utils::evalOpParm(result, thissop,
"dstpremul", cookparms.
getCookTime(), 0);
730 if (!thissop)
return getSrcpreadd();
732 OP_Utils::evalOpParm(result, thissop,
"srcpreadd", cookparms.
getCookTime(), 0);
740 if (!thissop)
return getSrcpremul();
742 OP_Utils::evalOpParm(result, thissop,
"srcpremul", cookparms.
getCookTime(), 0);
750 if (!thissop)
return getPostadd();
752 OP_Utils::evalOpParm(result, thissop,
"postadd", cookparms.
getCookTime(), 0);
760 if (!thissop)
return getPostmul();
762 OP_Utils::evalOpParm(result, thissop,
"postmul", cookparms.
getCookTime(), 0);
770 if (!thissop)
return getDoclampmin();
772 OP_Utils::evalOpParm(result, thissop,
"doclampmin", cookparms.
getCookTime(), 0);
780 if (!thissop)
return getClampmin();
782 OP_Utils::evalOpParm(result, thissop,
"clampmin", cookparms.
getCookTime(), 0);
790 if (!thissop)
return getDoclampmax();
792 OP_Utils::evalOpParm(result, thissop,
"doclampmax", cookparms.
getCookTime(), 0);
800 if (!thissop)
return getClampmax();
802 OP_Utils::evalOpParm(result, thissop,
"clampmax", cookparms.
getCookTime(), 0);
810 if (!thissop)
return getExpandvdb();
812 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
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
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
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)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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