23 namespace SOP_PackPointsEnums
52 myPath =
"op:`opfullpath('.')`"_UTsh;
66 if (myGroup != src.myGroup)
return false;
67 if (myTileSize != src.myTileSize)
return false;
68 if (myViewportLOD != src.myViewportLOD)
return false;
69 if (myCreatePath != src.myCreatePath)
return false;
70 if (myPath != src.myPath)
return false;
71 if (myPivot != src.myPivot)
return false;
88 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
91 graph->
evalOpParm(myTileSize, nodeidx,
"tilesize", time, 0);
94 graph->
evalOpParm(myViewportLOD, nodeidx,
"viewportlod", time, 0);
97 graph->
evalOpParm(myCreatePath, nodeidx,
"createpath", time, 0);
98 myPath =
"op:`opfullpath('.')`"_UTsh;
99 if (
true && ( (
true&&!(((getCreatePath()==0)))) ) )
100 graph->
evalOpParm(myPath, nodeidx,
"path", time, 0);
103 graph->
evalOpParm(myPivot, nodeidx,
"pivot", time, 0);
119 template <
typename T>
126 if (idx.
size() != instance.
size()+1)
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 { doGetParmValue(idx, instance, value); }
180 { doGetParmValue(idx, instance, value); }
182 { doGetParmValue(idx, instance, value); }
184 template <
typename T>
191 if (idx.
size() != instance.
size()+1)
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); }
234 { doSetParmValue(idx, instance, value); }
236 { doSetParmValue(idx, instance, value); }
238 { doSetParmValue(idx, instance, value); }
254 if (fieldnum.
size() < 1)
263 return "viewportlod";
277 if (fieldnum.
size() < 1)
278 return PARM_UNSUPPORTED;
314 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
316 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
318 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
331 loadData(is, rampdata);
349 int typelen = colon - data.
buffer();
363 {
int64 iv =
v; UTwrite(os, &iv); }
365 { UTwrite<fpreal64>(os, &
v); }
367 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
369 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
370 UTwrite<fpreal64>(os, &v.
z()); }
372 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
373 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
385 if (s) s->save(ostr);
387 saveData(os, result);
394 ostr << s->getDataTypeToken();
399 saveData(os, result);
403 void save(std::ostream &os)
const
407 saveData(os, myGroup);
408 saveData(os, myTileSize);
409 saveData(os, myViewportLOD);
410 saveData(os, myCreatePath);
411 saveData(os, myPath);
412 saveData(os, myPivot);
425 loadData(is, myGroup);
426 loadData(is, myTileSize);
427 loadData(is, myViewportLOD);
428 loadData(is, myCreatePath);
429 loadData(is, myPath);
430 loadData(is, myPivot);
440 if (!thissop)
return getGroup();
442 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
450 if (!thissop)
return getTileSize();
452 OP_Utils::evalOpParm(result, thissop,
"tilesize", cookparms.
getCookTime(), 0);
460 if (!thissop)
return getViewportLOD();
462 OP_Utils::evalOpParm(result, thissop,
"viewportlod", cookparms.
getCookTime(), 0);
470 if (!thissop)
return getCreatePath();
472 OP_Utils::evalOpParm(result, thissop,
"createpath", cookparms.
getCookTime(), 0);
480 if (!thissop)
return getPath();
482 OP_Utils::evalOpParm(result, thissop,
"path", cookparms.
getCookTime(), 0);
490 if (!thissop)
return getPivot();
492 OP_Utils::evalOpParm(result, thissop,
"pivot", cookparms.
getCookTime(), 0);
493 return Pivot(result);
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
bool load(UT_IStream &is)
static void saveData(std::ostream &os, bool v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
SOP_Node * getNode() const
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
T clampMaxValue(fpreal maxvalue, const T &src) const
exint bread(int32 *buffer, exint asize=1)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void save(std::ostream &os) const
fpreal64 getTileSize() const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
static void saveData(std::ostream &os, UT_Vector4D v)
SYS_FORCE_INLINE const char * buffer() const
static void saveData(std::ostream &os, UT_Matrix2D v)
Pivot opPivot(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, UT_StringHolder s)
**But if you need a result
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void loadData(UT_IStream &is, UT_Vector4D &v)
T clampMinValue(fpreal minvalue, const T &src) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
constexpr SYS_FORCE_INLINE T & x() noexcept
static void saveData(std::ostream &os, fpreal64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
ViewportLOD getViewportLOD() const
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void setCreatePath(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void loadData(UT_IStream &is, UT_Vector2D &v)
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Vector2I &v)
SYS_FORCE_INLINE const char * buffer() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
constexpr SYS_FORCE_INLINE T & z() noexcept
const OP_GraphProxy * graph() const
static void saveData(std::ostream &os, UT_Matrix3D v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void copyFrom(const OP_NodeParms *src) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
bool isParmColorRamp(exint idx) const override
static void loadData(UT_IStream &is, int64 &v)
static void saveData(std::ostream &os, UT_Matrix4D v)
bool operator!=(const SOP_PackPointsParms &src) const
void setTileSize(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void saveData(std::ostream &os, UT_Vector3D v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setViewportLOD(ViewportLOD val)
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setPath(const UT_StringHolder &val)
ViewportLOD opViewportLOD(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
const UT_StringHolder & getGroup() const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
bool operator==(const SOP_PackPointsParms &src) const
void coerceValue(T &result, const S &src) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
fpreal64 opTileSize(const SOP_NodeVerb::CookParms &cookparms) const
DEP_MicroNode * depnode() const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
Utility class for containing a color ramp.
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
constexpr SYS_FORCE_INLINE T & w() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
fpreal getCookTime() const
static void loadData(UT_IStream &is, UT_Vector4I &v)
bool opCreatePath(const SOP_NodeVerb::CookParms &cookparms) const
const char * findChar(int c) const
void setGroup(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Vector2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
const UT_StringHolder & getPath() const
UT_StringHolder opPath(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, bool &v)
exint getNestNumParms(TempIndex idx) const override
bool getCreatePath() const
static void loadData(UT_IStream &is, fpreal64 &v)
ParmType getNestParmType(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & y() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
SYS_FORCE_INLINE bool isstring() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void loadFromOpSubclass(const LoadParms &loadparms) override
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept