23 namespace SOP_VolumeBlurEnums
56 myUsevoxelradius =
false;
64 myEnableblending =
false;
79 if (myGroup != src.myGroup)
return false;
80 if (myUsevoxelradius != src.myUsevoxelradius)
return false;
81 if (myRadius != src.myRadius)
return false;
82 if (myVoxelradius != src.myVoxelradius)
return false;
83 if (myUseopencl != src.myUseopencl)
return false;
84 if (myReduction != src.myReduction)
return false;
85 if (myPasses != src.myPasses)
return false;
86 if (myBordertype != src.myBordertype)
return false;
87 if (myBorderval != src.myBorderval)
return false;
88 if (myEnableblending != src.myEnableblending)
return false;
89 if (myBlurblend != src.myBlurblend)
return false;
90 if (myOriginalblend != src.myOriginalblend)
return false;
107 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
108 myUsevoxelradius =
false;
110 graph->
evalOpParm(myUsevoxelradius, nodeidx,
"usevoxelradius", time, 0);
112 if (
true && ( (
true&&!(((getUsevoxelradius()==1)))) ) )
113 graph->
evalOpParm(myRadius, nodeidx,
"radius", time, 0);
115 if (
true && ( (
true&&!(((getUsevoxelradius()==0)))) ) )
116 graph->
evalOpParm(myVoxelradius, nodeidx,
"voxelradius", time, 0);
119 graph->
evalOpParm(myUseopencl, nodeidx,
"useopencl", time, 0);
122 graph->
evalOpParm(myReduction, nodeidx,
"reduction", time, 0);
125 graph->
evalOpParm(myPasses, nodeidx,
"passes", time, 0);
128 graph->
evalOpParm(myBordertype, nodeidx,
"bordertype", time, 0);
130 if (
true && ( (
true&&!(((
int64(getBordertype())==0)))) ) )
131 graph->
evalOpParm(myBorderval, nodeidx,
"borderval", time, 0);
132 myEnableblending =
false;
134 graph->
evalOpParm(myEnableblending, nodeidx,
"enableblending", time, 0);
136 if (
true && ( (
true&&!(((getEnableblending()==0)))) ) )
137 graph->
evalOpParm(myBlurblend, nodeidx,
"blurblend", time, 0);
139 if (
true && ( (
true&&!(((getEnableblending()==0)))) ) )
140 graph->
evalOpParm(myOriginalblend, nodeidx,
"originalblend", time, 0);
156 template <
typename T>
163 if (idx.
size() != instance.
size()+1)
217 { doGetParmValue(idx, instance, value); }
219 { doGetParmValue(idx, instance, value); }
221 { doGetParmValue(idx, instance, value); }
223 { doGetParmValue(idx, instance, value); }
225 { doGetParmValue(idx, instance, value); }
227 { doGetParmValue(idx, instance, value); }
229 { doGetParmValue(idx, instance, value); }
231 { doGetParmValue(idx, instance, value); }
233 { doGetParmValue(idx, instance, value); }
235 { doGetParmValue(idx, instance, value); }
237 { doGetParmValue(idx, instance, value); }
239 template <
typename T>
246 if (idx.
size() != instance.
size()+1)
291 { doSetParmValue(idx, instance, value); }
293 { doSetParmValue(idx, instance, value); }
295 { doSetParmValue(idx, instance, value); }
297 { doSetParmValue(idx, instance, value); }
299 { doSetParmValue(idx, instance, value); }
301 { doSetParmValue(idx, instance, value); }
303 { doSetParmValue(idx, instance, value); }
305 { doSetParmValue(idx, instance, value); }
307 { doSetParmValue(idx, instance, value); }
309 { doSetParmValue(idx, instance, value); }
311 { doSetParmValue(idx, instance, value); }
327 if (fieldnum.
size() < 1)
334 return "usevoxelradius";
338 return "voxelradius";
350 return "enableblending";
354 return "originalblend";
362 if (fieldnum.
size() < 1)
363 return PARM_UNSUPPORTED;
411 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
413 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
415 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
428 loadData(is, rampdata);
446 int typelen = colon - data.
buffer();
460 {
int64 iv =
v; UTwrite(os, &iv); }
462 { UTwrite<fpreal64>(os, &
v); }
464 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
466 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
467 UTwrite<fpreal64>(os, &v.
z()); }
469 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
470 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
482 if (s) s->save(ostr);
484 saveData(os, result);
491 ostr << s->getDataTypeToken();
496 saveData(os, result);
500 void save(std::ostream &os)
const
504 saveData(os, myGroup);
505 saveData(os, myUsevoxelradius);
506 saveData(os, myRadius);
507 saveData(os, myVoxelradius);
508 saveData(os, myUseopencl);
509 saveData(os, myReduction);
510 saveData(os, myPasses);
511 saveData(os, myBordertype);
512 saveData(os, myBorderval);
513 saveData(os, myEnableblending);
514 saveData(os, myBlurblend);
515 saveData(os, myOriginalblend);
528 loadData(is, myGroup);
529 loadData(is, myUsevoxelradius);
530 loadData(is, myRadius);
531 loadData(is, myVoxelradius);
532 loadData(is, myUseopencl);
533 loadData(is, myReduction);
534 loadData(is, myPasses);
535 loadData(is, myBordertype);
536 loadData(is, myBorderval);
537 loadData(is, myEnableblending);
538 loadData(is, myBlurblend);
539 loadData(is, myOriginalblend);
549 if (!thissop)
return getGroup();
551 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
559 if (!thissop)
return getUsevoxelradius();
561 OP_Utils::evalOpParm(result, thissop,
"usevoxelradius", cookparms.
getCookTime(), 0);
569 if (!thissop)
return getRadius();
571 OP_Utils::evalOpParm(result, thissop,
"radius", cookparms.
getCookTime(), 0);
579 if (!thissop)
return getVoxelradius();
581 OP_Utils::evalOpParm(result, thissop,
"voxelradius", cookparms.
getCookTime(), 0);
589 if (!thissop)
return getUseopencl();
591 OP_Utils::evalOpParm(result, thissop,
"useopencl", cookparms.
getCookTime(), 0);
599 if (!thissop)
return getReduction();
601 OP_Utils::evalOpParm(result, thissop,
"reduction", cookparms.
getCookTime(), 0);
609 if (!thissop)
return getPasses();
611 OP_Utils::evalOpParm(result, thissop,
"passes", cookparms.
getCookTime(), 0);
619 if (!thissop)
return getBordertype();
621 OP_Utils::evalOpParm(result, thissop,
"bordertype", cookparms.
getCookTime(), 0);
629 if (!thissop)
return getBorderval();
631 OP_Utils::evalOpParm(result, thissop,
"borderval", cookparms.
getCookTime(), 0);
639 if (!thissop)
return getEnableblending();
641 OP_Utils::evalOpParm(result, thissop,
"enableblending", cookparms.
getCookTime(), 0);
649 if (!thissop)
return getBlurblend();
651 OP_Utils::evalOpParm(result, thissop,
"blurblend", cookparms.
getCookTime(), 0);
659 if (!thissop)
return getOriginalblend();
661 OP_Utils::evalOpParm(result, thissop,
"originalblend", cookparms.
getCookTime(), 0);
667 bool myUsevoxelradius;
675 bool myEnableblending;
static void saveData(std::ostream &os, UT_StringHolder s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setUsevoxelradius(bool val)
void save(std::ostream &os) const
SOP_Node * getNode() const
static void loadData(UT_IStream &is, int64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
T clampMaxValue(fpreal maxvalue, const T &src) const
Reduction getReduction() const
UT_Vector3D getVoxelradius() const
void copyFrom(const OP_NodeParms *src) override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
UT_Vector3D opVoxelradius(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
fpreal64 getOriginalblend() const
bool opUsevoxelradius(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getRadius() const
bool opEnableblending(const SOP_NodeVerb::CookParms &cookparms) const
bool operator!=(const SOP_VolumeBlurParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
const OP_Context & context() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
void setPasses(int64 val)
An output stream object that owns its own string buffer storage.
bool operator==(const SOP_VolumeBlurParms &src) const
bool load(UT_IStream &is)
static void saveData(std::ostream &os, UT_Vector2D v)
**But if you need a result
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
fpreal64 opBorderval(const SOP_NodeVerb::CookParms &cookparms) const
T clampMinValue(fpreal minvalue, const T &src) const
fpreal64 opOriginalblend(const SOP_NodeVerb::CookParms &cookparms) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void saveData(std::ostream &os, UT_Matrix2D v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
bool opUseopencl(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
const char * getNestParmName(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setUseopencl(bool val)
static void loadData(UT_IStream &is, UT_Vector2I &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
exint getNestNumParms(TempIndex idx) const override
void setReduction(Reduction val)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void setRadius(fpreal64 val)
void setVoxelradius(UT_Vector3D val)
void setBlurblend(fpreal64 val)
fpreal64 getBlurblend() const
void setBorderval(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
fpreal64 opRadius(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
fpreal64 getBorderval() const
constexpr SYS_FORCE_INLINE T & z() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
int64 opPasses(const SOP_NodeVerb::CookParms &cookparms) const
const OP_GraphProxy * graph() const
static void saveData(std::ostream &os, UT_Vector3D v)
static void loadData(UT_IStream &is, bool &v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void saveData(std::ostream &os, UT_Matrix4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
UT_Vector3T< fpreal64 > UT_Vector3D
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
fpreal64 opBlurblend(const SOP_NodeVerb::CookParms &cookparms) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
ParmType getNestParmType(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
static void saveData(std::ostream &os, UT_Vector4D v)
static void saveData(std::ostream &os, fpreal64 v)
GT_API const UT_StringHolder version
void setGroup(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Matrix3D v)
bool getUseopencl() const
bool getEnableblending() const
static void loadData(UT_IStream &is, UT_Vector4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void coerceValue(T &result, const S &src) const
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setEnableblending(bool val)
void loadFromOpSubclass(const LoadParms &loadparms) override
DEP_MicroNode * depnode() const
Bordertype opBordertype(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
Utility class for containing a color ramp.
bool getUsevoxelradius() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
Reduction opReduction(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & w() noexcept
void setOriginalblend(fpreal64 val)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
fpreal getCookTime() const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void saveData(std::ostream &os, int64 v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
const char * findChar(int c) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setBordertype(Bordertype val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, UT_StringHolder &v)
const UT_StringHolder & getGroup() const
bool isParmColorRamp(exint idx) const override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
OP_NodeParms & operator=(const OP_NodeParms &)=default
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept
Bordertype getBordertype() const