40 myGgroup =
"generated"_UTsh;
42 mySpointnum =
"pointnum"_UTsh;
44 mySpointidx =
"pointidx"_UTsh;
45 myDocopyattribs =
false;
46 myAttribstocopy =
"*"_UTsh;
47 myDetailstocopy =
""_UTsh;
60 if (myGroup != src.myGroup)
return false;
61 if (myKeep != src.myKeep)
return false;
62 if (myPtsperpt != src.myPtsperpt)
return false;
63 if (myNpts != src.myNpts)
return false;
64 if (myNptsperpt != src.myNptsperpt)
return false;
65 if (myDoattrib != src.myDoattrib)
return false;
66 if (myAttrib != src.myAttrib)
return false;
67 if (mySeed != src.mySeed)
return false;
68 if (myDogroup != src.myDogroup)
return false;
69 if (myGgroup != src.myGgroup)
return false;
70 if (myDopointnum != src.myDopointnum)
return false;
71 if (mySpointnum != src.mySpointnum)
return false;
72 if (myDopointidx != src.myDopointidx)
return false;
73 if (mySpointidx != src.mySpointidx)
return false;
74 if (myDocopyattribs != src.myDocopyattribs)
return false;
75 if (myAttribstocopy != src.myAttribstocopy)
return false;
76 if (myDetailstocopy != src.myDetailstocopy)
return false;
90 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==0)))) ) )
91 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
93 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==0)))) ) )
94 graph->
evalOpParm(myKeep, nodeidx,
"keep", time, 0);
96 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==0)))) ) )
97 graph->
evalOpParm(myPtsperpt, nodeidx,
"ptsperpt", time, 0);
99 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==1)&&(getPtsperpt()==1)))) ) )
100 graph->
evalOpParm(myNpts, nodeidx,
"npts", time, 0);
102 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==0))||((getPtsperpt()==0)))) ) )
103 graph->
evalOpParm(myNptsperpt, nodeidx,
"nptsperpt", time, 0);
105 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==0)))) ) )
106 graph->
evalOpParm(myDoattrib, nodeidx,
"doattrib", time, 0);
108 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==0))||((getDoattrib()==0)))) ) )
109 graph->
evalOpParm(myAttrib, nodeidx,
"attrib", time, 0);
111 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==0)))) ) )
112 graph->
evalOpParm(mySeed, nodeidx,
"seed", time, 0);
115 graph->
evalOpParm(myDogroup, nodeidx,
"dogroup", time, 0);
116 myGgroup =
"generated"_UTsh;
117 if (
true && ( (
true&&!(((getDogroup()==0)))) ) )
118 graph->
evalOpParm(myGgroup, nodeidx,
"ggroup", time, 0);
119 myDopointnum =
false;
120 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==0)))) ) )
121 graph->
evalOpParm(myDopointnum, nodeidx,
"dopointnum", time, 0);
122 mySpointnum =
"pointnum"_UTsh;
123 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==0))||((getDopointnum()==0)))) ) )
124 graph->
evalOpParm(mySpointnum, nodeidx,
"spointnum", time, 0);
125 myDopointidx =
false;
127 graph->
evalOpParm(myDopointidx, nodeidx,
"dopointidx", time, 0);
128 mySpointidx =
"pointidx"_UTsh;
129 if (
true && ( (
true&&!(((getDopointidx()==0)))) ) )
130 graph->
evalOpParm(mySpointidx, nodeidx,
"spointidx", time, 0);
131 myDocopyattribs =
false;
132 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==0)))) ) )
133 graph->
evalOpParm(myDocopyattribs, nodeidx,
"docopyattribs", time, 0);
134 myAttribstocopy =
"*"_UTsh;
135 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==0))||((getDocopyattribs()==0)))) ) )
136 graph->
evalOpParm(myAttribstocopy, nodeidx,
"attribstocopy", time, 0);
137 myDetailstocopy =
""_UTsh;
138 if (
true && ( (
true&&!((((graph->
getInput(nodeidx,0)>=0)==0))||((getDocopyattribs()==0)))) ) )
139 graph->
evalOpParm(myDetailstocopy, nodeidx,
"detailstocopy", time, 0);
155 template <
typename T>
162 if (idx.
size() != instance.
size()+1)
231 { doGetParmValue(idx, instance, value); }
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 template <
typename T>
260 if (idx.
size() != instance.
size()+1)
320 { doSetParmValue(idx, instance, value); }
322 { doSetParmValue(idx, instance, value); }
324 { doSetParmValue(idx, instance, 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); }
356 if (fieldnum.
size() < 1)
389 return "docopyattribs";
391 return "attribstocopy";
393 return "detailstocopy";
401 if (fieldnum.
size() < 1)
402 return PARM_UNSUPPORTED;
477 loadData(is, rampdata);
495 int typelen = colon - data.
buffer();
509 {
int64 iv =
v; UTwrite(os, &iv); }
511 { UTwrite<fpreal64>(os, &
v); }
513 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
515 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
516 UTwrite<fpreal64>(os, &v.
z()); }
518 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
519 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
531 if (s) s->save(ostr);
533 saveData(os, result);
540 ostr << s->getDataTypeToken();
545 saveData(os, result);
549 void save(std::ostream &os)
const
553 saveData(os, myGroup);
554 saveData(os, myKeep);
555 saveData(os, myPtsperpt);
556 saveData(os, myNpts);
557 saveData(os, myNptsperpt);
558 saveData(os, myDoattrib);
559 saveData(os, myAttrib);
560 saveData(os, mySeed);
561 saveData(os, myDogroup);
562 saveData(os, myGgroup);
563 saveData(os, myDopointnum);
564 saveData(os, mySpointnum);
565 saveData(os, myDopointidx);
566 saveData(os, mySpointidx);
567 saveData(os, myDocopyattribs);
568 saveData(os, myAttribstocopy);
569 saveData(os, myDetailstocopy);
582 loadData(is, myGroup);
583 loadData(is, myKeep);
584 loadData(is, myPtsperpt);
585 loadData(is, myNpts);
586 loadData(is, myNptsperpt);
587 loadData(is, myDoattrib);
588 loadData(is, myAttrib);
589 loadData(is, mySeed);
590 loadData(is, myDogroup);
591 loadData(is, myGgroup);
592 loadData(is, myDopointnum);
593 loadData(is, mySpointnum);
594 loadData(is, myDopointidx);
595 loadData(is, mySpointidx);
596 loadData(is, myDocopyattribs);
597 loadData(is, myAttribstocopy);
598 loadData(is, myDetailstocopy);
608 if (!thissop)
return getGroup();
610 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
618 if (!thissop)
return getKeep();
620 OP_Utils::evalOpParm(result, thissop,
"keep", cookparms.
getCookTime(), 0);
628 if (!thissop)
return getPtsperpt();
630 OP_Utils::evalOpParm(result, thissop,
"ptsperpt", cookparms.
getCookTime(), 0);
638 if (!thissop)
return getNpts();
640 OP_Utils::evalOpParm(result, thissop,
"npts", cookparms.
getCookTime(), 0);
648 if (!thissop)
return getNptsperpt();
650 OP_Utils::evalOpParm(result, thissop,
"nptsperpt", cookparms.
getCookTime(), 0);
658 if (!thissop)
return getDoattrib();
660 OP_Utils::evalOpParm(result, thissop,
"doattrib", cookparms.
getCookTime(), 0);
668 if (!thissop)
return getAttrib();
670 OP_Utils::evalOpParm(result, thissop,
"attrib", cookparms.
getCookTime(), 0);
678 if (!thissop)
return getSeed();
680 OP_Utils::evalOpParm(result, thissop,
"seed", cookparms.
getCookTime(), 0);
688 if (!thissop)
return getDogroup();
690 OP_Utils::evalOpParm(result, thissop,
"dogroup", cookparms.
getCookTime(), 0);
698 if (!thissop)
return getGgroup();
700 OP_Utils::evalOpParm(result, thissop,
"ggroup", cookparms.
getCookTime(), 0);
708 if (!thissop)
return getDopointnum();
710 OP_Utils::evalOpParm(result, thissop,
"dopointnum", cookparms.
getCookTime(), 0);
718 if (!thissop)
return getSpointnum();
720 OP_Utils::evalOpParm(result, thissop,
"spointnum", cookparms.
getCookTime(), 0);
728 if (!thissop)
return getDopointidx();
730 OP_Utils::evalOpParm(result, thissop,
"dopointidx", cookparms.
getCookTime(), 0);
738 if (!thissop)
return getSpointidx();
740 OP_Utils::evalOpParm(result, thissop,
"spointidx", cookparms.
getCookTime(), 0);
748 if (!thissop)
return getDocopyattribs();
750 OP_Utils::evalOpParm(result, thissop,
"docopyattribs", cookparms.
getCookTime(), 0);
758 if (!thissop)
return getAttribstocopy();
760 OP_Utils::evalOpParm(result, thissop,
"attribstocopy", cookparms.
getCookTime(), 0);
768 if (!thissop)
return getDetailstocopy();
770 OP_Utils::evalOpParm(result, thissop,
"detailstocopy", cookparms.
getCookTime(), 0);
789 bool myDocopyattribs;
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void saveData(std::ostream &os, UT_Vector4D v)
SOP_Node * getNode() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
bool opDoattrib(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
UT_StringHolder opSpointidx(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void saveData(std::ostream &os, UT_Vector3D v)
exint bread(int32 *buffer, exint asize=1)
void setDogroup(bool val)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
bool operator==(const SOP_PointGenerateParms &src) const
void save(std::ostream &os) const
static void loadData(UT_IStream &is, int64 &v)
UT_StringHolder opGgroup(const SOP_NodeVerb::CookParms &cookparms) const
void setDopointidx(bool val)
void setPtsperpt(bool val)
const OP_Context & context() const
static void saveData(std::ostream &os, UT_Matrix2D v)
constexpr SYS_FORCE_INLINE T & z() noexcept
bool opPtsperpt(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
An output stream object that owns its own string buffer storage.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void saveData(std::ostream &os, int64 v)
const UT_StringHolder & getGroup() const
**But if you need a result
void setDocopyattribs(bool val)
T clampMinValue(fpreal minvalue, const T &src) const
const UT_StringHolder & getAttrib() const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
bool getDopointidx() const
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
virtual NodeIdx getInput(NodeIdx idx, int input, bool markused=false) const =0
constexpr SYS_FORCE_INLINE T & x() noexcept
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNptsperpt(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
fpreal64 getNptsperpt() const
static void saveData(std::ostream &os, bool v)
UT_StringHolder opDetailstocopy(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setAttrib(const UT_StringHolder &val)
void setDoattrib(bool val)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
const UT_StringHolder & getGgroup() const
constexpr SYS_FORCE_INLINE T & z() noexcept
exint getNestNumParms(TempIndex idx) const override
bool opDopointnum(const SOP_NodeVerb::CookParms &cookparms) const
bool getDopointnum() const
UT_StringHolder opAttrib(const SOP_NodeVerb::CookParms &cookparms) const
const OP_GraphProxy * graph() const
bool load(UT_IStream &is)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
fpreal64 opNptsperpt(const SOP_NodeVerb::CookParms &cookparms) const
bool opDogroup(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setSeed(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
const UT_StringHolder & getDetailstocopy() const
fpreal64 opSeed(const SOP_NodeVerb::CookParms &cookparms) const
bool operator!=(const SOP_PointGenerateParms &src) const
void setGroup(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void loadData(UT_IStream &is, UT_Vector4I &v)
bool opKeep(const SOP_NodeVerb::CookParms &cookparms) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void copyFrom(const OP_NodeParms *src) override
const UT_StringHolder & getAttribstocopy() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
UT_StringHolder opSpointnum(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, bool &v)
bool opDocopyattribs(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool isParmColorRamp(exint idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setGgroup(const UT_StringHolder &val)
bool getDocopyattribs() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void coerceValue(T &result, const S &src) const
static void saveData(std::ostream &os, UT_Vector2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
DEP_MicroNode * depnode() const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
Utility class for containing a color ramp.
const UT_StringHolder & getSpointidx() const
const UT_StringHolder & getSpointnum() const
ParmType getNestParmType(TempIndex fieldnum) const override
constexpr SYS_FORCE_INLINE T & w() noexcept
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void loadData(UT_IStream &is, fpreal64 &v)
void setDopointnum(bool val)
void setDetailstocopy(const UT_StringHolder &val)
void setSpointnum(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
int64 opNpts(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
fpreal getCookTime() const
void setSpointidx(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
const char * findChar(int c) const
static void saveData(std::ostream &os, UT_Matrix3D v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setAttribstocopy(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool opDopointidx(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opAttribstocopy(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
const char * getNestParmName(TempIndex fieldnum) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void saveData(std::ostream &os, UT_StringHolder s)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
static void saveData(std::ostream &os, fpreal64 v)
void loadFromOpSubclass(const LoadParms &loadparms) override
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void saveData(std::ostream &os, UT_Matrix4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept