23 namespace SOP_CurveEnums
36 using namespace UT::Literal;
56 using namespace UT::Literal;
75 using namespace UT::Literal;
118 if (myType != src.myType)
return false;
119 if (myMethod != src.myMethod)
return false;
120 if (myCoords != src.myCoords)
return false;
121 if (myClose != src.myClose)
return false;
122 if (myReverse != src.myReverse)
return false;
123 if (
myOrder != src.myOrder)
return false;
124 if (myParam != src.myParam)
return false;
125 if (myTolerance != src.myTolerance)
return false;
126 if (mySmooth != src.mySmooth)
return false;
127 if (myCsharp != src.myCsharp)
return false;
128 if (myKeepgeo != src.myKeepgeo)
return false;
129 if (myNormalize != src.myNormalize)
return false;
153 graph->
evalOpParm(myMethod, nodeidx,
"method", time, graph->
isDirect()?
nullptr:depnode);
156 graph->
evalOpParm(myCoords, nodeidx,
"coords", time, graph->
isDirect()?
nullptr:depnode);
158 if (
true && ( (
true&&!(((
int64(getType())==3)))) ) )
159 graph->
evalOpParm(myClose, nodeidx,
"close", time, graph->
isDirect()?
nullptr:depnode);
162 graph->
evalOpParm(myReverse, nodeidx,
"reverse", time, graph->
isDirect()?
nullptr:depnode);
164 if (
true && ( (
true&&!(((
int64(getType())!=1)&&(
int64(getType())!=2)))) ) )
167 if (
true && ( (
true&&!(((
int64(getType())!=1)&&(
int64(getType())!=2))||((
int64(getMethod())!=1)))) ) )
168 graph->
evalOpParm(myParam, nodeidx,
"param", time, graph->
isDirect()?
nullptr:depnode);
170 if (
true && ( (
true&&!(((
int64(getType())!=1)&&(
int64(getType())!=2))||((
int64(getMethod())!=2)))) ) )
171 graph->
evalOpParm(myTolerance, nodeidx,
"tolerance", time, graph->
isDirect()?
nullptr:depnode);
173 if (
true && ( (
true&&!(((
int64(getType())!=1)&&(
int64(getType())!=2))||((
int64(getMethod())!=2)))) ) )
174 graph->
evalOpParm(mySmooth, nodeidx,
"smooth", time, graph->
isDirect()?
nullptr:depnode);
176 if (
true && ( (
true&&!(((
int64(getType())!=1)&&(
int64(getType())!=2))||((
int64(getMethod())!=2)))) ) )
177 graph->
evalOpParm(myCsharp, nodeidx,
"csharp", time, graph->
isDirect()?
nullptr:depnode);
180 graph->
evalOpParm(myKeepgeo, nodeidx,
"keepgeo", time, graph->
isDirect()?
nullptr:depnode);
182 if (
true && ( (
true&&!(((
int64(getType())!=1)&&(
int64(getType())!=2))||((
int64(getMethod())!=1))||((
int64(getParam())!=0)))) ) )
183 graph->
evalOpParm(myNormalize, nodeidx,
"normalize", time, graph->
isDirect()?
nullptr:depnode);
199 template <
typename T>
206 if (idx.
size() != instance.
size()+1)
211 coerceValue(value, myType);
214 coerceValue(value, myMethod);
217 coerceValue(value, myCoords);
220 coerceValue(value, myClose);
223 coerceValue(value, myReverse);
229 coerceValue(value, myParam);
232 coerceValue(value, myTolerance);
235 coerceValue(value, mySmooth);
238 coerceValue(value, myCsharp);
241 coerceValue(value, myKeepgeo);
244 coerceValue(value, myNormalize);
260 { doGetParmValue(idx, instance, value); }
262 { doGetParmValue(idx, instance, value); }
264 { doGetParmValue(idx, instance, value); }
266 { doGetParmValue(idx, instance, value); }
268 { doGetParmValue(idx, instance, value); }
270 { doGetParmValue(idx, instance, value); }
272 { doGetParmValue(idx, instance, value); }
274 { doGetParmValue(idx, instance, value); }
276 { doGetParmValue(idx, instance, value); }
278 { doGetParmValue(idx, instance, value); }
280 { doGetParmValue(idx, instance, value); }
282 template <
typename T>
289 if (idx.
size() != instance.
size()+1)
294 coerceValue(myType, clampMinValue(0, clampMaxValue(3, value ) ));
297 coerceValue(myMethod, clampMinValue(0, clampMaxValue(2, value ) ));
300 coerceValue(myCoords, ( ( value ) ));
303 coerceValue(myClose, ( ( value ) ));
306 coerceValue(myReverse, ( ( value ) ));
309 coerceValue(
myOrder, clampMinValue(2, clampMaxValue(11, value ) ));
312 coerceValue(myParam, clampMinValue(0, clampMaxValue(2, value ) ));
315 coerceValue(myTolerance, clampMinValue(0, ( value ) ));
318 coerceValue(mySmooth, clampMinValue(0, clampMaxValue(1, value ) ));
321 coerceValue(myCsharp, ( ( value ) ));
324 coerceValue(myKeepgeo, ( ( value ) ));
327 coerceValue(myNormalize, ( ( value ) ));
334 { doSetParmValue(idx, instance, value); }
336 { doSetParmValue(idx, instance, value); }
338 { doSetParmValue(idx, instance, value); }
340 { doSetParmValue(idx, instance, value); }
342 { doSetParmValue(idx, instance, value); }
344 { doSetParmValue(idx, instance, value); }
346 { doSetParmValue(idx, instance, value); }
348 { doSetParmValue(idx, instance, value); }
350 { doSetParmValue(idx, instance, value); }
352 { doSetParmValue(idx, instance, value); }
354 { doSetParmValue(idx, instance, value); }
370 if (fieldnum.
size() < 1)
405 if (fieldnum.
size() < 1)
406 return PARM_UNSUPPORTED;
435 return PARM_UNSUPPORTED;
471 loadData(is, rampdata);
489 int typelen = colon - data.
buffer();
503 {
int64 iv =
v; UTwrite(os, &iv); }
505 { UTwrite<fpreal64>(os, &
v); }
507 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
509 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
510 UTwrite<fpreal64>(os, &v.
z()); }
512 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
513 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
525 if (s) s->save(ostr);
527 saveData(os, result);
534 ostr << s->getDataTypeToken();
539 saveData(os, result);
543 void save(std::ostream &os)
const
547 saveData(os, myType);
548 saveData(os, myMethod);
549 saveData(os, myCoords);
550 saveData(os, myClose);
551 saveData(os, myReverse);
553 saveData(os, myParam);
554 saveData(os, myTolerance);
555 saveData(os, mySmooth);
556 saveData(os, myCsharp);
557 saveData(os, myKeepgeo);
558 saveData(os, myNormalize);
571 loadData(is, myType);
572 loadData(is, myMethod);
573 loadData(is, myCoords);
574 loadData(is, myClose);
575 loadData(is, myReverse);
577 loadData(is, myParam);
578 loadData(is, myTolerance);
579 loadData(is, mySmooth);
580 loadData(is, myCsharp);
581 loadData(is, myKeepgeo);
582 loadData(is, myNormalize);
592 if (!thissop)
return getType();
594 OP_Utils::evalOpParm(result, thissop,
"type", cookparms.
getCookTime(), 0);
602 if (!thissop)
return getMethod();
604 OP_Utils::evalOpParm(result, thissop,
"method", cookparms.
getCookTime(), 0);
612 if (!thissop)
return getCoords();
614 OP_Utils::evalOpParm(result, thissop,
"coords", cookparms.
getCookTime(), 0);
622 if (!thissop)
return getClose();
624 OP_Utils::evalOpParm(result, thissop,
"close", cookparms.
getCookTime(), 0);
632 if (!thissop)
return getReverse();
634 OP_Utils::evalOpParm(result, thissop,
"reverse", cookparms.
getCookTime(), 0);
642 if (!thissop)
return getOrder();
644 OP_Utils::evalOpParm(result, thissop,
"order", cookparms.
getCookTime(), 0);
652 if (!thissop)
return getParam();
654 OP_Utils::evalOpParm(result, thissop,
"param", cookparms.
getCookTime(), 0);
655 return Param(result);
662 if (!thissop)
return getTolerance();
664 OP_Utils::evalOpParm(result, thissop,
"tolerance", cookparms.
getCookTime(), 0);
672 if (!thissop)
return getSmooth();
674 OP_Utils::evalOpParm(result, thissop,
"smooth", cookparms.
getCookTime(), 0);
682 if (!thissop)
return getCsharp();
684 OP_Utils::evalOpParm(result, thissop,
"csharp", cookparms.
getCookTime(), 0);
692 if (!thissop)
return getKeepgeo();
694 OP_Utils::evalOpParm(result, thissop,
"keepgeo", cookparms.
getCookTime(), 0);
702 if (!thissop)
return getNormalize();
704 OP_Utils::evalOpParm(result, thissop,
"normalize", cookparms.
getCookTime(), 0);
void copyFrom(const OP_NodeParms *src) override
SOP_Node * getNode() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
bool opKeepgeo(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
GLsizei const GLfloat * value
static void saveData(std::ostream &os, UT_Vector2D v)
void save(std::ostream &os) const
static void loadData(UT_IStream &is, int64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
const OP_Context & context() const
static void saveData(std::ostream &os, int64 v)
void setSmooth(fpreal64 val)
constexpr SYS_FORCE_INLINE T & z() noexcept
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
SYS_FORCE_INLINE const char * buffer() const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
const char * getNestParmName(TempIndex fieldnum) const override
bool load(UT_IStream &is)
An output stream object that owns its own string buffer storage.
void setTolerance(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
**But if you need a result
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 setReverse(bool val)
constexpr SYS_FORCE_INLINE T & x() noexcept
static void saveData(std::ostream &os, UT_Vector3D v)
void setKeepgeo(bool val)
static void saveData(std::ostream &os, UT_Matrix3D v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & x() noexcept
void setMethod(Method val)
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
fpreal64 getTolerance() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void loadFromOpSubclass(const LoadParms &loadparms) override
bool opReverse(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getSmooth() const
UT_StringHolder opCoords(const SOP_NodeVerb::CookParms &cookparms) const
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
SYS_FORCE_INLINE UT_StringHolder getToken(Type enum_value)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void saveData(std::ostream &os, bool v)
const OP_GraphProxy * graph() const
fpreal64 opTolerance(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void saveData(std::ostream &os, UT_Vector4D v)
bool operator!=(const SOP_CurveParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void saveData(std::ostream &os, UT_Matrix4D v)
bool opNormalize(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setCoords(const UT_StringHolder &val)
static void saveData(std::ostream &os, fpreal64 v)
exint getNestNumParms(TempIndex idx) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
GT_API const UT_StringHolder version
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
bool getNormalize() const
Type opType(const SOP_NodeVerb::CookParms &cookparms) const
ParmType getNestParmType(TempIndex fieldnum) const override
int64 opOrder(const SOP_NodeVerb::CookParms &cookparms) const
DEP_MicroNode * depnode() const
bool isParmColorRamp(exint idx) const override
LeafData & operator=(const LeafData &)=delete
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
Utility class for containing a color ramp.
const UT_StringHolder & getCoords() const
constexpr SYS_FORCE_INLINE T & w() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
bool opCsharp(const SOP_NodeVerb::CookParms &cookparms) const
virtual UT_StringHolder baseGetSignature() const
bool opClose(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const SOP_CurveParms &src) const
fpreal getCookTime() const
static void saveData(std::ostream &os, UT_StringHolder s)
void setNormalize(bool val)
const char * findChar(int c) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
static void loadData(UT_IStream &is, UT_Matrix3D &v)
fpreal64 opSmooth(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
Param opParam(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept