20 using namespace UT::Literal;
23 namespace SOP_TransformAxisEnums
57 myUpdateaffectednmls =
true;
59 myInvertxform =
false;
61 myOutputattrib =
"xform"_sh;
72 if (myGroup != src.myGroup)
return false;
73 if (myGrouptype != src.myGrouptype)
return false;
74 if (myOrig != src.myOrig)
return false;
75 if (myDir != src.myDir)
return false;
76 if (myTrans != src.myTrans)
return false;
77 if (myRot != src.myRot)
return false;
78 if (myScale != src.myScale)
return false;
79 if (myUpdatenmls != src.myUpdatenmls)
return false;
80 if (myUpdateaffectednmls != src.myUpdateaffectednmls)
return false;
81 if (myVlength != src.myVlength)
return false;
82 if (myInvertxform != src.myInvertxform)
return false;
83 if (myAddattrib != src.myAddattrib)
return false;
84 if (myOutputattrib != src.myOutputattrib)
return false;
85 if (myOutputmerge != src.myOutputmerge)
return false;
102 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
105 graph->
evalOpParm(myGrouptype, nodeidx,
"grouptype", time, 0);
108 graph->
evalOpParm(myOrig, nodeidx,
"orig", time, 0);
111 graph->
evalOpParm(myDir, nodeidx,
"dir", time, 0);
114 graph->
evalOpParm(myTrans, nodeidx,
"trans", time, 0);
117 graph->
evalOpParm(myRot, nodeidx,
"rot", time, 0);
120 graph->
evalOpParm(myScale, nodeidx,
"scale", time, 0);
121 myUpdatenmls =
false;
123 graph->
evalOpParm(myUpdatenmls, nodeidx,
"updatenmls", time, 0);
124 myUpdateaffectednmls =
true;
125 if (
true && ( (!(((getUpdatenmls()==1)))) ) )
126 graph->
evalOpParm(myUpdateaffectednmls, nodeidx,
"updateaffectednmls", time, 0);
128 if (
true && ( (!(((getUpdatenmls()==1)))) ) )
129 graph->
evalOpParm(myVlength, nodeidx,
"vlength", time, 0);
130 myInvertxform =
false;
132 graph->
evalOpParm(myInvertxform, nodeidx,
"invertxform", time, 0);
135 graph->
evalOpParm(myAddattrib, nodeidx,
"addattrib", time, 0);
136 myOutputattrib =
"xform"_sh;
137 if (
true && ( (!(((getAddattrib()==0)))) ) )
138 graph->
evalOpParm(myOutputattrib, nodeidx,
"outputattrib", time, 0);
140 if (
true && ( (!(((getAddattrib()==0)))) ) )
141 graph->
evalOpParm(myOutputmerge, nodeidx,
"outputmerge", time, 0);
157 template <
typename T>
164 if (idx.
size() != instance.
size()+1)
169 coerceValue(value, myGroup);
172 coerceValue(value, myGrouptype);
175 coerceValue(value, myOrig);
178 coerceValue(value, myDir);
181 coerceValue(value, myTrans);
184 coerceValue(value, myRot);
187 coerceValue(value, myScale);
190 coerceValue(value, myUpdatenmls);
193 coerceValue(value, myUpdateaffectednmls);
196 coerceValue(value, myVlength);
199 coerceValue(value, myInvertxform);
202 coerceValue(value, myAddattrib);
205 coerceValue(value, myOutputattrib);
208 coerceValue(value, myOutputmerge);
215 { doGetParmValue(idx, instance, value); }
217 { doGetParmValue(idx, instance, value); }
219 { doGetParmValue(idx, instance, value); }
221 { doGetParmValue(idx, instance, value); }
223 { doGetParmValue(idx, instance, value); }
225 { doGetParmValue(idx, instance, value); }
227 { doGetParmValue(idx, instance, value); }
229 { doGetParmValue(idx, instance, value); }
231 { doGetParmValue(idx, instance, value); }
233 { doGetParmValue(idx, instance, value); }
235 { doGetParmValue(idx, instance, value); }
237 template <
typename T>
244 if (idx.
size() != instance.
size()+1)
249 coerceValue(myGroup, value);
252 coerceValue(myGrouptype, value);
255 coerceValue(myOrig, value);
258 coerceValue(myDir, value);
261 coerceValue(myTrans, value);
264 coerceValue(myRot, value);
267 coerceValue(myScale, value);
270 coerceValue(myUpdatenmls, value);
273 coerceValue(myUpdateaffectednmls, value);
276 coerceValue(myVlength, value);
279 coerceValue(myInvertxform, value);
282 coerceValue(myAddattrib, value);
285 coerceValue(myOutputattrib, value);
288 coerceValue(myOutputmerge, value);
295 { doSetParmValue(idx, instance, value); }
297 { doSetParmValue(idx, instance, value); }
299 { doSetParmValue(idx, instance, value); }
301 { doSetParmValue(idx, instance, value); }
303 { doSetParmValue(idx, instance, value); }
305 { doSetParmValue(idx, instance, value); }
307 { doSetParmValue(idx, instance, value); }
309 { doSetParmValue(idx, instance, value); }
311 { doSetParmValue(idx, instance, value); }
313 { doSetParmValue(idx, instance, value); }
315 { doSetParmValue(idx, instance, value); }
331 if (fieldnum.
size() < 1)
352 return "updateaffectednmls";
356 return "invertxform";
360 return "outputattrib";
362 return "outputmerge";
370 if (fieldnum.
size() < 1)
371 return PARM_UNSUPPORTED;
404 return PARM_UNSUPPORTED;
440 loadData(is, rampdata);
458 int typelen = colon - data.
buffer();
472 {
int64 iv =
v; UTwrite(os, &iv); }
474 { UTwrite<fpreal64>(os, &
v); }
476 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
478 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
479 UTwrite<fpreal64>(os, &v.
z()); }
481 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
482 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
494 if (s) s->save(ostr);
496 saveData(os, result);
503 ostr << s->getDataTypeToken();
508 saveData(os, result);
512 void save(std::ostream &os)
const
516 saveData(os, myGroup);
517 saveData(os, myGrouptype);
518 saveData(os, myOrig);
520 saveData(os, myTrans);
522 saveData(os, myScale);
523 saveData(os, myUpdatenmls);
524 saveData(os, myUpdateaffectednmls);
525 saveData(os, myVlength);
526 saveData(os, myInvertxform);
527 saveData(os, myAddattrib);
528 saveData(os, myOutputattrib);
529 saveData(os, myOutputmerge);
542 loadData(is, myGroup);
543 loadData(is, myGrouptype);
544 loadData(is, myOrig);
546 loadData(is, myTrans);
548 loadData(is, myScale);
549 loadData(is, myUpdatenmls);
550 loadData(is, myUpdateaffectednmls);
551 loadData(is, myVlength);
552 loadData(is, myInvertxform);
553 loadData(is, myAddattrib);
554 loadData(is, myOutputattrib);
555 loadData(is, myOutputmerge);
565 if (!thissop)
return getGroup();
567 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
575 if (!thissop)
return getGrouptype();
577 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
585 if (!thissop)
return getOrig();
587 OP_Utils::evalOpParm(result, thissop,
"orig", cookparms.
getCookTime(), 0);
595 if (!thissop)
return getDir();
597 OP_Utils::evalOpParm(result, thissop,
"dir", cookparms.
getCookTime(), 0);
605 if (!thissop)
return getTrans();
607 OP_Utils::evalOpParm(result, thissop,
"trans", cookparms.
getCookTime(), 0);
615 if (!thissop)
return getRot();
617 OP_Utils::evalOpParm(result, thissop,
"rot", cookparms.
getCookTime(), 0);
627 OP_Utils::evalOpParm(result, thissop,
"scale", cookparms.
getCookTime(), 0);
635 if (!thissop)
return getUpdatenmls();
637 OP_Utils::evalOpParm(result, thissop,
"updatenmls", cookparms.
getCookTime(), 0);
645 if (!thissop)
return getUpdateaffectednmls();
647 OP_Utils::evalOpParm(result, thissop,
"updateaffectednmls", cookparms.
getCookTime(), 0);
655 if (!thissop)
return getVlength();
657 OP_Utils::evalOpParm(result, thissop,
"vlength", cookparms.
getCookTime(), 0);
665 if (!thissop)
return getInvertxform();
667 OP_Utils::evalOpParm(result, thissop,
"invertxform", cookparms.
getCookTime(), 0);
675 if (!thissop)
return getAddattrib();
677 OP_Utils::evalOpParm(result, thissop,
"addattrib", cookparms.
getCookTime(), 0);
685 if (!thissop)
return getOutputattrib();
687 OP_Utils::evalOpParm(result, thissop,
"outputattrib", cookparms.
getCookTime(), 0);
695 if (!thissop)
return getOutputmerge();
697 OP_Utils::evalOpParm(result, thissop,
"outputmerge", cookparms.
getCookTime(), 0);
710 bool myUpdateaffectednmls;
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)