23 namespace SOP_BlastEnums
45 myComputenorms =
false;
61 if (myGroup != src.myGroup)
return false;
62 if (myGrouptype != src.myGrouptype)
return false;
63 if (myComputenorms != src.myComputenorms)
return false;
64 if (myNegate != src.myNegate)
return false;
65 if (myFillhole != src.myFillhole)
return false;
66 if (myRemovegrp != src.myRemovegrp)
return false;
82 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
85 graph->
evalOpParm(myGrouptype, nodeidx,
"grouptype", time, 0);
86 myComputenorms =
false;
88 graph->
evalOpParm(myComputenorms, nodeidx,
"computenorms", time, 0);
91 graph->
evalOpParm(myNegate, nodeidx,
"negate", time, 0);
93 if (
true && ( (
true&&!(((
int64(getGrouptype())!=3)))) ) )
94 graph->
evalOpParm(myFillhole, nodeidx,
"fillhole", time, 0);
97 graph->
evalOpParm(myRemovegrp, nodeidx,
"removegrp", time, 0);
113 template <
typename T>
120 if (idx.
size() != instance.
size()+1)
156 { doGetParmValue(idx, instance, value); }
158 { doGetParmValue(idx, instance, value); }
160 { doGetParmValue(idx, instance, value); }
162 { doGetParmValue(idx, instance, value); }
164 { doGetParmValue(idx, instance, value); }
166 { doGetParmValue(idx, instance, value); }
168 { doGetParmValue(idx, instance, value); }
170 { doGetParmValue(idx, instance, value); }
172 { doGetParmValue(idx, instance, value); }
174 { doGetParmValue(idx, instance, value); }
176 { doGetParmValue(idx, instance, value); }
178 template <
typename T>
185 if (idx.
size() != instance.
size()+1)
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); }
232 { doSetParmValue(idx, instance, value); }
248 if (fieldnum.
size() < 1)
257 return "computenorms";
271 if (fieldnum.
size() < 1)
272 return PARM_UNSUPPORTED;
308 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
310 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
312 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
325 loadData(is, rampdata);
343 int typelen = colon - data.
buffer();
357 {
int64 iv =
v; UTwrite(os, &iv); }
359 { UTwrite<fpreal64>(os, &
v); }
361 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
363 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
364 UTwrite<fpreal64>(os, &v.
z()); }
366 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
367 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
379 if (s) s->save(ostr);
381 saveData(os, result);
388 ostr << s->getDataTypeToken();
393 saveData(os, result);
397 void save(std::ostream &os)
const
401 saveData(os, myGroup);
402 saveData(os, myGrouptype);
403 saveData(os, myComputenorms);
404 saveData(os, myNegate);
405 saveData(os, myFillhole);
406 saveData(os, myRemovegrp);
419 loadData(is, myGroup);
420 loadData(is, myGrouptype);
421 loadData(is, myComputenorms);
422 loadData(is, myNegate);
423 loadData(is, myFillhole);
424 loadData(is, myRemovegrp);
434 if (!thissop)
return getGroup();
436 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
444 if (!thissop)
return getGrouptype();
446 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
454 if (!thissop)
return getComputenorms();
456 OP_Utils::evalOpParm(result, thissop,
"computenorms", cookparms.
getCookTime(), 0);
464 if (!thissop)
return getNegate();
466 OP_Utils::evalOpParm(result, thissop,
"negate", cookparms.
getCookTime(), 0);
474 if (!thissop)
return getFillhole();
476 OP_Utils::evalOpParm(result, thissop,
"fillhole", cookparms.
getCookTime(), 0);
484 if (!thissop)
return getRemovegrp();
486 OP_Utils::evalOpParm(result, thissop,
"removegrp", cookparms.
getCookTime(), 0);
static void loadData(UT_IStream &is, UT_Vector2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setGroup(const UT_StringHolder &val)
SOP_Node * getNode() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setGrouptype(Grouptype val)
T clampMaxValue(fpreal maxvalue, const T &src) const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
Grouptype opGrouptype(const SOP_NodeVerb::CookParms &cookparms) const
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
ParmType getNestParmType(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Vector3I &v)
Grouptype getGrouptype() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void save(std::ostream &os) const
void setComputenorms(bool val)
const OP_Context & context() const
exint getNestNumParms(TempIndex idx) const override
constexpr SYS_FORCE_INLINE T & z() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
SYS_FORCE_INLINE const char * buffer() const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
bool opNegate(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
void setRemovegrp(bool val)
**But if you need a result
bool getRemovegrp() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
T clampMinValue(fpreal minvalue, const T &src) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, int64 &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
static void saveData(std::ostream &os, int64 v)
constexpr SYS_FORCE_INLINE T & x() noexcept
static void saveData(std::ostream &os, UT_Matrix2D v)
bool operator!=(const SOP_BlastParms &src) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void saveData(std::ostream &os, UT_Vector2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void saveData(std::ostream &os, UT_Vector3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void saveData(std::ostream &os, UT_Vector4D 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 doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void saveData(std::ostream &os, bool v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
const OP_GraphProxy * graph() const
static void saveData(std::ostream &os, UT_StringHolder s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void loadData(UT_IStream &is, UT_Vector2I &v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
bool load(UT_IStream &is)
void loadFromOpSubclass(const LoadParms &loadparms) override
static void loadData(UT_IStream &is, UT_StringHolder &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) 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
static void loadData(UT_IStream &is, UT_Vector4D &v)
GT_API const UT_StringHolder version
const UT_StringHolder & getGroup() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
bool opRemovegrp(const SOP_NodeVerb::CookParms &cookparms) const
void copyFrom(const OP_NodeParms *src) override
void setFillhole(bool val)
bool operator==(const SOP_BlastParms &src) const
void coerceValue(T &result, const S &src) const
DEP_MicroNode * depnode() const
static void loadData(UT_IStream &is, fpreal64 &v)
Utility class for containing a color ramp.
bool isParmColorRamp(exint idx) const override
constexpr SYS_FORCE_INLINE T & w() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
bool opFillhole(const SOP_NodeVerb::CookParms &cookparms) const
fpreal getCookTime() const
const char * findChar(int c) const
static void saveData(std::ostream &os, fpreal64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
static void saveData(std::ostream &os, UT_Matrix4D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
bool opComputenorms(const SOP_NodeVerb::CookParms &cookparms) const
bool getComputenorms() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
SYS_FORCE_INLINE bool isstring() const
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept