23 namespace SOP_VolumeFeatherEnums
37 using namespace UT::Literal;
59 using namespace UT::Literal;
102 if (myGroup != src.myGroup)
return false;
103 if (myDecaymode != src.myDecaymode)
return false;
104 if (myDecay != src.myDecay)
return false;
105 if (myDecayvoxel != src.myDecayvoxel)
return false;
106 if (myUnitdist != src.myUnitdist)
return false;
107 if (myUnitvoxel != src.myUnitvoxel)
return false;
108 if (myAngle != src.myAngle)
return false;
109 if (myOutside != src.myOutside)
return false;
110 if (myDetect2d != src.myDetect2d)
return false;
111 if (myBordertype != src.myBordertype)
return false;
112 if (myBorderval != src.myBorderval)
return false;
129 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
132 graph->
evalOpParm(myDecaymode, nodeidx,
"decaymode", time, 0);
134 if (
true && ( (
true&&!(((
int64(getDecaymode())!=0)))) ) )
135 graph->
evalOpParm(myDecay, nodeidx,
"decay", time, 0);
137 if (
true && ( (
true&&!(((
int64(getDecaymode())!=1)))) ) )
138 graph->
evalOpParm(myDecayvoxel, nodeidx,
"decayvoxel", time, 0);
140 if (
true && ( (
true&&!(((
int64(getDecaymode())!=2)))) ) )
141 graph->
evalOpParm(myUnitdist, nodeidx,
"unitdist", time, 0);
143 if (
true && ( (
true&&!(((
int64(getDecaymode())!=3)))) ) )
144 graph->
evalOpParm(myUnitvoxel, nodeidx,
"unitvoxel", time, 0);
146 if (
true && ( (
true&&!(((
int64(getDecaymode())!=4)))) ) )
147 graph->
evalOpParm(myAngle, nodeidx,
"angle", time, 0);
150 graph->
evalOpParm(myOutside, nodeidx,
"outside", time, 0);
153 graph->
evalOpParm(myDetect2d, nodeidx,
"detect2d", time, 0);
156 graph->
evalOpParm(myBordertype, nodeidx,
"bordertype", time, 0);
158 if (
true && ( (
true&&!(((
int64(getBordertype())==0)))) ) )
159 graph->
evalOpParm(myBorderval, nodeidx,
"borderval", time, 0);
175 template <
typename T>
182 if (idx.
size() != instance.
size()+1)
187 coerceValue(value, myGroup);
190 coerceValue(value, myDecaymode);
193 coerceValue(value, myDecay);
196 coerceValue(value, myDecayvoxel);
199 coerceValue(value, myUnitdist);
202 coerceValue(value, myUnitvoxel);
205 coerceValue(value, myAngle);
208 coerceValue(value, myOutside);
211 coerceValue(value, myDetect2d);
214 coerceValue(value, myBordertype);
217 coerceValue(value, myBorderval);
233 { doGetParmValue(idx, instance, value); }
235 { doGetParmValue(idx, instance, value); }
237 { doGetParmValue(idx, instance, value); }
239 { doGetParmValue(idx, instance, value); }
241 { doGetParmValue(idx, instance, value); }
243 { doGetParmValue(idx, instance, value); }
245 { doGetParmValue(idx, instance, value); }
247 { doGetParmValue(idx, instance, value); }
249 { doGetParmValue(idx, instance, value); }
251 { doGetParmValue(idx, instance, value); }
253 { doGetParmValue(idx, instance, value); }
255 template <
typename T>
262 if (idx.
size() != instance.
size()+1)
267 coerceValue(myGroup, ( ( value ) ));
270 coerceValue(myDecaymode, clampMinValue(0, clampMaxValue(4, value ) ));
273 coerceValue(myDecay, ( ( value ) ));
276 coerceValue(myDecayvoxel, ( ( value ) ));
279 coerceValue(myUnitdist, ( ( value ) ));
282 coerceValue(myUnitvoxel, ( ( value ) ));
285 coerceValue(myAngle, clampMinValue(0, clampMaxValue(90, value ) ));
288 coerceValue(myOutside, ( ( value ) ));
291 coerceValue(myDetect2d, ( ( value ) ));
294 coerceValue(myBordertype, clampMinValue(0, clampMaxValue(3, value ) ));
297 coerceValue(myBorderval, ( ( value ) ));
304 { doSetParmValue(idx, instance, value); }
306 { doSetParmValue(idx, instance, value); }
308 { doSetParmValue(idx, instance, value); }
310 { doSetParmValue(idx, instance, value); }
312 { doSetParmValue(idx, instance, value); }
314 { doSetParmValue(idx, instance, value); }
316 { doSetParmValue(idx, instance, value); }
318 { doSetParmValue(idx, instance, value); }
320 { doSetParmValue(idx, instance, value); }
322 { doSetParmValue(idx, instance, value); }
324 { doSetParmValue(idx, instance, value); }
340 if (fieldnum.
size() < 1)
373 if (fieldnum.
size() < 1)
374 return PARM_UNSUPPORTED;
401 return PARM_UNSUPPORTED;
437 loadData(is, rampdata);
455 int typelen = colon - data.
buffer();
469 {
int64 iv =
v; UTwrite(os, &iv); }
471 { UTwrite<fpreal64>(os, &
v); }
473 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
475 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
476 UTwrite<fpreal64>(os, &v.
z()); }
478 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
479 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
491 if (s) s->save(ostr);
493 saveData(os, result);
500 ostr << s->getDataTypeToken();
505 saveData(os, result);
509 void save(std::ostream &os)
const
513 saveData(os, myGroup);
514 saveData(os, myDecaymode);
515 saveData(os, myDecay);
516 saveData(os, myDecayvoxel);
517 saveData(os, myUnitdist);
518 saveData(os, myUnitvoxel);
519 saveData(os, myAngle);
520 saveData(os, myOutside);
521 saveData(os, myDetect2d);
522 saveData(os, myBordertype);
523 saveData(os, myBorderval);
536 loadData(is, myGroup);
537 loadData(is, myDecaymode);
538 loadData(is, myDecay);
539 loadData(is, myDecayvoxel);
540 loadData(is, myUnitdist);
541 loadData(is, myUnitvoxel);
542 loadData(is, myAngle);
543 loadData(is, myOutside);
544 loadData(is, myDetect2d);
545 loadData(is, myBordertype);
546 loadData(is, myBorderval);
556 if (!thissop)
return getGroup();
558 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
566 if (!thissop)
return getDecaymode();
568 OP_Utils::evalOpParm(result, thissop,
"decaymode", cookparms.
getCookTime(), 0);
576 if (!thissop)
return getDecay();
578 OP_Utils::evalOpParm(result, thissop,
"decay", cookparms.
getCookTime(), 0);
586 if (!thissop)
return getDecayvoxel();
588 OP_Utils::evalOpParm(result, thissop,
"decayvoxel", cookparms.
getCookTime(), 0);
596 if (!thissop)
return getUnitdist();
598 OP_Utils::evalOpParm(result, thissop,
"unitdist", cookparms.
getCookTime(), 0);
606 if (!thissop)
return getUnitvoxel();
608 OP_Utils::evalOpParm(result, thissop,
"unitvoxel", cookparms.
getCookTime(), 0);
616 if (!thissop)
return getAngle();
618 OP_Utils::evalOpParm(result, thissop,
"angle", cookparms.
getCookTime(), 0);
626 if (!thissop)
return getOutside();
628 OP_Utils::evalOpParm(result, thissop,
"outside", cookparms.
getCookTime(), 0);
636 if (!thissop)
return getDetect2d();
638 OP_Utils::evalOpParm(result, thissop,
"detect2d", cookparms.
getCookTime(), 0);
646 if (!thissop)
return getBordertype();
648 OP_Utils::evalOpParm(result, thissop,
"bordertype", cookparms.
getCookTime(), 0);
656 if (!thissop)
return getBorderval();
658 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
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
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
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
LeafData & operator=(const LeafData &)=delete
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
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
SYS_FORCE_INLINE UT_StringHolder getToken(Decaymode enum_value)
fpreal64 getAngle() const
constexpr SYS_FORCE_INLINE T & x() noexcept