23 namespace SOP_FeatherAttribInterpolateEnums
41 myBarbattribs =
"P_barbl P_barbr uv_barbl uv_barbr"_UTsh;
42 myIdentifierattrib =
"templatenames"_UTsh;
43 myWeightsattrib =
"templateweights"_UTsh;
44 myBlendattrib =
"blendattrib"_UTsh;
47 myUseshaftbasesegsattrib =
false;
48 myShaftbasesegsattrib =
"shaft_base_segs"_UTsh;
64 if (myGroup != src.myGroup)
return false;
65 if (myBarbattribs != src.myBarbattribs)
return false;
66 if (myIdentifierattrib != src.myIdentifierattrib)
return false;
67 if (myWeightsattrib != src.myWeightsattrib)
return false;
68 if (myBlendattrib != src.myBlendattrib)
return false;
69 if (myShaftsubd != src.myShaftsubd)
return false;
70 if (myShaftbasesegs != src.myShaftbasesegs)
return false;
71 if (myUseshaftbasesegsattrib != src.myUseshaftbasesegsattrib)
return false;
72 if (myShaftbasesegsattrib != src.myShaftbasesegsattrib)
return false;
73 if (myBarbsegmode != src.myBarbsegmode)
return false;
74 if (myBarbsegs != src.myBarbsegs)
return false;
75 if (myBarbmirror != src.myBarbmirror)
return false;
91 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
92 myBarbattribs =
"P_barbl P_barbr uv_barbl uv_barbr"_UTsh;
94 graph->
evalOpParm(myBarbattribs, nodeidx,
"barbattribs", time, 0);
95 myIdentifierattrib =
"templatenames"_UTsh;
97 graph->
evalOpParm(myIdentifierattrib, nodeidx,
"identifierattrib", time, 0);
98 myWeightsattrib =
"templateweights"_UTsh;
100 graph->
evalOpParm(myWeightsattrib, nodeidx,
"weightsattrib", time, 0);
101 myBlendattrib =
"blendattrib"_UTsh;
103 graph->
evalOpParm(myBlendattrib, nodeidx,
"blendattrib", time, 0);
106 graph->
evalOpParm(myShaftsubd, nodeidx,
"shaftsubd", time, 0);
109 graph->
evalOpParm(myShaftbasesegs, nodeidx,
"shaftbasesegs", time, 0);
110 myUseshaftbasesegsattrib =
false;
112 graph->
evalOpParm(myUseshaftbasesegsattrib, nodeidx,
"useshaftbasesegsattrib", time, 0);
113 myShaftbasesegsattrib =
"shaft_base_segs"_UTsh;
114 if (
true && ( (
true&&!(((getUseshaftbasesegsattrib()==0)))) ) )
115 graph->
evalOpParm(myShaftbasesegsattrib, nodeidx,
"shaftbasesegsattrib", time, 0);
118 graph->
evalOpParm(myBarbsegmode, nodeidx,
"barbsegmode", time, 0);
120 if (
true && ( (
true&&!(((
int64(getBarbsegmode())!=0)))) ) )
121 graph->
evalOpParm(myBarbsegs, nodeidx,
"barbsegs", time, 0);
124 graph->
evalOpParm(myBarbmirror, nodeidx,
"barbmirror", time, 0);
140 template <
typename T>
147 if (idx.
size() != instance.
size()+1)
201 { doGetParmValue(idx, instance, value); }
203 { doGetParmValue(idx, instance, value); }
205 { doGetParmValue(idx, instance, value); }
207 { doGetParmValue(idx, instance, value); }
209 { doGetParmValue(idx, instance, value); }
211 { doGetParmValue(idx, instance, value); }
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 template <
typename T>
230 if (idx.
size() != instance.
size()+1)
256 coerceValue(myUseshaftbasesegsattrib, ( ( value ) ));
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)
318 return "barbattribs";
320 return "identifierattrib";
322 return "weightsattrib";
324 return "blendattrib";
328 return "shaftbasesegs";
330 return "useshaftbasesegsattrib";
332 return "shaftbasesegsattrib";
334 return "barbsegmode";
346 if (fieldnum.
size() < 1)
347 return PARM_UNSUPPORTED;
395 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
397 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
399 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
412 loadData(is, rampdata);
430 int typelen = colon - data.
buffer();
444 {
int64 iv =
v; UTwrite(os, &iv); }
446 { UTwrite<fpreal64>(os, &
v); }
448 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
450 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
451 UTwrite<fpreal64>(os, &v.
z()); }
453 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
454 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
466 if (s) s->save(ostr);
468 saveData(os, result);
475 ostr << s->getDataTypeToken();
480 saveData(os, result);
484 void save(std::ostream &os)
const
488 saveData(os, myGroup);
489 saveData(os, myBarbattribs);
490 saveData(os, myIdentifierattrib);
491 saveData(os, myWeightsattrib);
492 saveData(os, myBlendattrib);
493 saveData(os, myShaftsubd);
494 saveData(os, myShaftbasesegs);
495 saveData(os, myUseshaftbasesegsattrib);
496 saveData(os, myShaftbasesegsattrib);
497 saveData(os, myBarbsegmode);
498 saveData(os, myBarbsegs);
499 saveData(os, myBarbmirror);
512 loadData(is, myGroup);
513 loadData(is, myBarbattribs);
514 loadData(is, myIdentifierattrib);
515 loadData(is, myWeightsattrib);
516 loadData(is, myBlendattrib);
517 loadData(is, myShaftsubd);
518 loadData(is, myShaftbasesegs);
519 loadData(is, myUseshaftbasesegsattrib);
520 loadData(is, myShaftbasesegsattrib);
521 loadData(is, myBarbsegmode);
522 loadData(is, myBarbsegs);
523 loadData(is, myBarbmirror);
533 if (!thissop)
return getGroup();
535 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
543 if (!thissop)
return getBarbattribs();
545 OP_Utils::evalOpParm(result, thissop,
"barbattribs", cookparms.
getCookTime(), 0);
553 if (!thissop)
return getIdentifierattrib();
555 OP_Utils::evalOpParm(result, thissop,
"identifierattrib", cookparms.
getCookTime(), 0);
563 if (!thissop)
return getWeightsattrib();
565 OP_Utils::evalOpParm(result, thissop,
"weightsattrib", cookparms.
getCookTime(), 0);
573 if (!thissop)
return getBlendattrib();
575 OP_Utils::evalOpParm(result, thissop,
"blendattrib", cookparms.
getCookTime(), 0);
583 if (!thissop)
return getShaftsubd();
585 OP_Utils::evalOpParm(result, thissop,
"shaftsubd", cookparms.
getCookTime(), 0);
593 if (!thissop)
return getShaftbasesegs();
595 OP_Utils::evalOpParm(result, thissop,
"shaftbasesegs", cookparms.
getCookTime(), 0);
603 if (!thissop)
return getUseshaftbasesegsattrib();
605 OP_Utils::evalOpParm(result, thissop,
"useshaftbasesegsattrib", cookparms.
getCookTime(), 0);
613 if (!thissop)
return getShaftbasesegsattrib();
615 OP_Utils::evalOpParm(result, thissop,
"shaftbasesegsattrib", cookparms.
getCookTime(), 0);
623 if (!thissop)
return getBarbsegmode();
625 OP_Utils::evalOpParm(result, thissop,
"barbsegmode", cookparms.
getCookTime(), 0);
633 if (!thissop)
return getBarbsegs();
635 OP_Utils::evalOpParm(result, thissop,
"barbsegs", cookparms.
getCookTime(), 0);
643 if (!thissop)
return getBarbmirror();
645 OP_Utils::evalOpParm(result, thissop,
"barbmirror", cookparms.
getCookTime(), 0);
656 int64 myShaftbasesegs;
657 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)
T clampMaxValue(fpreal maxvalue, const T &src) const
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
T clampMinValue(fpreal minvalue, const T &src) const
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
void coerceValue(T &result, const S &src) const
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
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
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept