23 namespace SOP_TransformByAttribEnums
45 myXformattrib =
"xform"_UTsh;
46 myInvertXform =
false;
48 myUpdateaffectednmls =
true;
63 if (myGroup != src.myGroup)
return false;
64 if (myGrouptype != src.myGrouptype)
return false;
65 if (myXformattrib != src.myXformattrib)
return false;
66 if (myInvertXform != src.myInvertXform)
return false;
67 if (myAttribs != src.myAttribs)
return false;
68 if (myUpdateaffectednmls != src.myUpdateaffectednmls)
return false;
69 if (myVlength != src.myVlength)
return false;
70 if (myDeletexform != src.myDeletexform)
return false;
86 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
89 graph->
evalOpParm(myGrouptype, nodeidx,
"grouptype", time, 0);
90 myXformattrib =
"xform"_UTsh;
92 graph->
evalOpParm(myXformattrib, nodeidx,
"xformattrib", time, 0);
93 myInvertXform =
false;
95 graph->
evalOpParm(myInvertXform, nodeidx,
"invertxform", time, 0);
98 graph->
evalOpParm(myAttribs, nodeidx,
"attribs", time, 0);
99 myUpdateaffectednmls =
true;
101 graph->
evalOpParm(myUpdateaffectednmls, nodeidx,
"updateaffectednmls", time, 0);
104 graph->
evalOpParm(myVlength, nodeidx,
"vlength", time, 0);
105 myDeletexform =
true;
107 graph->
evalOpParm(myDeletexform, nodeidx,
"deletexform", time, 0);
123 template <
typename T>
130 if (idx.
size() != instance.
size()+1)
172 { doGetParmValue(idx, instance, value); }
174 { doGetParmValue(idx, instance, value); }
176 { doGetParmValue(idx, instance, value); }
178 { doGetParmValue(idx, instance, value); }
180 { doGetParmValue(idx, instance, value); }
182 { doGetParmValue(idx, instance, value); }
184 { doGetParmValue(idx, instance, value); }
186 { doGetParmValue(idx, instance, value); }
188 { doGetParmValue(idx, instance, value); }
190 { doGetParmValue(idx, instance, value); }
192 { doGetParmValue(idx, instance, value); }
194 template <
typename T>
201 if (idx.
size() != instance.
size()+1)
234 { doSetParmValue(idx, instance, value); }
236 { doSetParmValue(idx, instance, value); }
238 { doSetParmValue(idx, instance, value); }
240 { doSetParmValue(idx, instance, value); }
242 { doSetParmValue(idx, instance, value); }
244 { doSetParmValue(idx, instance, value); }
246 { doSetParmValue(idx, instance, value); }
248 { doSetParmValue(idx, instance, value); }
250 { doSetParmValue(idx, instance, value); }
252 { doSetParmValue(idx, instance, value); }
254 { doSetParmValue(idx, instance, value); }
270 if (fieldnum.
size() < 1)
279 return "xformattrib";
281 return "invertxform";
285 return "updateaffectednmls";
289 return "deletexform";
297 if (fieldnum.
size() < 1)
298 return PARM_UNSUPPORTED;
338 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
340 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
342 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
355 loadData(is, rampdata);
373 int typelen = colon - data.
buffer();
387 {
int64 iv =
v; UTwrite(os, &iv); }
389 { UTwrite<fpreal64>(os, &
v); }
391 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
393 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
394 UTwrite<fpreal64>(os, &v.
z()); }
396 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
397 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
409 if (s) s->save(ostr);
411 saveData(os, result);
418 ostr << s->getDataTypeToken();
423 saveData(os, result);
427 void save(std::ostream &os)
const
431 saveData(os, myGroup);
432 saveData(os, myGrouptype);
433 saveData(os, myXformattrib);
434 saveData(os, myInvertXform);
435 saveData(os, myAttribs);
436 saveData(os, myUpdateaffectednmls);
437 saveData(os, myVlength);
438 saveData(os, myDeletexform);
451 loadData(is, myGroup);
452 loadData(is, myGrouptype);
453 loadData(is, myXformattrib);
454 loadData(is, myInvertXform);
455 loadData(is, myAttribs);
456 loadData(is, myUpdateaffectednmls);
457 loadData(is, myVlength);
458 loadData(is, myDeletexform);
468 if (!thissop)
return getGroup();
470 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
478 if (!thissop)
return getGrouptype();
480 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
488 if (!thissop)
return getXformattrib();
490 OP_Utils::evalOpParm(result, thissop,
"xformattrib", cookparms.
getCookTime(), 0);
498 if (!thissop)
return getInvertXform();
500 OP_Utils::evalOpParm(result, thissop,
"invertxform", cookparms.
getCookTime(), 0);
508 if (!thissop)
return getAttribs();
510 OP_Utils::evalOpParm(result, thissop,
"attribs", cookparms.
getCookTime(), 0);
518 if (!thissop)
return getUpdateaffectednmls();
520 OP_Utils::evalOpParm(result, thissop,
"updateaffectednmls", cookparms.
getCookTime(), 0);
528 if (!thissop)
return getVlength();
530 OP_Utils::evalOpParm(result, thissop,
"vlength", cookparms.
getCookTime(), 0);
538 if (!thissop)
return getDeletexform();
540 OP_Utils::evalOpParm(result, thissop,
"deletexform", cookparms.
getCookTime(), 0);
550 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
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
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