31 myRestAttrib =
"rest"_UTsh;
32 myPinGroup =
"pins"_UTsh;
33 myPinWeightAttrib =
"pinweight"_UTsh;
34 myPinScaleWeightAttrib =
"pinscaleweight"_UTsh;
35 myScaleAdjustment =
false;
36 myScaleAdjustmentWeight = 10;
49 if (myRestAttrib != src.myRestAttrib)
return false;
50 if (myPinGroup != src.myPinGroup)
return false;
51 if (myPinWeightAttrib != src.myPinWeightAttrib)
return false;
52 if (myPinScaleWeightAttrib != src.myPinScaleWeightAttrib)
return false;
53 if (myScaleAdjustment != src.myScaleAdjustment)
return false;
54 if (myScaleAdjustmentWeight != src.myScaleAdjustmentWeight)
return false;
67 myRestAttrib =
"rest"_UTsh;
69 graph->
evalOpParm(myRestAttrib, nodeidx,
"restattrib", time, 0);
70 myPinGroup =
"pins"_UTsh;
72 graph->
evalOpParm(myPinGroup, nodeidx,
"pingroup", time, 0);
73 myPinWeightAttrib =
"pinweight"_UTsh;
75 graph->
evalOpParm(myPinWeightAttrib, nodeidx,
"pinweightattrib", time, 0);
76 myPinScaleWeightAttrib =
"pinscaleweight"_UTsh;
78 graph->
evalOpParm(myPinScaleWeightAttrib, nodeidx,
"pinscaleweightattrib", time, 0);
79 myScaleAdjustment =
false;
81 graph->
evalOpParm(myScaleAdjustment, nodeidx,
"scaleadjustment", time, 0);
82 myScaleAdjustmentWeight = 10;
83 if (
true && ( (
true&&!(((getScaleAdjustment()==0)))) ) )
84 graph->
evalOpParm(myScaleAdjustmentWeight, nodeidx,
"scaleadjustmentweight", time, 0);
100 template <
typename T>
107 if (idx.
size() != instance.
size()+1)
143 { doGetParmValue(idx, instance, value); }
145 { doGetParmValue(idx, instance, value); }
147 { doGetParmValue(idx, instance, value); }
149 { doGetParmValue(idx, instance, value); }
151 { doGetParmValue(idx, instance, value); }
153 { doGetParmValue(idx, instance, value); }
155 { doGetParmValue(idx, instance, value); }
157 { doGetParmValue(idx, instance, value); }
159 { doGetParmValue(idx, instance, value); }
161 { doGetParmValue(idx, instance, value); }
163 { doGetParmValue(idx, instance, value); }
165 template <
typename T>
172 if (idx.
size() != instance.
size()+1)
186 coerceValue(myPinScaleWeightAttrib, ( ( value ) ));
192 coerceValue(myScaleAdjustmentWeight, ( ( value ) ));
199 { doSetParmValue(idx, instance, value); }
201 { doSetParmValue(idx, instance, value); }
203 { doSetParmValue(idx, instance, value); }
205 { doSetParmValue(idx, instance, value); }
207 { doSetParmValue(idx, instance, value); }
209 { doSetParmValue(idx, instance, value); }
211 { doSetParmValue(idx, instance, value); }
213 { doSetParmValue(idx, instance, value); }
215 { doSetParmValue(idx, instance, value); }
217 { doSetParmValue(idx, instance, value); }
219 { doSetParmValue(idx, instance, value); }
235 if (fieldnum.
size() < 1)
244 return "pinweightattrib";
246 return "pinscaleweightattrib";
248 return "scaleadjustment";
250 return "scaleadjustmentweight";
258 if (fieldnum.
size() < 1)
259 return PARM_UNSUPPORTED;
312 loadData(is, rampdata);
330 int typelen = colon - data.
buffer();
344 {
int64 iv =
v; UTwrite(os, &iv); }
346 { UTwrite<fpreal64>(os, &
v); }
348 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
350 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
351 UTwrite<fpreal64>(os, &v.
z()); }
353 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
354 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
366 if (s) s->save(ostr);
368 saveData(os, result);
375 ostr << s->getDataTypeToken();
380 saveData(os, result);
384 void save(std::ostream &os)
const
388 saveData(os, myRestAttrib);
389 saveData(os, myPinGroup);
390 saveData(os, myPinWeightAttrib);
391 saveData(os, myPinScaleWeightAttrib);
392 saveData(os, myScaleAdjustment);
393 saveData(os, myScaleAdjustmentWeight);
406 loadData(is, myRestAttrib);
407 loadData(is, myPinGroup);
408 loadData(is, myPinWeightAttrib);
409 loadData(is, myPinScaleWeightAttrib);
410 loadData(is, myScaleAdjustment);
411 loadData(is, myScaleAdjustmentWeight);
421 if (!thissop)
return getRestAttrib();
423 OP_Utils::evalOpParm(result, thissop,
"restattrib", cookparms.
getCookTime(), 0);
431 if (!thissop)
return getPinGroup();
433 OP_Utils::evalOpParm(result, thissop,
"pingroup", cookparms.
getCookTime(), 0);
441 if (!thissop)
return getPinWeightAttrib();
443 OP_Utils::evalOpParm(result, thissop,
"pinweightattrib", cookparms.
getCookTime(), 0);
451 if (!thissop)
return getPinScaleWeightAttrib();
453 OP_Utils::evalOpParm(result, thissop,
"pinscaleweightattrib", cookparms.
getCookTime(), 0);
461 if (!thissop)
return getScaleAdjustment();
463 OP_Utils::evalOpParm(result, thissop,
"scaleadjustment", cookparms.
getCookTime(), 0);
471 if (!thissop)
return getScaleAdjustmentWeight();
473 OP_Utils::evalOpParm(result, thissop,
"scaleadjustmentweight", cookparms.
getCookTime(), 0);
482 bool myScaleAdjustment;
bool operator!=(const SOP_CrowdMotionPathEditCoreParms &src) const
UT_StringHolder opPinScaleWeightAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
SOP_Node * getNode() const
static void loadData(UT_IStream &is, UT_Vector3D &v)
UT_StringHolder opRestAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
const UT_StringHolder & getRestAttrib() const
fpreal64 getScaleAdjustmentWeight() const
exint bread(int32 *buffer, exint asize=1)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void saveData(std::ostream &os, UT_Vector3D v)
bool operator==(const SOP_CrowdMotionPathEditCoreParms &src) const
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
ParmType getNestParmType(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
SYS_FORCE_INLINE const char * buffer() const
exint getNestNumParms(TempIndex idx) const override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
An output stream object that owns its own string buffer storage.
void setPinGroup(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_StringHolder &v)
**But if you need a result
void setRestAttrib(const UT_StringHolder &val)
void copyFrom(const OP_NodeParms *src) override
const UT_StringHolder & getPinWeightAttrib() const
void save(std::ostream &os) 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.
void setScaleAdjustment(bool val)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
bool load(UT_IStream &is)
const char * getNestParmName(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_Matrix3D &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
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
SOP_CrowdMotionPathEditCoreParms()
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
const OP_GraphProxy * graph() const
bool opScaleAdjustment(const SOP_NodeVerb::CookParms &cookparms) const
void setScaleAdjustmentWeight(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void saveData(std::ostream &os, fpreal64 v)
static void saveData(std::ostream &os, UT_Matrix2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void saveData(std::ostream &os, UT_Matrix4D v)
bool isParmColorRamp(exint idx) const override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void loadFromOpSubclass(const LoadParms &loadparms) override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void saveBinary(std::ostream &os) const
Save string to binary stream.
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void loadData(UT_IStream &is, UT_Vector3I &v)
GT_API const UT_StringHolder version
static void loadData(UT_IStream &is, bool &v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setPinWeightAttrib(const UT_StringHolder &val)
void coerceValue(T &result, const S &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
DEP_MicroNode * depnode() const
static void loadData(UT_IStream &is, UT_Vector4D &v)
Utility class for containing a color ramp.
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, int64 &v)
constexpr SYS_FORCE_INLINE T & w() noexcept
bool getScaleAdjustment() const
static void saveData(std::ostream &os, UT_Vector2D v)
fpreal getCookTime() const
const char * findChar(int c) const
const UT_StringHolder & getPinScaleWeightAttrib() const
UT_StringHolder opPinGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
UT_StringHolder opPinWeightAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
fpreal64 opScaleAdjustmentWeight(const SOP_NodeVerb::CookParms &cookparms) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
void setPinScaleWeightAttrib(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector4I &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
static void saveData(std::ostream &os, int64 v)
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, UT_Vector2I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void saveData(std::ostream &os, UT_StringHolder s)
constexpr SYS_FORCE_INLINE T & x() noexcept
const UT_StringHolder & getPinGroup() const