23 namespace SOP_PolyFrameEnums
34 using namespace UT::Literal;
54 myStyle =
"edge2"_UTsh;
55 myAttribname =
""_UTsh;
59 myTangentu =
"tangentu"_UTsh;
61 myTangentv =
"tangentv"_UTsh;
63 mySigns =
"signs"_UTsh;
78 if (myGroup != src.myGroup)
return false;
79 if (myEntity != src.myEntity)
return false;
80 if (myStyle != src.myStyle)
return false;
81 if (myAttribname != src.myAttribname)
return false;
82 if (myNon != src.myNon)
return false;
83 if (myN != src.myN)
return false;
84 if (myTangentuon != src.myTangentuon)
return false;
85 if (myTangentu != src.myTangentu)
return false;
86 if (myTangentvon != src.myTangentvon)
return false;
87 if (myTangentv != src.myTangentv)
return false;
88 if (mySignson != src.mySignson)
return false;
89 if (mySigns != src.mySigns)
return false;
90 if (myOrtho != src.myOrtho)
return false;
91 if (myLeftHanded != src.myLeftHanded)
return false;
107 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
110 graph->
evalOpParm(myEntity, nodeidx,
"entity", time, 0);
111 myStyle =
"edge2"_UTsh;
113 graph->
evalOpParm(myStyle, nodeidx,
"style", time, 0);
114 myAttribname =
""_UTsh;
115 if (
true && ( (
true&&!(((getStyle()!=
"attrib")&&(getStyle()!=
"texuv")&&(getStyle()!=
"mikkt")))) ) )
116 graph->
evalOpParm(myAttribname, nodeidx,
"attribname", time, 0);
118 if (
true && ( (
true&&!(((getStyle()==
"mikkt")))) ) )
119 graph->
evalOpParm(myNon, nodeidx,
"Non", time, 0);
121 if (
true && ( (
true&&!(((getNon()==0))||((getStyle()==
"mikkt")))) ) )
122 graph->
evalOpParm(myN, nodeidx,
"N", time, 0);
125 graph->
evalOpParm(myTangentuon, nodeidx,
"tangentuon", time, 0);
126 myTangentu =
"tangentu"_UTsh;
127 if (
true && ( (
true&&!(((getTangentuon()==0)))) ) )
128 graph->
evalOpParm(myTangentu, nodeidx,
"tangentu", time, 0);
129 myTangentvon =
false;
131 graph->
evalOpParm(myTangentvon, nodeidx,
"tangentvon", time, 0);
132 myTangentv =
"tangentv"_UTsh;
133 if (
true && ( (
true&&!(((getTangentvon()==0)))) ) )
134 graph->
evalOpParm(myTangentv, nodeidx,
"tangentv", time, 0);
136 if (
true && ( (
true&&!(((getStyle()!=
"mikkt")))) ) )
137 graph->
evalOpParm(mySignson, nodeidx,
"signson", time, 0);
138 mySigns =
"signs"_UTsh;
139 if (
true && ( (
true&&!(((getSignson()==0))||((getStyle()!=
"mikkt")))) ) )
140 graph->
evalOpParm(mySigns, nodeidx,
"signs", time, 0);
142 if (
true && ( (
true&&!(((getStyle()==
"mikkt")))) ) )
143 graph->
evalOpParm(myOrtho, nodeidx,
"ortho", time, 0);
144 myLeftHanded =
false;
145 if (
true && ( (
true&&!(((getOrtho()==0))||((getStyle()==
"mikkt")))) ) )
146 graph->
evalOpParm(myLeftHanded, nodeidx,
"lefthanded", time, 0);
162 template <
typename T>
169 if (idx.
size() != instance.
size()+1)
174 coerceValue(value, myGroup);
177 coerceValue(value, myEntity);
180 coerceValue(value, myStyle);
183 coerceValue(value, myAttribname);
186 coerceValue(value, myNon);
189 coerceValue(value, myN);
192 coerceValue(value, myTangentuon);
195 coerceValue(value, myTangentu);
198 coerceValue(value, myTangentvon);
201 coerceValue(value, myTangentv);
204 coerceValue(value, mySignson);
207 coerceValue(value, mySigns);
210 coerceValue(value, myOrtho);
213 coerceValue(value, myLeftHanded);
229 { doGetParmValue(idx, instance, value); }
231 { doGetParmValue(idx, instance, value); }
233 { doGetParmValue(idx, instance, value); }
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 template <
typename T>
258 if (idx.
size() != instance.
size()+1)
263 coerceValue(myGroup, ( ( value ) ));
266 coerceValue(myEntity, clampMinValue(0, clampMaxValue(1, value ) ));
269 coerceValue(myStyle, ( ( value ) ));
272 coerceValue(myAttribname, ( ( value ) ));
275 coerceValue(myNon, ( ( value ) ));
278 coerceValue(myN, ( ( value ) ));
281 coerceValue(myTangentuon, ( ( value ) ));
284 coerceValue(myTangentu, ( ( value ) ));
287 coerceValue(myTangentvon, ( ( value ) ));
290 coerceValue(myTangentv, ( ( value ) ));
293 coerceValue(mySignson, ( ( value ) ));
296 coerceValue(mySigns, ( ( value ) ));
299 coerceValue(myOrtho, ( ( value ) ));
302 coerceValue(myLeftHanded, ( ( value ) ));
309 { doSetParmValue(idx, instance, value); }
311 { doSetParmValue(idx, instance, value); }
313 { doSetParmValue(idx, instance, value); }
315 { doSetParmValue(idx, instance, value); }
317 { doSetParmValue(idx, instance, value); }
319 { doSetParmValue(idx, instance, 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); }
345 if (fieldnum.
size() < 1)
384 if (fieldnum.
size() < 1)
385 return PARM_UNSUPPORTED;
418 return PARM_UNSUPPORTED;
454 loadData(is, rampdata);
472 int typelen = colon - data.
buffer();
486 {
int64 iv =
v; UTwrite(os, &iv); }
488 { UTwrite<fpreal64>(os, &
v); }
490 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
492 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
493 UTwrite<fpreal64>(os, &v.
z()); }
495 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
496 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
508 if (s) s->save(ostr);
510 saveData(os, result);
517 ostr << s->getDataTypeToken();
522 saveData(os, result);
526 void save(std::ostream &os)
const
530 saveData(os, myGroup);
531 saveData(os, myEntity);
532 saveData(os, myStyle);
533 saveData(os, myAttribname);
536 saveData(os, myTangentuon);
537 saveData(os, myTangentu);
538 saveData(os, myTangentvon);
539 saveData(os, myTangentv);
540 saveData(os, mySignson);
541 saveData(os, mySigns);
542 saveData(os, myOrtho);
543 saveData(os, myLeftHanded);
556 loadData(is, myGroup);
557 loadData(is, myEntity);
558 loadData(is, myStyle);
559 loadData(is, myAttribname);
562 loadData(is, myTangentuon);
563 loadData(is, myTangentu);
564 loadData(is, myTangentvon);
565 loadData(is, myTangentv);
566 loadData(is, mySignson);
567 loadData(is, mySigns);
568 loadData(is, myOrtho);
569 loadData(is, myLeftHanded);
579 if (!thissop)
return getGroup();
581 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
589 if (!thissop)
return getEntity();
591 OP_Utils::evalOpParm(result, thissop,
"entity", cookparms.
getCookTime(), 0);
599 if (!thissop)
return getStyle();
601 OP_Utils::evalOpParm(result, thissop,
"style", cookparms.
getCookTime(), 0);
609 if (!thissop)
return getAttribname();
611 OP_Utils::evalOpParm(result, thissop,
"attribname", cookparms.
getCookTime(), 0);
619 if (!thissop)
return getNon();
621 OP_Utils::evalOpParm(result, thissop,
"Non", cookparms.
getCookTime(), 0);
629 if (!thissop)
return getN();
631 OP_Utils::evalOpParm(result, thissop,
"N", cookparms.
getCookTime(), 0);
639 if (!thissop)
return getTangentuon();
641 OP_Utils::evalOpParm(result, thissop,
"tangentuon", cookparms.
getCookTime(), 0);
649 if (!thissop)
return getTangentu();
651 OP_Utils::evalOpParm(result, thissop,
"tangentu", cookparms.
getCookTime(), 0);
659 if (!thissop)
return getTangentvon();
661 OP_Utils::evalOpParm(result, thissop,
"tangentvon", cookparms.
getCookTime(), 0);
669 if (!thissop)
return getTangentv();
671 OP_Utils::evalOpParm(result, thissop,
"tangentv", cookparms.
getCookTime(), 0);
679 if (!thissop)
return getSignson();
681 OP_Utils::evalOpParm(result, thissop,
"signson", cookparms.
getCookTime(), 0);
689 if (!thissop)
return getSigns();
691 OP_Utils::evalOpParm(result, thissop,
"signs", cookparms.
getCookTime(), 0);
699 if (!thissop)
return getOrtho();
701 OP_Utils::evalOpParm(result, thissop,
"ortho", cookparms.
getCookTime(), 0);
709 if (!thissop)
return getLeftHanded();
711 OP_Utils::evalOpParm(result, thissop,
"lefthanded", cookparms.
getCookTime(), 0);
UT_StringHolder opTangentv(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getSigns() const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, bool &v)
bool operator==(const SOP_PolyFrameParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setTangentuon(bool val)
SOP_Node * getNode() const
static void saveData(std::ostream &os, UT_StringHolder s)
static void saveData(std::ostream &os, int64 v)
static void saveData(std::ostream &os, UT_Matrix4D v)
static void saveData(std::ostream &os, UT_Vector4D v)
bool operator!=(const SOP_PolyFrameParms &src) const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setN(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void setSigns(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setGroup(const UT_StringHolder &val)
void loadFromOpSubclass(const LoadParms &loadparms) override
const UT_StringHolder & getN() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void saveData(std::ostream &os, UT_Matrix2D v)
**But if you need a result
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setAttribname(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
UT_StringHolder opAttribname(const SOP_NodeVerb::CookParms &cookparms) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
const char * getNestParmName(TempIndex fieldnum) const override
UT_StringHolder opTangentu(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
bool getLeftHanded() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
bool opTangentvon(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool opNon(const SOP_NodeVerb::CookParms &cookparms) const
bool isParmColorRamp(exint idx) const override
bool getTangentvon() const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setTangentvon(bool val)
void setTangentv(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setTangentu(const UT_StringHolder &val)
SYS_FORCE_INLINE const char * buffer() const
static void saveData(std::ostream &os, UT_Vector3D v)
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
static void loadData(UT_IStream &is, UT_Vector3D &v)
constexpr SYS_FORCE_INLINE T & z() noexcept
void setStyle(const UT_StringHolder &val)
const OP_GraphProxy * graph() const
static void loadData(UT_IStream &is, int64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void loadData(UT_IStream &is, fpreal64 &v)
bool opLeftHanded(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3I &v)
Entity opEntity(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
bool opOrtho(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opStyle(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getTangentv() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_Vector2D v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
exint getNestNumParms(TempIndex idx) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
static void loadData(UT_IStream &is, UT_Vector4D &v)
void copyFrom(const OP_NodeParms *src) override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void saveData(std::ostream &os, UT_Matrix3D v)
const UT_StringHolder & getGroup() const
UT_StringHolder opN(const SOP_NodeVerb::CookParms &cookparms) const
void save(std::ostream &os) const
const UT_StringHolder & getTangentu() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
DEP_MicroNode * depnode() const
static void saveData(std::ostream &os, fpreal64 v)
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
SYS_FORCE_INLINE UT_StringHolder getToken(Entity enum_value)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
constexpr SYS_FORCE_INLINE T & w() noexcept
static void loadData(UT_IStream &is, UT_StringHolder &v)
bool getTangentuon() const
bool load(UT_IStream &is)
fpreal getCookTime() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
const char * findChar(int c) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
const UT_StringHolder & getAttribname() const
const UT_StringHolder & getStyle() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
bool opTangentuon(const SOP_NodeVerb::CookParms &cookparms) const
void setSignson(bool val)
constexpr SYS_FORCE_INLINE T & y() noexcept
void setEntity(Entity val)
void setLeftHanded(bool val)
UT_StringHolder opSigns(const SOP_NodeVerb::CookParms &cookparms) const
ParmType getNestParmType(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Vector2D &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool opSignson(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, bool v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept