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;
116 graph->
evalOpParm(myGroup, nodeidx,
"group", time, graph->
isDirect()?
nullptr:depnode);
119 graph->
evalOpParm(myGrouptype, nodeidx,
"grouptype", time, graph->
isDirect()?
nullptr:depnode);
122 graph->
evalOpParm(myMethod, nodeidx,
"method", time, graph->
isDirect()?
nullptr:depnode);
123 myOutputedgegroup =
""_UTsh;
125 graph->
evalOpParm(myOutputedgegroup, nodeidx,
"outputedgegroup", time, graph->
isDirect()?
nullptr:depnode);
141 template <
typename T>
148 if (idx.
size() != instance.
size()+1)
153 coerceValue(value, myGroup);
156 coerceValue(value, myGrouptype);
159 coerceValue(value, myMethod);
162 coerceValue(value, myOutputedgegroup);
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 { doGetParmValue(idx, instance, value); }
194 { doGetParmValue(idx, instance, value); }
196 { doGetParmValue(idx, instance, value); }
198 { doGetParmValue(idx, instance, value); }
200 template <
typename T>
207 if (idx.
size() != instance.
size()+1)
212 coerceValue(myGroup, ( ( value ) ));
215 coerceValue(myGrouptype, clampMinValue(0, clampMaxValue(4, value ) ));
218 coerceValue(myMethod, clampMinValue(0, clampMaxValue(2, value ) ));
221 coerceValue(myOutputedgegroup, ( ( value ) ));
228 { doSetParmValue(idx, instance, value); }
230 { doSetParmValue(idx, instance, value); }
232 { doSetParmValue(idx, instance, value); }
234 { doSetParmValue(idx, instance, value); }
236 { doSetParmValue(idx, instance, value); }
238 { doSetParmValue(idx, instance, value); }
240 { doSetParmValue(idx, instance, value); }
242 { doSetParmValue(idx, instance, value); }
244 { doSetParmValue(idx, instance, value); }
246 { doSetParmValue(idx, instance, value); }
248 { doSetParmValue(idx, instance, value); }
264 if (fieldnum.
size() < 1)
275 return "outputedgegroup";
283 if (fieldnum.
size() < 1)
284 return PARM_UNSUPPORTED;
297 return PARM_UNSUPPORTED;
333 loadData(is, rampdata);
351 int typelen = colon - data.
buffer();
365 {
int64 iv =
v; UTwrite(os, &iv); }
367 { UTwrite<fpreal64>(os, &
v); }
369 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
371 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
372 UTwrite<fpreal64>(os, &v.
z()); }
374 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
375 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
387 if (s) s->save(ostr);
389 saveData(os, result);
396 ostr << s->getDataTypeToken();
401 saveData(os, result);
405 void save(std::ostream &os)
const
409 saveData(os, myGroup);
410 saveData(os, myGrouptype);
411 saveData(os, myMethod);
412 saveData(os, myOutputedgegroup);
425 loadData(is, myGroup);
426 loadData(is, myGrouptype);
427 loadData(is, myMethod);
428 loadData(is, myOutputedgegroup);
438 if (!thissop)
return getGroup();
440 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
448 if (!thissop)
return getGrouptype();
450 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
458 if (!thissop)
return getMethod();
460 OP_Utils::evalOpParm(result, thissop,
"method", cookparms.
getCookTime(), 0);
468 if (!thissop)
return getOutputedgegroup();
470 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
GLsizei const GLfloat * value
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_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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
virtual UT_StringHolder baseGetSignature() const
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)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
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