23 namespace SOP_EndsEnums
38 using namespace UT::Literal;
63 using namespace UT::Literal;
85 using namespace UT::Literal;
104 using namespace UT::Literal;
105 switch (enum_value) {
142 if (myGroup != src.myGroup)
return false;
143 if (myCloseu != src.myCloseu)
return false;
144 if (myClosev != src.myClosev)
return false;
145 if (myClampu != src.myClampu)
return false;
146 if (myClampv != src.myClampv)
return false;
147 if (myPshapeu != src.myPshapeu)
return false;
148 if (myPshapev != src.myPshapev)
return false;
167 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
170 graph->
evalOpParm(myCloseu, nodeidx,
"closeu", time, 0);
173 graph->
evalOpParm(myClosev, nodeidx,
"closev", time, 0);
176 graph->
evalOpParm(myClampu, nodeidx,
"clampu", time, 0);
179 graph->
evalOpParm(myClampv, nodeidx,
"clampv", time, 0);
181 if (
true && ( (
true&&!(((
int64(getCloseu())==0)&&(
int64(getClampu())==0)))) ) )
182 graph->
evalOpParm(myPshapeu, nodeidx,
"pshapeu", time, 0);
184 if (
true && ( (
true&&!(((
int64(getClosev())==0)&&(
int64(getClampv())==0)))) ) )
185 graph->
evalOpParm(myPshapev, nodeidx,
"pshapev", time, 0);
201 template <
typename T>
208 if (idx.
size() != instance.
size()+1)
213 coerceValue(value, myGroup);
216 coerceValue(value, myCloseu);
219 coerceValue(value, myClosev);
222 coerceValue(value, myClampu);
225 coerceValue(value, myClampv);
228 coerceValue(value, myPshapeu);
231 coerceValue(value, myPshapev);
247 { doGetParmValue(idx, instance, value); }
249 { doGetParmValue(idx, instance, value); }
251 { doGetParmValue(idx, instance, value); }
253 { doGetParmValue(idx, instance, value); }
255 { doGetParmValue(idx, instance, value); }
257 { doGetParmValue(idx, instance, value); }
259 { doGetParmValue(idx, instance, value); }
261 { doGetParmValue(idx, instance, value); }
263 { doGetParmValue(idx, instance, value); }
265 { doGetParmValue(idx, instance, value); }
267 { doGetParmValue(idx, instance, value); }
269 template <
typename T>
276 if (idx.
size() != instance.
size()+1)
281 coerceValue(myGroup, ( ( value ) ));
284 coerceValue(myCloseu, clampMinValue(0, clampMaxValue(5, value ) ));
287 coerceValue(myClosev, clampMinValue(0, clampMaxValue(5, value ) ));
290 coerceValue(myClampu, clampMinValue(0, clampMaxValue(2, value ) ));
293 coerceValue(myClampv, clampMinValue(0, clampMaxValue(2, value ) ));
296 coerceValue(myPshapeu, ( ( value ) ));
299 coerceValue(myPshapev, ( ( value ) ));
306 { doSetParmValue(idx, instance, value); }
308 { doSetParmValue(idx, instance, value); }
310 { doSetParmValue(idx, instance, value); }
312 { doSetParmValue(idx, instance, value); }
314 { doSetParmValue(idx, instance, value); }
316 { doSetParmValue(idx, instance, value); }
318 { doSetParmValue(idx, instance, value); }
320 { doSetParmValue(idx, instance, value); }
322 { doSetParmValue(idx, instance, value); }
324 { doSetParmValue(idx, instance, value); }
326 { doSetParmValue(idx, instance, value); }
342 if (fieldnum.
size() < 1)
367 if (fieldnum.
size() < 1)
368 return PARM_UNSUPPORTED;
387 return PARM_UNSUPPORTED;
423 loadData(is, rampdata);
441 int typelen = colon - data.
buffer();
455 {
int64 iv =
v; UTwrite(os, &iv); }
457 { UTwrite<fpreal64>(os, &
v); }
459 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
461 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
462 UTwrite<fpreal64>(os, &v.
z()); }
464 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
465 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
477 if (s) s->save(ostr);
479 saveData(os, result);
486 ostr << s->getDataTypeToken();
491 saveData(os, result);
495 void save(std::ostream &os)
const
499 saveData(os, myGroup);
500 saveData(os, myCloseu);
501 saveData(os, myClosev);
502 saveData(os, myClampu);
503 saveData(os, myClampv);
504 saveData(os, myPshapeu);
505 saveData(os, myPshapev);
518 loadData(is, myGroup);
519 loadData(is, myCloseu);
520 loadData(is, myClosev);
521 loadData(is, myClampu);
522 loadData(is, myClampv);
523 loadData(is, myPshapeu);
524 loadData(is, myPshapev);
534 if (!thissop)
return getGroup();
536 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
544 if (!thissop)
return getCloseu();
546 OP_Utils::evalOpParm(result, thissop,
"closeu", cookparms.
getCookTime(), 0);
554 if (!thissop)
return getClosev();
556 OP_Utils::evalOpParm(result, thissop,
"closev", cookparms.
getCookTime(), 0);
564 if (!thissop)
return getClampu();
566 OP_Utils::evalOpParm(result, thissop,
"clampu", cookparms.
getCookTime(), 0);
574 if (!thissop)
return getClampv();
576 OP_Utils::evalOpParm(result, thissop,
"clampv", cookparms.
getCookTime(), 0);
584 if (!thissop)
return getPshapeu();
586 OP_Utils::evalOpParm(result, thissop,
"pshapeu", cookparms.
getCookTime(), 0);
594 if (!thissop)
return getPshapev();
596 OP_Utils::evalOpParm(result, thissop,
"pshapev", cookparms.
getCookTime(), 0);
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
bool isParmColorRamp(exint idx) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void setGroup(const UT_StringHolder &val)
Closeu opCloseu(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
SOP_Node * getNode() const
void save(std::ostream &os) const
Closev opClosev(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setClosev(Closev val)
const char * getNestParmName(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void loadData(UT_IStream &is, UT_Vector3D &v)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
static void loadData(UT_IStream &is, UT_Matrix3D &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
void loadFromOpSubclass(const LoadParms &loadparms) override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void saveData(std::ostream &os, UT_Vector4D v)
const OP_Context & context() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void loadData(UT_IStream &is, fpreal64 &v)
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
exint getNestNumParms(TempIndex idx) const override
An output stream object that owns its own string buffer storage.
void setPshapeu(bool val)
SYS_FORCE_INLINE UT_StringHolder getToken(Closeu enum_value)
static void loadData(UT_IStream &is, UT_StringHolder &v)
**But if you need a result
static void saveData(std::ostream &os, UT_Matrix2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void setCloseu(Closeu val)
constexpr SYS_FORCE_INLINE T & x() noexcept
bool opPshapeu(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
static void loadData(UT_IStream &is, UT_Matrix2D &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void loadData(UT_IStream &is, int64 &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
bool load(UT_IStream &is)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void saveData(std::ostream &os, int64 v)
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 loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
constexpr SYS_FORCE_INLINE T & z() noexcept
static void saveData(std::ostream &os, fpreal64 v)
const OP_GraphProxy * graph() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void saveData(std::ostream &os, bool v)
static void saveData(std::ostream &os, UT_Matrix3D v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void saveData(std::ostream &os, UT_Vector3D v)
static void saveData(std::ostream &os, UT_Matrix4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const 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.
GT_API const UT_StringHolder version
bool operator!=(const SOP_EndsParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setClampu(Clampu val)
bool opPshapev(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
bool operator==(const SOP_EndsParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void copyFrom(const OP_NodeParms *src) override
DEP_MicroNode * depnode() const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setPshapev(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
constexpr SYS_FORCE_INLINE T & w() noexcept
void setClampv(Clampv val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
fpreal getCookTime() const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
const UT_StringHolder & getGroup() const
const char * findChar(int c) const
static void loadData(UT_IStream &is, bool &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void loadData(UT_IStream &is, UT_Vector3I &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
static void saveData(std::ostream &os, UT_StringHolder s)
Clampv opClampv(const SOP_NodeVerb::CookParms &cookparms) const
Clampu opClampu(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector2D v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
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
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)