23 namespace SOP_EdgeEqualizeEnums
37 using namespace UT::Literal;
58 using namespace UT::Literal;
80 myOutputedgegroup =
""_UTsh;
93 if (myGroup != src.myGroup)
return false;
94 if (myGrouptype != src.myGrouptype)
return false;
95 if (myMethod != src.myMethod)
return false;
96 if (myOutputedgegroup != src.myOutputedgegroup)
return false;
113 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
116 graph->
evalOpParm(myGrouptype, nodeidx,
"grouptype", time, 0);
119 graph->
evalOpParm(myMethod, nodeidx,
"method", time, 0);
120 myOutputedgegroup =
""_UTsh;
122 graph->
evalOpParm(myOutputedgegroup, nodeidx,
"outputedgegroup", time, 0);
138 template <
typename T>
145 if (idx.
size() != instance.
size()+1)
150 coerceValue(value, myGroup);
153 coerceValue(value, myGrouptype);
156 coerceValue(value, myMethod);
159 coerceValue(value, myOutputedgegroup);
175 { doGetParmValue(idx, instance, value); }
177 { doGetParmValue(idx, instance, value); }
179 { doGetParmValue(idx, instance, value); }
181 { doGetParmValue(idx, instance, value); }
183 { doGetParmValue(idx, instance, value); }
185 { doGetParmValue(idx, instance, value); }
187 { doGetParmValue(idx, instance, value); }
189 { doGetParmValue(idx, instance, value); }
191 { doGetParmValue(idx, instance, value); }
193 { doGetParmValue(idx, instance, value); }
195 { doGetParmValue(idx, instance, value); }
197 template <
typename T>
204 if (idx.
size() != instance.
size()+1)
209 coerceValue(myGroup, ( ( value ) ));
212 coerceValue(myGrouptype, clampMinValue(0, clampMaxValue(4, value ) ));
215 coerceValue(myMethod, clampMinValue(0, clampMaxValue(2, value ) ));
218 coerceValue(myOutputedgegroup, ( ( value ) ));
225 { doSetParmValue(idx, instance, value); }
227 { doSetParmValue(idx, instance, value); }
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); }
261 if (fieldnum.
size() < 1)
272 return "outputedgegroup";
280 if (fieldnum.
size() < 1)
281 return PARM_UNSUPPORTED;
294 return PARM_UNSUPPORTED;
330 loadData(is, rampdata);
348 int typelen = colon - data.
buffer();
362 {
int64 iv =
v; UTwrite(os, &iv); }
364 { UTwrite<fpreal64>(os, &
v); }
366 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
368 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
369 UTwrite<fpreal64>(os, &v.
z()); }
371 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
372 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
384 if (s) s->save(ostr);
386 saveData(os, result);
393 ostr << s->getDataTypeToken();
398 saveData(os, result);
402 void save(std::ostream &os)
const
406 saveData(os, myGroup);
407 saveData(os, myGrouptype);
408 saveData(os, myMethod);
409 saveData(os, myOutputedgegroup);
422 loadData(is, myGroup);
423 loadData(is, myGrouptype);
424 loadData(is, myMethod);
425 loadData(is, myOutputedgegroup);
435 if (!thissop)
return getGroup();
437 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
445 if (!thissop)
return getGrouptype();
447 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
455 if (!thissop)
return getMethod();
457 OP_Utils::evalOpParm(result, thissop,
"method", cookparms.
getCookTime(), 0);
465 if (!thissop)
return getOutputedgegroup();
467 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
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)
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 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)
LeafData & operator=(const LeafData &)=delete
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
SYS_FORCE_INLINE UT_StringHolder getToken(Grouptype enum_value)
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)
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