23 namespace SOP_GridEnums
38 using namespace UT::Literal;
64 using namespace UT::Literal;
87 using namespace UT::Literal;
130 if (myType != src.myType)
return false;
131 if (mySurftype != src.mySurftype)
return false;
132 if (myOrient != src.myOrient)
return false;
133 if (mySize != src.mySize)
return false;
134 if (myT != src.myT)
return false;
135 if (myR != src.myR)
return false;
136 if (myRows != src.myRows)
return false;
137 if (myCols != src.myCols)
return false;
138 if (myOrderu != src.myOrderu)
return false;
139 if (myOrderv != src.myOrderv)
return false;
140 if (myInterpu != src.myInterpu)
return false;
141 if (myInterpv != src.myInterpv)
return false;
164 if (
true && ( (
true&&!(((
int64(getType())==4)))) ) )
165 graph->
evalOpParm(mySurftype, nodeidx,
"surftype", time, graph->
isDirect()?
nullptr:depnode);
168 graph->
evalOpParm(myOrient, nodeidx,
"orient", time, graph->
isDirect()?
nullptr:depnode);
185 if (
true && ( (
true&&!(((
int64(getType())!=2)&&(
int64(getType())!=3)))) ) )
186 graph->
evalOpParm(myOrderu, nodeidx,
"orderu", time, graph->
isDirect()?
nullptr:depnode);
188 if (
true && ( (
true&&!(((
int64(getType())!=2)&&(
int64(getType())!=3)))) ) )
189 graph->
evalOpParm(myOrderv, nodeidx,
"orderv", time, graph->
isDirect()?
nullptr:depnode);
191 if (
true && ( (
true&&!(((
int64(getType())!=2)))) ) )
192 graph->
evalOpParm(myInterpu, nodeidx,
"interpu", time, graph->
isDirect()?
nullptr:depnode);
194 if (
true && ( (
true&&!(((
int64(getType())!=2)))) ) )
195 graph->
evalOpParm(myInterpv, nodeidx,
"interpv", time, graph->
isDirect()?
nullptr:depnode);
211 template <
typename T>
218 if (idx.
size() != instance.
size()+1)
223 coerceValue(value, myType);
226 coerceValue(value, mySurftype);
229 coerceValue(value, myOrient);
232 coerceValue(value, mySize);
235 coerceValue(value, myT);
238 coerceValue(value, myR);
241 coerceValue(value, myRows);
244 coerceValue(value, myCols);
247 coerceValue(value, myOrderu);
250 coerceValue(value, myOrderv);
253 coerceValue(value, myInterpu);
256 coerceValue(value, myInterpv);
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 { doGetParmValue(idx, instance, value); }
284 { doGetParmValue(idx, instance, value); }
286 { doGetParmValue(idx, instance, value); }
288 { doGetParmValue(idx, instance, value); }
290 { doGetParmValue(idx, instance, value); }
292 { doGetParmValue(idx, instance, value); }
294 template <
typename T>
301 if (idx.
size() != instance.
size()+1)
306 coerceValue(myType, clampMinValue(0, clampMaxValue(5, value ) ));
309 coerceValue(mySurftype, clampMinValue(0, clampMaxValue(6, value ) ));
312 coerceValue(myOrient, clampMinValue(0, clampMaxValue(2, value ) ));
315 coerceValue(mySize, ( ( value ) ));
318 coerceValue(myT, ( ( value ) ));
321 coerceValue(myR, ( ( value ) ));
324 coerceValue(myRows, clampMinValue(1, ( value ) ));
327 coerceValue(myCols, clampMinValue(1, ( value ) ));
330 coerceValue(myOrderu, clampMinValue(2, clampMaxValue(11, value ) ));
333 coerceValue(myOrderv, clampMinValue(2, clampMaxValue(11, value ) ));
336 coerceValue(myInterpu, ( ( value ) ));
339 coerceValue(myInterpv, ( ( 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); }
356 { doSetParmValue(idx, instance, value); }
358 { doSetParmValue(idx, instance, value); }
360 { doSetParmValue(idx, instance, value); }
362 { doSetParmValue(idx, instance, value); }
364 { doSetParmValue(idx, instance, value); }
366 { doSetParmValue(idx, instance, value); }
382 if (fieldnum.
size() < 1)
417 if (fieldnum.
size() < 1)
418 return PARM_UNSUPPORTED;
447 return PARM_UNSUPPORTED;
483 loadData(is, rampdata);
501 int typelen = colon - data.
buffer();
515 {
int64 iv =
v; UTwrite(os, &iv); }
517 { UTwrite<fpreal64>(os, &
v); }
519 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
521 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
522 UTwrite<fpreal64>(os, &v.
z()); }
524 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
525 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
537 if (s) s->save(ostr);
539 saveData(os, result);
546 ostr << s->getDataTypeToken();
551 saveData(os, result);
555 void save(std::ostream &os)
const
559 saveData(os, myType);
560 saveData(os, mySurftype);
561 saveData(os, myOrient);
562 saveData(os, mySize);
565 saveData(os, myRows);
566 saveData(os, myCols);
567 saveData(os, myOrderu);
568 saveData(os, myOrderv);
569 saveData(os, myInterpu);
570 saveData(os, myInterpv);
583 loadData(is, myType);
584 loadData(is, mySurftype);
585 loadData(is, myOrient);
586 loadData(is, mySize);
589 loadData(is, myRows);
590 loadData(is, myCols);
591 loadData(is, myOrderu);
592 loadData(is, myOrderv);
593 loadData(is, myInterpu);
594 loadData(is, myInterpv);
604 if (!thissop)
return getType();
606 OP_Utils::evalOpParm(result, thissop,
"type", cookparms.
getCookTime(), 0);
614 if (!thissop)
return getSurftype();
616 OP_Utils::evalOpParm(result, thissop,
"surftype", cookparms.
getCookTime(), 0);
624 if (!thissop)
return getOrient();
626 OP_Utils::evalOpParm(result, thissop,
"orient", cookparms.
getCookTime(), 0);
634 if (!thissop)
return getSize();
636 OP_Utils::evalOpParm(result, thissop,
"size", cookparms.
getCookTime(), 0);
644 if (!thissop)
return getT();
646 OP_Utils::evalOpParm(result, thissop,
"t", cookparms.
getCookTime(), 0);
654 if (!thissop)
return getR();
656 OP_Utils::evalOpParm(result, thissop,
"r", cookparms.
getCookTime(), 0);
664 if (!thissop)
return getRows();
666 OP_Utils::evalOpParm(result, thissop,
"rows", cookparms.
getCookTime(), 0);
674 if (!thissop)
return getCols();
676 OP_Utils::evalOpParm(result, thissop,
"cols", cookparms.
getCookTime(), 0);
684 if (!thissop)
return getOrderu();
686 OP_Utils::evalOpParm(result, thissop,
"orderu", cookparms.
getCookTime(), 0);
694 if (!thissop)
return getOrderv();
696 OP_Utils::evalOpParm(result, thissop,
"orderv", cookparms.
getCookTime(), 0);
704 if (!thissop)
return getInterpu();
706 OP_Utils::evalOpParm(result, thissop,
"interpu", cookparms.
getCookTime(), 0);
714 if (!thissop)
return getInterpv();
716 OP_Utils::evalOpParm(result, thissop,
"interpv", cookparms.
getCookTime(), 0);
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
ParmType getNestParmType(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setOrderv(int64 val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
bool opInterpu(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, int64 &v)
const char * getNestParmName(TempIndex fieldnum) const override
SOP_Node * getNode() const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool isParmColorRamp(exint idx) const override
Surftype opSurftype(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector4D v)
static void saveData(std::ostream &os, UT_StringHolder s)
Type opType(const SOP_NodeVerb::CookParms &cookparms) const
exint bread(int32 *buffer, exint asize=1)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void save(std::ostream &os) const
UT_Vector2T< fpreal64 > UT_Vector2D
static void loadData(UT_IStream &is, UT_Vector2D &v)
GLsizei const GLfloat * value
void copyFrom(const OP_NodeParms *src) override
Surftype getSurftype() const
exint getNestNumParms(TempIndex idx) const override
static void saveData(std::ostream &os, UT_Matrix4D v)
const OP_Context & context() const
void setT(UT_Vector3D val)
constexpr SYS_FORCE_INLINE T & z() noexcept
static void loadData(UT_IStream &is, UT_Vector2I &v)
SYS_FORCE_INLINE const char * buffer() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
bool operator==(const SOP_GridParms &src) const
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setInterpu(bool val)
**But if you need a result
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setOrderu(int64 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.
UT_Vector2D opSize(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & x() noexcept
UT_Vector2D getSize() const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void loadData(UT_IStream &is, UT_Vector3D &v)
UT_Vector3D opR(const SOP_NodeVerb::CookParms &cookparms) const
bool opInterpv(const SOP_NodeVerb::CookParms &cookparms) const
void setOrient(Orient val)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
UT_Vector3D opT(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
constexpr SYS_FORCE_INLINE T & z() noexcept
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, UT_Vector2D v)
const OP_GraphProxy * graph() const
static void loadData(UT_IStream &is, UT_Vector4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setSize(UT_Vector2D val)
UT_Vector3T< fpreal64 > UT_Vector3D
void setSurftype(Surftype val)
int64 opOrderv(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, int64 v)
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.
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
GT_API const UT_StringHolder version
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
int64 opOrderu(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
DEP_MicroNode * depnode() const
static void saveData(std::ostream &os, UT_Vector3D v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
LeafData & operator=(const LeafData &)=delete
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
Utility class for containing a color ramp.
static void saveData(std::ostream &os, fpreal64 v)
static void saveData(std::ostream &os, UT_Matrix2D v)
constexpr SYS_FORCE_INLINE T & w() noexcept
virtual UT_StringHolder baseGetSignature() const
static void saveData(std::ostream &os, bool v)
int64 opCols(const SOP_NodeVerb::CookParms &cookparms) const
void setR(UT_Vector3D val)
int64 opRows(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
fpreal getCookTime() const
Orient opOrient(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, bool &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void loadData(UT_IStream &is, fpreal64 &v)
const char * findChar(int c) const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
bool operator!=(const SOP_GridParms &src) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void saveData(std::ostream &os, UT_Matrix3D v)
void setInterpv(bool val)
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
void loadFromOpSubclass(const LoadParms &loadparms) override
bool load(UT_IStream &is)
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE UT_StringHolder getToken(Type enum_value)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept