23 namespace SOP_TransformEnums
37 using namespace UT::Literal;
61 using namespace UT::Literal;
86 using namespace UT::Literal;
111 using namespace UT::Literal;
112 switch (enum_value) {
136 using namespace UT::Literal;
137 switch (enum_value) {
158 using namespace UT::Literal;
159 switch (enum_value) {
194 myAttribs =
"*"_UTsh;
195 myUpdatenmls =
false;
196 myUpdateaffectednmls =
true;
198 myInvertxform =
false;
200 myOutputattrib =
"xform"_UTsh;
214 if (myGroup != src.myGroup)
return false;
215 if (myGrouptype != src.myGrouptype)
return false;
216 if (myXord != src.myXord)
return false;
217 if (myRord != src.myRord)
return false;
218 if (myT != src.myT)
return false;
219 if (myR != src.myR)
return false;
220 if (myS != src.myS)
return false;
221 if (myShear != src.myShear)
return false;
222 if (myScale != src.myScale)
return false;
223 if (myP != src.myP)
return false;
224 if (myPr != src.myPr)
return false;
225 if (myPrexform_xord != src.myPrexform_xord)
return false;
226 if (myPrexform_rord != src.myPrexform_rord)
return false;
227 if (myPrexform_t != src.myPrexform_t)
return false;
228 if (myPrexform_r != src.myPrexform_r)
return false;
229 if (myPrexform_s != src.myPrexform_s)
return false;
230 if (myPrexform_shear != src.myPrexform_shear)
return false;
231 if (myAttribs != src.myAttribs)
return false;
232 if (myUpdatenmls != src.myUpdatenmls)
return false;
233 if (myUpdateaffectednmls != src.myUpdateaffectednmls)
return false;
234 if (myVlength != src.myVlength)
return false;
235 if (myInvertxform != src.myInvertxform)
return false;
236 if (myAddattrib != src.myAddattrib)
return false;
237 if (myOutputattrib != src.myOutputattrib)
return false;
238 if (myOutputmerge != src.myOutputmerge)
return false;
262 graph->
evalOpParm(myGroup, nodeidx,
"group", time, graph->
isDirect()?
nullptr:depnode);
265 graph->
evalOpParm(myGrouptype, nodeidx,
"grouptype", time, graph->
isDirect()?
nullptr:depnode);
283 graph->
evalOpParm(myShear, nodeidx,
"shear", time, graph->
isDirect()?
nullptr:depnode);
286 graph->
evalOpParm(myScale, nodeidx,
"scale", time, graph->
isDirect()?
nullptr:depnode);
295 graph->
evalOpParm(myPrexform_xord, nodeidx,
"prexform_xOrd", time, graph->
isDirect()?
nullptr:depnode);
298 graph->
evalOpParm(myPrexform_rord, nodeidx,
"prexform_rOrd", time, graph->
isDirect()?
nullptr:depnode);
301 graph->
evalOpParm(myPrexform_t, nodeidx,
"prexform_t", time, graph->
isDirect()?
nullptr:depnode);
304 graph->
evalOpParm(myPrexform_r, nodeidx,
"prexform_r", time, graph->
isDirect()?
nullptr:depnode);
307 graph->
evalOpParm(myPrexform_s, nodeidx,
"prexform_s", time, graph->
isDirect()?
nullptr:depnode);
310 graph->
evalOpParm(myPrexform_shear, nodeidx,
"prexform_shear", time, graph->
isDirect()?
nullptr:depnode);
311 myAttribs =
"*"_UTsh;
313 graph->
evalOpParm(myAttribs, nodeidx,
"attribs", time, graph->
isDirect()?
nullptr:depnode);
314 myUpdatenmls =
false;
316 graph->
evalOpParm(myUpdatenmls, nodeidx,
"updatenmls", time, graph->
isDirect()?
nullptr:depnode);
317 myUpdateaffectednmls =
true;
318 if (
true && ( (
true&&!(((getUpdatenmls()==1)))) ) )
319 graph->
evalOpParm(myUpdateaffectednmls, nodeidx,
"updateaffectednmls", time, graph->
isDirect()?
nullptr:depnode);
321 if (
true && ( (
true&&!(((getUpdatenmls()==1)))) ) )
322 graph->
evalOpParm(myVlength, nodeidx,
"vlength", time, graph->
isDirect()?
nullptr:depnode);
323 myInvertxform =
false;
325 graph->
evalOpParm(myInvertxform, nodeidx,
"invertxform", time, graph->
isDirect()?
nullptr:depnode);
328 graph->
evalOpParm(myAddattrib, nodeidx,
"addattrib", time, graph->
isDirect()?
nullptr:depnode);
329 myOutputattrib =
"xform"_UTsh;
330 if (
true && ( (
true&&!(((getAddattrib()==0)))) ) )
331 graph->
evalOpParm(myOutputattrib, nodeidx,
"outputattrib", time, graph->
isDirect()?
nullptr:depnode);
333 if (
true && ( (
true&&!(((getAddattrib()==0)))) ) )
334 graph->
evalOpParm(myOutputmerge, nodeidx,
"outputmerge", time, graph->
isDirect()?
nullptr:depnode);
350 template <
typename T>
357 if (idx.
size() != instance.
size()+1)
362 coerceValue(value, myGroup);
365 coerceValue(value, myGrouptype);
368 coerceValue(value, myXord);
371 coerceValue(value, myRord);
374 coerceValue(value, myT);
377 coerceValue(value, myR);
380 coerceValue(value, myS);
383 coerceValue(value, myShear);
386 coerceValue(value, myScale);
389 coerceValue(value, myP);
392 coerceValue(value, myPr);
395 coerceValue(value, myPrexform_xord);
398 coerceValue(value, myPrexform_rord);
401 coerceValue(value, myPrexform_t);
404 coerceValue(value, myPrexform_r);
407 coerceValue(value, myPrexform_s);
410 coerceValue(value, myPrexform_shear);
413 coerceValue(value, myAttribs);
416 coerceValue(value, myUpdatenmls);
419 coerceValue(value, myUpdateaffectednmls);
422 coerceValue(value, myVlength);
425 coerceValue(value, myInvertxform);
428 coerceValue(value, myAddattrib);
431 coerceValue(value, myOutputattrib);
434 coerceValue(value, myOutputmerge);
450 { doGetParmValue(idx, instance, value); }
452 { doGetParmValue(idx, instance, value); }
454 { doGetParmValue(idx, instance, value); }
456 { doGetParmValue(idx, instance, value); }
458 { doGetParmValue(idx, instance, value); }
460 { doGetParmValue(idx, instance, value); }
462 { doGetParmValue(idx, instance, value); }
464 { doGetParmValue(idx, instance, value); }
466 { doGetParmValue(idx, instance, value); }
468 { doGetParmValue(idx, instance, value); }
470 { doGetParmValue(idx, instance, value); }
472 template <
typename T>
479 if (idx.
size() != instance.
size()+1)
484 coerceValue(myGroup, ( ( value ) ));
487 coerceValue(myGrouptype, clampMinValue(0, clampMaxValue(4, value ) ));
490 coerceValue(myXord, clampMinValue(0, clampMaxValue(5, value ) ));
493 coerceValue(myRord, clampMinValue(0, clampMaxValue(5, value ) ));
496 coerceValue(myT, ( ( value ) ));
499 coerceValue(myR, ( ( value ) ));
502 coerceValue(myS, ( ( value ) ));
505 coerceValue(myShear, ( ( value ) ));
508 coerceValue(myScale, ( ( value ) ));
511 coerceValue(myP, ( ( value ) ));
514 coerceValue(myPr, ( ( value ) ));
517 coerceValue(myPrexform_xord, clampMinValue(0, clampMaxValue(5, value ) ));
520 coerceValue(myPrexform_rord, clampMinValue(0, clampMaxValue(5, value ) ));
523 coerceValue(myPrexform_t, ( ( value ) ));
526 coerceValue(myPrexform_r, ( ( value ) ));
529 coerceValue(myPrexform_s, ( ( value ) ));
532 coerceValue(myPrexform_shear, ( ( value ) ));
535 coerceValue(myAttribs, ( ( value ) ));
538 coerceValue(myUpdatenmls, ( ( value ) ));
541 coerceValue(myUpdateaffectednmls, ( ( value ) ));
544 coerceValue(myVlength, ( ( value ) ));
547 coerceValue(myInvertxform, ( ( value ) ));
550 coerceValue(myAddattrib, ( ( value ) ));
553 coerceValue(myOutputattrib, ( ( value ) ));
556 coerceValue(myOutputmerge, clampMinValue(0, clampMaxValue(2, value ) ));
563 { doSetParmValue(idx, instance, value); }
565 { doSetParmValue(idx, instance, value); }
567 { doSetParmValue(idx, instance, value); }
569 { doSetParmValue(idx, instance, value); }
571 { doSetParmValue(idx, instance, value); }
573 { doSetParmValue(idx, instance, value); }
575 { doSetParmValue(idx, instance, value); }
577 { doSetParmValue(idx, instance, value); }
579 { doSetParmValue(idx, instance, value); }
581 { doSetParmValue(idx, instance, value); }
583 { doSetParmValue(idx, instance, value); }
599 if (fieldnum.
size() < 1)
626 return "prexform_xOrd";
628 return "prexform_rOrd";
636 return "prexform_shear";
642 return "updateaffectednmls";
646 return "invertxform";
650 return "outputattrib";
652 return "outputmerge";
660 if (fieldnum.
size() < 1)
661 return PARM_UNSUPPORTED;
716 return PARM_UNSUPPORTED;
752 loadData(is, rampdata);
770 int typelen = colon - data.
buffer();
784 {
int64 iv =
v; UTwrite(os, &iv); }
786 { UTwrite<fpreal64>(os, &
v); }
788 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
790 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
791 UTwrite<fpreal64>(os, &v.
z()); }
793 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
794 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
806 if (s) s->save(ostr);
808 saveData(os, result);
815 ostr << s->getDataTypeToken();
820 saveData(os, result);
824 void save(std::ostream &os)
const
828 saveData(os, myGroup);
829 saveData(os, myGrouptype);
830 saveData(os, myXord);
831 saveData(os, myRord);
835 saveData(os, myShear);
836 saveData(os, myScale);
839 saveData(os, myPrexform_xord);
840 saveData(os, myPrexform_rord);
841 saveData(os, myPrexform_t);
842 saveData(os, myPrexform_r);
843 saveData(os, myPrexform_s);
844 saveData(os, myPrexform_shear);
845 saveData(os, myAttribs);
846 saveData(os, myUpdatenmls);
847 saveData(os, myUpdateaffectednmls);
848 saveData(os, myVlength);
849 saveData(os, myInvertxform);
850 saveData(os, myAddattrib);
851 saveData(os, myOutputattrib);
852 saveData(os, myOutputmerge);
865 loadData(is, myGroup);
866 loadData(is, myGrouptype);
867 loadData(is, myXord);
868 loadData(is, myRord);
872 loadData(is, myShear);
873 loadData(is, myScale);
876 loadData(is, myPrexform_xord);
877 loadData(is, myPrexform_rord);
878 loadData(is, myPrexform_t);
879 loadData(is, myPrexform_r);
880 loadData(is, myPrexform_s);
881 loadData(is, myPrexform_shear);
882 loadData(is, myAttribs);
883 loadData(is, myUpdatenmls);
884 loadData(is, myUpdateaffectednmls);
885 loadData(is, myVlength);
886 loadData(is, myInvertxform);
887 loadData(is, myAddattrib);
888 loadData(is, myOutputattrib);
889 loadData(is, myOutputmerge);
899 if (!thissop)
return getGroup();
901 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
909 if (!thissop)
return getGrouptype();
911 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
919 if (!thissop)
return getXord();
921 OP_Utils::evalOpParm(result, thissop,
"xOrd", cookparms.
getCookTime(), 0);
929 if (!thissop)
return getRord();
931 OP_Utils::evalOpParm(result, thissop,
"rOrd", cookparms.
getCookTime(), 0);
939 if (!thissop)
return getT();
941 OP_Utils::evalOpParm(result, thissop,
"t", cookparms.
getCookTime(), 0);
949 if (!thissop)
return getR();
951 OP_Utils::evalOpParm(result, thissop,
"r", cookparms.
getCookTime(), 0);
959 if (!thissop)
return getS();
961 OP_Utils::evalOpParm(result, thissop,
"s", cookparms.
getCookTime(), 0);
969 if (!thissop)
return getShear();
971 OP_Utils::evalOpParm(result, thissop,
"shear", cookparms.
getCookTime(), 0);
981 OP_Utils::evalOpParm(result, thissop,
"scale", cookparms.
getCookTime(), 0);
989 if (!thissop)
return getP();
991 OP_Utils::evalOpParm(result, thissop,
"p", cookparms.
getCookTime(), 0);
999 if (!thissop)
return getPr();
1001 OP_Utils::evalOpParm(result, thissop,
"pr", cookparms.
getCookTime(), 0);
1009 if (!thissop)
return getPrexform_xord();
1011 OP_Utils::evalOpParm(result, thissop,
"prexform_xOrd", cookparms.
getCookTime(), 0);
1019 if (!thissop)
return getPrexform_rord();
1021 OP_Utils::evalOpParm(result, thissop,
"prexform_rOrd", cookparms.
getCookTime(), 0);
1029 if (!thissop)
return getPrexform_t();
1031 OP_Utils::evalOpParm(result, thissop,
"prexform_t", cookparms.
getCookTime(), 0);
1039 if (!thissop)
return getPrexform_r();
1041 OP_Utils::evalOpParm(result, thissop,
"prexform_r", cookparms.
getCookTime(), 0);
1049 if (!thissop)
return getPrexform_s();
1051 OP_Utils::evalOpParm(result, thissop,
"prexform_s", cookparms.
getCookTime(), 0);
1059 if (!thissop)
return getPrexform_shear();
1061 OP_Utils::evalOpParm(result, thissop,
"prexform_shear", cookparms.
getCookTime(), 0);
1069 if (!thissop)
return getAttribs();
1071 OP_Utils::evalOpParm(result, thissop,
"attribs", cookparms.
getCookTime(), 0);
1079 if (!thissop)
return getUpdatenmls();
1081 OP_Utils::evalOpParm(result, thissop,
"updatenmls", cookparms.
getCookTime(), 0);
1089 if (!thissop)
return getUpdateaffectednmls();
1091 OP_Utils::evalOpParm(result, thissop,
"updateaffectednmls", cookparms.
getCookTime(), 0);
1099 if (!thissop)
return getVlength();
1101 OP_Utils::evalOpParm(result, thissop,
"vlength", cookparms.
getCookTime(), 0);
1109 if (!thissop)
return getInvertxform();
1111 OP_Utils::evalOpParm(result, thissop,
"invertxform", cookparms.
getCookTime(), 0);
1119 if (!thissop)
return getAddattrib();
1121 OP_Utils::evalOpParm(result, thissop,
"addattrib", cookparms.
getCookTime(), 0);
1129 if (!thissop)
return getOutputattrib();
1131 OP_Utils::evalOpParm(result, thissop,
"outputattrib", cookparms.
getCookTime(), 0);
1139 if (!thissop)
return getOutputmerge();
1141 OP_Utils::evalOpParm(result, thissop,
"outputmerge", cookparms.
getCookTime(), 0);
1157 int64 myPrexform_xord;
1158 int64 myPrexform_rord;
1165 bool myUpdateaffectednmls;
1170 int64 myOutputmerge;
SOP_Node * getNode() const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
GLsizei const GLfloat * value
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
An output stream object that owns its own string buffer storage.
**But if you need a result
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
constexpr SYS_FORCE_INLINE T & x() noexcept
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
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
const OP_GraphProxy * graph() const
UT_Vector3T< fpreal64 > UT_Vector3D
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
virtual UT_StringHolder baseGetSignature() const
Vec3< typename MatType::value_type > getScale(const MatType &mat)
Return a Vec3 representing the lengths of the passed matrix's upper 3×3's rows.
fpreal getCookTime() const
const char * findChar(int c) const
constexpr SYS_FORCE_INLINE T & y() noexcept
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept