23 namespace SOP_CurveNetworkEnums
39 using namespace UT::Literal;
62 using namespace UT::Literal;
81 using namespace UT::Literal;
123 if (myUprims != src.myUprims)
return false;
124 if (myVprims != src.myVprims)
return false;
125 if (mySurftype != src.mySurftype)
return false;
126 if (myKeepshape != src.myKeepshape)
return false;
127 if (myClosev != src.myClosev)
return false;
128 if (myForce != src.myForce)
return false;
129 if (myOrderv != src.myOrderv)
return false;
130 if (mySkinops != src.mySkinops)
return false;
131 if (myInc != src.myInc)
return false;
132 if (myPrim != src.myPrim)
return false;
133 if (myPolys != src.myPolys)
return false;
151 graph->
evalOpParm(myUprims, nodeidx,
"uprims", time, 0);
154 graph->
evalOpParm(myVprims, nodeidx,
"vprims", time, 0);
157 graph->
evalOpParm(mySurftype, nodeidx,
"surftype", time, 0);
160 graph->
evalOpParm(myKeepshape, nodeidx,
"keepshape", time, 0);
162 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==1))||((getVprims()!=
"")))) ) )
163 graph->
evalOpParm(myClosev, nodeidx,
"closev", time, 0);
165 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==1))||((getVprims()!=
"")))) ) )
166 graph->
evalOpParm(myForce, nodeidx,
"force", time, 0);
168 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==1))||((getVprims()!=
""))||((getForce()==0)))) ) )
169 graph->
evalOpParm(myOrderv, nodeidx,
"orderv", time, 0);
171 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==1))||((getVprims()!=
"")))) ) )
172 graph->
evalOpParm(mySkinops, nodeidx,
"skinops", time, 0);
174 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==1))||((getVprims()!=
""))||((
int64(getSkinops())==0)))) ) )
175 graph->
evalOpParm(myInc, nodeidx,
"inc", time, 0);
178 graph->
evalOpParm(myPrim, nodeidx,
"prim", time, 0);
181 graph->
evalOpParm(myPolys, nodeidx,
"polys", time, 0);
197 template <
typename T>
204 if (idx.
size() != instance.
size()+1)
209 coerceValue(value, myUprims);
212 coerceValue(value, myVprims);
215 coerceValue(value, mySurftype);
218 coerceValue(value, myKeepshape);
221 coerceValue(value, myClosev);
224 coerceValue(value, myForce);
227 coerceValue(value, myOrderv);
230 coerceValue(value, mySkinops);
233 coerceValue(value, myInc);
236 coerceValue(value, myPrim);
239 coerceValue(value, myPolys);
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 { doGetParmValue(idx, instance, value); }
271 { doGetParmValue(idx, instance, value); }
273 { doGetParmValue(idx, instance, value); }
275 { doGetParmValue(idx, instance, value); }
277 template <
typename T>
284 if (idx.
size() != instance.
size()+1)
289 coerceValue(myUprims, ( ( value ) ));
292 coerceValue(myVprims, ( ( value ) ));
295 coerceValue(mySurftype, clampMinValue(0, clampMaxValue(6, value ) ));
298 coerceValue(myKeepshape, ( ( value ) ));
301 coerceValue(myClosev, clampMinValue(0, clampMaxValue(2, value ) ));
304 coerceValue(myForce, ( ( value ) ));
307 coerceValue(myOrderv, clampMinValue(2, clampMaxValue(11, value ) ));
310 coerceValue(mySkinops, clampMinValue(0, clampMaxValue(2, value ) ));
313 coerceValue(myInc, clampMinValue(1, ( value ) ));
316 coerceValue(myPrim, ( ( value ) ));
319 coerceValue(myPolys, ( ( value ) ));
326 { doSetParmValue(idx, instance, value); }
328 { doSetParmValue(idx, instance, value); }
330 { doSetParmValue(idx, instance, value); }
332 { doSetParmValue(idx, instance, 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); }
362 if (fieldnum.
size() < 1)
395 if (fieldnum.
size() < 1)
396 return PARM_UNSUPPORTED;
423 return PARM_UNSUPPORTED;
459 loadData(is, rampdata);
477 int typelen = colon - data.
buffer();
491 {
int64 iv =
v; UTwrite(os, &iv); }
493 { UTwrite<fpreal64>(os, &
v); }
495 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
497 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
498 UTwrite<fpreal64>(os, &v.
z()); }
500 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
501 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
513 if (s) s->save(ostr);
515 saveData(os, result);
522 ostr << s->getDataTypeToken();
527 saveData(os, result);
531 void save(std::ostream &os)
const
535 saveData(os, myUprims);
536 saveData(os, myVprims);
537 saveData(os, mySurftype);
538 saveData(os, myKeepshape);
539 saveData(os, myClosev);
540 saveData(os, myForce);
541 saveData(os, myOrderv);
542 saveData(os, mySkinops);
544 saveData(os, myPrim);
545 saveData(os, myPolys);
558 loadData(is, myUprims);
559 loadData(is, myVprims);
560 loadData(is, mySurftype);
561 loadData(is, myKeepshape);
562 loadData(is, myClosev);
563 loadData(is, myForce);
564 loadData(is, myOrderv);
565 loadData(is, mySkinops);
567 loadData(is, myPrim);
568 loadData(is, myPolys);
578 if (!thissop)
return getUprims();
580 OP_Utils::evalOpParm(result, thissop,
"uprims", cookparms.
getCookTime(), 0);
588 if (!thissop)
return getVprims();
590 OP_Utils::evalOpParm(result, thissop,
"vprims", cookparms.
getCookTime(), 0);
598 if (!thissop)
return getSurftype();
600 OP_Utils::evalOpParm(result, thissop,
"surftype", cookparms.
getCookTime(), 0);
608 if (!thissop)
return getKeepshape();
610 OP_Utils::evalOpParm(result, thissop,
"keepshape", cookparms.
getCookTime(), 0);
618 if (!thissop)
return getClosev();
620 OP_Utils::evalOpParm(result, thissop,
"closev", cookparms.
getCookTime(), 0);
628 if (!thissop)
return getForce();
630 OP_Utils::evalOpParm(result, thissop,
"force", cookparms.
getCookTime(), 0);
638 if (!thissop)
return getOrderv();
640 OP_Utils::evalOpParm(result, thissop,
"orderv", cookparms.
getCookTime(), 0);
648 if (!thissop)
return getSkinops();
650 OP_Utils::evalOpParm(result, thissop,
"skinops", cookparms.
getCookTime(), 0);
658 if (!thissop)
return getInc();
660 OP_Utils::evalOpParm(result, thissop,
"inc", cookparms.
getCookTime(), 0);
668 if (!thissop)
return getPrim();
670 OP_Utils::evalOpParm(result, thissop,
"prim", cookparms.
getCookTime(), 0);
678 if (!thissop)
return getPolys();
680 OP_Utils::evalOpParm(result, thissop,
"polys", cookparms.
getCookTime(), 0);
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
SOP_Node * getNode() const
Skinops opSkinops(const SOP_NodeVerb::CookParms &cookparms) const
bool operator!=(const SOP_CurveNetworkParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void loadData(UT_IStream &is, fpreal64 &v)
void loadFromOpSubclass(const LoadParms &loadparms) override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
const OP_Context & context() const
exint getNestNumParms(TempIndex idx) const override
static void loadData(UT_IStream &is, UT_StringHolder &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
constexpr SYS_FORCE_INLINE T & z() noexcept
static void loadData(UT_IStream &is, bool &v)
SYS_FORCE_INLINE const char * buffer() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
An output stream object that owns its own string buffer storage.
bool getKeepshape() const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
const char * getNestParmName(TempIndex fieldnum) const override
**But if you need a result
void setUprims(const UT_StringHolder &val)
Skinops getSkinops() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
SYS_FORCE_INLINE UT_StringHolder getToken(Surftype enum_value)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
Closev opClosev(const SOP_NodeVerb::CookParms &cookparms) const
virtual NodeIdx getInput(NodeIdx idx, int input, bool markused=false) const =0
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
bool opPrim(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void saveData(std::ostream &os, UT_Vector3D v)
static void saveData(std::ostream &os, fpreal64 v)
void setKeepshape(bool val)
static void saveData(std::ostream &os, int64 v)
bool isParmColorRamp(exint idx) const override
bool opPolys(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool operator==(const SOP_CurveNetworkParms &src) const
Surftype opSurftype(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & z() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
UT_StringHolder opUprims(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector2D v)
void copyFrom(const OP_NodeParms *src) override
const UT_StringHolder & getVprims() const
const OP_GraphProxy * graph() const
bool load(UT_IStream &is)
static void saveData(std::ostream &os, UT_Matrix3D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void saveData(std::ostream &os, UT_Matrix4D v)
UT_StringHolder opVprims(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
int64 opOrderv(const SOP_NodeVerb::CookParms &cookparms) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
const UT_StringHolder & getUprims() const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
GT_API const UT_StringHolder version
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
int64 opInc(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, int64 &v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, UT_Vector4I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
DEP_MicroNode * depnode() const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setVprims(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Matrix2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
fpreal getCookTime() const
static void saveData(std::ostream &os, UT_StringHolder s)
static void saveData(std::ostream &os, bool v)
const char * findChar(int c) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void setClosev(Closev val)
bool opForce(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
Surftype getSurftype() const
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
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
bool opKeepshape(const SOP_NodeVerb::CookParms &cookparms) const
void setSkinops(Skinops val)
void setSurftype(Surftype val)
static void loadData(UT_IStream &is, UT_Vector2I &v)
ParmType getNestParmType(TempIndex fieldnum) const override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
void save(std::ostream &os) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
void setOrderv(int64 val)
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
constexpr SYS_FORCE_INLINE T & x() noexcept