23 namespace SOP_VolumeFeatherEnums
73 if (myGroup != src.myGroup)
return false;
74 if (myDecaymode != src.myDecaymode)
return false;
75 if (myDecay != src.myDecay)
return false;
76 if (myDecayvoxel != src.myDecayvoxel)
return false;
77 if (myUnitdist != src.myUnitdist)
return false;
78 if (myUnitvoxel != src.myUnitvoxel)
return false;
79 if (myAngle != src.myAngle)
return false;
80 if (myOutside != src.myOutside)
return false;
81 if (myDetect2d != src.myDetect2d)
return false;
82 if (myBordertype != src.myBordertype)
return false;
83 if (myBorderval != src.myBorderval)
return false;
100 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
103 graph->
evalOpParm(myDecaymode, nodeidx,
"decaymode", time, 0);
105 if (
true && ( (
true&&!(((
int64(getDecaymode())!=0)))) ) )
106 graph->
evalOpParm(myDecay, nodeidx,
"decay", time, 0);
108 if (
true && ( (
true&&!(((
int64(getDecaymode())!=1)))) ) )
109 graph->
evalOpParm(myDecayvoxel, nodeidx,
"decayvoxel", time, 0);
111 if (
true && ( (
true&&!(((
int64(getDecaymode())!=2)))) ) )
112 graph->
evalOpParm(myUnitdist, nodeidx,
"unitdist", time, 0);
114 if (
true && ( (
true&&!(((
int64(getDecaymode())!=3)))) ) )
115 graph->
evalOpParm(myUnitvoxel, nodeidx,
"unitvoxel", time, 0);
117 if (
true && ( (
true&&!(((
int64(getDecaymode())!=4)))) ) )
118 graph->
evalOpParm(myAngle, nodeidx,
"angle", time, 0);
121 graph->
evalOpParm(myOutside, nodeidx,
"outside", time, 0);
124 graph->
evalOpParm(myDetect2d, nodeidx,
"detect2d", time, 0);
127 graph->
evalOpParm(myBordertype, nodeidx,
"bordertype", time, 0);
129 if (
true && ( (
true&&!(((
int64(getBordertype())==0)))) ) )
130 graph->
evalOpParm(myBorderval, nodeidx,
"borderval", time, 0);
146 template <
typename T>
153 if (idx.
size() != instance.
size()+1)
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 { doGetParmValue(idx, instance, value); }
218 { doGetParmValue(idx, instance, value); }
220 { doGetParmValue(idx, instance, value); }
222 { doGetParmValue(idx, instance, value); }
224 { doGetParmValue(idx, instance, value); }
226 template <
typename T>
233 if (idx.
size() != instance.
size()+1)
275 { doSetParmValue(idx, instance, value); }
277 { doSetParmValue(idx, instance, value); }
279 { doSetParmValue(idx, instance, value); }
281 { doSetParmValue(idx, instance, value); }
283 { doSetParmValue(idx, instance, value); }
285 { doSetParmValue(idx, instance, value); }
287 { doSetParmValue(idx, instance, value); }
289 { doSetParmValue(idx, instance, value); }
291 { doSetParmValue(idx, instance, value); }
293 { doSetParmValue(idx, instance, value); }
295 { doSetParmValue(idx, instance, value); }
311 if (fieldnum.
size() < 1)
344 if (fieldnum.
size() < 1)
345 return PARM_UNSUPPORTED;
391 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
393 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
395 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
408 loadData(is, rampdata);
426 int typelen = colon - data.
buffer();
440 {
int64 iv =
v; UTwrite(os, &iv); }
442 { UTwrite<fpreal64>(os, &
v); }
444 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
446 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
447 UTwrite<fpreal64>(os, &v.
z()); }
449 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
450 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
462 if (s) s->save(ostr);
464 saveData(os, result);
471 ostr << s->getDataTypeToken();
476 saveData(os, result);
480 void save(std::ostream &os)
const
484 saveData(os, myGroup);
485 saveData(os, myDecaymode);
486 saveData(os, myDecay);
487 saveData(os, myDecayvoxel);
488 saveData(os, myUnitdist);
489 saveData(os, myUnitvoxel);
490 saveData(os, myAngle);
491 saveData(os, myOutside);
492 saveData(os, myDetect2d);
493 saveData(os, myBordertype);
494 saveData(os, myBorderval);
507 loadData(is, myGroup);
508 loadData(is, myDecaymode);
509 loadData(is, myDecay);
510 loadData(is, myDecayvoxel);
511 loadData(is, myUnitdist);
512 loadData(is, myUnitvoxel);
513 loadData(is, myAngle);
514 loadData(is, myOutside);
515 loadData(is, myDetect2d);
516 loadData(is, myBordertype);
517 loadData(is, myBorderval);
527 if (!thissop)
return getGroup();
529 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
537 if (!thissop)
return getDecaymode();
539 OP_Utils::evalOpParm(result, thissop,
"decaymode", cookparms.
getCookTime(), 0);
547 if (!thissop)
return getDecay();
549 OP_Utils::evalOpParm(result, thissop,
"decay", cookparms.
getCookTime(), 0);
557 if (!thissop)
return getDecayvoxel();
559 OP_Utils::evalOpParm(result, thissop,
"decayvoxel", cookparms.
getCookTime(), 0);
567 if (!thissop)
return getUnitdist();
569 OP_Utils::evalOpParm(result, thissop,
"unitdist", cookparms.
getCookTime(), 0);
577 if (!thissop)
return getUnitvoxel();
579 OP_Utils::evalOpParm(result, thissop,
"unitvoxel", cookparms.
getCookTime(), 0);
587 if (!thissop)
return getAngle();
589 OP_Utils::evalOpParm(result, thissop,
"angle", cookparms.
getCookTime(), 0);
597 if (!thissop)
return getOutside();
599 OP_Utils::evalOpParm(result, thissop,
"outside", cookparms.
getCookTime(), 0);
607 if (!thissop)
return getDetect2d();
609 OP_Utils::evalOpParm(result, thissop,
"detect2d", cookparms.
getCookTime(), 0);
617 if (!thissop)
return getBordertype();
619 OP_Utils::evalOpParm(result, thissop,
"bordertype", cookparms.
getCookTime(), 0);
627 if (!thissop)
return getBorderval();
629 OP_Utils::evalOpParm(result, thissop,
"borderval", cookparms.
getCookTime(), 0);
static void saveData(std::ostream &os, UT_Vector2D v)
static void saveData(std::ostream &os, bool v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opUnitdist(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opUnitvoxel(const SOP_NodeVerb::CookParms &cookparms) const
SOP_Node * getNode() const
bool operator!=(const SOP_VolumeFeatherParms &src) const
static void saveData(std::ostream &os, UT_Matrix2D v)
void copyFrom(const OP_NodeParms *src) override
fpreal64 getDecay() const
T clampMaxValue(fpreal maxvalue, const T &src) const
exint bread(int32 *buffer, exint asize=1)
void setUnitdist(fpreal64 val)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
ParmType getNestParmType(TempIndex fieldnum) const override
void loadFromOpSubclass(const LoadParms &loadparms) override
static void loadData(UT_IStream &is, UT_Vector3D &v)
const OP_Context & context() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
fpreal64 opDecay(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
fpreal64 opBorderval(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector4D v)
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
**But if you need a result
T clampMinValue(fpreal minvalue, const T &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void loadData(UT_IStream &is, fpreal64 &v)
void setUnitvoxel(fpreal64 val)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void loadData(UT_IStream &is, bool &v)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void save(std::ostream &os) const
fpreal64 getDecayvoxel() const
static void saveData(std::ostream &os, UT_Matrix4D v)
static void saveData(std::ostream &os, UT_StringHolder s)
constexpr SYS_FORCE_INLINE T & x() noexcept
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
bool isParmColorRamp(exint idx) const override
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void saveData(std::ostream &os, UT_Vector3D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
bool operator==(const SOP_VolumeFeatherParms &src) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void setDetect2d(bool val)
fpreal64 getUnitvoxel() const
bool opOutside(const SOP_NodeVerb::CookParms &cookparms) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
Bordertype getBordertype() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
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
void setBordertype(Bordertype val)
const OP_GraphProxy * graph() const
void setDecay(fpreal64 val)
static void saveData(std::ostream &os, int64 v)
fpreal64 opAngle(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void saveData(std::ostream &os, fpreal64 v)
fpreal64 getBorderval() const
exint getNestNumParms(TempIndex idx) const override
void setAngle(fpreal64 val)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
const char * getNestParmName(TempIndex fieldnum) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
bool opDetect2d(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
const UT_StringHolder & getGroup() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void coerceValue(T &result, const S &src) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
fpreal64 opDecayvoxel(const SOP_NodeVerb::CookParms &cookparms) const
DEP_MicroNode * depnode() const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
Utility class for containing a color ramp.
void setOutside(bool val)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setDecaymode(Decaymode val)
constexpr SYS_FORCE_INLINE T & w() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, int64 &v)
fpreal64 getUnitdist() const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
fpreal getCookTime() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
Bordertype opBordertype(const SOP_NodeVerb::CookParms &cookparms) const
const char * findChar(int c) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void saveData(std::ostream &os, UT_Matrix3D v)
Decaymode getDecaymode() const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setDecayvoxel(fpreal64 val)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setGroup(const UT_StringHolder &val)
void setBorderval(fpreal64 val)
static void loadData(UT_IStream &is, UT_Vector4D &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
bool load(UT_IStream &is)
Decaymode opDecaymode(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
fpreal64 getAngle() const
constexpr SYS_FORCE_INLINE T & x() noexcept