23 namespace SOP_VolumeConvolve3Enums
37 using namespace UT::Literal;
76 if (myGroup != src.myGroup)
return false;
77 if (myConvolveZM != src.myConvolveZM)
return false;
78 if (myConvolveZZ != src.myConvolveZZ)
return false;
79 if (myConvolveZP != src.myConvolveZP)
return false;
80 if (myNormalize != src.myNormalize)
return false;
81 if (myOperation != src.myOperation)
return false;
97 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
100 graph->
evalOpParm(myConvolveZM, nodeidx,
"convolvezm", time, 0);
103 graph->
evalOpParm(myConvolveZZ, nodeidx,
"convolvezz", time, 0);
106 graph->
evalOpParm(myConvolveZP, nodeidx,
"convolvezp", time, 0);
109 graph->
evalOpParm(myNormalize, nodeidx,
"normalize", time, 0);
112 graph->
evalOpParm(myOperation, nodeidx,
"operation", time, 0);
128 template <
typename T>
135 if (idx.
size() != instance.
size()+1)
140 coerceValue(value, myGroup);
143 coerceValue(value, myConvolveZM);
146 coerceValue(value, myConvolveZZ);
149 coerceValue(value, myConvolveZP);
152 coerceValue(value, myNormalize);
155 coerceValue(value, myOperation);
171 { doGetParmValue(idx, instance, value); }
173 { doGetParmValue(idx, instance, value); }
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 template <
typename T>
200 if (idx.
size() != instance.
size()+1)
205 coerceValue(myGroup, ( ( value ) ));
208 coerceValue(myConvolveZM, ( ( value ) ));
211 coerceValue(myConvolveZZ, ( ( value ) ));
214 coerceValue(myConvolveZP, ( ( value ) ));
217 coerceValue(myNormalize, ( ( value ) ));
220 coerceValue(myOperation, clampMinValue(0, clampMaxValue(4, 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); }
247 { doSetParmValue(idx, instance, value); }
263 if (fieldnum.
size() < 1)
286 if (fieldnum.
size() < 1)
287 return PARM_UNSUPPORTED;
304 return PARM_UNSUPPORTED;
340 loadData(is, rampdata);
358 int typelen = colon - data.
buffer();
372 {
int64 iv =
v; UTwrite(os, &iv); }
374 { UTwrite<fpreal64>(os, &
v); }
376 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
378 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
379 UTwrite<fpreal64>(os, &v.
z()); }
381 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
382 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
394 if (s) s->save(ostr);
396 saveData(os, result);
403 ostr << s->getDataTypeToken();
408 saveData(os, result);
412 void save(std::ostream &os)
const
416 saveData(os, myGroup);
417 saveData(os, myConvolveZM);
418 saveData(os, myConvolveZZ);
419 saveData(os, myConvolveZP);
420 saveData(os, myNormalize);
421 saveData(os, myOperation);
434 loadData(is, myGroup);
435 loadData(is, myConvolveZM);
436 loadData(is, myConvolveZZ);
437 loadData(is, myConvolveZP);
438 loadData(is, myNormalize);
439 loadData(is, myOperation);
449 if (!thissop)
return getGroup();
451 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
459 if (!thissop)
return getConvolveZM();
461 OP_Utils::evalOpParm(result, thissop,
"convolvezm", cookparms.
getCookTime(), 0);
469 if (!thissop)
return getConvolveZZ();
471 OP_Utils::evalOpParm(result, thissop,
"convolvezz", cookparms.
getCookTime(), 0);
479 if (!thissop)
return getConvolveZP();
481 OP_Utils::evalOpParm(result, thissop,
"convolvezp", cookparms.
getCookTime(), 0);
489 if (!thissop)
return getNormalize();
491 OP_Utils::evalOpParm(result, thissop,
"normalize", cookparms.
getCookTime(), 0);
499 if (!thissop)
return getOperation();
501 OP_Utils::evalOpParm(result, thissop,
"operation", cookparms.
getCookTime(), 0);
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool getNormalize() const
SOP_Node * getNode() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void save(std::ostream &os) const
static void loadData(UT_IStream &is, int64 &v)
void setConvolveZZ(UT_Matrix3D val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
UT_Matrix3D getConvolveZP() const
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE UT_StringHolder getToken(Operation enum_value)
static void loadData(UT_IStream &is, bool &v)
const OP_Context & context() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
UT_Matrix3D opConvolveZP(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void saveData(std::ostream &os, UT_Vector2D v)
static void loadData(UT_IStream &is, fpreal64 &v)
**But if you need a result
bool operator==(const SOP_VolumeConvolve3Parms &src) const
UT_Matrix3D opConvolveZM(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getGroup() const
static void saveData(std::ostream &os, UT_Vector4D v)
static void saveData(std::ostream &os, fpreal64 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.
static void loadData(UT_IStream &is, UT_Matrix2D &v)
SOP_VolumeConvolve3Parms()
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
bool operator!=(const SOP_VolumeConvolve3Parms &src) const
static void saveData(std::ostream &os, UT_Matrix4D v)
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
ParmType getNestParmType(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
UT_Matrix3D getConvolveZM() const
static void saveData(std::ostream &os, UT_Vector3D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
UT_Matrix3D getConvolveZZ() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void saveData(std::ostream &os, UT_Matrix2D 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 loadFromOpSubclass(const LoadParms &loadparms) override
void setOperation(Operation val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
const OP_GraphProxy * graph() const
static void saveData(std::ostream &os, UT_StringHolder s)
static void saveData(std::ostream &os, int64 v)
Operation opOperation(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix3D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
bool load(UT_IStream &is)
void copyFrom(const OP_NodeParms *src) override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
static void loadData(UT_IStream &is, UT_Vector3D &v)
GT_API const UT_StringHolder version
const char * getNestParmName(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void setConvolveZM(UT_Matrix3D val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
DEP_MicroNode * depnode() const
void setNormalize(bool val)
LeafData & operator=(const LeafData &)=delete
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setGroup(const UT_StringHolder &val)
Utility class for containing a color ramp.
bool opNormalize(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
bool isParmColorRamp(exint idx) const override
constexpr SYS_FORCE_INLINE T & w() noexcept
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void saveData(std::ostream &os, bool v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
fpreal getCookTime() const
static void loadData(UT_IStream &is, UT_Vector4I &v)
const char * findChar(int c) const
exint getNestNumParms(TempIndex idx) const override
Operation getOperation() const
UT_Matrix3D opConvolveZZ(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void setConvolveZP(UT_Matrix3D val)
static void loadData(UT_IStream &is, UT_Vector3I &v)
UT_Matrix3T< fpreal64 > UT_Matrix3D
static void loadData(UT_IStream &is, UT_Matrix4D &v)
constexpr SYS_FORCE_INLINE T & x() noexcept