20 using namespace UT::Literal;
23 namespace SOP_EndsEnums
81 if (myGroup != src.myGroup)
return false;
82 if (myCloseu != src.myCloseu)
return false;
83 if (myClosev != src.myClosev)
return false;
84 if (myClampu != src.myClampu)
return false;
85 if (myClampv != src.myClampv)
return false;
86 if (myPshapeu != src.myPshapeu)
return false;
87 if (myPshapev != src.myPshapev)
return false;
106 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
109 graph->
evalOpParm(myCloseu, nodeidx,
"closeu", time, 0);
112 graph->
evalOpParm(myClosev, nodeidx,
"closev", time, 0);
115 graph->
evalOpParm(myClampu, nodeidx,
"clampu", time, 0);
118 graph->
evalOpParm(myClampv, nodeidx,
"clampv", time, 0);
120 if (
true && ( (!(((
int64(getCloseu())==0)&&(
int64(getClampu())==0)))) ) )
121 graph->
evalOpParm(myPshapeu, nodeidx,
"pshapeu", time, 0);
123 if (
true && ( (!(((
int64(getClosev())==0)&&(
int64(getClampv())==0)))) ) )
124 graph->
evalOpParm(myPshapev, nodeidx,
"pshapev", time, 0);
140 template <
typename T>
147 if (idx.
size() != instance.
size()+1)
152 coerceValue(value, myGroup);
155 coerceValue(value, myCloseu);
158 coerceValue(value, myClosev);
161 coerceValue(value, myClampu);
164 coerceValue(value, myClampv);
167 coerceValue(value, myPshapeu);
170 coerceValue(value, myPshapev);
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 { doGetParmValue(idx, instance, value); }
193 { doGetParmValue(idx, instance, value); }
195 { doGetParmValue(idx, instance, value); }
197 { doGetParmValue(idx, instance, value); }
199 template <
typename T>
206 if (idx.
size() != instance.
size()+1)
211 coerceValue(myGroup, value);
214 coerceValue(myCloseu, value);
217 coerceValue(myClosev, value);
220 coerceValue(myClampu, value);
223 coerceValue(myClampv, value);
226 coerceValue(myPshapeu, value);
229 coerceValue(myPshapev, value);
236 { doSetParmValue(idx, instance, value); }
238 { doSetParmValue(idx, instance, value); }
240 { doSetParmValue(idx, instance, value); }
242 { doSetParmValue(idx, instance, value); }
244 { doSetParmValue(idx, instance, value); }
246 { doSetParmValue(idx, instance, value); }
248 { doSetParmValue(idx, instance, value); }
250 { doSetParmValue(idx, instance, value); }
252 { doSetParmValue(idx, instance, value); }
254 { doSetParmValue(idx, instance, value); }
256 { doSetParmValue(idx, instance, value); }
272 if (fieldnum.
size() < 1)
297 if (fieldnum.
size() < 1)
298 return PARM_UNSUPPORTED;
317 return PARM_UNSUPPORTED;
353 loadData(is, rampdata);
371 int typelen = colon - data.
buffer();
385 {
int64 iv =
v; UTwrite(os, &iv); }
387 { UTwrite<fpreal64>(os, &
v); }
389 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
391 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
392 UTwrite<fpreal64>(os, &v.
z()); }
394 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
395 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
407 if (s) s->save(ostr);
409 saveData(os, result);
416 ostr << s->getDataTypeToken();
421 saveData(os, result);
425 void save(std::ostream &os)
const
429 saveData(os, myGroup);
430 saveData(os, myCloseu);
431 saveData(os, myClosev);
432 saveData(os, myClampu);
433 saveData(os, myClampv);
434 saveData(os, myPshapeu);
435 saveData(os, myPshapev);
448 loadData(is, myGroup);
449 loadData(is, myCloseu);
450 loadData(is, myClosev);
451 loadData(is, myClampu);
452 loadData(is, myClampv);
453 loadData(is, myPshapeu);
454 loadData(is, myPshapev);
464 if (!thissop)
return getGroup();
466 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
474 if (!thissop)
return getCloseu();
476 OP_Utils::evalOpParm(result, thissop,
"closeu", cookparms.
getCookTime(), 0);
484 if (!thissop)
return getClosev();
486 OP_Utils::evalOpParm(result, thissop,
"closev", cookparms.
getCookTime(), 0);
494 if (!thissop)
return getClampu();
496 OP_Utils::evalOpParm(result, thissop,
"clampu", cookparms.
getCookTime(), 0);
504 if (!thissop)
return getClampv();
506 OP_Utils::evalOpParm(result, thissop,
"clampv", cookparms.
getCookTime(), 0);
514 if (!thissop)
return getPshapeu();
516 OP_Utils::evalOpParm(result, thissop,
"pshapeu", cookparms.
getCookTime(), 0);
524 if (!thissop)
return getPshapev();
526 OP_Utils::evalOpParm(result, thissop,
"pshapev", cookparms.
getCookTime(), 0);
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) 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
void copyFrom(const SOP_NodeParms *src) 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)
void loadFromOpSubclass(const LoadParms &loadparms) override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
GLuint const GLfloat * val
static void saveData(std::ostream &os, UT_Vector4D v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void loadData(UT_IStream &is, fpreal64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
exint getNestNumParms(TempIndex idx) const override
An output stream object that owns its own string buffer storage.
void setPshapeu(bool val)
static void loadData(UT_IStream &is, UT_StringHolder &v)
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)
bool opPshapeu(const SOP_NodeVerb::CookParms &cookparms) const
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)
GLint GLenum GLsizei GLint GLsizei const void * data
static void saveData(std::ostream &os, fpreal64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
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
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
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)
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
void setClampv(Clampv val)
GLdouble GLdouble GLdouble r
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
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)
~SOP_EndsParms() override
static void saveData(std::ostream &os, UT_StringHolder s)
Clampv opClampv(const SOP_NodeVerb::CookParms &cookparms) const
GLsizei const GLfloat * value
Clampu opClampu(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector2D v)
const OP_Context & context() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)