23 namespace SOP_BoneCaptureLinesEnums
35 using namespace UT::Literal;
53 using namespace UT::Literal;
71 using namespace UT::Literal;
92 myExtraregions =
""_UTsh;
94 myMaxaxisfraction = 0.01;
96 myExcludeshortbones =
true;
97 myExcludethreshold = 0.001;
98 myFusethreshold = 0.001;
99 myUsebonelink =
false;
100 myUsecaptpose =
true;
103 myCaptureregionsop = 2;
105 myRelativeskel =
true;
118 if (myGroup != src.myGroup)
return false;
119 if (myRootpath != src.myRootpath)
return false;
120 if (myExtraregions != src.myExtraregions)
return false;
121 if (myResample != src.myResample)
return false;
122 if (myMaxaxisfraction != src.myMaxaxisfraction)
return false;
123 if (myMaxlength != src.myMaxlength)
return false;
124 if (myExcludeshortbones != src.myExcludeshortbones)
return false;
125 if (myExcludethreshold != src.myExcludethreshold)
return false;
126 if (myFusethreshold != src.myFusethreshold)
return false;
127 if (myUsebonelink != src.myUsebonelink)
return false;
128 if (myUsecaptpose != src.myUsecaptpose)
return false;
129 if (myCookat != src.myCookat)
return false;
130 if (myCaptframe != src.myCaptframe)
return false;
131 if (myCaptureregionsop != src.myCaptureregionsop)
return false;
132 if (myDosubnets != src.myDosubnets)
return false;
133 if (myRelativeskel != src.myRelativeskel)
return false;
151 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
152 myRootpath =
""_UTsh;
154 graph->
evalOpParm(myRootpath, nodeidx,
"rootpath", time, 0);
155 myExtraregions =
""_UTsh;
157 graph->
evalOpParm(myExtraregions, nodeidx,
"extraregions", time, 0);
160 graph->
evalOpParm(myResample, nodeidx,
"resample", time, 0);
161 myMaxaxisfraction = 0.01;
162 if (
true && ( (
true&&!(((
int64(getResample())!=1))||((
int64(getResample())!=1)))) ) )
163 graph->
evalOpParm(myMaxaxisfraction, nodeidx,
"maxaxisfraction", time, 0);
165 if (
true && ( (
true&&!(((
int64(getResample())!=2))||((
int64(getResample())!=2)))) ) )
166 graph->
evalOpParm(myMaxlength, nodeidx,
"maxlength", time, 0);
167 myExcludeshortbones =
true;
169 graph->
evalOpParm(myExcludeshortbones, nodeidx,
"excludeshortbones", time, 0);
170 myExcludethreshold = 0.001;
171 if (
true && ( (
true&&!(((getExcludeshortbones()==0)))) ) )
172 graph->
evalOpParm(myExcludethreshold, nodeidx,
"excludethreshold", time, 0);
173 myFusethreshold = 0.001;
175 graph->
evalOpParm(myFusethreshold, nodeidx,
"fusethreshold", time, 0);
176 myUsebonelink =
false;
178 graph->
evalOpParm(myUsebonelink, nodeidx,
"usebonelink", time, 0);
179 myUsecaptpose =
true;
181 graph->
evalOpParm(myUsecaptpose, nodeidx,
"usecaptpose", time, 0);
183 if (
true && ( (
true&&!(((getUsecaptpose()!=0)))) ) )
184 graph->
evalOpParm(myCookat, nodeidx,
"cookat", time, 0);
186 if (
true && ( (
true&&!(((getUsecaptpose()!=0))||((
int64(getCookat())==1)))) ) )
187 graph->
evalOpParm(myCaptframe, nodeidx,
"captframe", time, 0);
188 myCaptureregionsop = 2;
190 graph->
evalOpParm(myCaptureregionsop, nodeidx,
"captureregionsop", time, 0);
193 graph->
evalOpParm(myDosubnets, nodeidx,
"dosubnets", time, 0);
194 myRelativeskel =
true;
196 graph->
evalOpParm(myRelativeskel, nodeidx,
"relativeskel", time, 0);
212 template <
typename T>
219 if (idx.
size() != instance.
size()+1)
224 coerceValue(value, myGroup);
227 coerceValue(value, myRootpath);
230 coerceValue(value, myExtraregions);
233 coerceValue(value, myResample);
236 coerceValue(value, myMaxaxisfraction);
239 coerceValue(value, myMaxlength);
242 coerceValue(value, myExcludeshortbones);
245 coerceValue(value, myExcludethreshold);
248 coerceValue(value, myFusethreshold);
251 coerceValue(value, myUsebonelink);
254 coerceValue(value, myUsecaptpose);
257 coerceValue(value, myCookat);
260 coerceValue(value, myCaptframe);
263 coerceValue(value, myCaptureregionsop);
266 coerceValue(value, myDosubnets);
269 coerceValue(value, myRelativeskel);
285 { doGetParmValue(idx, instance, value); }
287 { doGetParmValue(idx, instance, value); }
289 { doGetParmValue(idx, instance, value); }
291 { doGetParmValue(idx, instance, value); }
293 { doGetParmValue(idx, instance, value); }
295 { doGetParmValue(idx, instance, value); }
297 { doGetParmValue(idx, instance, value); }
299 { doGetParmValue(idx, instance, value); }
301 { doGetParmValue(idx, instance, value); }
303 { doGetParmValue(idx, instance, value); }
305 { doGetParmValue(idx, instance, value); }
307 template <
typename T>
314 if (idx.
size() != instance.
size()+1)
319 coerceValue(myGroup, ( ( value ) ));
322 coerceValue(myRootpath, ( ( value ) ));
325 coerceValue(myExtraregions, ( ( value ) ));
328 coerceValue(myResample, clampMinValue(0, clampMaxValue(2, value ) ));
331 coerceValue(myMaxaxisfraction, ( ( value ) ));
334 coerceValue(myMaxlength, ( ( value ) ));
337 coerceValue(myExcludeshortbones, ( ( value ) ));
340 coerceValue(myExcludethreshold, ( ( value ) ));
343 coerceValue(myFusethreshold, ( ( value ) ));
346 coerceValue(myUsebonelink, ( ( value ) ));
349 coerceValue(myUsecaptpose, ( ( value ) ));
352 coerceValue(myCookat, clampMinValue(0, clampMaxValue(1, value ) ));
355 coerceValue(myCaptframe, ( ( value ) ));
358 coerceValue(myCaptureregionsop, clampMinValue(0, clampMaxValue(2, value ) ));
361 coerceValue(myDosubnets, ( ( value ) ));
364 coerceValue(myRelativeskel, ( ( value ) ));
371 { doSetParmValue(idx, instance, value); }
373 { doSetParmValue(idx, instance, value); }
375 { doSetParmValue(idx, instance, value); }
377 { doSetParmValue(idx, instance, value); }
379 { doSetParmValue(idx, instance, value); }
381 { doSetParmValue(idx, instance, value); }
383 { doSetParmValue(idx, instance, value); }
385 { doSetParmValue(idx, instance, value); }
387 { doSetParmValue(idx, instance, value); }
389 { doSetParmValue(idx, instance, value); }
391 { doSetParmValue(idx, instance, value); }
407 if (fieldnum.
size() < 1)
416 return "extraregions";
420 return "maxaxisfraction";
424 return "excludeshortbones";
426 return "excludethreshold";
428 return "fusethreshold";
430 return "usebonelink";
432 return "usecaptpose";
438 return "captureregionsop";
442 return "relativeskel";
450 if (fieldnum.
size() < 1)
451 return PARM_UNSUPPORTED;
488 return PARM_UNSUPPORTED;
524 loadData(is, rampdata);
542 int typelen = colon - data.
buffer();
556 {
int64 iv =
v; UTwrite(os, &iv); }
558 { UTwrite<fpreal64>(os, &
v); }
560 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
562 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
563 UTwrite<fpreal64>(os, &v.
z()); }
565 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
566 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
578 if (s) s->save(ostr);
580 saveData(os, result);
587 ostr << s->getDataTypeToken();
592 saveData(os, result);
596 void save(std::ostream &os)
const
600 saveData(os, myGroup);
601 saveData(os, myRootpath);
602 saveData(os, myExtraregions);
603 saveData(os, myResample);
604 saveData(os, myMaxaxisfraction);
605 saveData(os, myMaxlength);
606 saveData(os, myExcludeshortbones);
607 saveData(os, myExcludethreshold);
608 saveData(os, myFusethreshold);
609 saveData(os, myUsebonelink);
610 saveData(os, myUsecaptpose);
611 saveData(os, myCookat);
612 saveData(os, myCaptframe);
613 saveData(os, myCaptureregionsop);
614 saveData(os, myDosubnets);
615 saveData(os, myRelativeskel);
628 loadData(is, myGroup);
629 loadData(is, myRootpath);
630 loadData(is, myExtraregions);
631 loadData(is, myResample);
632 loadData(is, myMaxaxisfraction);
633 loadData(is, myMaxlength);
634 loadData(is, myExcludeshortbones);
635 loadData(is, myExcludethreshold);
636 loadData(is, myFusethreshold);
637 loadData(is, myUsebonelink);
638 loadData(is, myUsecaptpose);
639 loadData(is, myCookat);
640 loadData(is, myCaptframe);
641 loadData(is, myCaptureregionsop);
642 loadData(is, myDosubnets);
643 loadData(is, myRelativeskel);
653 if (!thissop)
return getGroup();
655 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
663 if (!thissop)
return getRootpath();
665 OP_Utils::evalOpParm(result, thissop,
"rootpath", cookparms.
getCookTime(), 0);
673 if (!thissop)
return getExtraregions();
675 OP_Utils::evalOpParm(result, thissop,
"extraregions", cookparms.
getCookTime(), 0);
683 if (!thissop)
return getResample();
685 OP_Utils::evalOpParm(result, thissop,
"resample", cookparms.
getCookTime(), 0);
693 if (!thissop)
return getMaxaxisfraction();
695 OP_Utils::evalOpParm(result, thissop,
"maxaxisfraction", cookparms.
getCookTime(), 0);
703 if (!thissop)
return getMaxlength();
705 OP_Utils::evalOpParm(result, thissop,
"maxlength", cookparms.
getCookTime(), 0);
713 if (!thissop)
return getExcludeshortbones();
715 OP_Utils::evalOpParm(result, thissop,
"excludeshortbones", cookparms.
getCookTime(), 0);
723 if (!thissop)
return getExcludethreshold();
725 OP_Utils::evalOpParm(result, thissop,
"excludethreshold", cookparms.
getCookTime(), 0);
733 if (!thissop)
return getFusethreshold();
735 OP_Utils::evalOpParm(result, thissop,
"fusethreshold", cookparms.
getCookTime(), 0);
743 if (!thissop)
return getUsebonelink();
745 OP_Utils::evalOpParm(result, thissop,
"usebonelink", cookparms.
getCookTime(), 0);
753 if (!thissop)
return getUsecaptpose();
755 OP_Utils::evalOpParm(result, thissop,
"usecaptpose", cookparms.
getCookTime(), 0);
763 if (!thissop)
return getCookat();
765 OP_Utils::evalOpParm(result, thissop,
"cookat", cookparms.
getCookTime(), 0);
773 if (!thissop)
return getCaptframe();
775 OP_Utils::evalOpParm(result, thissop,
"captframe", cookparms.
getCookTime(), 0);
783 if (!thissop)
return getCaptureregionsop();
785 OP_Utils::evalOpParm(result, thissop,
"captureregionsop", cookparms.
getCookTime(), 0);
793 if (!thissop)
return getDosubnets();
795 OP_Utils::evalOpParm(result, thissop,
"dosubnets", cookparms.
getCookTime(), 0);
803 if (!thissop)
return getRelativeskel();
805 OP_Utils::evalOpParm(result, thissop,
"relativeskel", cookparms.
getCookTime(), 0);
816 bool myExcludeshortbones;
823 int64 myCaptureregionsop;
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
bool operator!=(const SOP_BoneCaptureLinesParms &src) const
static void saveData(std::ostream &os, UT_Vector2D v)
SOP_Node * getNode() const
SOP_BoneCaptureLinesParms()
bool opRelativeskel(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setMaxaxisfraction(fpreal64 val)
static void loadData(UT_IStream &is, fpreal64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setCaptureregionsop(Captureregionsop val)
static void loadData(UT_IStream &is, UT_Vector3I &v)
bool opUsecaptpose(const SOP_NodeVerb::CookParms &cookparms) const
Captureregionsop getCaptureregionsop() const
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_Vector2D &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
const OP_Context & context() const
fpreal64 getCaptframe() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
constexpr SYS_FORCE_INLINE T & z() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
SYS_FORCE_INLINE const char * buffer() const
void setExcludethreshold(fpreal64 val)
static void saveData(std::ostream &os, UT_Matrix4D v)
An output stream object that owns its own string buffer storage.
Resample getResample() const
Resample opResample(const SOP_NodeVerb::CookParms &cookparms) const
bool opDosubnets(const SOP_NodeVerb::CookParms &cookparms) const
exint getNestNumParms(TempIndex idx) const override
fpreal64 opFusethreshold(const SOP_NodeVerb::CookParms &cookparms) const
**But if you need a result
fpreal64 opMaxlength(const SOP_NodeVerb::CookParms &cookparms) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setRelativeskel(bool val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) 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.
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
constexpr SYS_FORCE_INLINE T & x() noexcept
void setFusethreshold(fpreal64 val)
static void saveData(std::ostream &os, UT_Matrix2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setCookat(Cookat val)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, int64 &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
UT_StringHolder opRootpath(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void setExtraregions(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setResample(Resample val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void loadData(UT_IStream &is, UT_StringHolder &v)
bool load(UT_IStream &is)
static void loadData(UT_IStream &is, UT_Vector4D &v)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
constexpr SYS_FORCE_INLINE T & z() noexcept
void copyFrom(const OP_NodeParms *src) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
const char * getNestParmName(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
bool opUsebonelink(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getMaxaxisfraction() const
const OP_GraphProxy * graph() const
bool getDosubnets() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
const UT_StringHolder & getExtraregions() const
bool getRelativeskel() const
static void saveData(std::ostream &os, int64 v)
bool isParmColorRamp(exint idx) const override
void setDosubnets(bool val)
Captureregionsop opCaptureregionsop(const SOP_NodeVerb::CookParms &cookparms) const
void setMaxlength(fpreal64 val)
void setUsecaptpose(bool val)
static void saveData(std::ostream &os, UT_StringHolder s)
void setExcludeshortbones(bool val)
UT_StringHolder opExtraregions(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opExcludethreshold(const SOP_NodeVerb::CookParms &cookparms) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void loadFromOpSubclass(const LoadParms &loadparms) override
bool operator==(const SOP_BoneCaptureLinesParms &src) const
bool getUsecaptpose() const
void saveBinary(std::ostream &os) const
Save string to binary stream.
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
GT_API const UT_StringHolder version
SYS_FORCE_INLINE UT_StringHolder getToken(Resample enum_value)
void save(std::ostream &os) const
void setGroup(const UT_StringHolder &val)
bool getUsebonelink() const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
fpreal64 getMaxlength() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
fpreal64 getFusethreshold() const
const UT_StringHolder & getRootpath() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
DEP_MicroNode * depnode() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
Cookat opCookat(const SOP_NodeVerb::CookParms &cookparms) const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
const UT_StringHolder & getGroup() const
constexpr SYS_FORCE_INLINE T & w() noexcept
static void saveData(std::ostream &os, fpreal64 v)
fpreal getCookTime() const
void setRootpath(const UT_StringHolder &val)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
const char * findChar(int c) const
bool opExcludeshortbones(const SOP_NodeVerb::CookParms &cookparms) const
ParmType getNestParmType(TempIndex fieldnum) const override
void setCaptframe(fpreal64 val)
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
fpreal64 opMaxaxisfraction(const SOP_NodeVerb::CookParms &cookparms) const
bool getExcludeshortbones() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void loadData(UT_IStream &is, bool &v)
static void saveData(std::ostream &os, UT_Vector3D v)
void setUsebonelink(bool val)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
fpreal64 getExcludethreshold() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, UT_Matrix3D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
fpreal64 opCaptframe(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
static void saveData(std::ostream &os, bool v)