23 namespace SOP_MeasureEnums
36 using namespace UT::Literal;
56 using namespace UT::Literal;
78 myAttribname =
"area"_UTsh;
94 if (myGroup != src.myGroup)
return false;
95 if (myType != src.myType)
return false;
96 if (myOverride != src.myOverride)
return false;
97 if (myAttribname != src.myAttribname)
return false;
98 if (myCurvetype != src.myCurvetype)
return false;
99 if (myCurve != src.myCurve)
return false;
100 if (myT != src.myT)
return false;
117 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
120 graph->
evalOpParm(myType, nodeidx,
"type", time, 0);
123 graph->
evalOpParm(myOverride, nodeidx,
"override", time, 0);
124 myAttribname =
"area"_UTsh;
125 if (
true && ( (
true&&!(((getOverride()==0)))) ) )
126 graph->
evalOpParm(myAttribname, nodeidx,
"attribname", time, 0);
128 if (
true && ( (
true&&!(((
int64(getType())!=2)))) ) )
129 graph->
evalOpParm(myCurvetype, nodeidx,
"curvetype", time, 0);
131 if (
true && ( (
true&&!(((
int64(getType())!=2)))) ) )
132 graph->
evalOpParm(myCurve, nodeidx,
"curve", time, 0);
134 if (
true && ( (
true&&!(((
int64(getType())!=3)))) ) )
135 graph->
evalOpParm(myT, nodeidx,
"t", time, 0);
151 template <
typename T>
158 if (idx.
size() != instance.
size()+1)
163 coerceValue(value, myGroup);
166 coerceValue(value, myType);
169 coerceValue(value, myOverride);
172 coerceValue(value, myAttribname);
175 coerceValue(value, myCurvetype);
178 coerceValue(value, myCurve);
181 coerceValue(value, myT);
197 { doGetParmValue(idx, instance, value); }
199 { doGetParmValue(idx, instance, value); }
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 template <
typename T>
226 if (idx.
size() != instance.
size()+1)
231 coerceValue(myGroup, ( ( value ) ));
234 coerceValue(myType, clampMinValue(0, clampMaxValue(3, value ) ));
237 coerceValue(myOverride, ( ( value ) ));
240 coerceValue(myAttribname, ( ( value ) ));
243 coerceValue(myCurvetype, clampMinValue(0, clampMaxValue(2, value ) ));
246 coerceValue(myCurve, ( ( value ) ));
249 coerceValue(myT, ( ( value ) ));
256 { doSetParmValue(idx, instance, value); }
258 { doSetParmValue(idx, instance, value); }
260 { doSetParmValue(idx, instance, value); }
262 { doSetParmValue(idx, instance, value); }
264 { doSetParmValue(idx, instance, value); }
266 { doSetParmValue(idx, instance, value); }
268 { doSetParmValue(idx, instance, value); }
270 { doSetParmValue(idx, instance, value); }
272 { doSetParmValue(idx, instance, value); }
274 { doSetParmValue(idx, instance, value); }
276 { doSetParmValue(idx, instance, value); }
292 if (fieldnum.
size() < 1)
317 if (fieldnum.
size() < 1)
318 return PARM_UNSUPPORTED;
337 return PARM_UNSUPPORTED;
373 loadData(is, rampdata);
391 int typelen = colon - data.
buffer();
405 {
int64 iv =
v; UTwrite(os, &iv); }
407 { UTwrite<fpreal64>(os, &
v); }
409 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
411 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
412 UTwrite<fpreal64>(os, &v.
z()); }
414 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
415 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
427 if (s) s->save(ostr);
429 saveData(os, result);
436 ostr << s->getDataTypeToken();
441 saveData(os, result);
445 void save(std::ostream &os)
const
449 saveData(os, myGroup);
450 saveData(os, myType);
451 saveData(os, myOverride);
452 saveData(os, myAttribname);
453 saveData(os, myCurvetype);
454 saveData(os, myCurve);
468 loadData(is, myGroup);
469 loadData(is, myType);
470 loadData(is, myOverride);
471 loadData(is, myAttribname);
472 loadData(is, myCurvetype);
473 loadData(is, myCurve);
484 if (!thissop)
return getGroup();
486 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
494 if (!thissop)
return getType();
496 OP_Utils::evalOpParm(result, thissop,
"type", cookparms.
getCookTime(), 0);
504 if (!thissop)
return getOverride();
506 OP_Utils::evalOpParm(result, thissop,
"override", cookparms.
getCookTime(), 0);
514 if (!thissop)
return getAttribname();
516 OP_Utils::evalOpParm(result, thissop,
"attribname", cookparms.
getCookTime(), 0);
524 if (!thissop)
return getCurvetype();
526 OP_Utils::evalOpParm(result, thissop,
"curvetype", cookparms.
getCookTime(), 0);
534 if (!thissop)
return getCurve();
536 OP_Utils::evalOpParm(result, thissop,
"curve", cookparms.
getCookTime(), 0);
544 if (!thissop)
return getT();
546 OP_Utils::evalOpParm(result, thissop,
"t", cookparms.
getCookTime(), 0);
void loadFromOpSubclass(const LoadParms &loadparms) override
void setGroup(const UT_StringHolder &val)
bool operator==(const SOP_MeasureParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void loadData(UT_IStream &is, fpreal64 &v)
SOP_Node * getNode() const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
bool opOverride(const SOP_NodeVerb::CookParms &cookparms) const
exint getNestNumParms(TempIndex idx) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void setT(UT_Vector3D val)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
UT_Vector2T< fpreal64 > UT_Vector2D
void save(std::ostream &os) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
static void loadData(UT_IStream &is, UT_Vector4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void saveData(std::ostream &os, UT_Matrix2D v)
An output stream object that owns its own string buffer storage.
const UT_StringHolder & getGroup() const
**But if you need a result
static void loadData(UT_IStream &is, bool &v)
void setAttribname(const UT_StringHolder &val)
bool isParmColorRamp(exint idx) const override
Type opType(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
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
static void saveData(std::ostream &os, UT_StringHolder s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
ParmType getNestParmType(TempIndex fieldnum) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, int64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
constexpr SYS_FORCE_INLINE T & z() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
bool load(UT_IStream &is)
static void saveData(std::ostream &os, UT_Matrix4D v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
const OP_GraphProxy * graph() const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
Curvetype getCurvetype() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void saveData(std::ostream &os, bool v)
UT_StringHolder opAttribname(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3T< fpreal64 > UT_Vector3D
void setCurve(UT_Vector2D val)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
bool operator!=(const SOP_MeasureParms &src) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void saveBinary(std::ostream &os) const
Save string to binary stream.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
GT_API const UT_StringHolder version
void setCurvetype(Curvetype val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void setOverride(bool val)
static void saveData(std::ostream &os, UT_Vector3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
DEP_MicroNode * depnode() const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
SYS_FORCE_INLINE UT_StringHolder getToken(Type enum_value)
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
constexpr SYS_FORCE_INLINE T & w() noexcept
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
UT_Vector2D getCurve() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, UT_StringHolder &v)
fpreal getCookTime() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
const char * findChar(int c) const
Curvetype opCurvetype(const SOP_NodeVerb::CookParms &cookparms) const
void copyFrom(const OP_NodeParms *src) override
const char * getNestParmName(TempIndex fieldnum) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
const UT_StringHolder & getAttribname() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector2D opCurve(const SOP_NodeVerb::CookParms &cookparms) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
static void saveData(std::ostream &os, fpreal64 v)
static void saveData(std::ostream &os, UT_Vector2D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, UT_Vector2I &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override