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;
133 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
136 graph->
evalOpParm(myGrouptype, nodeidx,
"grouptype", time, 0);
139 graph->
evalOpParm(myOrig, nodeidx,
"orig", time, 0);
142 graph->
evalOpParm(myDir, nodeidx,
"dir", time, 0);
145 graph->
evalOpParm(myTrans, nodeidx,
"trans", time, 0);
148 graph->
evalOpParm(myRot, nodeidx,
"rot", time, 0);
151 graph->
evalOpParm(myScale, nodeidx,
"scale", time, 0);
152 myUpdatenmls =
false;
154 graph->
evalOpParm(myUpdatenmls, nodeidx,
"updatenmls", time, 0);
155 myUpdateaffectednmls =
true;
156 if (
true && ( (
true&&!(((getUpdatenmls()==1)))) ) )
157 graph->
evalOpParm(myUpdateaffectednmls, nodeidx,
"updateaffectednmls", time, 0);
159 if (
true && ( (
true&&!(((getUpdatenmls()==1)))) ) )
160 graph->
evalOpParm(myVlength, nodeidx,
"vlength", time, 0);
161 myInvertxform =
false;
163 graph->
evalOpParm(myInvertxform, nodeidx,
"invertxform", time, 0);
166 graph->
evalOpParm(myAddattrib, nodeidx,
"addattrib", time, 0);
167 myOutputattrib =
"xform"_UTsh;
168 if (
true && ( (
true&&!(((getAddattrib()==0)))) ) )
169 graph->
evalOpParm(myOutputattrib, nodeidx,
"outputattrib", time, 0);
171 if (
true && ( (
true&&!(((getAddattrib()==0)))) ) )
172 graph->
evalOpParm(myOutputmerge, nodeidx,
"outputmerge", time, 0);
188 template <
typename T>
195 if (idx.
size() != instance.
size()+1)
200 coerceValue(value, myGroup);
203 coerceValue(value, myGrouptype);
206 coerceValue(value, myOrig);
209 coerceValue(value, myDir);
212 coerceValue(value, myTrans);
215 coerceValue(value, myRot);
218 coerceValue(value, myScale);
221 coerceValue(value, myUpdatenmls);
224 coerceValue(value, myUpdateaffectednmls);
227 coerceValue(value, myVlength);
230 coerceValue(value, myInvertxform);
233 coerceValue(value, myAddattrib);
236 coerceValue(value, myOutputattrib);
239 coerceValue(value, myOutputmerge);
255 { doGetParmValue(idx, instance, value); }
257 { doGetParmValue(idx, instance, value); }
259 { doGetParmValue(idx, instance, value); }
261 { doGetParmValue(idx, instance, value); }
263 { doGetParmValue(idx, instance, value); }
265 { doGetParmValue(idx, instance, value); }
267 { doGetParmValue(idx, instance, value); }
269 { doGetParmValue(idx, instance, value); }
271 { doGetParmValue(idx, instance, value); }
273 { doGetParmValue(idx, instance, value); }
275 { doGetParmValue(idx, instance, value); }
277 template <
typename T>
284 if (idx.
size() != instance.
size()+1)
289 coerceValue(myGroup, ( ( value ) ));
292 coerceValue(myGrouptype, clampMinValue(0, clampMaxValue(4, value ) ));
295 coerceValue(myOrig, ( ( value ) ));
298 coerceValue(myDir, ( ( value ) ));
301 coerceValue(myTrans, ( ( value ) ));
304 coerceValue(myRot, ( ( value ) ));
307 coerceValue(myScale, ( ( value ) ));
310 coerceValue(myUpdatenmls, ( ( value ) ));
313 coerceValue(myUpdateaffectednmls, ( ( value ) ));
316 coerceValue(myVlength, ( ( value ) ));
319 coerceValue(myInvertxform, ( ( value ) ));
322 coerceValue(myAddattrib, ( ( value ) ));
325 coerceValue(myOutputattrib, ( ( value ) ));
328 coerceValue(myOutputmerge, clampMinValue(0, clampMaxValue(2, value ) ));
335 { doSetParmValue(idx, instance, value); }
337 { doSetParmValue(idx, instance, value); }
339 { doSetParmValue(idx, instance, value); }
341 { doSetParmValue(idx, instance, value); }
343 { doSetParmValue(idx, instance, value); }
345 { doSetParmValue(idx, instance, value); }
347 { doSetParmValue(idx, instance, value); }
349 { doSetParmValue(idx, instance, value); }
351 { doSetParmValue(idx, instance, value); }
353 { doSetParmValue(idx, instance, value); }
355 { doSetParmValue(idx, instance, value); }
371 if (fieldnum.
size() < 1)
392 return "updateaffectednmls";
396 return "invertxform";
400 return "outputattrib";
402 return "outputmerge";
410 if (fieldnum.
size() < 1)
411 return PARM_UNSUPPORTED;
444 return PARM_UNSUPPORTED;
480 loadData(is, rampdata);
498 int typelen = colon - data.
buffer();
512 {
int64 iv =
v; UTwrite(os, &iv); }
514 { UTwrite<fpreal64>(os, &
v); }
516 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
518 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
519 UTwrite<fpreal64>(os, &v.
z()); }
521 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
522 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
534 if (s) s->save(ostr);
536 saveData(os, result);
543 ostr << s->getDataTypeToken();
548 saveData(os, result);
552 void save(std::ostream &os)
const
556 saveData(os, myGroup);
557 saveData(os, myGrouptype);
558 saveData(os, myOrig);
560 saveData(os, myTrans);
562 saveData(os, myScale);
563 saveData(os, myUpdatenmls);
564 saveData(os, myUpdateaffectednmls);
565 saveData(os, myVlength);
566 saveData(os, myInvertxform);
567 saveData(os, myAddattrib);
568 saveData(os, myOutputattrib);
569 saveData(os, myOutputmerge);
582 loadData(is, myGroup);
583 loadData(is, myGrouptype);
584 loadData(is, myOrig);
586 loadData(is, myTrans);
588 loadData(is, myScale);
589 loadData(is, myUpdatenmls);
590 loadData(is, myUpdateaffectednmls);
591 loadData(is, myVlength);
592 loadData(is, myInvertxform);
593 loadData(is, myAddattrib);
594 loadData(is, myOutputattrib);
595 loadData(is, myOutputmerge);
605 if (!thissop)
return getGroup();
607 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
615 if (!thissop)
return getGrouptype();
617 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
625 if (!thissop)
return getOrig();
627 OP_Utils::evalOpParm(result, thissop,
"orig", cookparms.
getCookTime(), 0);
635 if (!thissop)
return getDir();
637 OP_Utils::evalOpParm(result, thissop,
"dir", cookparms.
getCookTime(), 0);
645 if (!thissop)
return getTrans();
647 OP_Utils::evalOpParm(result, thissop,
"trans", cookparms.
getCookTime(), 0);
655 if (!thissop)
return getRot();
657 OP_Utils::evalOpParm(result, thissop,
"rot", cookparms.
getCookTime(), 0);
667 OP_Utils::evalOpParm(result, thissop,
"scale", cookparms.
getCookTime(), 0);
675 if (!thissop)
return getUpdatenmls();
677 OP_Utils::evalOpParm(result, thissop,
"updatenmls", cookparms.
getCookTime(), 0);
685 if (!thissop)
return getUpdateaffectednmls();
687 OP_Utils::evalOpParm(result, thissop,
"updateaffectednmls", cookparms.
getCookTime(), 0);
695 if (!thissop)
return getVlength();
697 OP_Utils::evalOpParm(result, thissop,
"vlength", cookparms.
getCookTime(), 0);
705 if (!thissop)
return getInvertxform();
707 OP_Utils::evalOpParm(result, thissop,
"invertxform", cookparms.
getCookTime(), 0);
715 if (!thissop)
return getAddattrib();
717 OP_Utils::evalOpParm(result, thissop,
"addattrib", cookparms.
getCookTime(), 0);
725 if (!thissop)
return getOutputattrib();
727 OP_Utils::evalOpParm(result, thissop,
"outputattrib", cookparms.
getCookTime(), 0);
735 if (!thissop)
return getOutputmerge();
737 OP_Utils::evalOpParm(result, thissop,
"outputmerge", cookparms.
getCookTime(), 0);
750 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
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