20 using namespace UT::Literal;
23 namespace SOP_TransformEnums
103 myUpdatenmls =
false;
104 myUpdateaffectednmls =
true;
106 myInvertxform =
false;
108 myOutputattrib =
"xform"_sh;
119 if (myGroup != src.myGroup)
return false;
120 if (myGrouptype != src.myGrouptype)
return false;
121 if (myXord != src.myXord)
return false;
122 if (myRord != src.myRord)
return false;
123 if (myT != src.myT)
return false;
124 if (myR != src.myR)
return false;
125 if (myS != src.myS)
return false;
126 if (myShear != src.myShear)
return false;
127 if (myScale != src.myScale)
return false;
128 if (myP != src.myP)
return false;
129 if (myPr != src.myPr)
return false;
130 if (myPrexform_xord != src.myPrexform_xord)
return false;
131 if (myPrexform_rord != src.myPrexform_rord)
return false;
132 if (myPrexform_t != src.myPrexform_t)
return false;
133 if (myPrexform_r != src.myPrexform_r)
return false;
134 if (myPrexform_s != src.myPrexform_s)
return false;
135 if (myPrexform_shear != src.myPrexform_shear)
return false;
136 if (myAttribs != src.myAttribs)
return false;
137 if (myUpdatenmls != src.myUpdatenmls)
return false;
138 if (myUpdateaffectednmls != src.myUpdateaffectednmls)
return false;
139 if (myVlength != src.myVlength)
return false;
140 if (myInvertxform != src.myInvertxform)
return false;
141 if (myAddattrib != src.myAddattrib)
return false;
142 if (myOutputattrib != src.myOutputattrib)
return false;
143 if (myOutputmerge != src.myOutputmerge)
return false;
164 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
167 graph->
evalOpParm(myGrouptype, nodeidx,
"grouptype", time, 0);
170 graph->
evalOpParm(myXord, nodeidx,
"xOrd", time, 0);
173 graph->
evalOpParm(myRord, nodeidx,
"rOrd", time, 0);
176 graph->
evalOpParm(myT, nodeidx,
"t", time, 0);
179 graph->
evalOpParm(myR, nodeidx,
"r", time, 0);
182 graph->
evalOpParm(myS, nodeidx,
"s", time, 0);
185 graph->
evalOpParm(myShear, nodeidx,
"shear", time, 0);
188 graph->
evalOpParm(myScale, nodeidx,
"scale", time, 0);
191 graph->
evalOpParm(myP, nodeidx,
"p", time, 0);
194 graph->
evalOpParm(myPr, nodeidx,
"pr", time, 0);
197 graph->
evalOpParm(myPrexform_xord, nodeidx,
"prexform_xOrd", time, 0);
200 graph->
evalOpParm(myPrexform_rord, nodeidx,
"prexform_rOrd", time, 0);
203 graph->
evalOpParm(myPrexform_t, nodeidx,
"prexform_t", time, 0);
206 graph->
evalOpParm(myPrexform_r, nodeidx,
"prexform_r", time, 0);
209 graph->
evalOpParm(myPrexform_s, nodeidx,
"prexform_s", time, 0);
212 graph->
evalOpParm(myPrexform_shear, nodeidx,
"prexform_shear", time, 0);
215 graph->
evalOpParm(myAttribs, nodeidx,
"attribs", time, 0);
216 myUpdatenmls =
false;
218 graph->
evalOpParm(myUpdatenmls, nodeidx,
"updatenmls", time, 0);
219 myUpdateaffectednmls =
true;
220 if (
true && ( (!(((getUpdatenmls()==1)))) ) )
221 graph->
evalOpParm(myUpdateaffectednmls, nodeidx,
"updateaffectednmls", time, 0);
223 if (
true && ( (!(((getUpdatenmls()==1)))) ) )
224 graph->
evalOpParm(myVlength, nodeidx,
"vlength", time, 0);
225 myInvertxform =
false;
227 graph->
evalOpParm(myInvertxform, nodeidx,
"invertxform", time, 0);
230 graph->
evalOpParm(myAddattrib, nodeidx,
"addattrib", time, 0);
231 myOutputattrib =
"xform"_sh;
232 if (
true && ( (!(((getAddattrib()==0)))) ) )
233 graph->
evalOpParm(myOutputattrib, nodeidx,
"outputattrib", time, 0);
235 if (
true && ( (!(((getAddattrib()==0)))) ) )
236 graph->
evalOpParm(myOutputmerge, nodeidx,
"outputmerge", time, 0);
252 template <
typename T>
259 if (idx.
size() != instance.
size()+1)
264 coerceValue(value, myGroup);
267 coerceValue(value, myGrouptype);
270 coerceValue(value, myXord);
273 coerceValue(value, myRord);
276 coerceValue(value, myT);
279 coerceValue(value, myR);
282 coerceValue(value, myS);
285 coerceValue(value, myShear);
288 coerceValue(value, myScale);
291 coerceValue(value, myP);
294 coerceValue(value, myPr);
297 coerceValue(value, myPrexform_xord);
300 coerceValue(value, myPrexform_rord);
303 coerceValue(value, myPrexform_t);
306 coerceValue(value, myPrexform_r);
309 coerceValue(value, myPrexform_s);
312 coerceValue(value, myPrexform_shear);
315 coerceValue(value, myAttribs);
318 coerceValue(value, myUpdatenmls);
321 coerceValue(value, myUpdateaffectednmls);
324 coerceValue(value, myVlength);
327 coerceValue(value, myInvertxform);
330 coerceValue(value, myAddattrib);
333 coerceValue(value, myOutputattrib);
336 coerceValue(value, myOutputmerge);
343 { doGetParmValue(idx, instance, value); }
345 { doGetParmValue(idx, instance, value); }
347 { doGetParmValue(idx, instance, value); }
349 { doGetParmValue(idx, instance, value); }
351 { doGetParmValue(idx, instance, value); }
353 { doGetParmValue(idx, instance, value); }
355 { doGetParmValue(idx, instance, value); }
357 { doGetParmValue(idx, instance, value); }
359 { doGetParmValue(idx, instance, value); }
361 { doGetParmValue(idx, instance, value); }
363 { doGetParmValue(idx, instance, value); }
365 template <
typename T>
372 if (idx.
size() != instance.
size()+1)
377 coerceValue(myGroup, value);
380 coerceValue(myGrouptype, value);
383 coerceValue(myXord, value);
386 coerceValue(myRord, value);
389 coerceValue(myT, value);
392 coerceValue(myR, value);
395 coerceValue(myS, value);
398 coerceValue(myShear, value);
401 coerceValue(myScale, value);
404 coerceValue(myP, value);
407 coerceValue(myPr, value);
410 coerceValue(myPrexform_xord, value);
413 coerceValue(myPrexform_rord, value);
416 coerceValue(myPrexform_t, value);
419 coerceValue(myPrexform_r, value);
422 coerceValue(myPrexform_s, value);
425 coerceValue(myPrexform_shear, value);
428 coerceValue(myAttribs, value);
431 coerceValue(myUpdatenmls, value);
434 coerceValue(myUpdateaffectednmls, value);
437 coerceValue(myVlength, value);
440 coerceValue(myInvertxform, value);
443 coerceValue(myAddattrib, value);
446 coerceValue(myOutputattrib, value);
449 coerceValue(myOutputmerge, value);
456 { doSetParmValue(idx, instance, value); }
458 { doSetParmValue(idx, instance, value); }
460 { doSetParmValue(idx, instance, value); }
462 { doSetParmValue(idx, instance, value); }
464 { doSetParmValue(idx, instance, value); }
466 { doSetParmValue(idx, instance, value); }
468 { doSetParmValue(idx, instance, value); }
470 { doSetParmValue(idx, instance, value); }
472 { doSetParmValue(idx, instance, value); }
474 { doSetParmValue(idx, instance, value); }
476 { doSetParmValue(idx, instance, value); }
492 if (fieldnum.
size() < 1)
519 return "prexform_xOrd";
521 return "prexform_rOrd";
529 return "prexform_shear";
535 return "updateaffectednmls";
539 return "invertxform";
543 return "outputattrib";
545 return "outputmerge";
553 if (fieldnum.
size() < 1)
554 return PARM_UNSUPPORTED;
609 return PARM_UNSUPPORTED;
645 loadData(is, rampdata);
663 int typelen = colon - data.
buffer();
677 {
int64 iv =
v; UTwrite(os, &iv); }
679 { UTwrite<fpreal64>(os, &
v); }
681 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
683 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
684 UTwrite<fpreal64>(os, &v.
z()); }
686 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
687 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
699 if (s) s->save(ostr);
701 saveData(os, result);
708 ostr << s->getDataTypeToken();
713 saveData(os, result);
717 void save(std::ostream &os)
const
721 saveData(os, myGroup);
722 saveData(os, myGrouptype);
723 saveData(os, myXord);
724 saveData(os, myRord);
728 saveData(os, myShear);
729 saveData(os, myScale);
732 saveData(os, myPrexform_xord);
733 saveData(os, myPrexform_rord);
734 saveData(os, myPrexform_t);
735 saveData(os, myPrexform_r);
736 saveData(os, myPrexform_s);
737 saveData(os, myPrexform_shear);
738 saveData(os, myAttribs);
739 saveData(os, myUpdatenmls);
740 saveData(os, myUpdateaffectednmls);
741 saveData(os, myVlength);
742 saveData(os, myInvertxform);
743 saveData(os, myAddattrib);
744 saveData(os, myOutputattrib);
745 saveData(os, myOutputmerge);
758 loadData(is, myGroup);
759 loadData(is, myGrouptype);
760 loadData(is, myXord);
761 loadData(is, myRord);
765 loadData(is, myShear);
766 loadData(is, myScale);
769 loadData(is, myPrexform_xord);
770 loadData(is, myPrexform_rord);
771 loadData(is, myPrexform_t);
772 loadData(is, myPrexform_r);
773 loadData(is, myPrexform_s);
774 loadData(is, myPrexform_shear);
775 loadData(is, myAttribs);
776 loadData(is, myUpdatenmls);
777 loadData(is, myUpdateaffectednmls);
778 loadData(is, myVlength);
779 loadData(is, myInvertxform);
780 loadData(is, myAddattrib);
781 loadData(is, myOutputattrib);
782 loadData(is, myOutputmerge);
792 if (!thissop)
return getGroup();
794 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
802 if (!thissop)
return getGrouptype();
804 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
812 if (!thissop)
return getXord();
814 OP_Utils::evalOpParm(result, thissop,
"xOrd", cookparms.
getCookTime(), 0);
822 if (!thissop)
return getRord();
824 OP_Utils::evalOpParm(result, thissop,
"rOrd", cookparms.
getCookTime(), 0);
832 if (!thissop)
return getT();
834 OP_Utils::evalOpParm(result, thissop,
"t", cookparms.
getCookTime(), 0);
842 if (!thissop)
return getR();
844 OP_Utils::evalOpParm(result, thissop,
"r", cookparms.
getCookTime(), 0);
852 if (!thissop)
return getS();
854 OP_Utils::evalOpParm(result, thissop,
"s", cookparms.
getCookTime(), 0);
862 if (!thissop)
return getShear();
864 OP_Utils::evalOpParm(result, thissop,
"shear", cookparms.
getCookTime(), 0);
874 OP_Utils::evalOpParm(result, thissop,
"scale", cookparms.
getCookTime(), 0);
882 if (!thissop)
return getP();
884 OP_Utils::evalOpParm(result, thissop,
"p", cookparms.
getCookTime(), 0);
892 if (!thissop)
return getPr();
894 OP_Utils::evalOpParm(result, thissop,
"pr", cookparms.
getCookTime(), 0);
902 if (!thissop)
return getPrexform_xord();
904 OP_Utils::evalOpParm(result, thissop,
"prexform_xOrd", cookparms.
getCookTime(), 0);
912 if (!thissop)
return getPrexform_rord();
914 OP_Utils::evalOpParm(result, thissop,
"prexform_rOrd", cookparms.
getCookTime(), 0);
922 if (!thissop)
return getPrexform_t();
924 OP_Utils::evalOpParm(result, thissop,
"prexform_t", cookparms.
getCookTime(), 0);
932 if (!thissop)
return getPrexform_r();
934 OP_Utils::evalOpParm(result, thissop,
"prexform_r", cookparms.
getCookTime(), 0);
942 if (!thissop)
return getPrexform_s();
944 OP_Utils::evalOpParm(result, thissop,
"prexform_s", cookparms.
getCookTime(), 0);
952 if (!thissop)
return getPrexform_shear();
954 OP_Utils::evalOpParm(result, thissop,
"prexform_shear", cookparms.
getCookTime(), 0);
962 if (!thissop)
return getAttribs();
964 OP_Utils::evalOpParm(result, thissop,
"attribs", cookparms.
getCookTime(), 0);
972 if (!thissop)
return getUpdatenmls();
974 OP_Utils::evalOpParm(result, thissop,
"updatenmls", cookparms.
getCookTime(), 0);
982 if (!thissop)
return getUpdateaffectednmls();
984 OP_Utils::evalOpParm(result, thissop,
"updateaffectednmls", cookparms.
getCookTime(), 0);
992 if (!thissop)
return getVlength();
994 OP_Utils::evalOpParm(result, thissop,
"vlength", cookparms.
getCookTime(), 0);
1002 if (!thissop)
return getInvertxform();
1004 OP_Utils::evalOpParm(result, thissop,
"invertxform", cookparms.
getCookTime(), 0);
1012 if (!thissop)
return getAddattrib();
1014 OP_Utils::evalOpParm(result, thissop,
"addattrib", cookparms.
getCookTime(), 0);
1022 if (!thissop)
return getOutputattrib();
1024 OP_Utils::evalOpParm(result, thissop,
"outputattrib", cookparms.
getCookTime(), 0);
1032 if (!thissop)
return getOutputmerge();
1034 OP_Utils::evalOpParm(result, thissop,
"outputmerge", cookparms.
getCookTime(), 0);
1050 int64 myPrexform_xord;
1051 int64 myPrexform_rord;
1058 bool myUpdateaffectednmls;
1063 int64 myOutputmerge;
SOP_Node * getNode() const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
GLuint const GLfloat * val
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
An output stream object that owns its own string buffer storage.
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
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.
GLint GLenum GLsizei GLint GLsizei const void * data
UT_Vector3T< fpreal64 > UT_Vector3D
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Utility class for containing a color ramp.
GLdouble GLdouble GLdouble r
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.
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
fpreal getCookTime() const
const char * findChar(int c) const
GLsizei const GLfloat * value
const OP_Context & context() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)