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;
154 graph->
evalOpParm(myGroup, nodeidx,
"group", time, graph->
isDirect()?
nullptr:depnode);
155 myRootpath =
""_UTsh;
157 graph->
evalOpParm(myRootpath, nodeidx,
"rootpath", time, graph->
isDirect()?
nullptr:depnode);
158 myExtraregions =
""_UTsh;
160 graph->
evalOpParm(myExtraregions, nodeidx,
"extraregions", time, graph->
isDirect()?
nullptr:depnode);
163 graph->
evalOpParm(myResample, nodeidx,
"resample", time, graph->
isDirect()?
nullptr:depnode);
164 myMaxaxisfraction = 0.01;
165 if (
true && ( (
true&&!(((
int64(getResample())!=1))||((
int64(getResample())!=1)))) ) )
166 graph->
evalOpParm(myMaxaxisfraction, nodeidx,
"maxaxisfraction", time, graph->
isDirect()?
nullptr:depnode);
168 if (
true && ( (
true&&!(((
int64(getResample())!=2))||((
int64(getResample())!=2)))) ) )
169 graph->
evalOpParm(myMaxlength, nodeidx,
"maxlength", time, graph->
isDirect()?
nullptr:depnode);
170 myExcludeshortbones =
true;
172 graph->
evalOpParm(myExcludeshortbones, nodeidx,
"excludeshortbones", time, graph->
isDirect()?
nullptr:depnode);
173 myExcludethreshold = 0.001;
174 if (
true && ( (
true&&!(((getExcludeshortbones()==0)))) ) )
175 graph->
evalOpParm(myExcludethreshold, nodeidx,
"excludethreshold", time, graph->
isDirect()?
nullptr:depnode);
176 myFusethreshold = 0.001;
178 graph->
evalOpParm(myFusethreshold, nodeidx,
"fusethreshold", time, graph->
isDirect()?
nullptr:depnode);
179 myUsebonelink =
false;
181 graph->
evalOpParm(myUsebonelink, nodeidx,
"usebonelink", time, graph->
isDirect()?
nullptr:depnode);
182 myUsecaptpose =
true;
184 graph->
evalOpParm(myUsecaptpose, nodeidx,
"usecaptpose", time, graph->
isDirect()?
nullptr:depnode);
186 if (
true && ( (
true&&!(((getUsecaptpose()!=0)))) ) )
187 graph->
evalOpParm(myCookat, nodeidx,
"cookat", time, graph->
isDirect()?
nullptr:depnode);
189 if (
true && ( (
true&&!(((getUsecaptpose()!=0))||((
int64(getCookat())==1)))) ) )
190 graph->
evalOpParm(myCaptframe, nodeidx,
"captframe", time, graph->
isDirect()?
nullptr:depnode);
191 myCaptureregionsop = 2;
193 graph->
evalOpParm(myCaptureregionsop, nodeidx,
"captureregionsop", time, graph->
isDirect()?
nullptr:depnode);
196 graph->
evalOpParm(myDosubnets, nodeidx,
"dosubnets", time, graph->
isDirect()?
nullptr:depnode);
197 myRelativeskel =
true;
199 graph->
evalOpParm(myRelativeskel, nodeidx,
"relativeskel", time, graph->
isDirect()?
nullptr:depnode);
215 template <
typename T>
222 if (idx.
size() != instance.
size()+1)
227 coerceValue(value, myGroup);
230 coerceValue(value, myRootpath);
233 coerceValue(value, myExtraregions);
236 coerceValue(value, myResample);
239 coerceValue(value, myMaxaxisfraction);
242 coerceValue(value, myMaxlength);
245 coerceValue(value, myExcludeshortbones);
248 coerceValue(value, myExcludethreshold);
251 coerceValue(value, myFusethreshold);
254 coerceValue(value, myUsebonelink);
257 coerceValue(value, myUsecaptpose);
260 coerceValue(value, myCookat);
263 coerceValue(value, myCaptframe);
266 coerceValue(value, myCaptureregionsop);
269 coerceValue(value, myDosubnets);
272 coerceValue(value, myRelativeskel);
288 { doGetParmValue(idx, instance, value); }
290 { doGetParmValue(idx, instance, value); }
292 { doGetParmValue(idx, instance, value); }
294 { doGetParmValue(idx, instance, value); }
296 { doGetParmValue(idx, instance, value); }
298 { doGetParmValue(idx, instance, value); }
300 { doGetParmValue(idx, instance, value); }
302 { doGetParmValue(idx, instance, value); }
304 { doGetParmValue(idx, instance, value); }
306 { doGetParmValue(idx, instance, value); }
308 { doGetParmValue(idx, instance, value); }
310 template <
typename T>
317 if (idx.
size() != instance.
size()+1)
322 coerceValue(myGroup, ( ( value ) ));
325 coerceValue(myRootpath, ( ( value ) ));
328 coerceValue(myExtraregions, ( ( value ) ));
331 coerceValue(myResample, clampMinValue(0, clampMaxValue(2, value ) ));
334 coerceValue(myMaxaxisfraction, ( ( value ) ));
337 coerceValue(myMaxlength, ( ( value ) ));
340 coerceValue(myExcludeshortbones, ( ( value ) ));
343 coerceValue(myExcludethreshold, ( ( value ) ));
346 coerceValue(myFusethreshold, ( ( value ) ));
349 coerceValue(myUsebonelink, ( ( value ) ));
352 coerceValue(myUsecaptpose, ( ( value ) ));
355 coerceValue(myCookat, clampMinValue(0, clampMaxValue(1, value ) ));
358 coerceValue(myCaptframe, ( ( value ) ));
361 coerceValue(myCaptureregionsop, clampMinValue(0, clampMaxValue(2, value ) ));
364 coerceValue(myDosubnets, ( ( value ) ));
367 coerceValue(myRelativeskel, ( ( value ) ));
374 { doSetParmValue(idx, instance, value); }
376 { doSetParmValue(idx, instance, value); }
378 { doSetParmValue(idx, instance, value); }
380 { doSetParmValue(idx, instance, value); }
382 { doSetParmValue(idx, instance, value); }
384 { doSetParmValue(idx, instance, value); }
386 { doSetParmValue(idx, instance, value); }
388 { doSetParmValue(idx, instance, value); }
390 { doSetParmValue(idx, instance, value); }
392 { doSetParmValue(idx, instance, value); }
394 { doSetParmValue(idx, instance, value); }
410 if (fieldnum.
size() < 1)
419 return "extraregions";
423 return "maxaxisfraction";
427 return "excludeshortbones";
429 return "excludethreshold";
431 return "fusethreshold";
433 return "usebonelink";
435 return "usecaptpose";
441 return "captureregionsop";
445 return "relativeskel";
453 if (fieldnum.
size() < 1)
454 return PARM_UNSUPPORTED;
491 return PARM_UNSUPPORTED;
527 loadData(is, rampdata);
545 int typelen = colon - data.
buffer();
559 {
int64 iv =
v; UTwrite(os, &iv); }
561 { UTwrite<fpreal64>(os, &
v); }
563 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
565 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
566 UTwrite<fpreal64>(os, &v.
z()); }
568 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
569 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
581 if (s) s->save(ostr);
583 saveData(os, result);
590 ostr << s->getDataTypeToken();
595 saveData(os, result);
599 void save(std::ostream &os)
const
603 saveData(os, myGroup);
604 saveData(os, myRootpath);
605 saveData(os, myExtraregions);
606 saveData(os, myResample);
607 saveData(os, myMaxaxisfraction);
608 saveData(os, myMaxlength);
609 saveData(os, myExcludeshortbones);
610 saveData(os, myExcludethreshold);
611 saveData(os, myFusethreshold);
612 saveData(os, myUsebonelink);
613 saveData(os, myUsecaptpose);
614 saveData(os, myCookat);
615 saveData(os, myCaptframe);
616 saveData(os, myCaptureregionsop);
617 saveData(os, myDosubnets);
618 saveData(os, myRelativeskel);
631 loadData(is, myGroup);
632 loadData(is, myRootpath);
633 loadData(is, myExtraregions);
634 loadData(is, myResample);
635 loadData(is, myMaxaxisfraction);
636 loadData(is, myMaxlength);
637 loadData(is, myExcludeshortbones);
638 loadData(is, myExcludethreshold);
639 loadData(is, myFusethreshold);
640 loadData(is, myUsebonelink);
641 loadData(is, myUsecaptpose);
642 loadData(is, myCookat);
643 loadData(is, myCaptframe);
644 loadData(is, myCaptureregionsop);
645 loadData(is, myDosubnets);
646 loadData(is, myRelativeskel);
656 if (!thissop)
return getGroup();
658 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
666 if (!thissop)
return getRootpath();
668 OP_Utils::evalOpParm(result, thissop,
"rootpath", cookparms.
getCookTime(), 0);
676 if (!thissop)
return getExtraregions();
678 OP_Utils::evalOpParm(result, thissop,
"extraregions", cookparms.
getCookTime(), 0);
686 if (!thissop)
return getResample();
688 OP_Utils::evalOpParm(result, thissop,
"resample", cookparms.
getCookTime(), 0);
696 if (!thissop)
return getMaxaxisfraction();
698 OP_Utils::evalOpParm(result, thissop,
"maxaxisfraction", cookparms.
getCookTime(), 0);
706 if (!thissop)
return getMaxlength();
708 OP_Utils::evalOpParm(result, thissop,
"maxlength", cookparms.
getCookTime(), 0);
716 if (!thissop)
return getExcludeshortbones();
718 OP_Utils::evalOpParm(result, thissop,
"excludeshortbones", cookparms.
getCookTime(), 0);
726 if (!thissop)
return getExcludethreshold();
728 OP_Utils::evalOpParm(result, thissop,
"excludethreshold", cookparms.
getCookTime(), 0);
736 if (!thissop)
return getFusethreshold();
738 OP_Utils::evalOpParm(result, thissop,
"fusethreshold", cookparms.
getCookTime(), 0);
746 if (!thissop)
return getUsebonelink();
748 OP_Utils::evalOpParm(result, thissop,
"usebonelink", cookparms.
getCookTime(), 0);
756 if (!thissop)
return getUsecaptpose();
758 OP_Utils::evalOpParm(result, thissop,
"usecaptpose", cookparms.
getCookTime(), 0);
766 if (!thissop)
return getCookat();
768 OP_Utils::evalOpParm(result, thissop,
"cookat", cookparms.
getCookTime(), 0);
776 if (!thissop)
return getCaptframe();
778 OP_Utils::evalOpParm(result, thissop,
"captframe", cookparms.
getCookTime(), 0);
786 if (!thissop)
return getCaptureregionsop();
788 OP_Utils::evalOpParm(result, thissop,
"captureregionsop", cookparms.
getCookTime(), 0);
796 if (!thissop)
return getDosubnets();
798 OP_Utils::evalOpParm(result, thissop,
"dosubnets", cookparms.
getCookTime(), 0);
806 if (!thissop)
return getRelativeskel();
808 OP_Utils::evalOpParm(result, thissop,
"relativeskel", cookparms.
getCookTime(), 0);
819 bool myExcludeshortbones;
826 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)
GLsizei const GLfloat * value
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)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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
virtual UT_StringHolder baseGetSignature() const
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
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
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)
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)