23 namespace SOP_EdgeStraightenEnums
35 using namespace UT::Literal;
56 myOutputedgegroup =
""_UTsh;
69 if (myGroup != src.myGroup)
return false;
70 if (myGrouptype != src.myGrouptype)
return false;
71 if (myOutputedgegroup != src.myOutputedgegroup)
return false;
87 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
90 graph->
evalOpParm(myGrouptype, nodeidx,
"grouptype", time, 0);
91 myOutputedgegroup =
""_UTsh;
93 graph->
evalOpParm(myOutputedgegroup, nodeidx,
"outputedgegroup", time, 0);
109 template <
typename T>
116 if (idx.
size() != instance.
size()+1)
121 coerceValue(value, myGroup);
124 coerceValue(value, myGrouptype);
127 coerceValue(value, myOutputedgegroup);
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)
177 coerceValue(myGroup, ( ( value ) ));
180 coerceValue(myGrouptype, clampMinValue(0, clampMaxValue(2, value ) ));
183 coerceValue(myOutputedgegroup, ( ( value ) ));
190 { doSetParmValue(idx, instance, value); }
192 { doSetParmValue(idx, instance, value); }
194 { doSetParmValue(idx, instance, value); }
196 { doSetParmValue(idx, instance, value); }
198 { doSetParmValue(idx, instance, value); }
200 { doSetParmValue(idx, instance, value); }
202 { doSetParmValue(idx, instance, value); }
204 { doSetParmValue(idx, instance, value); }
206 { doSetParmValue(idx, instance, value); }
208 { doSetParmValue(idx, instance, value); }
210 { doSetParmValue(idx, instance, value); }
226 if (fieldnum.
size() < 1)
235 return "outputedgegroup";
243 if (fieldnum.
size() < 1)
244 return PARM_UNSUPPORTED;
255 return PARM_UNSUPPORTED;
291 loadData(is, rampdata);
309 int typelen = colon - data.
buffer();
323 {
int64 iv =
v; UTwrite(os, &iv); }
325 { UTwrite<fpreal64>(os, &
v); }
327 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
329 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
330 UTwrite<fpreal64>(os, &v.
z()); }
332 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
333 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
345 if (s) s->save(ostr);
347 saveData(os, result);
354 ostr << s->getDataTypeToken();
359 saveData(os, result);
363 void save(std::ostream &os)
const
367 saveData(os, myGroup);
368 saveData(os, myGrouptype);
369 saveData(os, myOutputedgegroup);
382 loadData(is, myGroup);
383 loadData(is, myGrouptype);
384 loadData(is, myOutputedgegroup);
394 if (!thissop)
return getGroup();
396 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
404 if (!thissop)
return getGrouptype();
406 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
414 if (!thissop)
return getOutputedgegroup();
416 OP_Utils::evalOpParm(result, thissop,
"outputedgegroup", cookparms.
getCookTime(), 0);
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void saveData(std::ostream &os, UT_Matrix2D v)
void save(std::ostream &os) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
SOP_Node * getNode() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void loadData(UT_IStream &is, UT_Vector4D &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 setGroup(const UT_StringHolder &val)
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
const OP_Context & context() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
constexpr SYS_FORCE_INLINE T & z() noexcept
static void loadData(UT_IStream &is, int64 &v)
SYS_FORCE_INLINE const char * buffer() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void saveData(std::ostream &os, UT_Vector4D v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
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, UT_Vector2D &v)
SOP_EdgeStraightenParms()
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_StringHolder & getOutputedgegroup() const
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void loadFromOpSubclass(const LoadParms &loadparms) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void loadData(UT_IStream &is, fpreal64 &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const SOP_EdgeStraightenParms &src) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
SYS_FORCE_INLINE UT_StringHolder getToken(Grouptype enum_value)
bool load(UT_IStream &is)
static void loadData(UT_IStream &is, bool &v)
void setGrouptype(Grouptype val)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
ParmType getNestParmType(TempIndex fieldnum) const override
Grouptype getGrouptype() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
static void saveData(std::ostream &os, UT_Vector2D v)
constexpr SYS_FORCE_INLINE T & z() noexcept
const OP_GraphProxy * graph() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool isParmColorRamp(exint idx) const override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void saveBinary(std::ostream &os) const
Save string to binary stream.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
GT_API const UT_StringHolder version
const char * getNestParmName(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
Grouptype opGrouptype(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void saveData(std::ostream &os, UT_StringHolder s)
UT_StringHolder opOutputedgegroup(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
DEP_MicroNode * depnode() const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void saveData(std::ostream &os, int64 v)
void copyFrom(const OP_NodeParms *src) override
void setOutputedgegroup(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & w() noexcept
exint getNestNumParms(TempIndex idx) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
fpreal getCookTime() const
const char * findChar(int c) const
static void saveData(std::ostream &os, fpreal64 v)
static void saveData(std::ostream &os, UT_Vector3D v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
static void saveData(std::ostream &os, UT_Matrix4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
static void saveData(std::ostream &os, UT_Matrix3D v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool operator!=(const SOP_EdgeStraightenParms &src) const
constexpr SYS_FORCE_INLINE T & x() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override