23 namespace SOP_FeatherAttribInterpolateEnums
34 using namespace UT::Literal;
53 myBarbattribs =
"P_barbl P_barbr uv_barbl uv_barbr"_UTsh;
54 myIdentifierattrib =
"templatenames"_UTsh;
55 myWeightsattrib =
"templateweights"_UTsh;
56 myBlendattrib =
"blendattrib"_UTsh;
59 myUseshaftbasesegsattrib =
false;
60 myShaftbasesegsattrib =
"shaft_base_segs"_UTsh;
76 if (myGroup != src.myGroup)
return false;
77 if (myBarbattribs != src.myBarbattribs)
return false;
78 if (myIdentifierattrib != src.myIdentifierattrib)
return false;
79 if (myWeightsattrib != src.myWeightsattrib)
return false;
80 if (myBlendattrib != src.myBlendattrib)
return false;
81 if (myShaftsubd != src.myShaftsubd)
return false;
82 if (myShaftbasesegs != src.myShaftbasesegs)
return false;
83 if (myUseshaftbasesegsattrib != src.myUseshaftbasesegsattrib)
return false;
84 if (myShaftbasesegsattrib != src.myShaftbasesegsattrib)
return false;
85 if (myBarbsegmode != src.myBarbsegmode)
return false;
86 if (myBarbsegs != src.myBarbsegs)
return false;
87 if (myBarbmirror != src.myBarbmirror)
return false;
103 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
104 myBarbattribs =
"P_barbl P_barbr uv_barbl uv_barbr"_UTsh;
106 graph->
evalOpParm(myBarbattribs, nodeidx,
"barbattribs", time, 0);
107 myIdentifierattrib =
"templatenames"_UTsh;
109 graph->
evalOpParm(myIdentifierattrib, nodeidx,
"identifierattrib", time, 0);
110 myWeightsattrib =
"templateweights"_UTsh;
112 graph->
evalOpParm(myWeightsattrib, nodeidx,
"weightsattrib", time, 0);
113 myBlendattrib =
"blendattrib"_UTsh;
115 graph->
evalOpParm(myBlendattrib, nodeidx,
"blendattrib", time, 0);
118 graph->
evalOpParm(myShaftsubd, nodeidx,
"shaftsubd", time, 0);
121 graph->
evalOpParm(myShaftbasesegs, nodeidx,
"shaftbasesegs", time, 0);
122 myUseshaftbasesegsattrib =
false;
124 graph->
evalOpParm(myUseshaftbasesegsattrib, nodeidx,
"useshaftbasesegsattrib", time, 0);
125 myShaftbasesegsattrib =
"shaft_base_segs"_UTsh;
126 if (
true && ( (
true&&!(((getUseshaftbasesegsattrib()==0)))) ) )
127 graph->
evalOpParm(myShaftbasesegsattrib, nodeidx,
"shaftbasesegsattrib", time, 0);
130 graph->
evalOpParm(myBarbsegmode, nodeidx,
"barbsegmode", time, 0);
132 if (
true && ( (
true&&!(((
int64(getBarbsegmode())!=0)))) ) )
133 graph->
evalOpParm(myBarbsegs, nodeidx,
"barbsegs", time, 0);
136 graph->
evalOpParm(myBarbmirror, nodeidx,
"barbmirror", time, 0);
152 template <
typename T>
159 if (idx.
size() != instance.
size()+1)
164 coerceValue(value, myGroup);
167 coerceValue(value, myBarbattribs);
170 coerceValue(value, myIdentifierattrib);
173 coerceValue(value, myWeightsattrib);
176 coerceValue(value, myBlendattrib);
179 coerceValue(value, myShaftsubd);
182 coerceValue(value, myShaftbasesegs);
185 coerceValue(value, myUseshaftbasesegsattrib);
188 coerceValue(value, myShaftbasesegsattrib);
191 coerceValue(value, myBarbsegmode);
194 coerceValue(value, myBarbsegs);
197 coerceValue(value, myBarbmirror);
213 { doGetParmValue(idx, instance, value); }
215 { doGetParmValue(idx, instance, value); }
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 template <
typename T>
242 if (idx.
size() != instance.
size()+1)
247 coerceValue(myGroup, ( ( value ) ));
250 coerceValue(myBarbattribs, ( ( value ) ));
253 coerceValue(myIdentifierattrib, ( ( value ) ));
256 coerceValue(myWeightsattrib, ( ( value ) ));
259 coerceValue(myBlendattrib, ( ( value ) ));
262 coerceValue(myShaftsubd, ( ( value ) ));
265 coerceValue(myShaftbasesegs, ( ( value ) ));
268 coerceValue(myUseshaftbasesegsattrib, ( ( value ) ));
271 coerceValue(myShaftbasesegsattrib, ( ( value ) ));
274 coerceValue(myBarbsegmode, clampMinValue(0, clampMaxValue(1, value ) ));
277 coerceValue(myBarbsegs, clampMinValue(1, ( value ) ));
280 coerceValue(myBarbmirror, ( ( 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); }
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); }
323 if (fieldnum.
size() < 1)
330 return "barbattribs";
332 return "identifierattrib";
334 return "weightsattrib";
336 return "blendattrib";
340 return "shaftbasesegs";
342 return "useshaftbasesegsattrib";
344 return "shaftbasesegsattrib";
346 return "barbsegmode";
358 if (fieldnum.
size() < 1)
359 return PARM_UNSUPPORTED;
388 return PARM_UNSUPPORTED;
424 loadData(is, rampdata);
442 int typelen = colon - data.
buffer();
456 {
int64 iv =
v; UTwrite(os, &iv); }
458 { UTwrite<fpreal64>(os, &
v); }
460 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
462 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
463 UTwrite<fpreal64>(os, &v.
z()); }
465 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
466 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
478 if (s) s->save(ostr);
480 saveData(os, result);
487 ostr << s->getDataTypeToken();
492 saveData(os, result);
496 void save(std::ostream &os)
const
500 saveData(os, myGroup);
501 saveData(os, myBarbattribs);
502 saveData(os, myIdentifierattrib);
503 saveData(os, myWeightsattrib);
504 saveData(os, myBlendattrib);
505 saveData(os, myShaftsubd);
506 saveData(os, myShaftbasesegs);
507 saveData(os, myUseshaftbasesegsattrib);
508 saveData(os, myShaftbasesegsattrib);
509 saveData(os, myBarbsegmode);
510 saveData(os, myBarbsegs);
511 saveData(os, myBarbmirror);
524 loadData(is, myGroup);
525 loadData(is, myBarbattribs);
526 loadData(is, myIdentifierattrib);
527 loadData(is, myWeightsattrib);
528 loadData(is, myBlendattrib);
529 loadData(is, myShaftsubd);
530 loadData(is, myShaftbasesegs);
531 loadData(is, myUseshaftbasesegsattrib);
532 loadData(is, myShaftbasesegsattrib);
533 loadData(is, myBarbsegmode);
534 loadData(is, myBarbsegs);
535 loadData(is, myBarbmirror);
545 if (!thissop)
return getGroup();
547 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
555 if (!thissop)
return getBarbattribs();
557 OP_Utils::evalOpParm(result, thissop,
"barbattribs", cookparms.
getCookTime(), 0);
565 if (!thissop)
return getIdentifierattrib();
567 OP_Utils::evalOpParm(result, thissop,
"identifierattrib", cookparms.
getCookTime(), 0);
575 if (!thissop)
return getWeightsattrib();
577 OP_Utils::evalOpParm(result, thissop,
"weightsattrib", cookparms.
getCookTime(), 0);
585 if (!thissop)
return getBlendattrib();
587 OP_Utils::evalOpParm(result, thissop,
"blendattrib", cookparms.
getCookTime(), 0);
595 if (!thissop)
return getShaftsubd();
597 OP_Utils::evalOpParm(result, thissop,
"shaftsubd", cookparms.
getCookTime(), 0);
605 if (!thissop)
return getShaftbasesegs();
607 OP_Utils::evalOpParm(result, thissop,
"shaftbasesegs", cookparms.
getCookTime(), 0);
615 if (!thissop)
return getUseshaftbasesegsattrib();
617 OP_Utils::evalOpParm(result, thissop,
"useshaftbasesegsattrib", cookparms.
getCookTime(), 0);
625 if (!thissop)
return getShaftbasesegsattrib();
627 OP_Utils::evalOpParm(result, thissop,
"shaftbasesegsattrib", cookparms.
getCookTime(), 0);
635 if (!thissop)
return getBarbsegmode();
637 OP_Utils::evalOpParm(result, thissop,
"barbsegmode", cookparms.
getCookTime(), 0);
645 if (!thissop)
return getBarbsegs();
647 OP_Utils::evalOpParm(result, thissop,
"barbsegs", cookparms.
getCookTime(), 0);
655 if (!thissop)
return getBarbmirror();
657 OP_Utils::evalOpParm(result, thissop,
"barbmirror", cookparms.
getCookTime(), 0);
668 int64 myShaftbasesegs;
669 bool myUseshaftbasesegsattrib;
static void loadData(UT_IStream &is, UT_Vector3I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
SOP_Node * getNode() const
UT_StringHolder opWeightsattrib(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void saveData(std::ostream &os, UT_Vector2D v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
bool operator!=(const SOP_FeatherAttribInterpolateParms &src) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
bool opBarbmirror(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, int64 &v)
static void saveData(std::ostream &os, fpreal64 v)
void save(std::ostream &os) const
static void saveData(std::ostream &os, UT_StringHolder s)
const OP_Context & context() const
void setBarbsegs(int64 val)
void loadFromOpSubclass(const LoadParms &loadparms) override
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
const UT_StringHolder & getWeightsattrib() const
bool load(UT_IStream &is)
void setBarbattribs(const UT_StringHolder &val)
UT_StringHolder opBlendattrib(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
int64 opShaftbasesegs(const SOP_NodeVerb::CookParms &cookparms) const
void setIdentifierattrib(const UT_StringHolder &val)
**But if you need a result
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
SYS_FORCE_INLINE UT_StringHolder getToken(Barbsegmode enum_value)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void saveData(std::ostream &os, UT_Matrix2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void saveData(std::ostream &os, UT_Vector4D v)
bool getUseshaftbasesegsattrib() const
constexpr SYS_FORCE_INLINE T & x() noexcept
void setShaftbasesegs(int64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void loadData(UT_IStream &is, UT_Vector2D &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
bool isParmColorRamp(exint idx) const override
UT_StringHolder opIdentifierattrib(const SOP_NodeVerb::CookParms &cookparms) const
void setUseshaftbasesegsattrib(bool val)
const char * getNestParmName(TempIndex fieldnum) const override
const UT_StringHolder & getIdentifierattrib() const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
bool getBarbmirror() const
constexpr SYS_FORCE_INLINE T & z() noexcept
void setShaftsubd(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void loadData(UT_IStream &is, UT_Vector3D &v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
const OP_GraphProxy * graph() const
void setShaftbasesegsattrib(const UT_StringHolder &val)
Barbsegmode opBarbsegmode(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opBarbattribs(const SOP_NodeVerb::CookParms &cookparms) const
int64 getShaftbasesegs() const
bool opUseshaftbasesegsattrib(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const SOP_FeatherAttribInterpolateParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void saveData(std::ostream &os, UT_Vector3D v)
void setBarbmirror(bool val)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
SOP_FeatherAttribInterpolateParms()
const UT_StringHolder & getShaftbasesegsattrib() const
UT_StringHolder opShaftbasesegsattrib(const SOP_NodeVerb::CookParms &cookparms) const
int64 opBarbsegs(const SOP_NodeVerb::CookParms &cookparms) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setBarbsegmode(Barbsegmode val)
static void loadData(UT_IStream &is, UT_StringHolder &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Barbsegmode getBarbsegmode() const
static void loadData(UT_IStream &is, bool &v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
GT_API const UT_StringHolder version
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
exint getNestNumParms(TempIndex idx) const override
int64 getBarbsegs() const
void setGroup(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void saveData(std::ostream &os, bool v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setWeightsattrib(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
DEP_MicroNode * depnode() const
LeafData & operator=(const LeafData &)=delete
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
Utility class for containing a color ramp.
const UT_StringHolder & getBlendattrib() const
static void loadData(UT_IStream &is, fpreal64 &v)
constexpr SYS_FORCE_INLINE T & w() noexcept
static void loadData(UT_IStream &is, UT_Matrix4D &v)
ParmType getNestParmType(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void saveData(std::ostream &os, UT_Matrix3D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
fpreal getCookTime() const
void copyFrom(const OP_NodeParms *src) override
const UT_StringHolder & getBarbattribs() const
const char * findChar(int c) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
bool opShaftsubd(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setBlendattrib(const UT_StringHolder &val)
bool getShaftsubd() const
constexpr SYS_FORCE_INLINE T & y() noexcept
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
static void saveData(std::ostream &os, UT_Matrix4D v)
const UT_StringHolder & getGroup() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept