23 namespace SOP_TransformAxisEnums
57 myUpdateaffectednmls =
true;
59 myInvertxform =
false;
61 myOutputattrib =
"xform"_UTsh;
75 if (myGroup != src.myGroup)
return false;
76 if (myGrouptype != src.myGrouptype)
return false;
77 if (myOrig != src.myOrig)
return false;
78 if (myDir != src.myDir)
return false;
79 if (myTrans != src.myTrans)
return false;
80 if (myRot != src.myRot)
return false;
81 if (myScale != src.myScale)
return false;
82 if (myUpdatenmls != src.myUpdatenmls)
return false;
83 if (myUpdateaffectednmls != src.myUpdateaffectednmls)
return false;
84 if (myVlength != src.myVlength)
return false;
85 if (myInvertxform != src.myInvertxform)
return false;
86 if (myAddattrib != src.myAddattrib)
return false;
87 if (myOutputattrib != src.myOutputattrib)
return false;
88 if (myOutputmerge != src.myOutputmerge)
return false;
105 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
108 graph->
evalOpParm(myGrouptype, nodeidx,
"grouptype", time, 0);
111 graph->
evalOpParm(myOrig, nodeidx,
"orig", time, 0);
114 graph->
evalOpParm(myDir, nodeidx,
"dir", time, 0);
117 graph->
evalOpParm(myTrans, nodeidx,
"trans", time, 0);
120 graph->
evalOpParm(myRot, nodeidx,
"rot", time, 0);
123 graph->
evalOpParm(myScale, nodeidx,
"scale", time, 0);
124 myUpdatenmls =
false;
126 graph->
evalOpParm(myUpdatenmls, nodeidx,
"updatenmls", time, 0);
127 myUpdateaffectednmls =
true;
128 if (
true && ( (
true&&!(((getUpdatenmls()==1)))) ) )
129 graph->
evalOpParm(myUpdateaffectednmls, nodeidx,
"updateaffectednmls", time, 0);
131 if (
true && ( (
true&&!(((getUpdatenmls()==1)))) ) )
132 graph->
evalOpParm(myVlength, nodeidx,
"vlength", time, 0);
133 myInvertxform =
false;
135 graph->
evalOpParm(myInvertxform, nodeidx,
"invertxform", time, 0);
138 graph->
evalOpParm(myAddattrib, nodeidx,
"addattrib", time, 0);
139 myOutputattrib =
"xform"_UTsh;
140 if (
true && ( (
true&&!(((getAddattrib()==0)))) ) )
141 graph->
evalOpParm(myOutputattrib, nodeidx,
"outputattrib", time, 0);
143 if (
true && ( (
true&&!(((getAddattrib()==0)))) ) )
144 graph->
evalOpParm(myOutputmerge, nodeidx,
"outputmerge", time, 0);
160 template <
typename T>
167 if (idx.
size() != instance.
size()+1)
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 { 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 template <
typename T>
256 if (idx.
size() != instance.
size()+1)
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); }
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); }
343 if (fieldnum.
size() < 1)
364 return "updateaffectednmls";
368 return "invertxform";
372 return "outputattrib";
374 return "outputmerge";
382 if (fieldnum.
size() < 1)
383 return PARM_UNSUPPORTED;
435 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
437 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
439 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
452 loadData(is, rampdata);
470 int typelen = colon - data.
buffer();
484 {
int64 iv =
v; UTwrite(os, &iv); }
486 { UTwrite<fpreal64>(os, &
v); }
488 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
490 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
491 UTwrite<fpreal64>(os, &v.
z()); }
493 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
494 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
506 if (s) s->save(ostr);
508 saveData(os, result);
515 ostr << s->getDataTypeToken();
520 saveData(os, result);
524 void save(std::ostream &os)
const
528 saveData(os, myGroup);
529 saveData(os, myGrouptype);
530 saveData(os, myOrig);
532 saveData(os, myTrans);
534 saveData(os, myScale);
535 saveData(os, myUpdatenmls);
536 saveData(os, myUpdateaffectednmls);
537 saveData(os, myVlength);
538 saveData(os, myInvertxform);
539 saveData(os, myAddattrib);
540 saveData(os, myOutputattrib);
541 saveData(os, myOutputmerge);
554 loadData(is, myGroup);
555 loadData(is, myGrouptype);
556 loadData(is, myOrig);
558 loadData(is, myTrans);
560 loadData(is, myScale);
561 loadData(is, myUpdatenmls);
562 loadData(is, myUpdateaffectednmls);
563 loadData(is, myVlength);
564 loadData(is, myInvertxform);
565 loadData(is, myAddattrib);
566 loadData(is, myOutputattrib);
567 loadData(is, myOutputmerge);
577 if (!thissop)
return getGroup();
579 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
587 if (!thissop)
return getGrouptype();
589 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
597 if (!thissop)
return getOrig();
599 OP_Utils::evalOpParm(result, thissop,
"orig", cookparms.
getCookTime(), 0);
607 if (!thissop)
return getDir();
609 OP_Utils::evalOpParm(result, thissop,
"dir", cookparms.
getCookTime(), 0);
617 if (!thissop)
return getTrans();
619 OP_Utils::evalOpParm(result, thissop,
"trans", cookparms.
getCookTime(), 0);
627 if (!thissop)
return getRot();
629 OP_Utils::evalOpParm(result, thissop,
"rot", cookparms.
getCookTime(), 0);
639 OP_Utils::evalOpParm(result, thissop,
"scale", cookparms.
getCookTime(), 0);
647 if (!thissop)
return getUpdatenmls();
649 OP_Utils::evalOpParm(result, thissop,
"updatenmls", cookparms.
getCookTime(), 0);
657 if (!thissop)
return getUpdateaffectednmls();
659 OP_Utils::evalOpParm(result, thissop,
"updateaffectednmls", cookparms.
getCookTime(), 0);
667 if (!thissop)
return getVlength();
669 OP_Utils::evalOpParm(result, thissop,
"vlength", cookparms.
getCookTime(), 0);
677 if (!thissop)
return getInvertxform();
679 OP_Utils::evalOpParm(result, thissop,
"invertxform", cookparms.
getCookTime(), 0);
687 if (!thissop)
return getAddattrib();
689 OP_Utils::evalOpParm(result, thissop,
"addattrib", cookparms.
getCookTime(), 0);
697 if (!thissop)
return getOutputattrib();
699 OP_Utils::evalOpParm(result, thissop,
"outputattrib", cookparms.
getCookTime(), 0);
707 if (!thissop)
return getOutputmerge();
709 OP_Utils::evalOpParm(result, thissop,
"outputmerge", cookparms.
getCookTime(), 0);
722 bool myUpdateaffectednmls;
SOP_Node * getNode() const
T clampMaxValue(fpreal maxvalue, const T &src) 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
T clampMinValue(fpreal minvalue, const T &src) 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.
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
void coerceValue(T &result, const S &src) const
DEP_MicroNode * depnode() const
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
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept