31 myIndicesattrib =
"indices"_UTsh;
32 myWeightsattrib =
"weights"_UTsh;
33 myShaftbasesegsattrib =
"shaft_base_segs"_UTsh;
34 mySourceuattrib =
"sourceu"_UTsh;
47 if (myIndicesattrib != src.myIndicesattrib)
return false;
48 if (myWeightsattrib != src.myWeightsattrib)
return false;
49 if (myShaftbasesegsattrib != src.myShaftbasesegsattrib)
return false;
50 if (mySourceuattrib != src.mySourceuattrib)
return false;
63 myIndicesattrib =
"indices"_UTsh;
65 graph->
evalOpParm(myIndicesattrib, nodeidx,
"indicesattrib", time, 0);
66 myWeightsattrib =
"weights"_UTsh;
68 graph->
evalOpParm(myWeightsattrib, nodeidx,
"weightsattrib", time, 0);
69 myShaftbasesegsattrib =
"shaft_base_segs"_UTsh;
71 graph->
evalOpParm(myShaftbasesegsattrib, nodeidx,
"shaftbasesegsattrib", time, 0);
72 mySourceuattrib =
"sourceu"_UTsh;
74 graph->
evalOpParm(mySourceuattrib, nodeidx,
"sourceuattrib", time, 0);
127 { doGetParmValue(idx, instance, value); }
129 { doGetParmValue(idx, instance, value); }
131 { doGetParmValue(idx, instance, value); }
133 { doGetParmValue(idx, instance, value); }
135 { doGetParmValue(idx, instance, value); }
137 { doGetParmValue(idx, instance, value); }
139 { doGetParmValue(idx, instance, value); }
141 { doGetParmValue(idx, instance, value); }
143 { doGetParmValue(idx, instance, value); }
145 { doGetParmValue(idx, instance, value); }
147 { doGetParmValue(idx, instance, value); }
149 template <
typename T>
156 if (idx.
size() != instance.
size()+1)
177 { doSetParmValue(idx, instance, value); }
179 { doSetParmValue(idx, instance, value); }
181 { doSetParmValue(idx, instance, value); }
183 { doSetParmValue(idx, instance, value); }
185 { doSetParmValue(idx, instance, value); }
187 { doSetParmValue(idx, instance, value); }
189 { doSetParmValue(idx, instance, value); }
191 { doSetParmValue(idx, instance, value); }
193 { doSetParmValue(idx, instance, value); }
195 { doSetParmValue(idx, instance, value); }
197 { doSetParmValue(idx, instance, value); }
213 if (fieldnum.
size() < 1)
218 return "indicesattrib";
220 return "weightsattrib";
222 return "shaftbasesegsattrib";
224 return "sourceuattrib";
232 if (fieldnum.
size() < 1)
233 return PARM_UNSUPPORTED;
282 loadData(is, rampdata);
300 int typelen = colon - data.
buffer();
314 {
int64 iv =
v; UTwrite(os, &iv); }
316 { UTwrite<fpreal64>(os, &
v); }
318 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
320 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
321 UTwrite<fpreal64>(os, &v.
z()); }
323 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
324 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
336 if (s) s->save(ostr);
338 saveData(os, result);
345 ostr << s->getDataTypeToken();
350 saveData(os, result);
354 void save(std::ostream &os)
const
358 saveData(os, myIndicesattrib);
359 saveData(os, myWeightsattrib);
360 saveData(os, myShaftbasesegsattrib);
361 saveData(os, mySourceuattrib);
374 loadData(is, myIndicesattrib);
375 loadData(is, myWeightsattrib);
376 loadData(is, myShaftbasesegsattrib);
377 loadData(is, mySourceuattrib);
387 if (!thissop)
return getIndicesattrib();
389 OP_Utils::evalOpParm(result, thissop,
"indicesattrib", cookparms.
getCookTime(), 0);
397 if (!thissop)
return getWeightsattrib();
399 OP_Utils::evalOpParm(result, thissop,
"weightsattrib", cookparms.
getCookTime(), 0);
407 if (!thissop)
return getShaftbasesegsattrib();
409 OP_Utils::evalOpParm(result, thissop,
"shaftbasesegsattrib", cookparms.
getCookTime(), 0);
417 if (!thissop)
return getSourceuattrib();
419 OP_Utils::evalOpParm(result, thissop,
"sourceuattrib", cookparms.
getCookTime(), 0);
static void loadData(UT_IStream &is, UT_Matrix4D &v)
UT_StringHolder opWeightsattrib(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector3D v)
void loadFromOpSubclass(const LoadParms &loadparms) override
SOP_FeatherTemplateInterpolateParms()
const UT_StringHolder & getSourceuattrib() const
bool load(UT_IStream &is)
SOP_Node * getNode() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
const OP_Context & context() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
UT_StringHolder opIndicesattrib(const SOP_NodeVerb::CookParms &cookparms) const
void setShaftbasesegsattrib(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void saveData(std::ostream &os, UT_StringHolder s)
An output stream object that owns its own string buffer storage.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
**But if you need a result
static void saveData(std::ostream &os, int64 v)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
constexpr SYS_FORCE_INLINE T & x() noexcept
void copyFrom(const OP_NodeParms *src) override
const char * getNestParmName(TempIndex fieldnum) const override
ParmType getNestParmType(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void loadData(UT_IStream &is, bool &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
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
const OP_GraphProxy * graph() const
static void saveData(std::ostream &os, UT_Vector2D v)
void setIndicesattrib(const UT_StringHolder &val)
exint getNestNumParms(TempIndex idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void loadData(UT_IStream &is, int64 &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setSourceuattrib(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector2D &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
const UT_StringHolder & getShaftbasesegsattrib() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
static void loadData(UT_IStream &is, UT_Vector3I &v)
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, UT_Matrix3D v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void saveData(std::ostream &os, UT_Vector4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
bool operator!=(const SOP_FeatherTemplateInterpolateParms &src) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
void coerceValue(T &result, const S &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
DEP_MicroNode * depnode() const
static void loadData(UT_IStream &is, fpreal64 &v)
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
static void saveData(std::ostream &os, fpreal64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
bool isParmColorRamp(exint idx) const override
UT_StringHolder opSourceuattrib(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
UT_StringHolder opShaftbasesegsattrib(const SOP_NodeVerb::CookParms &cookparms) const
fpreal getCookTime() const
static void saveData(std::ostream &os, UT_Matrix2D v)
const char * findChar(int c) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
const UT_StringHolder & getWeightsattrib() const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
const UT_StringHolder & getIndicesattrib() const
static void saveData(std::ostream &os, UT_Matrix4D v)
bool operator==(const SOP_FeatherTemplateInterpolateParms &src) const
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
void save(std::ostream &os) const
void setWeightsattrib(const UT_StringHolder &val)
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept