23 namespace SOP_LineEnums
36 using namespace UT::Literal;
74 if (myType != src.myType)
return false;
75 if (myOrigin != src.myOrigin)
return false;
76 if (myDir != src.myDir)
return false;
77 if (myDist != src.myDist)
return false;
78 if (myPoints != src.myPoints)
return false;
79 if (
myOrder != src.myOrder)
return false;
95 graph->
evalOpParm(myType, nodeidx,
"type", time, 0);
98 graph->
evalOpParm(myOrigin, nodeidx,
"origin", time, 0);
101 graph->
evalOpParm(myDir, nodeidx,
"dir", time, 0);
104 graph->
evalOpParm(myDist, nodeidx,
"dist", time, 0);
107 graph->
evalOpParm(myPoints, nodeidx,
"points", time, 0);
109 if (
true && ( (
true&&!(((
int64(getType())==0))||((
int64(getType())==3)))) ) )
126 template <
typename T>
133 if (idx.
size() != instance.
size()+1)
138 coerceValue(value, myType);
141 coerceValue(value, myOrigin);
144 coerceValue(value, myDir);
147 coerceValue(value, myDist);
150 coerceValue(value, myPoints);
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 { doGetParmValue(idx, instance, value); }
187 { doGetParmValue(idx, instance, value); }
189 { doGetParmValue(idx, instance, value); }
191 template <
typename T>
198 if (idx.
size() != instance.
size()+1)
203 coerceValue(myType, clampMinValue(0, clampMaxValue(3, value ) ));
206 coerceValue(myOrigin, ( ( value ) ));
209 coerceValue(myDir, ( ( value ) ));
212 coerceValue(myDist, ( ( value ) ));
215 coerceValue(myPoints, clampMinValue(0, ( value ) ));
218 coerceValue(
myOrder, clampMinValue(2, clampMaxValue(11, value ) ));
225 { doSetParmValue(idx, instance, 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); }
261 if (fieldnum.
size() < 1)
284 if (fieldnum.
size() < 1)
285 return PARM_UNSUPPORTED;
302 return PARM_UNSUPPORTED;
338 loadData(is, rampdata);
356 int typelen = colon - data.
buffer();
370 {
int64 iv =
v; UTwrite(os, &iv); }
372 { UTwrite<fpreal64>(os, &
v); }
374 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
376 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
377 UTwrite<fpreal64>(os, &v.
z()); }
379 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
380 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
392 if (s) s->save(ostr);
394 saveData(os, result);
401 ostr << s->getDataTypeToken();
406 saveData(os, result);
410 void save(std::ostream &os)
const
414 saveData(os, myType);
415 saveData(os, myOrigin);
417 saveData(os, myDist);
418 saveData(os, myPoints);
432 loadData(is, myType);
433 loadData(is, myOrigin);
435 loadData(is, myDist);
436 loadData(is, myPoints);
447 if (!thissop)
return getType();
449 OP_Utils::evalOpParm(result, thissop,
"type", cookparms.
getCookTime(), 0);
457 if (!thissop)
return getOrigin();
459 OP_Utils::evalOpParm(result, thissop,
"origin", cookparms.
getCookTime(), 0);
467 if (!thissop)
return getDir();
469 OP_Utils::evalOpParm(result, thissop,
"dir", cookparms.
getCookTime(), 0);
477 if (!thissop)
return getDist();
479 OP_Utils::evalOpParm(result, thissop,
"dist", cookparms.
getCookTime(), 0);
487 if (!thissop)
return getPoints();
489 OP_Utils::evalOpParm(result, thissop,
"points", cookparms.
getCookTime(), 0);
497 if (!thissop)
return getOrder();
499 OP_Utils::evalOpParm(result, thissop,
"order", cookparms.
getCookTime(), 0);
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void loadData(UT_IStream &is, fpreal64 &v)
fpreal64 opDist(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, fpreal64 v)
SOP_Node * getNode() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
exint getNestNumParms(TempIndex idx) const override
UT_Vector3D opDir(const SOP_NodeVerb::CookParms &cookparms) const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, UT_Vector3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
**But if you need a result
UT_Vector3D getDir() const
void setOrigin(UT_Vector3D val)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
int64 opOrder(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void loadFromOpSubclass(const LoadParms &loadparms) override
constexpr SYS_FORCE_INLINE T & x() noexcept
static void saveData(std::ostream &os, UT_Vector4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void saveData(std::ostream &os, bool v)
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, bool &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
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
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
const char * getNestParmName(TempIndex fieldnum) const override
const OP_GraphProxy * graph() const
bool isParmColorRamp(exint idx) const override
static void saveData(std::ostream &os, UT_Vector2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_Matrix3D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void loadData(UT_IStream &is, UT_Vector4D &v)
void copyFrom(const OP_NodeParms *src) override
ParmType getNestParmType(TempIndex fieldnum) const override
UT_Vector3T< fpreal64 > UT_Vector3D
static void saveData(std::ostream &os, UT_Matrix4D v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
SYS_FORCE_INLINE UT_StringHolder getToken(Type enum_value)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setDist(fpreal64 val)
bool load(UT_IStream &is)
bool operator!=(const SOP_LineParms &src) const
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.
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
Type opType(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D opOrigin(const SOP_NodeVerb::CookParms &cookparms) const
void setPoints(int64 val)
DEP_MicroNode * depnode() const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
int64 opPoints(const SOP_NodeVerb::CookParms &cookparms) const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void saveData(std::ostream &os, UT_StringHolder s)
constexpr SYS_FORCE_INLINE T & w() noexcept
void setDir(UT_Vector3D val)
static void loadData(UT_IStream &is, int64 &v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
fpreal getCookTime() const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
bool operator==(const SOP_LineParms &src) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void saveData(std::ostream &os, int64 v)
void save(std::ostream &os) const
const char * findChar(int c) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
UT_Vector3D getOrigin() const
constexpr SYS_FORCE_INLINE T & y() noexcept
static void saveData(std::ostream &os, UT_Matrix2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
static void loadData(UT_IStream &is, UT_Vector4I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept