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;
106 graph->
evalOpParm(myGroup, nodeidx,
"group", time, graph->
isDirect()?
nullptr:depnode);
107 myBarbattribs =
"P_barbl P_barbr uv_barbl uv_barbr"_UTsh;
109 graph->
evalOpParm(myBarbattribs, nodeidx,
"barbattribs", time, graph->
isDirect()?
nullptr:depnode);
110 myIdentifierattrib =
"templatenames"_UTsh;
112 graph->
evalOpParm(myIdentifierattrib, nodeidx,
"identifierattrib", time, graph->
isDirect()?
nullptr:depnode);
113 myWeightsattrib =
"templateweights"_UTsh;
115 graph->
evalOpParm(myWeightsattrib, nodeidx,
"weightsattrib", time, graph->
isDirect()?
nullptr:depnode);
116 myBlendattrib =
"blendattrib"_UTsh;
118 graph->
evalOpParm(myBlendattrib, nodeidx,
"blendattrib", time, graph->
isDirect()?
nullptr:depnode);
121 graph->
evalOpParm(myShaftsubd, nodeidx,
"shaftsubd", time, graph->
isDirect()?
nullptr:depnode);
124 graph->
evalOpParm(myShaftbasesegs, nodeidx,
"shaftbasesegs", time, graph->
isDirect()?
nullptr:depnode);
125 myUseshaftbasesegsattrib =
false;
127 graph->
evalOpParm(myUseshaftbasesegsattrib, nodeidx,
"useshaftbasesegsattrib", time, graph->
isDirect()?
nullptr:depnode);
128 myShaftbasesegsattrib =
"shaft_base_segs"_UTsh;
129 if (
true && ( (
true&&!(((getUseshaftbasesegsattrib()==0)))) ) )
130 graph->
evalOpParm(myShaftbasesegsattrib, nodeidx,
"shaftbasesegsattrib", time, graph->
isDirect()?
nullptr:depnode);
133 graph->
evalOpParm(myBarbsegmode, nodeidx,
"barbsegmode", time, graph->
isDirect()?
nullptr:depnode);
135 if (
true && ( (
true&&!(((
int64(getBarbsegmode())!=0)))) ) )
136 graph->
evalOpParm(myBarbsegs, nodeidx,
"barbsegs", time, graph->
isDirect()?
nullptr:depnode);
139 graph->
evalOpParm(myBarbmirror, nodeidx,
"barbmirror", time, graph->
isDirect()?
nullptr:depnode);
155 template <
typename T>
162 if (idx.
size() != instance.
size()+1)
167 coerceValue(value, myGroup);
170 coerceValue(value, myBarbattribs);
173 coerceValue(value, myIdentifierattrib);
176 coerceValue(value, myWeightsattrib);
179 coerceValue(value, myBlendattrib);
182 coerceValue(value, myShaftsubd);
185 coerceValue(value, myShaftbasesegs);
188 coerceValue(value, myUseshaftbasesegsattrib);
191 coerceValue(value, myShaftbasesegsattrib);
194 coerceValue(value, myBarbsegmode);
197 coerceValue(value, myBarbsegs);
200 coerceValue(value, myBarbmirror);
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 { doGetParmValue(idx, instance, value); }
228 { doGetParmValue(idx, instance, value); }
230 { doGetParmValue(idx, instance, value); }
232 { doGetParmValue(idx, instance, value); }
234 { doGetParmValue(idx, instance, value); }
236 { doGetParmValue(idx, instance, value); }
238 template <
typename T>
245 if (idx.
size() != instance.
size()+1)
250 coerceValue(myGroup, ( ( value ) ));
253 coerceValue(myBarbattribs, ( ( value ) ));
256 coerceValue(myIdentifierattrib, ( ( value ) ));
259 coerceValue(myWeightsattrib, ( ( value ) ));
262 coerceValue(myBlendattrib, ( ( value ) ));
265 coerceValue(myShaftsubd, ( ( value ) ));
268 coerceValue(myShaftbasesegs, ( ( value ) ));
271 coerceValue(myUseshaftbasesegsattrib, ( ( value ) ));
274 coerceValue(myShaftbasesegsattrib, ( ( value ) ));
277 coerceValue(myBarbsegmode, clampMinValue(0, clampMaxValue(1, value ) ));
280 coerceValue(myBarbsegs, clampMinValue(1, ( value ) ));
283 coerceValue(myBarbmirror, ( ( value ) ));
290 { doSetParmValue(idx, instance, value); }
292 { doSetParmValue(idx, instance, value); }
294 { doSetParmValue(idx, instance, value); }
296 { doSetParmValue(idx, instance, value); }
298 { doSetParmValue(idx, instance, value); }
300 { doSetParmValue(idx, instance, value); }
302 { doSetParmValue(idx, instance, value); }
304 { doSetParmValue(idx, instance, value); }
306 { doSetParmValue(idx, instance, value); }
308 { doSetParmValue(idx, instance, value); }
310 { doSetParmValue(idx, instance, value); }
326 if (fieldnum.
size() < 1)
333 return "barbattribs";
335 return "identifierattrib";
337 return "weightsattrib";
339 return "blendattrib";
343 return "shaftbasesegs";
345 return "useshaftbasesegsattrib";
347 return "shaftbasesegsattrib";
349 return "barbsegmode";
361 if (fieldnum.
size() < 1)
362 return PARM_UNSUPPORTED;
391 return PARM_UNSUPPORTED;
427 loadData(is, rampdata);
445 int typelen = colon - data.
buffer();
459 {
int64 iv =
v; UTwrite(os, &iv); }
461 { UTwrite<fpreal64>(os, &
v); }
463 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
465 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
466 UTwrite<fpreal64>(os, &v.
z()); }
468 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
469 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
481 if (s) s->save(ostr);
483 saveData(os, result);
490 ostr << s->getDataTypeToken();
495 saveData(os, result);
499 void save(std::ostream &os)
const
503 saveData(os, myGroup);
504 saveData(os, myBarbattribs);
505 saveData(os, myIdentifierattrib);
506 saveData(os, myWeightsattrib);
507 saveData(os, myBlendattrib);
508 saveData(os, myShaftsubd);
509 saveData(os, myShaftbasesegs);
510 saveData(os, myUseshaftbasesegsattrib);
511 saveData(os, myShaftbasesegsattrib);
512 saveData(os, myBarbsegmode);
513 saveData(os, myBarbsegs);
514 saveData(os, myBarbmirror);
527 loadData(is, myGroup);
528 loadData(is, myBarbattribs);
529 loadData(is, myIdentifierattrib);
530 loadData(is, myWeightsattrib);
531 loadData(is, myBlendattrib);
532 loadData(is, myShaftsubd);
533 loadData(is, myShaftbasesegs);
534 loadData(is, myUseshaftbasesegsattrib);
535 loadData(is, myShaftbasesegsattrib);
536 loadData(is, myBarbsegmode);
537 loadData(is, myBarbsegs);
538 loadData(is, myBarbmirror);
548 if (!thissop)
return getGroup();
550 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
558 if (!thissop)
return getBarbattribs();
560 OP_Utils::evalOpParm(result, thissop,
"barbattribs", cookparms.
getCookTime(), 0);
568 if (!thissop)
return getIdentifierattrib();
570 OP_Utils::evalOpParm(result, thissop,
"identifierattrib", cookparms.
getCookTime(), 0);
578 if (!thissop)
return getWeightsattrib();
580 OP_Utils::evalOpParm(result, thissop,
"weightsattrib", cookparms.
getCookTime(), 0);
588 if (!thissop)
return getBlendattrib();
590 OP_Utils::evalOpParm(result, thissop,
"blendattrib", cookparms.
getCookTime(), 0);
598 if (!thissop)
return getShaftsubd();
600 OP_Utils::evalOpParm(result, thissop,
"shaftsubd", cookparms.
getCookTime(), 0);
608 if (!thissop)
return getShaftbasesegs();
610 OP_Utils::evalOpParm(result, thissop,
"shaftbasesegs", cookparms.
getCookTime(), 0);
618 if (!thissop)
return getUseshaftbasesegsattrib();
620 OP_Utils::evalOpParm(result, thissop,
"useshaftbasesegsattrib", cookparms.
getCookTime(), 0);
628 if (!thissop)
return getShaftbasesegsattrib();
630 OP_Utils::evalOpParm(result, thissop,
"shaftbasesegsattrib", cookparms.
getCookTime(), 0);
638 if (!thissop)
return getBarbsegmode();
640 OP_Utils::evalOpParm(result, thissop,
"barbsegmode", cookparms.
getCookTime(), 0);
648 if (!thissop)
return getBarbsegs();
650 OP_Utils::evalOpParm(result, thissop,
"barbsegs", cookparms.
getCookTime(), 0);
658 if (!thissop)
return getBarbmirror();
660 OP_Utils::evalOpParm(result, thissop,
"barbmirror", cookparms.
getCookTime(), 0);
671 int64 myShaftbasesegs;
672 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)
GLsizei const GLfloat * value
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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)
virtual UT_StringHolder baseGetSignature() const
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
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
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