23 namespace SOP_EdgeEqualizeEnums
52 myOutputedgegroup =
""_UTsh;
65 if (myGroup != src.myGroup)
return false;
66 if (myGrouptype != src.myGrouptype)
return false;
67 if (myMethod != src.myMethod)
return false;
68 if (myOutputedgegroup != src.myOutputedgegroup)
return false;
85 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
88 graph->
evalOpParm(myGrouptype, nodeidx,
"grouptype", time, 0);
91 graph->
evalOpParm(myMethod, nodeidx,
"method", time, 0);
92 myOutputedgegroup =
""_UTsh;
94 graph->
evalOpParm(myOutputedgegroup, nodeidx,
"outputedgegroup", time, 0);
110 template <
typename T>
117 if (idx.
size() != instance.
size()+1)
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 { doGetParmValue(idx, instance, value); }
167 { doGetParmValue(idx, instance, value); }
169 template <
typename T>
176 if (idx.
size() != instance.
size()+1)
197 { doSetParmValue(idx, instance, 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); }
233 if (fieldnum.
size() < 1)
244 return "outputedgegroup";
252 if (fieldnum.
size() < 1)
253 return PARM_UNSUPPORTED;
285 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
287 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
289 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
302 loadData(is, rampdata);
320 int typelen = colon - data.
buffer();
334 {
int64 iv =
v; UTwrite(os, &iv); }
336 { UTwrite<fpreal64>(os, &
v); }
338 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
340 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
341 UTwrite<fpreal64>(os, &v.
z()); }
343 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
344 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
356 if (s) s->save(ostr);
358 saveData(os, result);
365 ostr << s->getDataTypeToken();
370 saveData(os, result);
374 void save(std::ostream &os)
const
378 saveData(os, myGroup);
379 saveData(os, myGrouptype);
380 saveData(os, myMethod);
381 saveData(os, myOutputedgegroup);
394 loadData(is, myGroup);
395 loadData(is, myGrouptype);
396 loadData(is, myMethod);
397 loadData(is, myOutputedgegroup);
407 if (!thissop)
return getGroup();
409 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
417 if (!thissop)
return getGrouptype();
419 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
427 if (!thissop)
return getMethod();
429 OP_Utils::evalOpParm(result, thissop,
"method", cookparms.
getCookTime(), 0);
437 if (!thissop)
return getOutputedgegroup();
439 OP_Utils::evalOpParm(result, thissop,
"outputedgegroup", cookparms.
getCookTime(), 0);
static void saveData(std::ostream &os, UT_StringHolder s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
Grouptype opGrouptype(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix3D v)
UT_StringHolder opOutputedgegroup(const SOP_NodeVerb::CookParms &cookparms) const
bool isParmColorRamp(exint idx) const override
SOP_Node * getNode() const
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void saveData(std::ostream &os, UT_Matrix4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
T clampMaxValue(fpreal maxvalue, const T &src) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void loadData(UT_IStream &is, bool &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 fpreal &value) override
const OP_Context & context() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
constexpr SYS_FORCE_INLINE T & z() noexcept
void setOutputedgegroup(const UT_StringHolder &val)
SYS_FORCE_INLINE const char * buffer() const
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_Vector2I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
**But if you need a result
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
T clampMinValue(fpreal minvalue, const T &src) 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 setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator!=(const SOP_EdgeEqualizeParms &src) const
exint getNestNumParms(TempIndex idx) const override
static void saveData(std::ostream &os, UT_Vector4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
const char * getNestParmName(TempIndex fieldnum) const override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
static void loadData(UT_IStream &is, UT_Vector4I &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
ParmType getNestParmType(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &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 setGrouptype(Grouptype val)
const OP_GraphProxy * graph() const
static void saveData(std::ostream &os, int64 v)
void copyFrom(const OP_NodeParms *src) override
bool load(UT_IStream &is)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const 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 doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void loadFromOpSubclass(const LoadParms &loadparms) override
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void saveData(std::ostream &os, UT_Vector3D v)
const UT_StringHolder & getOutputedgegroup() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void coerceValue(T &result, const S &src) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
DEP_MicroNode * depnode() const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, int64 &v)
Utility class for containing a color ramp.
bool operator==(const SOP_EdgeEqualizeParms &src) const
static void saveData(std::ostream &os, UT_Vector2D v)
constexpr SYS_FORCE_INLINE T & w() noexcept
void setMethod(Method val)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
fpreal getCookTime() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
const char * findChar(int c) const
static void saveData(std::ostream &os, fpreal64 v)
Grouptype getGrouptype() const
const UT_StringHolder & getGroup() const
void setGroup(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector3D &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, UT_Vector2D &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
static void saveData(std::ostream &os, UT_Matrix2D v)
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
void save(std::ostream &os) const