20 using namespace UT::Literal;
23 namespace SOP_EdgeEqualizeEnums
52 myOutputedgegroup =
""_sh;
62 if (myGroup != src.myGroup)
return false;
63 if (myGrouptype != src.myGrouptype)
return false;
64 if (myMethod != src.myMethod)
return false;
65 if (myOutputedgegroup != src.myOutputedgegroup)
return false;
82 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
85 graph->
evalOpParm(myGrouptype, nodeidx,
"grouptype", time, 0);
88 graph->
evalOpParm(myMethod, nodeidx,
"method", time, 0);
89 myOutputedgegroup =
""_sh;
91 graph->
evalOpParm(myOutputedgegroup, nodeidx,
"outputedgegroup", time, 0);
107 template <
typename T>
114 if (idx.
size() != instance.
size()+1)
119 coerceValue(value, myGroup);
122 coerceValue(value, myGrouptype);
125 coerceValue(value, myMethod);
128 coerceValue(value, myOutputedgegroup);
135 { doGetParmValue(idx, instance, value); }
137 { doGetParmValue(idx, instance, value); }
139 { doGetParmValue(idx, instance, value); }
141 { doGetParmValue(idx, instance, value); }
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 template <
typename T>
164 if (idx.
size() != instance.
size()+1)
169 coerceValue(myGroup, value);
172 coerceValue(myGrouptype, value);
175 coerceValue(myMethod, value);
178 coerceValue(myOutputedgegroup, 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); }
199 { doSetParmValue(idx, instance, value); }
201 { doSetParmValue(idx, instance, value); }
203 { doSetParmValue(idx, instance, value); }
205 { doSetParmValue(idx, instance, value); }
221 if (fieldnum.
size() < 1)
232 return "outputedgegroup";
240 if (fieldnum.
size() < 1)
241 return PARM_UNSUPPORTED;
254 return PARM_UNSUPPORTED;
290 loadData(is, rampdata);
308 int typelen = colon - data.
buffer();
322 {
int64 iv =
v; UTwrite(os, &iv); }
324 { UTwrite<fpreal64>(os, &
v); }
326 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
328 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
329 UTwrite<fpreal64>(os, &v.
z()); }
331 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
332 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
344 if (s) s->save(ostr);
346 saveData(os, result);
353 ostr << s->getDataTypeToken();
358 saveData(os, result);
362 void save(std::ostream &os)
const
366 saveData(os, myGroup);
367 saveData(os, myGrouptype);
368 saveData(os, myMethod);
369 saveData(os, myOutputedgegroup);
382 loadData(is, myGroup);
383 loadData(is, myGrouptype);
384 loadData(is, myMethod);
385 loadData(is, myOutputedgegroup);
395 if (!thissop)
return getGroup();
397 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
405 if (!thissop)
return getGrouptype();
407 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
415 if (!thissop)
return getMethod();
417 OP_Utils::evalOpParm(result, thissop,
"method", cookparms.
getCookTime(), 0);
425 if (!thissop)
return getOutputedgegroup();
427 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
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
GLuint const GLfloat * val
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setOutputedgegroup(const UT_StringHolder &val)
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() 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)
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
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
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.
GLint GLenum GLsizei GLint GLsizei const void * data
void setGrouptype(Grouptype val)
void copyFrom(const SOP_NodeParms *src) override
static void saveData(std::ostream &os, int64 v)
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
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
DEP_MicroNode * depnode() const
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
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)
GLdouble GLdouble GLdouble r
void setMethod(Method val)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
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
~SOP_EdgeEqualizeParms() override
static void saveData(std::ostream &os, fpreal64 v)
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
Grouptype getGrouptype() const
const UT_StringHolder & getGroup() const
void setGroup(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
GLsizei const GLfloat * value
const OP_Context & context() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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
void save(std::ostream &os) const