23 namespace SOP_JoinEnums
34 using namespace UT::Literal;
52 using namespace UT::Literal;
82 myOnlyconnected =
false;
95 if (myGroup != src.myGroup)
return false;
96 if (myBlend != src.myBlend)
return false;
97 if (myTolerance != src.myTolerance)
return false;
98 if (myBias != src.myBias)
return false;
99 if (myKnotmult != src.myKnotmult)
return false;
100 if (myProximity != src.myProximity)
return false;
101 if (myDir != src.myDir)
return false;
102 if (myJoinop != src.myJoinop)
return false;
103 if (myInc != src.myInc)
return false;
104 if (myLoop != src.myLoop)
return false;
105 if (myPrim != src.myPrim)
return false;
106 if (myOnlyconnected != src.myOnlyconnected)
return false;
123 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
126 graph->
evalOpParm(myBlend, nodeidx,
"blend", time, 0);
129 graph->
evalOpParm(myTolerance, nodeidx,
"tolerance", time, 0);
131 if (
true && ( (
true&&!(((getBlend()==0)))) ) )
132 graph->
evalOpParm(myBias, nodeidx,
"bias", time, 0);
135 graph->
evalOpParm(myKnotmult, nodeidx,
"knotmult", time, 0);
138 graph->
evalOpParm(myProximity, nodeidx,
"proximity", time, 0);
141 graph->
evalOpParm(myDir, nodeidx,
"dir", time, 0);
144 graph->
evalOpParm(myJoinop, nodeidx,
"joinop", time, 0);
146 if (
true && ( (
true&&!(((
int64(getJoinop())==0)))) ) )
147 graph->
evalOpParm(myInc, nodeidx,
"inc", time, 0);
150 graph->
evalOpParm(myLoop, nodeidx,
"loop", time, 0);
153 graph->
evalOpParm(myPrim, nodeidx,
"prim", time, 0);
154 myOnlyconnected =
false;
156 graph->
evalOpParm(myOnlyconnected, nodeidx,
"onlyconnected", time, 0);
172 template <
typename T>
179 if (idx.
size() != instance.
size()+1)
184 coerceValue(value, myGroup);
187 coerceValue(value, myBlend);
190 coerceValue(value, myTolerance);
193 coerceValue(value, myBias);
196 coerceValue(value, myKnotmult);
199 coerceValue(value, myProximity);
202 coerceValue(value, myDir);
205 coerceValue(value, myJoinop);
208 coerceValue(value, myInc);
211 coerceValue(value, myLoop);
214 coerceValue(value, myPrim);
217 coerceValue(value, myOnlyconnected);
233 { doGetParmValue(idx, instance, value); }
235 { doGetParmValue(idx, instance, value); }
237 { doGetParmValue(idx, instance, value); }
239 { doGetParmValue(idx, instance, value); }
241 { doGetParmValue(idx, instance, value); }
243 { doGetParmValue(idx, instance, value); }
245 { doGetParmValue(idx, instance, value); }
247 { doGetParmValue(idx, instance, value); }
249 { doGetParmValue(idx, instance, value); }
251 { doGetParmValue(idx, instance, value); }
253 { doGetParmValue(idx, instance, value); }
255 template <
typename T>
262 if (idx.
size() != instance.
size()+1)
267 coerceValue(myGroup, ( ( value ) ));
270 coerceValue(myBlend, ( ( value ) ));
273 coerceValue(myTolerance, clampMinValue(0, clampMaxValue(1, value ) ));
276 coerceValue(myBias, clampMinValue(0, clampMaxValue(1, value ) ));
279 coerceValue(myKnotmult, ( ( value ) ));
282 coerceValue(myProximity, ( ( value ) ));
285 coerceValue(myDir, clampMinValue(0, clampMaxValue(1, value ) ));
288 coerceValue(myJoinop, clampMinValue(0, clampMaxValue(2, value ) ));
291 coerceValue(myInc, clampMinValue(1, ( value ) ));
294 coerceValue(myLoop, ( ( value ) ));
297 coerceValue(myPrim, ( ( value ) ));
300 coerceValue(myOnlyconnected, ( ( value ) ));
307 { doSetParmValue(idx, instance, value); }
309 { doSetParmValue(idx, instance, value); }
311 { doSetParmValue(idx, instance, value); }
313 { doSetParmValue(idx, instance, value); }
315 { doSetParmValue(idx, instance, value); }
317 { doSetParmValue(idx, instance, value); }
319 { doSetParmValue(idx, instance, value); }
321 { doSetParmValue(idx, instance, value); }
323 { doSetParmValue(idx, instance, value); }
325 { doSetParmValue(idx, instance, value); }
327 { doSetParmValue(idx, instance, value); }
343 if (fieldnum.
size() < 1)
370 return "onlyconnected";
378 if (fieldnum.
size() < 1)
379 return PARM_UNSUPPORTED;
408 return PARM_UNSUPPORTED;
444 loadData(is, rampdata);
462 int typelen = colon - data.
buffer();
476 {
int64 iv =
v; UTwrite(os, &iv); }
478 { UTwrite<fpreal64>(os, &
v); }
480 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
482 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
483 UTwrite<fpreal64>(os, &v.
z()); }
485 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
486 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
498 if (s) s->save(ostr);
500 saveData(os, result);
507 ostr << s->getDataTypeToken();
512 saveData(os, result);
516 void save(std::ostream &os)
const
520 saveData(os, myGroup);
521 saveData(os, myBlend);
522 saveData(os, myTolerance);
523 saveData(os, myBias);
524 saveData(os, myKnotmult);
525 saveData(os, myProximity);
527 saveData(os, myJoinop);
529 saveData(os, myLoop);
530 saveData(os, myPrim);
531 saveData(os, myOnlyconnected);
544 loadData(is, myGroup);
545 loadData(is, myBlend);
546 loadData(is, myTolerance);
547 loadData(is, myBias);
548 loadData(is, myKnotmult);
549 loadData(is, myProximity);
551 loadData(is, myJoinop);
553 loadData(is, myLoop);
554 loadData(is, myPrim);
555 loadData(is, myOnlyconnected);
565 if (!thissop)
return getGroup();
567 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
575 if (!thissop)
return getBlend();
577 OP_Utils::evalOpParm(result, thissop,
"blend", cookparms.
getCookTime(), 0);
585 if (!thissop)
return getTolerance();
587 OP_Utils::evalOpParm(result, thissop,
"tolerance", cookparms.
getCookTime(), 0);
595 if (!thissop)
return getBias();
597 OP_Utils::evalOpParm(result, thissop,
"bias", cookparms.
getCookTime(), 0);
605 if (!thissop)
return getKnotmult();
607 OP_Utils::evalOpParm(result, thissop,
"knotmult", cookparms.
getCookTime(), 0);
615 if (!thissop)
return getProximity();
617 OP_Utils::evalOpParm(result, thissop,
"proximity", cookparms.
getCookTime(), 0);
625 if (!thissop)
return getDir();
627 OP_Utils::evalOpParm(result, thissop,
"dir", cookparms.
getCookTime(), 0);
635 if (!thissop)
return getJoinop();
637 OP_Utils::evalOpParm(result, thissop,
"joinop", cookparms.
getCookTime(), 0);
645 if (!thissop)
return getInc();
647 OP_Utils::evalOpParm(result, thissop,
"inc", cookparms.
getCookTime(), 0);
655 if (!thissop)
return getLoop();
657 OP_Utils::evalOpParm(result, thissop,
"loop", cookparms.
getCookTime(), 0);
665 if (!thissop)
return getPrim();
667 OP_Utils::evalOpParm(result, thissop,
"prim", cookparms.
getCookTime(), 0);
675 if (!thissop)
return getOnlyconnected();
677 OP_Utils::evalOpParm(result, thissop,
"onlyconnected", cookparms.
getCookTime(), 0);
693 bool myOnlyconnected;
Dir opDir(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
bool operator==(const SOP_JoinParms &src) const
SOP_Node * getNode() const
static void saveData(std::ostream &os, UT_Vector4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setProximity(bool val)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setKnotmult(bool val)
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
void save(std::ostream &os) const
SYS_FORCE_INLINE const char * buffer() const
bool getProximity() const
bool load(UT_IStream &is)
static void saveData(std::ostream &os, bool v)
fpreal64 getTolerance() const
An output stream object that owns its own string buffer storage.
void setTolerance(fpreal64 val)
static void saveData(std::ostream &os, int64 v)
void copyFrom(const OP_NodeParms *src) override
**But if you need a result
void setJoinop(Joinop val)
bool getOnlyconnected() const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
bool opPrim(const SOP_NodeVerb::CookParms &cookparms) const
const char * getNestParmName(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Vector3D v)
bool operator!=(const SOP_JoinParms &src) const
void loadFromOpSubclass(const LoadParms &loadparms) override
constexpr SYS_FORCE_INLINE T & x() noexcept
bool opBlend(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setOnlyconnected(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool opLoop(const SOP_NodeVerb::CookParms &cookparms) const
bool isParmColorRamp(exint idx) const override
static void loadData(UT_IStream &is, UT_Vector4D &v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
SYS_FORCE_INLINE const char * buffer() const
static void loadData(UT_IStream &is, UT_Vector4I &v)
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE UT_StringHolder getToken(Dir enum_value)
static void loadData(UT_IStream &is, UT_Vector3D &v)
const OP_GraphProxy * graph() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
exint getNestNumParms(TempIndex idx) const override
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void loadData(UT_IStream &is, int64 &v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void saveData(std::ostream &os, fpreal64 v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
bool opKnotmult(const SOP_NodeVerb::CookParms &cookparms) const
bool opProximity(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, UT_StringHolder s)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setBias(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
Joinop opJoinop(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, bool &v)
fpreal64 opTolerance(const SOP_NodeVerb::CookParms &cookparms) const
DEP_MicroNode * depnode() const
fpreal64 opBias(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
LeafData & operator=(const LeafData &)=delete
int64 opInc(const SOP_NodeVerb::CookParms &cookparms) const
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
bool opOnlyconnected(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
static void saveData(std::ostream &os, UT_Vector2D v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
fpreal getCookTime() const
ParmType getNestParmType(TempIndex fieldnum) const override
const UT_StringHolder & getGroup() const
const char * findChar(int c) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
void setGroup(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
constexpr SYS_FORCE_INLINE T & y() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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 saveData(std::ostream &os, UT_Matrix4D v)