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;
132 graph->
evalOpParm(myGroup, nodeidx,
"group", time, graph->
isDirect()?
nullptr:depnode);
135 graph->
evalOpParm(myDecaymode, nodeidx,
"decaymode", time, graph->
isDirect()?
nullptr:depnode);
137 if (
true && ( (
true&&!(((
int64(getDecaymode())!=0)))) ) )
138 graph->
evalOpParm(myDecay, nodeidx,
"decay", time, graph->
isDirect()?
nullptr:depnode);
140 if (
true && ( (
true&&!(((
int64(getDecaymode())!=1)))) ) )
141 graph->
evalOpParm(myDecayvoxel, nodeidx,
"decayvoxel", time, graph->
isDirect()?
nullptr:depnode);
143 if (
true && ( (
true&&!(((
int64(getDecaymode())!=2)))) ) )
144 graph->
evalOpParm(myUnitdist, nodeidx,
"unitdist", time, graph->
isDirect()?
nullptr:depnode);
146 if (
true && ( (
true&&!(((
int64(getDecaymode())!=3)))) ) )
147 graph->
evalOpParm(myUnitvoxel, nodeidx,
"unitvoxel", time, graph->
isDirect()?
nullptr:depnode);
149 if (
true && ( (
true&&!(((
int64(getDecaymode())!=4)))) ) )
150 graph->
evalOpParm(myAngle, nodeidx,
"angle", time, graph->
isDirect()?
nullptr:depnode);
153 graph->
evalOpParm(myOutside, nodeidx,
"outside", time, graph->
isDirect()?
nullptr:depnode);
156 graph->
evalOpParm(myDetect2d, nodeidx,
"detect2d", time, graph->
isDirect()?
nullptr:depnode);
159 graph->
evalOpParm(myBordertype, nodeidx,
"bordertype", time, graph->
isDirect()?
nullptr:depnode);
161 if (
true && ( (
true&&!(((
int64(getBordertype())==0)))) ) )
162 graph->
evalOpParm(myBorderval, nodeidx,
"borderval", time, graph->
isDirect()?
nullptr:depnode);
178 template <
typename T>
185 if (idx.
size() != instance.
size()+1)
190 coerceValue(value, myGroup);
193 coerceValue(value, myDecaymode);
196 coerceValue(value, myDecay);
199 coerceValue(value, myDecayvoxel);
202 coerceValue(value, myUnitdist);
205 coerceValue(value, myUnitvoxel);
208 coerceValue(value, myAngle);
211 coerceValue(value, myOutside);
214 coerceValue(value, myDetect2d);
217 coerceValue(value, myBordertype);
220 coerceValue(value, myBorderval);
236 { doGetParmValue(idx, instance, value); }
238 { doGetParmValue(idx, instance, value); }
240 { doGetParmValue(idx, instance, value); }
242 { doGetParmValue(idx, instance, value); }
244 { doGetParmValue(idx, instance, value); }
246 { doGetParmValue(idx, instance, value); }
248 { doGetParmValue(idx, instance, value); }
250 { doGetParmValue(idx, instance, value); }
252 { doGetParmValue(idx, instance, value); }
254 { doGetParmValue(idx, instance, value); }
256 { doGetParmValue(idx, instance, value); }
258 template <
typename T>
265 if (idx.
size() != instance.
size()+1)
270 coerceValue(myGroup, ( ( value ) ));
273 coerceValue(myDecaymode, clampMinValue(0, clampMaxValue(4, value ) ));
276 coerceValue(myDecay, ( ( value ) ));
279 coerceValue(myDecayvoxel, ( ( value ) ));
282 coerceValue(myUnitdist, ( ( value ) ));
285 coerceValue(myUnitvoxel, ( ( value ) ));
288 coerceValue(myAngle, clampMinValue(0, clampMaxValue(90, value ) ));
291 coerceValue(myOutside, ( ( value ) ));
294 coerceValue(myDetect2d, ( ( value ) ));
297 coerceValue(myBordertype, clampMinValue(0, clampMaxValue(3, value ) ));
300 coerceValue(myBorderval, ( ( value ) ));
307 { doSetParmValue(idx, instance, value); }
309 { doSetParmValue(idx, instance, value); }
311 { doSetParmValue(idx, instance, value); }
313 { doSetParmValue(idx, instance, value); }
315 { doSetParmValue(idx, instance, value); }
317 { doSetParmValue(idx, instance, value); }
319 { doSetParmValue(idx, instance, value); }
321 { doSetParmValue(idx, instance, value); }
323 { doSetParmValue(idx, instance, value); }
325 { doSetParmValue(idx, instance, value); }
327 { doSetParmValue(idx, instance, value); }
343 if (fieldnum.
size() < 1)
376 if (fieldnum.
size() < 1)
377 return PARM_UNSUPPORTED;
404 return PARM_UNSUPPORTED;
440 loadData(is, rampdata);
458 int typelen = colon - data.
buffer();
472 {
int64 iv =
v; UTwrite(os, &iv); }
474 { UTwrite<fpreal64>(os, &
v); }
476 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
478 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
479 UTwrite<fpreal64>(os, &v.
z()); }
481 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
482 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
494 if (s) s->save(ostr);
496 saveData(os, result);
503 ostr << s->getDataTypeToken();
508 saveData(os, result);
512 void save(std::ostream &os)
const
516 saveData(os, myGroup);
517 saveData(os, myDecaymode);
518 saveData(os, myDecay);
519 saveData(os, myDecayvoxel);
520 saveData(os, myUnitdist);
521 saveData(os, myUnitvoxel);
522 saveData(os, myAngle);
523 saveData(os, myOutside);
524 saveData(os, myDetect2d);
525 saveData(os, myBordertype);
526 saveData(os, myBorderval);
539 loadData(is, myGroup);
540 loadData(is, myDecaymode);
541 loadData(is, myDecay);
542 loadData(is, myDecayvoxel);
543 loadData(is, myUnitdist);
544 loadData(is, myUnitvoxel);
545 loadData(is, myAngle);
546 loadData(is, myOutside);
547 loadData(is, myDetect2d);
548 loadData(is, myBordertype);
549 loadData(is, myBorderval);
559 if (!thissop)
return getGroup();
561 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
569 if (!thissop)
return getDecaymode();
571 OP_Utils::evalOpParm(result, thissop,
"decaymode", cookparms.
getCookTime(), 0);
579 if (!thissop)
return getDecay();
581 OP_Utils::evalOpParm(result, thissop,
"decay", cookparms.
getCookTime(), 0);
589 if (!thissop)
return getDecayvoxel();
591 OP_Utils::evalOpParm(result, thissop,
"decayvoxel", cookparms.
getCookTime(), 0);
599 if (!thissop)
return getUnitdist();
601 OP_Utils::evalOpParm(result, thissop,
"unitdist", cookparms.
getCookTime(), 0);
609 if (!thissop)
return getUnitvoxel();
611 OP_Utils::evalOpParm(result, thissop,
"unitvoxel", cookparms.
getCookTime(), 0);
619 if (!thissop)
return getAngle();
621 OP_Utils::evalOpParm(result, thissop,
"angle", cookparms.
getCookTime(), 0);
629 if (!thissop)
return getOutside();
631 OP_Utils::evalOpParm(result, thissop,
"outside", cookparms.
getCookTime(), 0);
639 if (!thissop)
return getDetect2d();
641 OP_Utils::evalOpParm(result, thissop,
"detect2d", cookparms.
getCookTime(), 0);
649 if (!thissop)
return getBordertype();
651 OP_Utils::evalOpParm(result, thissop,
"bordertype", cookparms.
getCookTime(), 0);
659 if (!thissop)
return getBorderval();
661 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
GLsizei const GLfloat * value
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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
virtual UT_StringHolder baseGetSignature() const
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)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
Decaymode opDecaymode(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
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