23 namespace SOP_ExtractTransformEnums
53 myUsePieceAttrib =
false;
54 myPieceAttrib =
"name"_UTsh;
55 myPieceAttribClass = 0;
56 myExtractionMethod = 0;
58 myComputeDistortion =
false;
59 myDistortionAttrib =
"distortion"_UTsh;
72 if (myUsePieceAttrib != src.myUsePieceAttrib)
return false;
73 if (myPieceAttrib != src.myPieceAttrib)
return false;
74 if (myPieceAttribClass != src.myPieceAttribClass)
return false;
75 if (myExtractionMethod != src.myExtractionMethod)
return false;
76 if (myOutputAttribs != src.myOutputAttribs)
return false;
77 if (myComputeDistortion != src.myComputeDistortion)
return false;
78 if (myDistortionAttrib != src.myDistortionAttrib)
return false;
94 myUsePieceAttrib =
false;
96 graph->
evalOpParm(myUsePieceAttrib, nodeidx,
"usepieceattrib", time, 0);
97 myPieceAttrib =
"name"_UTsh;
98 if (
true && ( (
true&&!(((getUsePieceAttrib()==0)))) ) )
99 graph->
evalOpParm(myPieceAttrib, nodeidx,
"pieceattrib", time, 0);
100 myPieceAttribClass = 0;
101 if (
true && ( (
true&&!(((getUsePieceAttrib()==0)))) ) )
102 graph->
evalOpParm(myPieceAttribClass, nodeidx,
"pieceattribclass", time, 0);
103 myExtractionMethod = 0;
105 graph->
evalOpParm(myExtractionMethod, nodeidx,
"extractionmethod", time, 0);
108 graph->
evalOpParm(myOutputAttribs, nodeidx,
"outputattribs", time, 0);
109 myComputeDistortion =
false;
111 graph->
evalOpParm(myComputeDistortion, nodeidx,
"computedistortion", time, 0);
112 myDistortionAttrib =
"distortion"_UTsh;
113 if (
true && ( (
true&&!(((getComputeDistortion()==0)))) ) )
114 graph->
evalOpParm(myDistortionAttrib, nodeidx,
"distortionattrib", time, 0);
130 template <
typename T>
137 if (idx.
size() != instance.
size()+1)
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 { doGetParmValue(idx, instance, value); }
196 { doGetParmValue(idx, instance, value); }
198 template <
typename T>
205 if (idx.
size() != instance.
size()+1)
235 { doSetParmValue(idx, instance, value); }
237 { doSetParmValue(idx, instance, value); }
239 { doSetParmValue(idx, instance, value); }
241 { doSetParmValue(idx, instance, value); }
243 { doSetParmValue(idx, instance, value); }
245 { doSetParmValue(idx, instance, value); }
247 { doSetParmValue(idx, instance, value); }
249 { doSetParmValue(idx, instance, value); }
251 { doSetParmValue(idx, instance, value); }
253 { doSetParmValue(idx, instance, value); }
255 { doSetParmValue(idx, instance, value); }
271 if (fieldnum.
size() < 1)
276 return "usepieceattrib";
278 return "pieceattrib";
280 return "pieceattribclass";
282 return "extractionmethod";
284 return "outputattribs";
286 return "computedistortion";
288 return "distortionattrib";
296 if (fieldnum.
size() < 1)
297 return PARM_UNSUPPORTED;
335 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
337 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
339 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
352 loadData(is, rampdata);
370 int typelen = colon - data.
buffer();
384 {
int64 iv =
v; UTwrite(os, &iv); }
386 { UTwrite<fpreal64>(os, &
v); }
388 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
390 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
391 UTwrite<fpreal64>(os, &v.
z()); }
393 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
394 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
406 if (s) s->save(ostr);
408 saveData(os, result);
415 ostr << s->getDataTypeToken();
420 saveData(os, result);
424 void save(std::ostream &os)
const
428 saveData(os, myUsePieceAttrib);
429 saveData(os, myPieceAttrib);
430 saveData(os, myPieceAttribClass);
431 saveData(os, myExtractionMethod);
432 saveData(os, myOutputAttribs);
433 saveData(os, myComputeDistortion);
434 saveData(os, myDistortionAttrib);
447 loadData(is, myUsePieceAttrib);
448 loadData(is, myPieceAttrib);
449 loadData(is, myPieceAttribClass);
450 loadData(is, myExtractionMethod);
451 loadData(is, myOutputAttribs);
452 loadData(is, myComputeDistortion);
453 loadData(is, myDistortionAttrib);
463 if (!thissop)
return getUsePieceAttrib();
465 OP_Utils::evalOpParm(result, thissop,
"usepieceattrib", cookparms.
getCookTime(), 0);
473 if (!thissop)
return getPieceAttrib();
475 OP_Utils::evalOpParm(result, thissop,
"pieceattrib", cookparms.
getCookTime(), 0);
483 if (!thissop)
return getPieceAttribClass();
485 OP_Utils::evalOpParm(result, thissop,
"pieceattribclass", cookparms.
getCookTime(), 0);
493 if (!thissop)
return getExtractionMethod();
495 OP_Utils::evalOpParm(result, thissop,
"extractionmethod", cookparms.
getCookTime(), 0);
503 if (!thissop)
return getOutputAttribs();
505 OP_Utils::evalOpParm(result, thissop,
"outputattribs", cookparms.
getCookTime(), 0);
513 if (!thissop)
return getComputeDistortion();
515 OP_Utils::evalOpParm(result, thissop,
"computedistortion", cookparms.
getCookTime(), 0);
523 if (!thissop)
return getDistortionAttrib();
525 OP_Utils::evalOpParm(result, thissop,
"distortionattrib", cookparms.
getCookTime(), 0);
530 bool myUsePieceAttrib;
532 int64 myPieceAttribClass;
533 int64 myExtractionMethod;
534 int64 myOutputAttribs;
535 bool myComputeDistortion;
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