20 using namespace UT::Literal;
23 namespace SOP_RestEnums
59 if (myFile != src.myFile)
return false;
60 if (myNml != src.myNml)
return false;
61 if (myQuadric != src.myQuadric)
return false;
77 if (
true && ( (!((((graph->
getInput(nodeidx,1)>=0)==1)))) ) )
78 graph->
evalOpParm(myFile, nodeidx,
"file", time, 0);
81 graph->
evalOpParm(myNml, nodeidx,
"nml", time, 0);
84 graph->
evalOpParm(myQuadric, nodeidx,
"quadric", time, 0);
100 template <
typename T>
107 if (idx.
size() != instance.
size()+1)
112 coerceValue(value, myFile);
115 coerceValue(value, myNml);
118 coerceValue(value, myQuadric);
125 { doGetParmValue(idx, instance, value); }
127 { doGetParmValue(idx, instance, value); }
129 { doGetParmValue(idx, instance, value); }
131 { doGetParmValue(idx, instance, value); }
133 { doGetParmValue(idx, instance, value); }
135 { doGetParmValue(idx, instance, value); }
137 { doGetParmValue(idx, instance, value); }
139 { doGetParmValue(idx, instance, value); }
141 { doGetParmValue(idx, instance, value); }
143 { doGetParmValue(idx, instance, value); }
145 { doGetParmValue(idx, instance, value); }
147 template <
typename T>
154 if (idx.
size() != instance.
size()+1)
159 coerceValue(myFile, value);
162 coerceValue(myNml, value);
165 coerceValue(myQuadric, value);
172 { doSetParmValue(idx, instance, value); }
174 { doSetParmValue(idx, instance, value); }
176 { doSetParmValue(idx, instance, value); }
178 { doSetParmValue(idx, instance, value); }
180 { doSetParmValue(idx, instance, value); }
182 { doSetParmValue(idx, instance, value); }
184 { doSetParmValue(idx, instance, value); }
186 { doSetParmValue(idx, instance, value); }
188 { doSetParmValue(idx, instance, value); }
190 { doSetParmValue(idx, instance, value); }
192 { doSetParmValue(idx, instance, value); }
208 if (fieldnum.
size() < 1)
225 if (fieldnum.
size() < 1)
226 return PARM_UNSUPPORTED;
237 return PARM_UNSUPPORTED;
273 loadData(is, rampdata);
291 int typelen = colon - data.
buffer();
305 {
int64 iv =
v; UTwrite(os, &iv); }
307 { UTwrite<fpreal64>(os, &
v); }
309 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
311 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
312 UTwrite<fpreal64>(os, &v.
z()); }
314 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
315 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
327 if (s) s->save(ostr);
329 saveData(os, result);
336 ostr << s->getDataTypeToken();
341 saveData(os, result);
345 void save(std::ostream &os)
const
349 saveData(os, myFile);
351 saveData(os, myQuadric);
364 loadData(is, myFile);
366 loadData(is, myQuadric);
376 if (!thissop)
return getFile();
378 OP_Utils::evalOpParm(result, thissop,
"file", cookparms.
getCookTime(), 0);
386 if (!thissop)
return getNml();
388 OP_Utils::evalOpParm(result, thissop,
"nml", cookparms.
getCookTime(), 0);
396 if (!thissop)
return getQuadric();
398 OP_Utils::evalOpParm(result, thissop,
"quadric", cookparms.
getCookTime(), 0);
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
Quadric getQuadric() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
SOP_Node * getNode() const
virtual NodeIdx getInput(NodeIdx idx, int input, bool markused=false) const =0
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
GLuint const GLfloat * val
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void loadData(UT_IStream &is, UT_StringHolder &v)
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
~SOP_RestParms() override
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, fpreal64 &v)
Quadric opQuadric(const SOP_NodeVerb::CookParms &cookparms) const
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, bool &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
const UT_StringHolder & getFile() const
bool load(UT_IStream &is)
static void saveData(std::ostream &os, UT_Matrix2D v)
static void saveData(std::ostream &os, UT_StringHolder s)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
bool operator==(const SOP_RestParms &src) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
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_Vector4D &v)
GLint GLenum GLsizei GLint GLsizei const void * data
UT_StringHolder opFile(const SOP_NodeVerb::CookParms &cookparms) const
void loadFromOpSubclass(const LoadParms &loadparms) override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
Nml opNml(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void loadData(UT_IStream &is, int64 &v)
bool operator!=(const SOP_RestParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void saveData(std::ostream &os, UT_Matrix4D v)
Utility class for containing a color ramp.
void copyFrom(const SOP_NodeParms *src) override
static void saveData(std::ostream &os, UT_Vector4D v)
GLdouble GLdouble GLdouble r
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void saveData(std::ostream &os, UT_Vector3D v)
exint getNestNumParms(TempIndex idx) const override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
fpreal getCookTime() const
void setFile(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void saveData(std::ostream &os, fpreal64 v)
const char * findChar(int c) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setQuadric(Quadric val)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void save(std::ostream &os) const
static void saveData(std::ostream &os, bool v)
GLsizei const GLfloat * value
static void saveData(std::ostream &os, UT_Vector2D v)
const OP_Context & context() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
static void loadData(UT_IStream &is, UT_Vector3D &v)
SYS_FORCE_INLINE bool isstring() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
ParmType getNestParmType(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Vector2I &v)