20 using namespace UT::Literal;
23 namespace SOP_BoneCaptureLinesEnums
54 myExtraregions =
""_sh;
56 myMaxaxisfraction = 0.01;
58 myExcludeshortbones =
true;
59 myExcludethreshold = 0.001;
60 myFusethreshold = 0.001;
61 myUsebonelink =
false;
65 myCaptureregionsop = 2;
67 myRelativeskel =
true;
77 if (myGroup != src.myGroup)
return false;
78 if (myRootpath != src.myRootpath)
return false;
79 if (myExtraregions != src.myExtraregions)
return false;
80 if (myResample != src.myResample)
return false;
81 if (myMaxaxisfraction != src.myMaxaxisfraction)
return false;
82 if (myMaxlength != src.myMaxlength)
return false;
83 if (myExcludeshortbones != src.myExcludeshortbones)
return false;
84 if (myExcludethreshold != src.myExcludethreshold)
return false;
85 if (myFusethreshold != src.myFusethreshold)
return false;
86 if (myUsebonelink != src.myUsebonelink)
return false;
87 if (myUsecaptpose != src.myUsecaptpose)
return false;
88 if (myCookat != src.myCookat)
return false;
89 if (myCaptframe != src.myCaptframe)
return false;
90 if (myCaptureregionsop != src.myCaptureregionsop)
return false;
91 if (myDosubnets != src.myDosubnets)
return false;
92 if (myRelativeskel != src.myRelativeskel)
return false;
110 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
113 graph->
evalOpParm(myRootpath, nodeidx,
"rootpath", time, 0);
114 myExtraregions =
""_sh;
116 graph->
evalOpParm(myExtraregions, nodeidx,
"extraregions", time, 0);
119 graph->
evalOpParm(myResample, nodeidx,
"resample", time, 0);
120 myMaxaxisfraction = 0.01;
121 if (
true && ( (!(((
int64(getResample())!=1))||((
int64(getResample())!=1)))) ) )
122 graph->
evalOpParm(myMaxaxisfraction, nodeidx,
"maxaxisfraction", time, 0);
124 if (
true && ( (!(((
int64(getResample())!=2))||((
int64(getResample())!=2)))) ) )
125 graph->
evalOpParm(myMaxlength, nodeidx,
"maxlength", time, 0);
126 myExcludeshortbones =
true;
128 graph->
evalOpParm(myExcludeshortbones, nodeidx,
"excludeshortbones", time, 0);
129 myExcludethreshold = 0.001;
130 if (
true && ( (!(((getExcludeshortbones()==0)))) ) )
131 graph->
evalOpParm(myExcludethreshold, nodeidx,
"excludethreshold", time, 0);
132 myFusethreshold = 0.001;
134 graph->
evalOpParm(myFusethreshold, nodeidx,
"fusethreshold", time, 0);
135 myUsebonelink =
false;
137 graph->
evalOpParm(myUsebonelink, nodeidx,
"usebonelink", time, 0);
138 myUsecaptpose =
true;
140 graph->
evalOpParm(myUsecaptpose, nodeidx,
"usecaptpose", time, 0);
142 if (
true && ( (!(((getUsecaptpose()!=0)))) ) )
143 graph->
evalOpParm(myCookat, nodeidx,
"cookat", time, 0);
145 if (
true && ( (!(((getUsecaptpose()!=0))||((
int64(getCookat())==1)))) ) )
146 graph->
evalOpParm(myCaptframe, nodeidx,
"captframe", time, 0);
147 myCaptureregionsop = 2;
149 graph->
evalOpParm(myCaptureregionsop, nodeidx,
"captureregionsop", time, 0);
152 graph->
evalOpParm(myDosubnets, nodeidx,
"dosubnets", time, 0);
153 myRelativeskel =
true;
155 graph->
evalOpParm(myRelativeskel, nodeidx,
"relativeskel", time, 0);
171 template <
typename T>
178 if (idx.
size() != instance.
size()+1)
183 coerceValue(value, myGroup);
186 coerceValue(value, myRootpath);
189 coerceValue(value, myExtraregions);
192 coerceValue(value, myResample);
195 coerceValue(value, myMaxaxisfraction);
198 coerceValue(value, myMaxlength);
201 coerceValue(value, myExcludeshortbones);
204 coerceValue(value, myExcludethreshold);
207 coerceValue(value, myFusethreshold);
210 coerceValue(value, myUsebonelink);
213 coerceValue(value, myUsecaptpose);
216 coerceValue(value, myCookat);
219 coerceValue(value, myCaptframe);
222 coerceValue(value, myCaptureregionsop);
225 coerceValue(value, myDosubnets);
228 coerceValue(value, myRelativeskel);
235 { doGetParmValue(idx, instance, value); }
237 { doGetParmValue(idx, instance, value); }
239 { doGetParmValue(idx, instance, value); }
241 { doGetParmValue(idx, instance, value); }
243 { doGetParmValue(idx, instance, value); }
245 { doGetParmValue(idx, instance, value); }
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 template <
typename T>
264 if (idx.
size() != instance.
size()+1)
269 coerceValue(myGroup, value);
272 coerceValue(myRootpath, value);
275 coerceValue(myExtraregions, value);
278 coerceValue(myResample, value);
281 coerceValue(myMaxaxisfraction, value);
284 coerceValue(myMaxlength, value);
287 coerceValue(myExcludeshortbones, value);
290 coerceValue(myExcludethreshold, value);
293 coerceValue(myFusethreshold, value);
296 coerceValue(myUsebonelink, value);
299 coerceValue(myUsecaptpose, value);
302 coerceValue(myCookat, value);
305 coerceValue(myCaptframe, value);
308 coerceValue(myCaptureregionsop, value);
311 coerceValue(myDosubnets, value);
314 coerceValue(myRelativeskel, value);
321 { doSetParmValue(idx, instance, value); }
323 { doSetParmValue(idx, instance, value); }
325 { doSetParmValue(idx, instance, value); }
327 { doSetParmValue(idx, instance, value); }
329 { doSetParmValue(idx, instance, value); }
331 { doSetParmValue(idx, instance, value); }
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); }
357 if (fieldnum.
size() < 1)
366 return "extraregions";
370 return "maxaxisfraction";
374 return "excludeshortbones";
376 return "excludethreshold";
378 return "fusethreshold";
380 return "usebonelink";
382 return "usecaptpose";
388 return "captureregionsop";
392 return "relativeskel";
400 if (fieldnum.
size() < 1)
401 return PARM_UNSUPPORTED;
438 return PARM_UNSUPPORTED;
474 loadData(is, rampdata);
492 int typelen = colon - data.
buffer();
506 {
int64 iv =
v; UTwrite(os, &iv); }
508 { UTwrite<fpreal64>(os, &
v); }
510 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
512 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
513 UTwrite<fpreal64>(os, &v.
z()); }
515 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
516 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
528 if (s) s->save(ostr);
530 saveData(os, result);
537 ostr << s->getDataTypeToken();
542 saveData(os, result);
546 void save(std::ostream &os)
const
550 saveData(os, myGroup);
551 saveData(os, myRootpath);
552 saveData(os, myExtraregions);
553 saveData(os, myResample);
554 saveData(os, myMaxaxisfraction);
555 saveData(os, myMaxlength);
556 saveData(os, myExcludeshortbones);
557 saveData(os, myExcludethreshold);
558 saveData(os, myFusethreshold);
559 saveData(os, myUsebonelink);
560 saveData(os, myUsecaptpose);
561 saveData(os, myCookat);
562 saveData(os, myCaptframe);
563 saveData(os, myCaptureregionsop);
564 saveData(os, myDosubnets);
565 saveData(os, myRelativeskel);
578 loadData(is, myGroup);
579 loadData(is, myRootpath);
580 loadData(is, myExtraregions);
581 loadData(is, myResample);
582 loadData(is, myMaxaxisfraction);
583 loadData(is, myMaxlength);
584 loadData(is, myExcludeshortbones);
585 loadData(is, myExcludethreshold);
586 loadData(is, myFusethreshold);
587 loadData(is, myUsebonelink);
588 loadData(is, myUsecaptpose);
589 loadData(is, myCookat);
590 loadData(is, myCaptframe);
591 loadData(is, myCaptureregionsop);
592 loadData(is, myDosubnets);
593 loadData(is, myRelativeskel);
603 if (!thissop)
return getGroup();
605 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
613 if (!thissop)
return getRootpath();
615 OP_Utils::evalOpParm(result, thissop,
"rootpath", cookparms.
getCookTime(), 0);
623 if (!thissop)
return getExtraregions();
625 OP_Utils::evalOpParm(result, thissop,
"extraregions", cookparms.
getCookTime(), 0);
633 if (!thissop)
return getResample();
635 OP_Utils::evalOpParm(result, thissop,
"resample", cookparms.
getCookTime(), 0);
643 if (!thissop)
return getMaxaxisfraction();
645 OP_Utils::evalOpParm(result, thissop,
"maxaxisfraction", cookparms.
getCookTime(), 0);
653 if (!thissop)
return getMaxlength();
655 OP_Utils::evalOpParm(result, thissop,
"maxlength", cookparms.
getCookTime(), 0);
663 if (!thissop)
return getExcludeshortbones();
665 OP_Utils::evalOpParm(result, thissop,
"excludeshortbones", cookparms.
getCookTime(), 0);
673 if (!thissop)
return getExcludethreshold();
675 OP_Utils::evalOpParm(result, thissop,
"excludethreshold", cookparms.
getCookTime(), 0);
683 if (!thissop)
return getFusethreshold();
685 OP_Utils::evalOpParm(result, thissop,
"fusethreshold", cookparms.
getCookTime(), 0);
693 if (!thissop)
return getUsebonelink();
695 OP_Utils::evalOpParm(result, thissop,
"usebonelink", cookparms.
getCookTime(), 0);
703 if (!thissop)
return getUsecaptpose();
705 OP_Utils::evalOpParm(result, thissop,
"usecaptpose", cookparms.
getCookTime(), 0);
713 if (!thissop)
return getCookat();
715 OP_Utils::evalOpParm(result, thissop,
"cookat", cookparms.
getCookTime(), 0);
723 if (!thissop)
return getCaptframe();
725 OP_Utils::evalOpParm(result, thissop,
"captframe", cookparms.
getCookTime(), 0);
733 if (!thissop)
return getCaptureregionsop();
735 OP_Utils::evalOpParm(result, thissop,
"captureregionsop", cookparms.
getCookTime(), 0);
743 if (!thissop)
return getDosubnets();
745 OP_Utils::evalOpParm(result, thissop,
"dosubnets", cookparms.
getCookTime(), 0);
753 if (!thissop)
return getRelativeskel();
755 OP_Utils::evalOpParm(result, thissop,
"relativeskel", cookparms.
getCookTime(), 0);
766 bool myExcludeshortbones;
773 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()
void copyFrom(const SOP_NodeParms *src) override
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
static void loadData(UT_IStream &is, UT_Vector2D &v)
GLuint const GLfloat * val
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)
fpreal64 getCaptframe() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() 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
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.
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
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)
~SOP_BoneCaptureLinesParms() override
static void loadData(UT_IStream &is, int64 &v)
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.
GLint GLenum GLsizei GLint GLsizei const void * data
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
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)
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
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
DEP_MicroNode * depnode() const
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
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
GLdouble GLdouble GLdouble r
static void saveData(std::ostream &os, fpreal64 v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
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)
fpreal64 opMaxaxisfraction(const SOP_NodeVerb::CookParms &cookparms) const
bool getExcludeshortbones() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
GLsizei const GLfloat * value
static void loadData(UT_IStream &is, bool &v)
static void saveData(std::ostream &os, UT_Vector3D v)
void setUsebonelink(bool val)
const OP_Context & context() const
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)
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
fpreal64 opCaptframe(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, bool v)