23 namespace SOP_ProximityCaptureEnums
35 using namespace UT::Literal;
53 using namespace UT::Literal;
70 using namespace UT::Literal;
87 using namespace UT::Literal;
104 using namespace UT::Literal;
105 switch (enum_value) {
123 myCapturegroup =
""_UTsh;
124 myRootpath =
""_UTsh;
125 myExtraregions =
""_UTsh;
126 myCaptureregionsop = 2;
128 myRelativeskel =
true;
129 myUsecaptpose =
false;
136 myNormweights =
true;
137 myDestroyweights =
true;
153 if (myGroup != src.myGroup)
return false;
154 if (myCapturegroup != src.myCapturegroup)
return false;
155 if (myRootpath != src.myRootpath)
return false;
156 if (myExtraregions != src.myExtraregions)
return false;
157 if (myCaptureregionsop != src.myCaptureregionsop)
return false;
158 if (myDosubnets != src.myDosubnets)
return false;
159 if (myRelativeskel != src.myRelativeskel)
return false;
160 if (myUsecaptpose != src.myUsecaptpose)
return false;
161 if (myCookat != src.myCookat)
return false;
162 if (myCaptframe != src.myCaptframe)
return false;
163 if (myWeightmethod != src.myWeightmethod)
return false;
164 if (myWeightfrom != src.myWeightfrom)
return false;
165 if (myDropoff != src.myDropoff)
return false;
166 if (myMaxinfluences != src.myMaxinfluences)
return false;
167 if (myNormweights != src.myNormweights)
return false;
168 if (myDestroyweights != src.myDestroyweights)
return false;
169 if (myBlendfactor != src.myBlendfactor)
return false;
170 if (myColor != src.myColor)
return false;
171 if (myZeroweightcolor != src.myZeroweightcolor)
return false;
191 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
192 myCapturegroup =
""_UTsh;
194 graph->
evalOpParm(myCapturegroup, nodeidx,
"capturegroup", time, 0);
195 myRootpath =
""_UTsh;
197 graph->
evalOpParm(myRootpath, nodeidx,
"rootpath", time, 0);
198 myExtraregions =
""_UTsh;
200 graph->
evalOpParm(myExtraregions, nodeidx,
"extraregions", time, 0);
201 myCaptureregionsop = 2;
203 graph->
evalOpParm(myCaptureregionsop, nodeidx,
"captureregionsop", time, 0);
206 graph->
evalOpParm(myDosubnets, nodeidx,
"dosubnets", time, 0);
207 myRelativeskel =
true;
209 graph->
evalOpParm(myRelativeskel, nodeidx,
"relativeskel", time, 0);
210 myUsecaptpose =
false;
212 graph->
evalOpParm(myUsecaptpose, nodeidx,
"usecaptpose", time, 0);
214 if (
true && ( (
true&&!(((getUsecaptpose()!=0)))) ) )
215 graph->
evalOpParm(myCookat, nodeidx,
"cookat", time, 0);
217 if (
true && ( (
true&&!(((getUsecaptpose()!=0))||((
int64(getCookat())==1)))) ) )
218 graph->
evalOpParm(myCaptframe, nodeidx,
"captframe", time, 0);
221 graph->
evalOpParm(myWeightmethod, nodeidx,
"weightmethod", time, 0);
224 graph->
evalOpParm(myWeightfrom, nodeidx,
"weightFrom", time, 0);
227 graph->
evalOpParm(myDropoff, nodeidx,
"dropoff", time, 0);
230 graph->
evalOpParm(myMaxinfluences, nodeidx,
"maxinfluences", time, 0);
231 myNormweights =
true;
233 graph->
evalOpParm(myNormweights, nodeidx,
"normweights", time, 0);
234 myDestroyweights =
true;
236 graph->
evalOpParm(myDestroyweights, nodeidx,
"destroyweights", time, 0);
238 if (
true && ( (
true&&!(((getDestroyweights()!=0)))) ) )
239 graph->
evalOpParm(myBlendfactor, nodeidx,
"blendfactor", time, 0);
242 graph->
evalOpParm(myColor, nodeidx,
"color", time, 0);
245 graph->
evalOpParm(myZeroweightcolor, nodeidx,
"zeroweightcolor", time, 0);
261 template <
typename T>
268 if (idx.
size() != instance.
size()+1)
273 coerceValue(value, myGroup);
276 coerceValue(value, myCapturegroup);
279 coerceValue(value, myRootpath);
282 coerceValue(value, myExtraregions);
285 coerceValue(value, myCaptureregionsop);
288 coerceValue(value, myDosubnets);
291 coerceValue(value, myRelativeskel);
294 coerceValue(value, myUsecaptpose);
297 coerceValue(value, myCookat);
300 coerceValue(value, myCaptframe);
303 coerceValue(value, myWeightmethod);
306 coerceValue(value, myWeightfrom);
309 coerceValue(value, myDropoff);
312 coerceValue(value, myMaxinfluences);
315 coerceValue(value, myNormweights);
318 coerceValue(value, myDestroyweights);
321 coerceValue(value, myBlendfactor);
324 coerceValue(value, myColor);
327 coerceValue(value, myZeroweightcolor);
343 { doGetParmValue(idx, instance, value); }
345 { doGetParmValue(idx, instance, value); }
347 { doGetParmValue(idx, instance, value); }
349 { doGetParmValue(idx, instance, value); }
351 { doGetParmValue(idx, instance, value); }
353 { doGetParmValue(idx, instance, value); }
355 { doGetParmValue(idx, instance, value); }
357 { doGetParmValue(idx, instance, value); }
359 { doGetParmValue(idx, instance, value); }
361 { doGetParmValue(idx, instance, value); }
363 { doGetParmValue(idx, instance, value); }
365 template <
typename T>
372 if (idx.
size() != instance.
size()+1)
377 coerceValue(myGroup, ( ( value ) ));
380 coerceValue(myCapturegroup, ( ( value ) ));
383 coerceValue(myRootpath, ( ( value ) ));
386 coerceValue(myExtraregions, ( ( value ) ));
389 coerceValue(myCaptureregionsop, clampMinValue(0, clampMaxValue(2, value ) ));
392 coerceValue(myDosubnets, ( ( value ) ));
395 coerceValue(myRelativeskel, ( ( value ) ));
398 coerceValue(myUsecaptpose, ( ( value ) ));
401 coerceValue(myCookat, clampMinValue(0, clampMaxValue(1, value ) ));
404 coerceValue(myCaptframe, ( ( value ) ));
407 coerceValue(myWeightmethod, clampMinValue(0, clampMaxValue(1, value ) ));
410 coerceValue(myWeightfrom, clampMinValue(0, clampMaxValue(1, value ) ));
413 coerceValue(myDropoff, clampMinValue(0.001, ( value ) ));
416 coerceValue(myMaxinfluences, clampMinValue(1, ( value ) ));
419 coerceValue(myNormweights, ( ( value ) ));
422 coerceValue(myDestroyweights, ( ( value ) ));
425 coerceValue(myBlendfactor, ( ( value ) ));
428 coerceValue(myColor, clampMinValue(0, clampMaxValue(1, value ) ));
431 coerceValue(myZeroweightcolor, ( ( value ) ));
438 { doSetParmValue(idx, instance, value); }
440 { doSetParmValue(idx, instance, value); }
442 { doSetParmValue(idx, instance, value); }
444 { doSetParmValue(idx, instance, value); }
446 { doSetParmValue(idx, instance, value); }
448 { doSetParmValue(idx, instance, value); }
450 { doSetParmValue(idx, instance, value); }
452 { doSetParmValue(idx, instance, value); }
454 { doSetParmValue(idx, instance, value); }
456 { doSetParmValue(idx, instance, value); }
458 { doSetParmValue(idx, instance, value); }
474 if (fieldnum.
size() < 1)
481 return "capturegroup";
485 return "extraregions";
487 return "captureregionsop";
491 return "relativeskel";
493 return "usecaptpose";
499 return "weightmethod";
505 return "maxinfluences";
507 return "normweights";
509 return "destroyweights";
511 return "blendfactor";
515 return "zeroweightcolor";
523 if (fieldnum.
size() < 1)
524 return PARM_UNSUPPORTED;
567 return PARM_UNSUPPORTED;
603 loadData(is, rampdata);
621 int typelen = colon - data.
buffer();
635 {
int64 iv =
v; UTwrite(os, &iv); }
637 { UTwrite<fpreal64>(os, &
v); }
639 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
641 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
642 UTwrite<fpreal64>(os, &v.
z()); }
644 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
645 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
657 if (s) s->save(ostr);
659 saveData(os, result);
666 ostr << s->getDataTypeToken();
671 saveData(os, result);
675 void save(std::ostream &os)
const
679 saveData(os, myGroup);
680 saveData(os, myCapturegroup);
681 saveData(os, myRootpath);
682 saveData(os, myExtraregions);
683 saveData(os, myCaptureregionsop);
684 saveData(os, myDosubnets);
685 saveData(os, myRelativeskel);
686 saveData(os, myUsecaptpose);
687 saveData(os, myCookat);
688 saveData(os, myCaptframe);
689 saveData(os, myWeightmethod);
690 saveData(os, myWeightfrom);
691 saveData(os, myDropoff);
692 saveData(os, myMaxinfluences);
693 saveData(os, myNormweights);
694 saveData(os, myDestroyweights);
695 saveData(os, myBlendfactor);
696 saveData(os, myColor);
697 saveData(os, myZeroweightcolor);
710 loadData(is, myGroup);
711 loadData(is, myCapturegroup);
712 loadData(is, myRootpath);
713 loadData(is, myExtraregions);
714 loadData(is, myCaptureregionsop);
715 loadData(is, myDosubnets);
716 loadData(is, myRelativeskel);
717 loadData(is, myUsecaptpose);
718 loadData(is, myCookat);
719 loadData(is, myCaptframe);
720 loadData(is, myWeightmethod);
721 loadData(is, myWeightfrom);
722 loadData(is, myDropoff);
723 loadData(is, myMaxinfluences);
724 loadData(is, myNormweights);
725 loadData(is, myDestroyweights);
726 loadData(is, myBlendfactor);
727 loadData(is, myColor);
728 loadData(is, myZeroweightcolor);
738 if (!thissop)
return getGroup();
740 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
748 if (!thissop)
return getCapturegroup();
750 OP_Utils::evalOpParm(result, thissop,
"capturegroup", cookparms.
getCookTime(), 0);
758 if (!thissop)
return getRootpath();
760 OP_Utils::evalOpParm(result, thissop,
"rootpath", cookparms.
getCookTime(), 0);
768 if (!thissop)
return getExtraregions();
770 OP_Utils::evalOpParm(result, thissop,
"extraregions", cookparms.
getCookTime(), 0);
778 if (!thissop)
return getCaptureregionsop();
780 OP_Utils::evalOpParm(result, thissop,
"captureregionsop", cookparms.
getCookTime(), 0);
788 if (!thissop)
return getDosubnets();
790 OP_Utils::evalOpParm(result, thissop,
"dosubnets", cookparms.
getCookTime(), 0);
798 if (!thissop)
return getRelativeskel();
800 OP_Utils::evalOpParm(result, thissop,
"relativeskel", cookparms.
getCookTime(), 0);
808 if (!thissop)
return getUsecaptpose();
810 OP_Utils::evalOpParm(result, thissop,
"usecaptpose", cookparms.
getCookTime(), 0);
818 if (!thissop)
return getCookat();
820 OP_Utils::evalOpParm(result, thissop,
"cookat", cookparms.
getCookTime(), 0);
828 if (!thissop)
return getCaptframe();
830 OP_Utils::evalOpParm(result, thissop,
"captframe", cookparms.
getCookTime(), 0);
838 if (!thissop)
return getWeightmethod();
840 OP_Utils::evalOpParm(result, thissop,
"weightmethod", cookparms.
getCookTime(), 0);
848 if (!thissop)
return getWeightfrom();
850 OP_Utils::evalOpParm(result, thissop,
"weightFrom", cookparms.
getCookTime(), 0);
858 if (!thissop)
return getDropoff();
860 OP_Utils::evalOpParm(result, thissop,
"dropoff", cookparms.
getCookTime(), 0);
868 if (!thissop)
return getMaxinfluences();
870 OP_Utils::evalOpParm(result, thissop,
"maxinfluences", cookparms.
getCookTime(), 0);
878 if (!thissop)
return getNormweights();
880 OP_Utils::evalOpParm(result, thissop,
"normweights", cookparms.
getCookTime(), 0);
888 if (!thissop)
return getDestroyweights();
890 OP_Utils::evalOpParm(result, thissop,
"destroyweights", cookparms.
getCookTime(), 0);
898 if (!thissop)
return getBlendfactor();
900 OP_Utils::evalOpParm(result, thissop,
"blendfactor", cookparms.
getCookTime(), 0);
908 if (!thissop)
return getColor();
910 OP_Utils::evalOpParm(result, thissop,
"color", cookparms.
getCookTime(), 0);
911 return Color(result);
918 if (!thissop)
return getZeroweightcolor();
920 OP_Utils::evalOpParm(result, thissop,
"zeroweightcolor", cookparms.
getCookTime(), 0);
929 int64 myCaptureregionsop;
935 int64 myWeightmethod;
938 int64 myMaxinfluences;
940 bool myDestroyweights;
UT_StringHolder opRootpath(const SOP_NodeVerb::CookParms &cookparms) const
Weightfrom getWeightfrom() const
UT_Vector3D getZeroweightcolor() const
bool opUsecaptpose(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void saveData(std::ostream &os, fpreal64 v)
int64 opMaxinfluences(const SOP_NodeVerb::CookParms &cookparms) const
void setExtraregions(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
Color opColor(const SOP_NodeVerb::CookParms &cookparms) const
void setDestroyweights(bool val)
void setCaptframe(fpreal64 val)
SOP_Node * getNode() const
static void loadData(UT_IStream &is, UT_Vector3D &v)
SOP_ProximityCaptureParms()
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
fpreal64 getDropoff() const
void setWeightmethod(Weightmethod val)
bool opNormweights(const SOP_NodeVerb::CookParms &cookparms) const
void copyFrom(const OP_NodeParms *src) override
bool operator==(const SOP_ProximityCaptureParms &src) const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
static void loadData(UT_IStream &is, UT_Vector4I &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opCaptframe(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opBlendfactor(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
const OP_Context & context() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
const UT_StringHolder & getExtraregions() const
void setMaxinfluences(int64 val)
void setZeroweightcolor(UT_Vector3D val)
An output stream object that owns its own string buffer storage.
bool getNormweights() const
fpreal64 getCaptframe() const
bool isParmColorRamp(exint idx) const override
void setGroup(const UT_StringHolder &val)
void setNormweights(bool val)
**But if you need a result
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
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 setCaptureregionsop(Captureregionsop val)
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void saveData(std::ostream &os, UT_Matrix2D v)
void setCookat(Cookat val)
void loadFromOpSubclass(const LoadParms &loadparms) override
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setDosubnets(bool val)
constexpr SYS_FORCE_INLINE T & x() noexcept
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void saveData(std::ostream &os, UT_Matrix4D v)
UT_Vector3D opZeroweightcolor(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void loadData(UT_IStream &is, UT_Vector3I &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void saveData(std::ostream &os, UT_Vector2D v)
void save(std::ostream &os) const
const UT_StringHolder & getRootpath() const
static void saveData(std::ostream &os, UT_Vector3D v)
UT_StringHolder opExtraregions(const SOP_NodeVerb::CookParms &cookparms) const
bool getDestroyweights() const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void saveData(std::ostream &os, UT_Matrix3D v)
void setBlendfactor(fpreal64 val)
static void loadData(UT_IStream &is, UT_StringHolder &v)
Captureregionsop getCaptureregionsop() const
SYS_FORCE_INLINE const char * buffer() const
bool opDosubnets(const SOP_NodeVerb::CookParms &cookparms) const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
constexpr SYS_FORCE_INLINE T & z() noexcept
Captureregionsop opCaptureregionsop(const SOP_NodeVerb::CookParms &cookparms) const
bool getDosubnets() const
Weightmethod getWeightmethod() const
static void loadData(UT_IStream &is, bool &v)
void setRootpath(const UT_StringHolder &val)
const OP_GraphProxy * graph() const
static void saveData(std::ostream &os, bool v)
bool load(UT_IStream &is)
static void saveData(std::ostream &os, UT_StringHolder s)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
ParmType getNestParmType(TempIndex fieldnum) const override
Cookat opCookat(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
UT_Vector3T< fpreal64 > UT_Vector3D
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
bool getUsecaptpose() const
fpreal64 getBlendfactor() const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setRelativeskel(bool val)
void saveBinary(std::ostream &os) const
Save string to binary stream.
void setWeightfrom(Weightfrom val)
GT_API const UT_StringHolder version
const UT_StringHolder & getCapturegroup() const
void setCapturegroup(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Vector4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
SYS_FORCE_INLINE UT_StringHolder getToken(Captureregionsop enum_value)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
Weightfrom opWeightfrom(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, int64 v)
bool opDestroyweights(const SOP_NodeVerb::CookParms &cookparms) const
DEP_MicroNode * depnode() const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setDropoff(fpreal64 val)
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
bool operator!=(const SOP_ProximityCaptureParms &src) const
void setUsecaptpose(bool val)
constexpr SYS_FORCE_INLINE T & w() noexcept
fpreal64 opDropoff(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void loadData(UT_IStream &is, int64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
fpreal getCookTime() const
Weightmethod opWeightmethod(const SOP_NodeVerb::CookParms &cookparms) const
const char * findChar(int c) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
UT_StringHolder opCapturegroup(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
const char * getNestParmName(TempIndex fieldnum) const override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
exint getNestNumParms(TempIndex idx) const override
SYS_FORCE_INLINE bool isstring() const
bool getRelativeskel() const
int64 getMaxinfluences() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool opRelativeskel(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getGroup() const
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override