23 namespace SOP_MeasureEnums
51 myAttribname =
"area"_UTsh;
67 if (myGroup != src.myGroup)
return false;
68 if (myType != src.myType)
return false;
69 if (myOverride != src.myOverride)
return false;
70 if (myAttribname != src.myAttribname)
return false;
71 if (myCurvetype != src.myCurvetype)
return false;
72 if (myCurve != src.myCurve)
return false;
73 if (myT != src.myT)
return false;
90 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
93 graph->
evalOpParm(myType, nodeidx,
"type", time, 0);
96 graph->
evalOpParm(myOverride, nodeidx,
"override", time, 0);
97 myAttribname =
"area"_UTsh;
98 if (
true && ( (
true&&!(((getOverride()==0)))) ) )
99 graph->
evalOpParm(myAttribname, nodeidx,
"attribname", time, 0);
101 if (
true && ( (
true&&!(((
int64(getType())!=2)))) ) )
102 graph->
evalOpParm(myCurvetype, nodeidx,
"curvetype", time, 0);
104 if (
true && ( (
true&&!(((
int64(getType())!=2)))) ) )
105 graph->
evalOpParm(myCurve, nodeidx,
"curve", time, 0);
107 if (
true && ( (
true&&!(((
int64(getType())!=3)))) ) )
108 graph->
evalOpParm(myT, nodeidx,
"t", time, 0);
124 template <
typename T>
131 if (idx.
size() != instance.
size()+1)
170 { doGetParmValue(idx, instance, value); }
172 { doGetParmValue(idx, instance, value); }
174 { doGetParmValue(idx, instance, value); }
176 { doGetParmValue(idx, instance, value); }
178 { doGetParmValue(idx, instance, value); }
180 { doGetParmValue(idx, instance, value); }
182 { doGetParmValue(idx, instance, value); }
184 { doGetParmValue(idx, instance, value); }
186 { doGetParmValue(idx, instance, value); }
188 { doGetParmValue(idx, instance, value); }
190 { doGetParmValue(idx, instance, value); }
192 template <
typename T>
199 if (idx.
size() != instance.
size()+1)
229 { doSetParmValue(idx, instance, value); }
231 { doSetParmValue(idx, instance, value); }
233 { doSetParmValue(idx, instance, value); }
235 { doSetParmValue(idx, instance, value); }
237 { doSetParmValue(idx, instance, value); }
239 { doSetParmValue(idx, instance, value); }
241 { doSetParmValue(idx, instance, value); }
243 { doSetParmValue(idx, instance, value); }
245 { doSetParmValue(idx, instance, value); }
247 { doSetParmValue(idx, instance, value); }
249 { doSetParmValue(idx, instance, value); }
265 if (fieldnum.
size() < 1)
290 if (fieldnum.
size() < 1)
291 return PARM_UNSUPPORTED;
329 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
331 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
333 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
346 loadData(is, rampdata);
364 int typelen = colon - data.
buffer();
378 {
int64 iv =
v; UTwrite(os, &iv); }
380 { UTwrite<fpreal64>(os, &
v); }
382 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
384 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
385 UTwrite<fpreal64>(os, &v.
z()); }
387 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
388 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
400 if (s) s->save(ostr);
402 saveData(os, result);
409 ostr << s->getDataTypeToken();
414 saveData(os, result);
418 void save(std::ostream &os)
const
422 saveData(os, myGroup);
423 saveData(os, myType);
424 saveData(os, myOverride);
425 saveData(os, myAttribname);
426 saveData(os, myCurvetype);
427 saveData(os, myCurve);
441 loadData(is, myGroup);
442 loadData(is, myType);
443 loadData(is, myOverride);
444 loadData(is, myAttribname);
445 loadData(is, myCurvetype);
446 loadData(is, myCurve);
457 if (!thissop)
return getGroup();
459 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
467 if (!thissop)
return getType();
469 OP_Utils::evalOpParm(result, thissop,
"type", cookparms.
getCookTime(), 0);
477 if (!thissop)
return getOverride();
479 OP_Utils::evalOpParm(result, thissop,
"override", cookparms.
getCookTime(), 0);
487 if (!thissop)
return getAttribname();
489 OP_Utils::evalOpParm(result, thissop,
"attribname", cookparms.
getCookTime(), 0);
497 if (!thissop)
return getCurvetype();
499 OP_Utils::evalOpParm(result, thissop,
"curvetype", cookparms.
getCookTime(), 0);
507 if (!thissop)
return getCurve();
509 OP_Utils::evalOpParm(result, thissop,
"curve", cookparms.
getCookTime(), 0);
517 if (!thissop)
return getT();
519 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
T clampMaxValue(fpreal maxvalue, const T &src) const
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
T clampMinValue(fpreal minvalue, const T &src) const
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 coerceValue(T &result, const S &src) const
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
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
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)
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override