23 namespace SOP_VolumeAnalysisEnums
36 using namespace UT::Literal;
55 using namespace UT::Literal;
88 if (myGroup != src.myGroup)
return false;
89 if (myAnalysis != src.myAnalysis)
return false;
90 if (myEdgedetectmode != src.myEdgedetectmode)
return false;
107 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
110 graph->
evalOpParm(myAnalysis, nodeidx,
"analysis", time, 0);
111 myEdgedetectmode = 0;
112 if (
true && ( (
true&&!(((
int64(getAnalysis())!=3)))) ) )
113 graph->
evalOpParm(myEdgedetectmode, nodeidx,
"edgedetectmode", time, 0);
129 template <
typename T>
136 if (idx.
size() != instance.
size()+1)
141 coerceValue(value, myGroup);
144 coerceValue(value, myAnalysis);
147 coerceValue(value, myEdgedetectmode);
163 { doGetParmValue(idx, instance, value); }
165 { doGetParmValue(idx, instance, value); }
167 { doGetParmValue(idx, instance, value); }
169 { doGetParmValue(idx, instance, value); }
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 template <
typename T>
192 if (idx.
size() != instance.
size()+1)
197 coerceValue(myGroup, ( ( value ) ));
200 coerceValue(myAnalysis, clampMinValue(0, clampMaxValue(3, value ) ));
203 coerceValue(myEdgedetectmode, clampMinValue(0, clampMaxValue(1, value ) ));
210 { doSetParmValue(idx, instance, value); }
212 { doSetParmValue(idx, instance, value); }
214 { doSetParmValue(idx, instance, value); }
216 { doSetParmValue(idx, instance, value); }
218 { doSetParmValue(idx, instance, value); }
220 { doSetParmValue(idx, instance, value); }
222 { doSetParmValue(idx, instance, value); }
224 { doSetParmValue(idx, instance, value); }
226 { doSetParmValue(idx, instance, value); }
228 { doSetParmValue(idx, instance, value); }
230 { doSetParmValue(idx, instance, value); }
246 if (fieldnum.
size() < 1)
255 return "edgedetectmode";
263 if (fieldnum.
size() < 1)
264 return PARM_UNSUPPORTED;
275 return PARM_UNSUPPORTED;
311 loadData(is, rampdata);
329 int typelen = colon - data.
buffer();
343 {
int64 iv =
v; UTwrite(os, &iv); }
345 { UTwrite<fpreal64>(os, &
v); }
347 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
349 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
350 UTwrite<fpreal64>(os, &v.
z()); }
352 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
353 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
365 if (s) s->save(ostr);
367 saveData(os, result);
374 ostr << s->getDataTypeToken();
379 saveData(os, result);
383 void save(std::ostream &os)
const
387 saveData(os, myGroup);
388 saveData(os, myAnalysis);
389 saveData(os, myEdgedetectmode);
402 loadData(is, myGroup);
403 loadData(is, myAnalysis);
404 loadData(is, myEdgedetectmode);
414 if (!thissop)
return getGroup();
416 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
424 if (!thissop)
return getAnalysis();
426 OP_Utils::evalOpParm(result, thissop,
"analysis", cookparms.
getCookTime(), 0);
434 if (!thissop)
return getEdgedetectmode();
436 OP_Utils::evalOpParm(result, thissop,
"edgedetectmode", cookparms.
getCookTime(), 0);
443 int64 myEdgedetectmode;
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
SOP_Node * getNode() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void saveData(std::ostream &os, int64 v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
const char * getNestParmName(TempIndex fieldnum) const override
ParmType getNestParmType(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Vector4D v)
exint bread(int32 *buffer, exint asize=1)
static void saveData(std::ostream &os, UT_Matrix2D v)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
const OP_Context & context() const
static void loadData(UT_IStream &is, UT_Vector4I &v)
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
SYS_FORCE_INLINE UT_StringHolder getToken(Analysis enum_value)
exint getNestNumParms(TempIndex idx) const override
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, bool &v)
void loadFromOpSubclass(const LoadParms &loadparms) override
static void saveData(std::ostream &os, fpreal64 v)
**But if you need a result
Analysis getAnalysis() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
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_SharedPtr< UT_Ramp > &v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
bool load(UT_IStream &is)
constexpr SYS_FORCE_INLINE T & x() noexcept
static void saveData(std::ostream &os, UT_Matrix3D v)
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void saveData(std::ostream &os, UT_Vector3D v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void loadData(UT_IStream &is, int64 &v)
static void saveData(std::ostream &os, UT_Matrix4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setAnalysis(Analysis val)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
static void saveData(std::ostream &os, UT_StringHolder s)
Analysis opAnalysis(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & z() noexcept
bool isParmColorRamp(exint idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
const UT_StringHolder & getGroup() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
const OP_GraphProxy * graph() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, fpreal64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setEdgedetectmode(Edgedetectmode val)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
Edgedetectmode getEdgedetectmode() const
bool operator!=(const SOP_VolumeAnalysisParms &src) const
DEP_MicroNode * depnode() const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
LeafData & operator=(const LeafData &)=delete
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
Utility class for containing a color ramp.
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void saveData(std::ostream &os, UT_Vector2D v)
void setGroup(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & w() noexcept
bool operator==(const SOP_VolumeAnalysisParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
fpreal getCookTime() const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void saveData(std::ostream &os, bool v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
const char * findChar(int c) const
void copyFrom(const OP_NodeParms *src) override
Edgedetectmode opEdgedetectmode(const SOP_NodeVerb::CookParms &cookparms) const
void save(std::ostream &os) const
constexpr SYS_FORCE_INLINE T & y() noexcept
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
SOP_VolumeAnalysisParms()
constexpr SYS_FORCE_INLINE T & x() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void loadData(UT_IStream &is, UT_Vector4D &v)