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;
259 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
262 graph->
evalOpParm(myGrouptype, nodeidx,
"grouptype", time, 0);
265 graph->
evalOpParm(myXord, nodeidx,
"xOrd", time, 0);
268 graph->
evalOpParm(myRord, nodeidx,
"rOrd", time, 0);
271 graph->
evalOpParm(myT, nodeidx,
"t", time, 0);
274 graph->
evalOpParm(myR, nodeidx,
"r", time, 0);
277 graph->
evalOpParm(myS, nodeidx,
"s", time, 0);
280 graph->
evalOpParm(myShear, nodeidx,
"shear", time, 0);
283 graph->
evalOpParm(myScale, nodeidx,
"scale", time, 0);
286 graph->
evalOpParm(myP, nodeidx,
"p", time, 0);
289 graph->
evalOpParm(myPr, nodeidx,
"pr", time, 0);
292 graph->
evalOpParm(myPrexform_xord, nodeidx,
"prexform_xOrd", time, 0);
295 graph->
evalOpParm(myPrexform_rord, nodeidx,
"prexform_rOrd", time, 0);
298 graph->
evalOpParm(myPrexform_t, nodeidx,
"prexform_t", time, 0);
301 graph->
evalOpParm(myPrexform_r, nodeidx,
"prexform_r", time, 0);
304 graph->
evalOpParm(myPrexform_s, nodeidx,
"prexform_s", time, 0);
307 graph->
evalOpParm(myPrexform_shear, nodeidx,
"prexform_shear", time, 0);
308 myAttribs =
"*"_UTsh;
310 graph->
evalOpParm(myAttribs, nodeidx,
"attribs", time, 0);
311 myUpdatenmls =
false;
313 graph->
evalOpParm(myUpdatenmls, nodeidx,
"updatenmls", time, 0);
314 myUpdateaffectednmls =
true;
315 if (
true && ( (
true&&!(((getUpdatenmls()==1)))) ) )
316 graph->
evalOpParm(myUpdateaffectednmls, nodeidx,
"updateaffectednmls", time, 0);
318 if (
true && ( (
true&&!(((getUpdatenmls()==1)))) ) )
319 graph->
evalOpParm(myVlength, nodeidx,
"vlength", time, 0);
320 myInvertxform =
false;
322 graph->
evalOpParm(myInvertxform, nodeidx,
"invertxform", time, 0);
325 graph->
evalOpParm(myAddattrib, nodeidx,
"addattrib", time, 0);
326 myOutputattrib =
"xform"_UTsh;
327 if (
true && ( (
true&&!(((getAddattrib()==0)))) ) )
328 graph->
evalOpParm(myOutputattrib, nodeidx,
"outputattrib", time, 0);
330 if (
true && ( (
true&&!(((getAddattrib()==0)))) ) )
331 graph->
evalOpParm(myOutputmerge, nodeidx,
"outputmerge", time, 0);
347 template <
typename T>
354 if (idx.
size() != instance.
size()+1)
359 coerceValue(value, myGroup);
362 coerceValue(value, myGrouptype);
365 coerceValue(value, myXord);
368 coerceValue(value, myRord);
371 coerceValue(value, myT);
374 coerceValue(value, myR);
377 coerceValue(value, myS);
380 coerceValue(value, myShear);
383 coerceValue(value, myScale);
386 coerceValue(value, myP);
389 coerceValue(value, myPr);
392 coerceValue(value, myPrexform_xord);
395 coerceValue(value, myPrexform_rord);
398 coerceValue(value, myPrexform_t);
401 coerceValue(value, myPrexform_r);
404 coerceValue(value, myPrexform_s);
407 coerceValue(value, myPrexform_shear);
410 coerceValue(value, myAttribs);
413 coerceValue(value, myUpdatenmls);
416 coerceValue(value, myUpdateaffectednmls);
419 coerceValue(value, myVlength);
422 coerceValue(value, myInvertxform);
425 coerceValue(value, myAddattrib);
428 coerceValue(value, myOutputattrib);
431 coerceValue(value, myOutputmerge);
447 { doGetParmValue(idx, instance, value); }
449 { doGetParmValue(idx, instance, value); }
451 { doGetParmValue(idx, instance, value); }
453 { doGetParmValue(idx, instance, value); }
455 { doGetParmValue(idx, instance, value); }
457 { doGetParmValue(idx, instance, value); }
459 { doGetParmValue(idx, instance, value); }
461 { doGetParmValue(idx, instance, value); }
463 { doGetParmValue(idx, instance, value); }
465 { doGetParmValue(idx, instance, value); }
467 { doGetParmValue(idx, instance, value); }
469 template <
typename T>
476 if (idx.
size() != instance.
size()+1)
481 coerceValue(myGroup, ( ( value ) ));
484 coerceValue(myGrouptype, clampMinValue(0, clampMaxValue(4, value ) ));
487 coerceValue(myXord, clampMinValue(0, clampMaxValue(5, value ) ));
490 coerceValue(myRord, clampMinValue(0, clampMaxValue(5, value ) ));
493 coerceValue(myT, ( ( value ) ));
496 coerceValue(myR, ( ( value ) ));
499 coerceValue(myS, ( ( value ) ));
502 coerceValue(myShear, ( ( value ) ));
505 coerceValue(myScale, ( ( value ) ));
508 coerceValue(myP, ( ( value ) ));
511 coerceValue(myPr, ( ( value ) ));
514 coerceValue(myPrexform_xord, clampMinValue(0, clampMaxValue(5, value ) ));
517 coerceValue(myPrexform_rord, clampMinValue(0, clampMaxValue(5, value ) ));
520 coerceValue(myPrexform_t, ( ( value ) ));
523 coerceValue(myPrexform_r, ( ( value ) ));
526 coerceValue(myPrexform_s, ( ( value ) ));
529 coerceValue(myPrexform_shear, ( ( value ) ));
532 coerceValue(myAttribs, ( ( value ) ));
535 coerceValue(myUpdatenmls, ( ( value ) ));
538 coerceValue(myUpdateaffectednmls, ( ( value ) ));
541 coerceValue(myVlength, ( ( value ) ));
544 coerceValue(myInvertxform, ( ( value ) ));
547 coerceValue(myAddattrib, ( ( value ) ));
550 coerceValue(myOutputattrib, ( ( value ) ));
553 coerceValue(myOutputmerge, clampMinValue(0, clampMaxValue(2, value ) ));
560 { doSetParmValue(idx, instance, value); }
562 { doSetParmValue(idx, instance, value); }
564 { doSetParmValue(idx, instance, value); }
566 { doSetParmValue(idx, instance, value); }
568 { doSetParmValue(idx, instance, value); }
570 { doSetParmValue(idx, instance, value); }
572 { doSetParmValue(idx, instance, value); }
574 { doSetParmValue(idx, instance, value); }
576 { doSetParmValue(idx, instance, value); }
578 { doSetParmValue(idx, instance, value); }
580 { doSetParmValue(idx, instance, value); }
596 if (fieldnum.
size() < 1)
623 return "prexform_xOrd";
625 return "prexform_rOrd";
633 return "prexform_shear";
639 return "updateaffectednmls";
643 return "invertxform";
647 return "outputattrib";
649 return "outputmerge";
657 if (fieldnum.
size() < 1)
658 return PARM_UNSUPPORTED;
713 return PARM_UNSUPPORTED;
749 loadData(is, rampdata);
767 int typelen = colon - data.
buffer();
781 {
int64 iv =
v; UTwrite(os, &iv); }
783 { UTwrite<fpreal64>(os, &
v); }
785 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
787 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
788 UTwrite<fpreal64>(os, &v.
z()); }
790 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
791 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
803 if (s) s->save(ostr);
805 saveData(os, result);
812 ostr << s->getDataTypeToken();
817 saveData(os, result);
821 void save(std::ostream &os)
const
825 saveData(os, myGroup);
826 saveData(os, myGrouptype);
827 saveData(os, myXord);
828 saveData(os, myRord);
832 saveData(os, myShear);
833 saveData(os, myScale);
836 saveData(os, myPrexform_xord);
837 saveData(os, myPrexform_rord);
838 saveData(os, myPrexform_t);
839 saveData(os, myPrexform_r);
840 saveData(os, myPrexform_s);
841 saveData(os, myPrexform_shear);
842 saveData(os, myAttribs);
843 saveData(os, myUpdatenmls);
844 saveData(os, myUpdateaffectednmls);
845 saveData(os, myVlength);
846 saveData(os, myInvertxform);
847 saveData(os, myAddattrib);
848 saveData(os, myOutputattrib);
849 saveData(os, myOutputmerge);
862 loadData(is, myGroup);
863 loadData(is, myGrouptype);
864 loadData(is, myXord);
865 loadData(is, myRord);
869 loadData(is, myShear);
870 loadData(is, myScale);
873 loadData(is, myPrexform_xord);
874 loadData(is, myPrexform_rord);
875 loadData(is, myPrexform_t);
876 loadData(is, myPrexform_r);
877 loadData(is, myPrexform_s);
878 loadData(is, myPrexform_shear);
879 loadData(is, myAttribs);
880 loadData(is, myUpdatenmls);
881 loadData(is, myUpdateaffectednmls);
882 loadData(is, myVlength);
883 loadData(is, myInvertxform);
884 loadData(is, myAddattrib);
885 loadData(is, myOutputattrib);
886 loadData(is, myOutputmerge);
896 if (!thissop)
return getGroup();
898 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
906 if (!thissop)
return getGrouptype();
908 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
916 if (!thissop)
return getXord();
918 OP_Utils::evalOpParm(result, thissop,
"xOrd", cookparms.
getCookTime(), 0);
926 if (!thissop)
return getRord();
928 OP_Utils::evalOpParm(result, thissop,
"rOrd", cookparms.
getCookTime(), 0);
936 if (!thissop)
return getT();
938 OP_Utils::evalOpParm(result, thissop,
"t", cookparms.
getCookTime(), 0);
946 if (!thissop)
return getR();
948 OP_Utils::evalOpParm(result, thissop,
"r", cookparms.
getCookTime(), 0);
956 if (!thissop)
return getS();
958 OP_Utils::evalOpParm(result, thissop,
"s", cookparms.
getCookTime(), 0);
966 if (!thissop)
return getShear();
968 OP_Utils::evalOpParm(result, thissop,
"shear", cookparms.
getCookTime(), 0);
978 OP_Utils::evalOpParm(result, thissop,
"scale", cookparms.
getCookTime(), 0);
986 if (!thissop)
return getP();
988 OP_Utils::evalOpParm(result, thissop,
"p", cookparms.
getCookTime(), 0);
996 if (!thissop)
return getPr();
998 OP_Utils::evalOpParm(result, thissop,
"pr", cookparms.
getCookTime(), 0);
1006 if (!thissop)
return getPrexform_xord();
1008 OP_Utils::evalOpParm(result, thissop,
"prexform_xOrd", cookparms.
getCookTime(), 0);
1016 if (!thissop)
return getPrexform_rord();
1018 OP_Utils::evalOpParm(result, thissop,
"prexform_rOrd", cookparms.
getCookTime(), 0);
1026 if (!thissop)
return getPrexform_t();
1028 OP_Utils::evalOpParm(result, thissop,
"prexform_t", cookparms.
getCookTime(), 0);
1036 if (!thissop)
return getPrexform_r();
1038 OP_Utils::evalOpParm(result, thissop,
"prexform_r", cookparms.
getCookTime(), 0);
1046 if (!thissop)
return getPrexform_s();
1048 OP_Utils::evalOpParm(result, thissop,
"prexform_s", cookparms.
getCookTime(), 0);
1056 if (!thissop)
return getPrexform_shear();
1058 OP_Utils::evalOpParm(result, thissop,
"prexform_shear", cookparms.
getCookTime(), 0);
1066 if (!thissop)
return getAttribs();
1068 OP_Utils::evalOpParm(result, thissop,
"attribs", cookparms.
getCookTime(), 0);
1076 if (!thissop)
return getUpdatenmls();
1078 OP_Utils::evalOpParm(result, thissop,
"updatenmls", cookparms.
getCookTime(), 0);
1086 if (!thissop)
return getUpdateaffectednmls();
1088 OP_Utils::evalOpParm(result, thissop,
"updateaffectednmls", cookparms.
getCookTime(), 0);
1096 if (!thissop)
return getVlength();
1098 OP_Utils::evalOpParm(result, thissop,
"vlength", cookparms.
getCookTime(), 0);
1106 if (!thissop)
return getInvertxform();
1108 OP_Utils::evalOpParm(result, thissop,
"invertxform", cookparms.
getCookTime(), 0);
1116 if (!thissop)
return getAddattrib();
1118 OP_Utils::evalOpParm(result, thissop,
"addattrib", cookparms.
getCookTime(), 0);
1126 if (!thissop)
return getOutputattrib();
1128 OP_Utils::evalOpParm(result, thissop,
"outputattrib", cookparms.
getCookTime(), 0);
1136 if (!thissop)
return getOutputmerge();
1138 OP_Utils::evalOpParm(result, thissop,
"outputmerge", cookparms.
getCookTime(), 0);
1154 int64 myPrexform_xord;
1155 int64 myPrexform_rord;
1162 bool myUpdateaffectednmls;
1167 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
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
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
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
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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