23 namespace SOP_EdgeStraightenEnums
43 myOutputedgegroup =
""_UTsh;
56 if (myGroup != src.myGroup)
return false;
57 if (myGrouptype != src.myGrouptype)
return false;
58 if (myOutputedgegroup != src.myOutputedgegroup)
return false;
74 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
77 graph->
evalOpParm(myGrouptype, nodeidx,
"grouptype", time, 0);
78 myOutputedgegroup =
""_UTsh;
80 graph->
evalOpParm(myOutputedgegroup, nodeidx,
"outputedgegroup", time, 0);
103 if (idx.
size() != instance.
size()+1)
130 { doGetParmValue(idx, instance, value); }
132 { doGetParmValue(idx, instance, value); }
134 { doGetParmValue(idx, instance, value); }
136 { doGetParmValue(idx, instance, value); }
138 { doGetParmValue(idx, instance, value); }
140 { doGetParmValue(idx, instance, value); }
142 { doGetParmValue(idx, instance, value); }
144 { doGetParmValue(idx, instance, value); }
146 { doGetParmValue(idx, instance, value); }
148 { doGetParmValue(idx, instance, value); }
150 { doGetParmValue(idx, instance, value); }
152 template <
typename T>
159 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)
222 return "outputedgegroup";
230 if (fieldnum.
size() < 1)
231 return PARM_UNSUPPORTED;
261 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
263 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
265 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
278 loadData(is, rampdata);
296 int typelen = colon - data.
buffer();
310 {
int64 iv =
v; UTwrite(os, &iv); }
312 { UTwrite<fpreal64>(os, &
v); }
314 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
316 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
317 UTwrite<fpreal64>(os, &v.
z()); }
319 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
320 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
332 if (s) s->save(ostr);
334 saveData(os, result);
341 ostr << s->getDataTypeToken();
346 saveData(os, result);
350 void save(std::ostream &os)
const
354 saveData(os, myGroup);
355 saveData(os, myGrouptype);
356 saveData(os, myOutputedgegroup);
369 loadData(is, myGroup);
370 loadData(is, myGrouptype);
371 loadData(is, myOutputedgegroup);
381 if (!thissop)
return getGroup();
383 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
391 if (!thissop)
return getGrouptype();
393 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
401 if (!thissop)
return getOutputedgegroup();
403 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)
T clampMaxValue(fpreal maxvalue, const T &src) const
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)
T clampMinValue(fpreal minvalue, const T &src) const
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)
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)
void coerceValue(T &result, const S &src) const
UT_StringHolder opOutputedgegroup(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
DEP_MicroNode * depnode() const
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
OP_NodeParms & operator=(const OP_NodeParms &)=default
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