23 namespace SOP_BoneCaptureLinesEnums
54 myExtraregions =
""_UTsh;
56 myMaxaxisfraction = 0.01;
58 myExcludeshortbones =
true;
59 myExcludethreshold = 0.001;
60 myFusethreshold = 0.001;
61 myUsebonelink =
false;
65 myCaptureregionsop = 2;
67 myRelativeskel =
true;
80 if (myGroup != src.myGroup)
return false;
81 if (myRootpath != src.myRootpath)
return false;
82 if (myExtraregions != src.myExtraregions)
return false;
83 if (myResample != src.myResample)
return false;
84 if (myMaxaxisfraction != src.myMaxaxisfraction)
return false;
85 if (myMaxlength != src.myMaxlength)
return false;
86 if (myExcludeshortbones != src.myExcludeshortbones)
return false;
87 if (myExcludethreshold != src.myExcludethreshold)
return false;
88 if (myFusethreshold != src.myFusethreshold)
return false;
89 if (myUsebonelink != src.myUsebonelink)
return false;
90 if (myUsecaptpose != src.myUsecaptpose)
return false;
91 if (myCookat != src.myCookat)
return false;
92 if (myCaptframe != src.myCaptframe)
return false;
93 if (myCaptureregionsop != src.myCaptureregionsop)
return false;
94 if (myDosubnets != src.myDosubnets)
return false;
95 if (myRelativeskel != src.myRelativeskel)
return false;
113 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
114 myRootpath =
""_UTsh;
116 graph->
evalOpParm(myRootpath, nodeidx,
"rootpath", time, 0);
117 myExtraregions =
""_UTsh;
119 graph->
evalOpParm(myExtraregions, nodeidx,
"extraregions", time, 0);
122 graph->
evalOpParm(myResample, nodeidx,
"resample", time, 0);
123 myMaxaxisfraction = 0.01;
124 if (
true && ( (
true&&!(((
int64(getResample())!=1))||((
int64(getResample())!=1)))) ) )
125 graph->
evalOpParm(myMaxaxisfraction, nodeidx,
"maxaxisfraction", time, 0);
127 if (
true && ( (
true&&!(((
int64(getResample())!=2))||((
int64(getResample())!=2)))) ) )
128 graph->
evalOpParm(myMaxlength, nodeidx,
"maxlength", time, 0);
129 myExcludeshortbones =
true;
131 graph->
evalOpParm(myExcludeshortbones, nodeidx,
"excludeshortbones", time, 0);
132 myExcludethreshold = 0.001;
133 if (
true && ( (
true&&!(((getExcludeshortbones()==0)))) ) )
134 graph->
evalOpParm(myExcludethreshold, nodeidx,
"excludethreshold", time, 0);
135 myFusethreshold = 0.001;
137 graph->
evalOpParm(myFusethreshold, nodeidx,
"fusethreshold", time, 0);
138 myUsebonelink =
false;
140 graph->
evalOpParm(myUsebonelink, nodeidx,
"usebonelink", time, 0);
141 myUsecaptpose =
true;
143 graph->
evalOpParm(myUsecaptpose, nodeidx,
"usecaptpose", time, 0);
145 if (
true && ( (
true&&!(((getUsecaptpose()!=0)))) ) )
146 graph->
evalOpParm(myCookat, nodeidx,
"cookat", time, 0);
148 if (
true && ( (
true&&!(((getUsecaptpose()!=0))||((
int64(getCookat())==1)))) ) )
149 graph->
evalOpParm(myCaptframe, nodeidx,
"captframe", time, 0);
150 myCaptureregionsop = 2;
152 graph->
evalOpParm(myCaptureregionsop, nodeidx,
"captureregionsop", time, 0);
155 graph->
evalOpParm(myDosubnets, nodeidx,
"dosubnets", time, 0);
156 myRelativeskel =
true;
158 graph->
evalOpParm(myRelativeskel, nodeidx,
"relativeskel", time, 0);
174 template <
typename T>
181 if (idx.
size() != instance.
size()+1)
247 { doGetParmValue(idx, instance, value); }
249 { doGetParmValue(idx, instance, value); }
251 { doGetParmValue(idx, instance, value); }
253 { doGetParmValue(idx, instance, value); }
255 { doGetParmValue(idx, instance, value); }
257 { doGetParmValue(idx, instance, value); }
259 { doGetParmValue(idx, instance, value); }
261 { doGetParmValue(idx, instance, value); }
263 { doGetParmValue(idx, instance, value); }
265 { doGetParmValue(idx, instance, value); }
267 { doGetParmValue(idx, instance, value); }
269 template <
typename T>
276 if (idx.
size() != instance.
size()+1)
333 { doSetParmValue(idx, instance, value); }
335 { doSetParmValue(idx, instance, value); }
337 { doSetParmValue(idx, instance, value); }
339 { doSetParmValue(idx, instance, value); }
341 { doSetParmValue(idx, instance, value); }
343 { doSetParmValue(idx, instance, value); }
345 { doSetParmValue(idx, instance, value); }
347 { doSetParmValue(idx, instance, value); }
349 { doSetParmValue(idx, instance, value); }
351 { doSetParmValue(idx, instance, value); }
353 { doSetParmValue(idx, instance, value); }
369 if (fieldnum.
size() < 1)
378 return "extraregions";
382 return "maxaxisfraction";
386 return "excludeshortbones";
388 return "excludethreshold";
390 return "fusethreshold";
392 return "usebonelink";
394 return "usecaptpose";
400 return "captureregionsop";
404 return "relativeskel";
412 if (fieldnum.
size() < 1)
413 return PARM_UNSUPPORTED;
469 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
471 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
473 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
486 loadData(is, rampdata);
504 int typelen = colon - data.
buffer();
518 {
int64 iv =
v; UTwrite(os, &iv); }
520 { UTwrite<fpreal64>(os, &
v); }
522 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
524 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
525 UTwrite<fpreal64>(os, &v.
z()); }
527 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
528 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
540 if (s) s->save(ostr);
542 saveData(os, result);
549 ostr << s->getDataTypeToken();
554 saveData(os, result);
558 void save(std::ostream &os)
const
562 saveData(os, myGroup);
563 saveData(os, myRootpath);
564 saveData(os, myExtraregions);
565 saveData(os, myResample);
566 saveData(os, myMaxaxisfraction);
567 saveData(os, myMaxlength);
568 saveData(os, myExcludeshortbones);
569 saveData(os, myExcludethreshold);
570 saveData(os, myFusethreshold);
571 saveData(os, myUsebonelink);
572 saveData(os, myUsecaptpose);
573 saveData(os, myCookat);
574 saveData(os, myCaptframe);
575 saveData(os, myCaptureregionsop);
576 saveData(os, myDosubnets);
577 saveData(os, myRelativeskel);
590 loadData(is, myGroup);
591 loadData(is, myRootpath);
592 loadData(is, myExtraregions);
593 loadData(is, myResample);
594 loadData(is, myMaxaxisfraction);
595 loadData(is, myMaxlength);
596 loadData(is, myExcludeshortbones);
597 loadData(is, myExcludethreshold);
598 loadData(is, myFusethreshold);
599 loadData(is, myUsebonelink);
600 loadData(is, myUsecaptpose);
601 loadData(is, myCookat);
602 loadData(is, myCaptframe);
603 loadData(is, myCaptureregionsop);
604 loadData(is, myDosubnets);
605 loadData(is, myRelativeskel);
615 if (!thissop)
return getGroup();
617 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
625 if (!thissop)
return getRootpath();
627 OP_Utils::evalOpParm(result, thissop,
"rootpath", cookparms.
getCookTime(), 0);
635 if (!thissop)
return getExtraregions();
637 OP_Utils::evalOpParm(result, thissop,
"extraregions", cookparms.
getCookTime(), 0);
645 if (!thissop)
return getResample();
647 OP_Utils::evalOpParm(result, thissop,
"resample", cookparms.
getCookTime(), 0);
655 if (!thissop)
return getMaxaxisfraction();
657 OP_Utils::evalOpParm(result, thissop,
"maxaxisfraction", cookparms.
getCookTime(), 0);
665 if (!thissop)
return getMaxlength();
667 OP_Utils::evalOpParm(result, thissop,
"maxlength", cookparms.
getCookTime(), 0);
675 if (!thissop)
return getExcludeshortbones();
677 OP_Utils::evalOpParm(result, thissop,
"excludeshortbones", cookparms.
getCookTime(), 0);
685 if (!thissop)
return getExcludethreshold();
687 OP_Utils::evalOpParm(result, thissop,
"excludethreshold", cookparms.
getCookTime(), 0);
695 if (!thissop)
return getFusethreshold();
697 OP_Utils::evalOpParm(result, thissop,
"fusethreshold", cookparms.
getCookTime(), 0);
705 if (!thissop)
return getUsebonelink();
707 OP_Utils::evalOpParm(result, thissop,
"usebonelink", cookparms.
getCookTime(), 0);
715 if (!thissop)
return getUsecaptpose();
717 OP_Utils::evalOpParm(result, thissop,
"usecaptpose", cookparms.
getCookTime(), 0);
725 if (!thissop)
return getCookat();
727 OP_Utils::evalOpParm(result, thissop,
"cookat", cookparms.
getCookTime(), 0);
735 if (!thissop)
return getCaptframe();
737 OP_Utils::evalOpParm(result, thissop,
"captframe", cookparms.
getCookTime(), 0);
745 if (!thissop)
return getCaptureregionsop();
747 OP_Utils::evalOpParm(result, thissop,
"captureregionsop", cookparms.
getCookTime(), 0);
755 if (!thissop)
return getDosubnets();
757 OP_Utils::evalOpParm(result, thissop,
"dosubnets", cookparms.
getCookTime(), 0);
765 if (!thissop)
return getRelativeskel();
767 OP_Utils::evalOpParm(result, thissop,
"relativeskel", cookparms.
getCookTime(), 0);
778 bool myExcludeshortbones;
785 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)
T clampMaxValue(fpreal maxvalue, const T &src) const
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)
T clampMinValue(fpreal minvalue, const T &src) const
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
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
void coerceValue(T &result, const S &src) const
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
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
OP_NodeParms & operator=(const OP_NodeParms &)=default
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)