22 using namespace UT::Literal;
25 namespace SOP_SplitPointsEnums
47 myAttribName =
"N"_sh;
59 if (myGroup != src.myGroup)
return false;
60 if (myGroupType != src.myGroupType)
return false;
61 if (myUseAttrib != src.myUseAttrib)
return false;
62 if (myAttribName != src.myAttribName)
return false;
63 if (myTol != src.myTol)
return false;
64 if (myPromote != src.myPromote)
return false;
80 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
83 graph->
evalOpParm(myGroupType, nodeidx,
"grouptype", time, 0);
86 graph->
evalOpParm(myUseAttrib, nodeidx,
"useattrib", time, 0);
87 myAttribName =
"N"_sh;
88 if (
true && ( (
true&&!(((getUseAttrib()==0)))) ) )
89 graph->
evalOpParm(myAttribName, nodeidx,
"attribname", time, 0);
91 if (
true && ( (
true&&!(((getUseAttrib()==0)))) ) )
92 graph->
evalOpParm(myTol, nodeidx,
"tol", time, 0);
94 if (
true && ( (
true&&!(((getUseAttrib()==0)))) ) )
95 graph->
evalOpParm(myPromote, nodeidx,
"promote", time, 0);
111 template <
typename T>
118 if (idx.
size() != instance.
size()+1)
123 coerceValue(value, myGroup);
126 coerceValue(value, myGroupType);
129 coerceValue(value, myUseAttrib);
132 coerceValue(value, myAttribName);
135 coerceValue(value, myTol);
138 coerceValue(value, myPromote);
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 { doGetParmValue(idx, instance, value); }
159 { doGetParmValue(idx, instance, value); }
161 { doGetParmValue(idx, instance, value); }
163 { doGetParmValue(idx, instance, value); }
165 { doGetParmValue(idx, instance, value); }
167 template <
typename T>
174 if (idx.
size() != instance.
size()+1)
179 coerceValue(myGroup, ( ( value ) ));
182 coerceValue(myGroupType, clampMinValue(0, clampMaxValue(3, value ) ));
185 coerceValue(myUseAttrib, ( ( value ) ));
188 coerceValue(myAttribName, ( ( value ) ));
191 coerceValue(myTol, clampMinValue(0, ( value ) ));
194 coerceValue(myPromote, ( ( value ) ));
201 { doSetParmValue(idx, instance, value); }
203 { doSetParmValue(idx, instance, value); }
205 { doSetParmValue(idx, instance, value); }
207 { doSetParmValue(idx, instance, value); }
209 { doSetParmValue(idx, instance, value); }
211 { doSetParmValue(idx, instance, value); }
213 { doSetParmValue(idx, instance, value); }
215 { doSetParmValue(idx, instance, value); }
217 { doSetParmValue(idx, instance, value); }
219 { doSetParmValue(idx, instance, value); }
221 { doSetParmValue(idx, instance, value); }
237 if (fieldnum.
size() < 1)
260 if (fieldnum.
size() < 1)
261 return PARM_UNSUPPORTED;
278 return PARM_UNSUPPORTED;
314 loadData(is, rampdata);
332 int typelen = colon - data.
buffer();
346 {
int64 iv =
v; UTwrite(os, &iv); }
348 { UTwrite<fpreal64>(os, &
v); }
350 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
352 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
353 UTwrite<fpreal64>(os, &v.
z()); }
355 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
356 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
368 if (s) s->save(ostr);
370 saveData(os, result);
377 ostr << s->getDataTypeToken();
382 saveData(os, result);
386 void save(std::ostream &os)
const
390 saveData(os, myGroup);
391 saveData(os, myGroupType);
392 saveData(os, myUseAttrib);
393 saveData(os, myAttribName);
395 saveData(os, myPromote);
408 loadData(is, myGroup);
409 loadData(is, myGroupType);
410 loadData(is, myUseAttrib);
411 loadData(is, myAttribName);
413 loadData(is, myPromote);
423 if (!thissop)
return getGroup();
425 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
433 if (!thissop)
return getGroupType();
435 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
443 if (!thissop)
return getUseAttrib();
445 OP_Utils::evalOpParm(result, thissop,
"useattrib", cookparms.
getCookTime(), 0);
453 if (!thissop)
return getAttribName();
455 OP_Utils::evalOpParm(result, thissop,
"attribname", cookparms.
getCookTime(), 0);
463 if (!thissop)
return getTol();
465 OP_Utils::evalOpParm(result, thissop,
"tol", cookparms.
getCookTime(), 0);
473 if (!thissop)
return getPromote();
475 OP_Utils::evalOpParm(result, thissop,
"promote", cookparms.
getCookTime(), 0);
static void loadData(UT_IStream &is, UT_Vector4D &v)
exint getNestNumParms(TempIndex idx) const override
const UT_StringHolder & getAttribName() const
SOP_Node * getNode() const
GroupType opGroupType(const SOP_NodeVerb::CookParms &cookparms) const
~SOP_SplitPointsParms() override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Vector3I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
static void saveData(std::ostream &os, UT_StringHolder s)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void saveData(std::ostream &os, int64 v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setPromote(bool val)
static void saveData(std::ostream &os, bool v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void saveData(std::ostream &os, fpreal64 v)
constexpr SYS_FORCE_INLINE T & z() noexcept
void copyFrom(const SOP_NodeParms *src) override
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 saveData(std::ostream &os, UT_Matrix2D v)
static void saveData(std::ostream &os, UT_Vector3D v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void saveData(std::ostream &os, UT_Matrix3D v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setGroupType(GroupType val)
void setAttribName(const UT_StringHolder &val)
bool getUseAttrib() const
static void loadData(UT_IStream &is, bool &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
bool opUseAttrib(const SOP_NodeVerb::CookParms &cookparms) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void loadData(UT_IStream &is, fpreal64 &v)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
ParmType getNestParmType(TempIndex fieldnum) const 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_Matrix4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setTol(fpreal64 val)
void loadFromOpSubclass(const LoadParms &loadparms) override
static void loadData(UT_IStream &is, UT_Vector2D &v)
GroupType getGroupType() const
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, int64 &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, UT_StringHolder &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setUseAttrib(bool val)
const UT_StringHolder & getGroup() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void save(std::ostream &os) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
Utility class for containing a color ramp.
bool load(UT_IStream &is)
static void saveData(std::ostream &os, UT_Vector4D v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
fpreal getCookTime() const
bool opPromote(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opTol(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
const char * findChar(int c) const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
bool operator==(const SOP_SplitPointsParms &src) const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setGroup(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
UT_StringHolder opAttribName(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void saveData(std::ostream &os, UT_Vector2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
bool operator!=(const SOP_SplitPointsParms &src) const
constexpr SYS_FORCE_INLINE T & x() noexcept