23 namespace SOP_TransformAxisEnums
37 using namespace UT::Literal;
58 using namespace UT::Literal;
85 myUpdateaffectednmls =
true;
87 myInvertxform =
false;
89 myOutputattrib =
"xform"_UTsh;
103 if (myGroup != src.myGroup)
return false;
104 if (myGrouptype != src.myGrouptype)
return false;
105 if (myOrig != src.myOrig)
return false;
106 if (myDir != src.myDir)
return false;
107 if (myTrans != src.myTrans)
return false;
108 if (myRot != src.myRot)
return false;
109 if (myScale != src.myScale)
return false;
110 if (myUpdatenmls != src.myUpdatenmls)
return false;
111 if (myUpdateaffectednmls != src.myUpdateaffectednmls)
return false;
112 if (myVlength != src.myVlength)
return false;
113 if (myInvertxform != src.myInvertxform)
return false;
114 if (myAddattrib != src.myAddattrib)
return false;
115 if (myOutputattrib != src.myOutputattrib)
return false;
116 if (myOutputmerge != src.myOutputmerge)
return false;
136 graph->
evalOpParm(myGroup, nodeidx,
"group", time, graph->
isDirect()?
nullptr:depnode);
139 graph->
evalOpParm(myGrouptype, nodeidx,
"grouptype", time, graph->
isDirect()?
nullptr:depnode);
148 graph->
evalOpParm(myTrans, nodeidx,
"trans", time, graph->
isDirect()?
nullptr:depnode);
154 graph->
evalOpParm(myScale, nodeidx,
"scale", time, graph->
isDirect()?
nullptr:depnode);
155 myUpdatenmls =
false;
157 graph->
evalOpParm(myUpdatenmls, nodeidx,
"updatenmls", time, graph->
isDirect()?
nullptr:depnode);
158 myUpdateaffectednmls =
true;
159 if (
true && ( (
true&&!(((getUpdatenmls()==1)))) ) )
160 graph->
evalOpParm(myUpdateaffectednmls, nodeidx,
"updateaffectednmls", time, graph->
isDirect()?
nullptr:depnode);
162 if (
true && ( (
true&&!(((getUpdatenmls()==1)))) ) )
163 graph->
evalOpParm(myVlength, nodeidx,
"vlength", time, graph->
isDirect()?
nullptr:depnode);
164 myInvertxform =
false;
166 graph->
evalOpParm(myInvertxform, nodeidx,
"invertxform", time, graph->
isDirect()?
nullptr:depnode);
169 graph->
evalOpParm(myAddattrib, nodeidx,
"addattrib", time, graph->
isDirect()?
nullptr:depnode);
170 myOutputattrib =
"xform"_UTsh;
171 if (
true && ( (
true&&!(((getAddattrib()==0)))) ) )
172 graph->
evalOpParm(myOutputattrib, nodeidx,
"outputattrib", time, graph->
isDirect()?
nullptr:depnode);
174 if (
true && ( (
true&&!(((getAddattrib()==0)))) ) )
175 graph->
evalOpParm(myOutputmerge, nodeidx,
"outputmerge", time, graph->
isDirect()?
nullptr:depnode);
191 template <
typename T>
198 if (idx.
size() != instance.
size()+1)
203 coerceValue(value, myGroup);
206 coerceValue(value, myGrouptype);
209 coerceValue(value, myOrig);
212 coerceValue(value, myDir);
215 coerceValue(value, myTrans);
218 coerceValue(value, myRot);
221 coerceValue(value, myScale);
224 coerceValue(value, myUpdatenmls);
227 coerceValue(value, myUpdateaffectednmls);
230 coerceValue(value, myVlength);
233 coerceValue(value, myInvertxform);
236 coerceValue(value, myAddattrib);
239 coerceValue(value, myOutputattrib);
242 coerceValue(value, myOutputmerge);
258 { doGetParmValue(idx, instance, value); }
260 { doGetParmValue(idx, instance, value); }
262 { doGetParmValue(idx, instance, value); }
264 { doGetParmValue(idx, instance, value); }
266 { doGetParmValue(idx, instance, value); }
268 { doGetParmValue(idx, instance, value); }
270 { doGetParmValue(idx, instance, value); }
272 { doGetParmValue(idx, instance, value); }
274 { doGetParmValue(idx, instance, value); }
276 { doGetParmValue(idx, instance, value); }
278 { doGetParmValue(idx, instance, value); }
280 template <
typename T>
287 if (idx.
size() != instance.
size()+1)
292 coerceValue(myGroup, ( ( value ) ));
295 coerceValue(myGrouptype, clampMinValue(0, clampMaxValue(4, value ) ));
298 coerceValue(myOrig, ( ( value ) ));
301 coerceValue(myDir, ( ( value ) ));
304 coerceValue(myTrans, ( ( value ) ));
307 coerceValue(myRot, ( ( value ) ));
310 coerceValue(myScale, ( ( value ) ));
313 coerceValue(myUpdatenmls, ( ( value ) ));
316 coerceValue(myUpdateaffectednmls, ( ( value ) ));
319 coerceValue(myVlength, ( ( value ) ));
322 coerceValue(myInvertxform, ( ( value ) ));
325 coerceValue(myAddattrib, ( ( value ) ));
328 coerceValue(myOutputattrib, ( ( value ) ));
331 coerceValue(myOutputmerge, clampMinValue(0, clampMaxValue(2, value ) ));
338 { doSetParmValue(idx, instance, value); }
340 { doSetParmValue(idx, instance, value); }
342 { doSetParmValue(idx, instance, value); }
344 { doSetParmValue(idx, instance, value); }
346 { doSetParmValue(idx, instance, value); }
348 { doSetParmValue(idx, instance, value); }
350 { doSetParmValue(idx, instance, value); }
352 { doSetParmValue(idx, instance, value); }
354 { doSetParmValue(idx, instance, value); }
356 { doSetParmValue(idx, instance, value); }
358 { doSetParmValue(idx, instance, value); }
374 if (fieldnum.
size() < 1)
395 return "updateaffectednmls";
399 return "invertxform";
403 return "outputattrib";
405 return "outputmerge";
413 if (fieldnum.
size() < 1)
414 return PARM_UNSUPPORTED;
447 return PARM_UNSUPPORTED;
483 loadData(is, rampdata);
501 int typelen = colon - data.
buffer();
515 {
int64 iv =
v; UTwrite(os, &iv); }
517 { UTwrite<fpreal64>(os, &
v); }
519 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
521 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
522 UTwrite<fpreal64>(os, &v.
z()); }
524 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
525 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
537 if (s) s->save(ostr);
539 saveData(os, result);
546 ostr << s->getDataTypeToken();
551 saveData(os, result);
555 void save(std::ostream &os)
const
559 saveData(os, myGroup);
560 saveData(os, myGrouptype);
561 saveData(os, myOrig);
563 saveData(os, myTrans);
565 saveData(os, myScale);
566 saveData(os, myUpdatenmls);
567 saveData(os, myUpdateaffectednmls);
568 saveData(os, myVlength);
569 saveData(os, myInvertxform);
570 saveData(os, myAddattrib);
571 saveData(os, myOutputattrib);
572 saveData(os, myOutputmerge);
585 loadData(is, myGroup);
586 loadData(is, myGrouptype);
587 loadData(is, myOrig);
589 loadData(is, myTrans);
591 loadData(is, myScale);
592 loadData(is, myUpdatenmls);
593 loadData(is, myUpdateaffectednmls);
594 loadData(is, myVlength);
595 loadData(is, myInvertxform);
596 loadData(is, myAddattrib);
597 loadData(is, myOutputattrib);
598 loadData(is, myOutputmerge);
608 if (!thissop)
return getGroup();
610 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
618 if (!thissop)
return getGrouptype();
620 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
628 if (!thissop)
return getOrig();
630 OP_Utils::evalOpParm(result, thissop,
"orig", cookparms.
getCookTime(), 0);
638 if (!thissop)
return getDir();
640 OP_Utils::evalOpParm(result, thissop,
"dir", cookparms.
getCookTime(), 0);
648 if (!thissop)
return getTrans();
650 OP_Utils::evalOpParm(result, thissop,
"trans", cookparms.
getCookTime(), 0);
658 if (!thissop)
return getRot();
660 OP_Utils::evalOpParm(result, thissop,
"rot", cookparms.
getCookTime(), 0);
670 OP_Utils::evalOpParm(result, thissop,
"scale", cookparms.
getCookTime(), 0);
678 if (!thissop)
return getUpdatenmls();
680 OP_Utils::evalOpParm(result, thissop,
"updatenmls", cookparms.
getCookTime(), 0);
688 if (!thissop)
return getUpdateaffectednmls();
690 OP_Utils::evalOpParm(result, thissop,
"updateaffectednmls", cookparms.
getCookTime(), 0);
698 if (!thissop)
return getVlength();
700 OP_Utils::evalOpParm(result, thissop,
"vlength", cookparms.
getCookTime(), 0);
708 if (!thissop)
return getInvertxform();
710 OP_Utils::evalOpParm(result, thissop,
"invertxform", cookparms.
getCookTime(), 0);
718 if (!thissop)
return getAddattrib();
720 OP_Utils::evalOpParm(result, thissop,
"addattrib", cookparms.
getCookTime(), 0);
728 if (!thissop)
return getOutputattrib();
730 OP_Utils::evalOpParm(result, thissop,
"outputattrib", cookparms.
getCookTime(), 0);
738 if (!thissop)
return getOutputmerge();
740 OP_Utils::evalOpParm(result, thissop,
"outputmerge", cookparms.
getCookTime(), 0);
753 bool myUpdateaffectednmls;
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