23 namespace SOP_CopyToPointsEnums
34 using namespace UT::Literal;
54 using namespace UT::Literal;
75 mySourceGroup =
""_UTsh;
76 myTargetGroup =
""_UTsh;
83 mySetpt =
"*,^v,^Alpha,^N"_UTsh;
84 myMulpt =
"Alpha"_UTsh;
107 if (mySourceGroup != src.mySourceGroup)
return false;
108 if (myTargetGroup != src.myTargetGroup)
return false;
109 if (myShowguide != src.myShowguide)
return false;
110 if (myPack != src.myPack)
return false;
111 if (myPivot != src.myPivot)
return false;
112 if (myViewportlod != src.myViewportlod)
return false;
113 if (myTransform != src.myTransform)
return false;
114 if (myDoAttr != src.myDoAttr)
return false;
115 if (mySetpt != src.mySetpt)
return false;
116 if (myMulpt != src.myMulpt)
return false;
117 if (myAddpt != src.myAddpt)
return false;
118 if (mySubpt != src.mySubpt)
return false;
119 if (mySetprim != src.mySetprim)
return false;
120 if (myMulprim != src.myMulprim)
return false;
121 if (myAddprim != src.myAddprim)
return false;
122 if (mySubprim != src.mySubprim)
return false;
123 if (mySetvtx != src.mySetvtx)
return false;
124 if (myMulvtx != src.myMulvtx)
return false;
125 if (myAddvtx != src.myAddvtx)
return false;
126 if (mySubvtx != src.mySubvtx)
return false;
141 mySourceGroup =
""_UTsh;
143 graph->
evalOpParm(mySourceGroup, nodeidx,
"sourcegroup", time, 0);
144 myTargetGroup =
""_UTsh;
146 graph->
evalOpParm(myTargetGroup, nodeidx,
"targetgroup", time, 0);
149 graph->
evalOpParm(myShowguide, nodeidx,
"showguide", time, 0);
152 graph->
evalOpParm(myPack, nodeidx,
"pack", time, 0);
154 if (
true && ( (
true&&!(((getPack()==0)))) ) )
155 graph->
evalOpParm(myPivot, nodeidx,
"pivot", time, 0);
157 if (
true && ( (
true&&!(((getPack()==0)))) ) )
158 graph->
evalOpParm(myViewportlod, nodeidx,
"viewportlod", time, 0);
161 graph->
evalOpParm(myTransform, nodeidx,
"transform", time, 0);
164 graph->
evalOpParm(myDoAttr, nodeidx,
"doattr", time, 0);
165 mySetpt =
"*,^v,^Alpha,^N"_UTsh;
166 if (
true && ( (
true&&!(((getDoAttr()==0)))) ) )
167 graph->
evalOpParm(mySetpt, nodeidx,
"setpt", time, 0);
168 myMulpt =
"Alpha"_UTsh;
169 if (
true && ( (
true&&!(((getDoAttr()==0)))) ) )
170 graph->
evalOpParm(myMulpt, nodeidx,
"mulpt", time, 0);
172 if (
true && ( (
true&&!(((getDoAttr()==0)))) ) )
173 graph->
evalOpParm(myAddpt, nodeidx,
"addpt", time, 0);
175 if (
true && ( (
true&&!(((getDoAttr()==0)))) ) )
176 graph->
evalOpParm(mySubpt, nodeidx,
"subpt", time, 0);
178 if (
true && ( (
true&&!(((getDoAttr()==0)))) ) )
179 graph->
evalOpParm(mySetprim, nodeidx,
"setprim", time, 0);
181 if (
true && ( (
true&&!(((getDoAttr()==0)))) ) )
182 graph->
evalOpParm(myMulprim, nodeidx,
"mulprim", time, 0);
184 if (
true && ( (
true&&!(((getDoAttr()==0)))) ) )
185 graph->
evalOpParm(myAddprim, nodeidx,
"addprim", time, 0);
187 if (
true && ( (
true&&!(((getDoAttr()==0)))) ) )
188 graph->
evalOpParm(mySubprim, nodeidx,
"subprim", time, 0);
190 if (
true && ( (
true&&!(((getDoAttr()==0)))) ) )
191 graph->
evalOpParm(mySetvtx, nodeidx,
"setvtx", time, 0);
193 if (
true && ( (
true&&!(((getDoAttr()==0)))) ) )
194 graph->
evalOpParm(myMulvtx, nodeidx,
"mulvtx", time, 0);
196 if (
true && ( (
true&&!(((getDoAttr()==0)))) ) )
197 graph->
evalOpParm(myAddvtx, nodeidx,
"addvtx", time, 0);
199 if (
true && ( (
true&&!(((getDoAttr()==0)))) ) )
200 graph->
evalOpParm(mySubvtx, nodeidx,
"subvtx", time, 0);
216 template <
typename T>
223 if (idx.
size() != instance.
size()+1)
228 coerceValue(value, mySourceGroup);
231 coerceValue(value, myTargetGroup);
234 coerceValue(value, myShowguide);
237 coerceValue(value, myPack);
240 coerceValue(value, myPivot);
243 coerceValue(value, myViewportlod);
246 coerceValue(value, myTransform);
249 coerceValue(value, myDoAttr);
252 coerceValue(value, mySetpt);
255 coerceValue(value, myMulpt);
258 coerceValue(value, myAddpt);
261 coerceValue(value, mySubpt);
264 coerceValue(value, mySetprim);
267 coerceValue(value, myMulprim);
270 coerceValue(value, myAddprim);
273 coerceValue(value, mySubprim);
276 coerceValue(value, mySetvtx);
279 coerceValue(value, myMulvtx);
282 coerceValue(value, myAddvtx);
285 coerceValue(value, mySubvtx);
301 { doGetParmValue(idx, instance, value); }
303 { doGetParmValue(idx, instance, value); }
305 { doGetParmValue(idx, instance, value); }
307 { doGetParmValue(idx, instance, value); }
309 { doGetParmValue(idx, instance, value); }
311 { doGetParmValue(idx, instance, value); }
313 { doGetParmValue(idx, instance, value); }
315 { doGetParmValue(idx, instance, value); }
317 { doGetParmValue(idx, instance, value); }
319 { doGetParmValue(idx, instance, value); }
321 { doGetParmValue(idx, instance, value); }
323 template <
typename T>
330 if (idx.
size() != instance.
size()+1)
335 coerceValue(mySourceGroup, ( ( value ) ));
338 coerceValue(myTargetGroup, ( ( value ) ));
341 coerceValue(myShowguide, ( ( value ) ));
344 coerceValue(myPack, ( ( value ) ));
347 coerceValue(myPivot, clampMinValue(0, clampMaxValue(1, value ) ));
350 coerceValue(myViewportlod, clampMinValue(0, clampMaxValue(4, value ) ));
353 coerceValue(myTransform, ( ( value ) ));
356 coerceValue(myDoAttr, ( ( value ) ));
359 coerceValue(mySetpt, ( ( value ) ));
362 coerceValue(myMulpt, ( ( value ) ));
365 coerceValue(myAddpt, ( ( value ) ));
368 coerceValue(mySubpt, ( ( value ) ));
371 coerceValue(mySetprim, ( ( value ) ));
374 coerceValue(myMulprim, ( ( value ) ));
377 coerceValue(myAddprim, ( ( value ) ));
380 coerceValue(mySubprim, ( ( value ) ));
383 coerceValue(mySetvtx, ( ( value ) ));
386 coerceValue(myMulvtx, ( ( value ) ));
389 coerceValue(myAddvtx, ( ( value ) ));
392 coerceValue(mySubvtx, ( ( value ) ));
399 { doSetParmValue(idx, instance, value); }
401 { doSetParmValue(idx, instance, value); }
403 { doSetParmValue(idx, instance, value); }
405 { doSetParmValue(idx, instance, value); }
407 { doSetParmValue(idx, instance, value); }
409 { doSetParmValue(idx, instance, value); }
411 { doSetParmValue(idx, instance, value); }
413 { doSetParmValue(idx, instance, value); }
415 { doSetParmValue(idx, instance, value); }
417 { doSetParmValue(idx, instance, value); }
419 { doSetParmValue(idx, instance, value); }
435 if (fieldnum.
size() < 1)
440 return "sourcegroup";
442 return "targetgroup";
450 return "viewportlod";
486 if (fieldnum.
size() < 1)
487 return PARM_UNSUPPORTED;
532 return PARM_UNSUPPORTED;
568 loadData(is, rampdata);
586 int typelen = colon - data.
buffer();
600 {
int64 iv =
v; UTwrite(os, &iv); }
602 { UTwrite<fpreal64>(os, &
v); }
604 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
606 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
607 UTwrite<fpreal64>(os, &v.
z()); }
609 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
610 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
622 if (s) s->save(ostr);
624 saveData(os, result);
631 ostr << s->getDataTypeToken();
636 saveData(os, result);
640 void save(std::ostream &os)
const
644 saveData(os, mySourceGroup);
645 saveData(os, myTargetGroup);
646 saveData(os, myShowguide);
647 saveData(os, myPack);
648 saveData(os, myPivot);
649 saveData(os, myViewportlod);
650 saveData(os, myTransform);
651 saveData(os, myDoAttr);
652 saveData(os, mySetpt);
653 saveData(os, myMulpt);
654 saveData(os, myAddpt);
655 saveData(os, mySubpt);
656 saveData(os, mySetprim);
657 saveData(os, myMulprim);
658 saveData(os, myAddprim);
659 saveData(os, mySubprim);
660 saveData(os, mySetvtx);
661 saveData(os, myMulvtx);
662 saveData(os, myAddvtx);
663 saveData(os, mySubvtx);
676 loadData(is, mySourceGroup);
677 loadData(is, myTargetGroup);
678 loadData(is, myShowguide);
679 loadData(is, myPack);
680 loadData(is, myPivot);
681 loadData(is, myViewportlod);
682 loadData(is, myTransform);
683 loadData(is, myDoAttr);
684 loadData(is, mySetpt);
685 loadData(is, myMulpt);
686 loadData(is, myAddpt);
687 loadData(is, mySubpt);
688 loadData(is, mySetprim);
689 loadData(is, myMulprim);
690 loadData(is, myAddprim);
691 loadData(is, mySubprim);
692 loadData(is, mySetvtx);
693 loadData(is, myMulvtx);
694 loadData(is, myAddvtx);
695 loadData(is, mySubvtx);
705 if (!thissop)
return getSourceGroup();
707 OP_Utils::evalOpParm(result, thissop,
"sourcegroup", cookparms.
getCookTime(), 0);
715 if (!thissop)
return getTargetGroup();
717 OP_Utils::evalOpParm(result, thissop,
"targetgroup", cookparms.
getCookTime(), 0);
725 if (!thissop)
return getShowguide();
727 OP_Utils::evalOpParm(result, thissop,
"showguide", cookparms.
getCookTime(), 0);
735 if (!thissop)
return getPack();
737 OP_Utils::evalOpParm(result, thissop,
"pack", cookparms.
getCookTime(), 0);
745 if (!thissop)
return getPivot();
747 OP_Utils::evalOpParm(result, thissop,
"pivot", cookparms.
getCookTime(), 0);
748 return Pivot(result);
755 if (!thissop)
return getViewportlod();
757 OP_Utils::evalOpParm(result, thissop,
"viewportlod", cookparms.
getCookTime(), 0);
765 if (!thissop)
return getTransform();
767 OP_Utils::evalOpParm(result, thissop,
"transform", cookparms.
getCookTime(), 0);
775 if (!thissop)
return getDoAttr();
777 OP_Utils::evalOpParm(result, thissop,
"doattr", cookparms.
getCookTime(), 0);
785 if (!thissop)
return getSetpt();
787 OP_Utils::evalOpParm(result, thissop,
"setpt", cookparms.
getCookTime(), 0);
795 if (!thissop)
return getMulpt();
797 OP_Utils::evalOpParm(result, thissop,
"mulpt", cookparms.
getCookTime(), 0);
805 if (!thissop)
return getAddpt();
807 OP_Utils::evalOpParm(result, thissop,
"addpt", cookparms.
getCookTime(), 0);
815 if (!thissop)
return getSubpt();
817 OP_Utils::evalOpParm(result, thissop,
"subpt", cookparms.
getCookTime(), 0);
825 if (!thissop)
return getSetprim();
827 OP_Utils::evalOpParm(result, thissop,
"setprim", cookparms.
getCookTime(), 0);
835 if (!thissop)
return getMulprim();
837 OP_Utils::evalOpParm(result, thissop,
"mulprim", cookparms.
getCookTime(), 0);
845 if (!thissop)
return getAddprim();
847 OP_Utils::evalOpParm(result, thissop,
"addprim", cookparms.
getCookTime(), 0);
855 if (!thissop)
return getSubprim();
857 OP_Utils::evalOpParm(result, thissop,
"subprim", cookparms.
getCookTime(), 0);
865 if (!thissop)
return getSetvtx();
867 OP_Utils::evalOpParm(result, thissop,
"setvtx", cookparms.
getCookTime(), 0);
875 if (!thissop)
return getMulvtx();
877 OP_Utils::evalOpParm(result, thissop,
"mulvtx", cookparms.
getCookTime(), 0);
885 if (!thissop)
return getAddvtx();
887 OP_Utils::evalOpParm(result, thissop,
"addvtx", cookparms.
getCookTime(), 0);
895 if (!thissop)
return getSubvtx();
897 OP_Utils::evalOpParm(result, thissop,
"subvtx", cookparms.
getCookTime(), 0);
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void loadFromOpSubclass(const LoadParms &loadparms) override
bool opDoAttr(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opSubprim(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
SOP_Node * getNode() const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void saveData(std::ostream &os, UT_Matrix3D v)
bool operator==(const SOP_CopyToPointsParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void setSubprim(const UT_StringHolder &val)
void setTransform(bool val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void save(std::ostream &os) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
exint bread(int32 *buffer, exint asize=1)
exint getNestNumParms(TempIndex idx) const override
const UT_StringHolder & getSubprim() const
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
const UT_StringHolder & getAddprim() const
void setSubpt(const UT_StringHolder &val)
const OP_Context & context() const
static void loadData(UT_IStream &is, UT_Vector4D &v)
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
bool getTransform() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
An output stream object that owns its own string buffer storage.
UT_StringHolder opSetvtx(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getAddvtx() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void copyFrom(const OP_NodeParms *src) override
const UT_StringHolder & getAddpt() const
UT_StringHolder opMulvtx(const SOP_NodeVerb::CookParms &cookparms) const
**But if you need a result
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void loadData(UT_IStream &is, bool &v)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void saveData(std::ostream &os, int64 v)
void setViewportlod(Viewportlod val)
constexpr SYS_FORCE_INLINE T & x() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void saveData(std::ostream &os, UT_Vector3D v)
const UT_StringHolder & getMulvtx() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
Viewportlod getViewportlod() const
static void saveData(std::ostream &os, fpreal64 v)
UT_StringHolder opTargetGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setSourceGroup(const UT_StringHolder &val)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
const UT_StringHolder & getMulpt() const
void setAddpt(const UT_StringHolder &val)
UT_StringHolder opAddvtx(const SOP_NodeVerb::CookParms &cookparms) const
bool isParmColorRamp(exint idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
bool operator!=(const SOP_CopyToPointsParms &src) const
UT_StringHolder opSubvtx(const SOP_NodeVerb::CookParms &cookparms) const
bool getShowguide() const
Pivot opPivot(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getSetpt() const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
const UT_StringHolder & getSubvtx() const
constexpr SYS_FORCE_INLINE T & z() noexcept
UT_StringHolder opSetprim(const SOP_NodeVerb::CookParms &cookparms) const
void setSetprim(const UT_StringHolder &val)
const UT_StringHolder & getTargetGroup() const
const OP_GraphProxy * graph() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setMulprim(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void loadData(UT_IStream &is, int64 &v)
static void saveData(std::ostream &os, bool v)
UT_StringHolder opSourceGroup(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector2D v)
const UT_StringHolder & getSetprim() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
bool opPack(const SOP_NodeVerb::CookParms &cookparms) const
void setMulvtx(const UT_StringHolder &val)
void setSetvtx(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setSubvtx(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
bool opShowguide(const SOP_NodeVerb::CookParms &cookparms) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
bool load(UT_IStream &is)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
GT_API const UT_StringHolder version
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setMulpt(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setAddprim(const UT_StringHolder &val)
UT_StringHolder opSubpt(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
UT_StringHolder opAddpt(const SOP_NodeVerb::CookParms &cookparms) const
const char * getNestParmName(TempIndex fieldnum) const override
Viewportlod opViewportlod(const SOP_NodeVerb::CookParms &cookparms) const
DEP_MicroNode * depnode() const
UT_StringHolder opMulprim(const SOP_NodeVerb::CookParms &cookparms) const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
const UT_StringHolder & getSetvtx() const
constexpr SYS_FORCE_INLINE T & w() noexcept
bool opTransform(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setSetpt(const UT_StringHolder &val)
UT_StringHolder opMulpt(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector4D v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
const UT_StringHolder & getMulprim() const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void loadData(UT_IStream &is, UT_StringHolder &v)
fpreal getCookTime() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
UT_StringHolder opAddprim(const SOP_NodeVerb::CookParms &cookparms) const
const char * findChar(int c) const
static void saveData(std::ostream &os, UT_StringHolder s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
static void saveData(std::ostream &os, UT_Matrix2D v)
const UT_StringHolder & getSubpt() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setShowguide(bool val)
void setTargetGroup(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector4I &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
static void saveData(std::ostream &os, UT_Matrix4D v)
SYS_FORCE_INLINE UT_StringHolder getToken(Pivot enum_value)
ParmType getNestParmType(TempIndex fieldnum) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
UT_StringHolder opSetpt(const SOP_NodeVerb::CookParms &cookparms) const
void setAddvtx(const UT_StringHolder &val)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
const UT_StringHolder & getSourceGroup() const
static void loadData(UT_IStream &is, UT_Vector2I &v)
constexpr SYS_FORCE_INLINE T & x() noexcept