23 namespace SOP_ExtractTransformEnums
34 using namespace UT::Literal;
53 using namespace UT::Literal;
73 using namespace UT::Literal;
92 myUsePieceAttrib =
false;
93 myPieceAttrib =
"name"_UTsh;
94 myPieceAttribClass = 0;
95 myExtractionMethod = 0;
97 myComputeDistortion =
false;
98 myDistortionAttrib =
"distortion"_UTsh;
111 if (myUsePieceAttrib != src.myUsePieceAttrib)
return false;
112 if (myPieceAttrib != src.myPieceAttrib)
return false;
113 if (myPieceAttribClass != src.myPieceAttribClass)
return false;
114 if (myExtractionMethod != src.myExtractionMethod)
return false;
115 if (myOutputAttribs != src.myOutputAttribs)
return false;
116 if (myComputeDistortion != src.myComputeDistortion)
return false;
117 if (myDistortionAttrib != src.myDistortionAttrib)
return false;
133 myUsePieceAttrib =
false;
135 graph->
evalOpParm(myUsePieceAttrib, nodeidx,
"usepieceattrib", time, 0);
136 myPieceAttrib =
"name"_UTsh;
137 if (
true && ( (
true&&!(((getUsePieceAttrib()==0)))) ) )
138 graph->
evalOpParm(myPieceAttrib, nodeidx,
"pieceattrib", time, 0);
139 myPieceAttribClass = 0;
140 if (
true && ( (
true&&!(((getUsePieceAttrib()==0)))) ) )
141 graph->
evalOpParm(myPieceAttribClass, nodeidx,
"pieceattribclass", time, 0);
142 myExtractionMethod = 0;
144 graph->
evalOpParm(myExtractionMethod, nodeidx,
"extractionmethod", time, 0);
147 graph->
evalOpParm(myOutputAttribs, nodeidx,
"outputattribs", time, 0);
148 myComputeDistortion =
false;
150 graph->
evalOpParm(myComputeDistortion, nodeidx,
"computedistortion", time, 0);
151 myDistortionAttrib =
"distortion"_UTsh;
152 if (
true && ( (
true&&!(((getComputeDistortion()==0)))) ) )
153 graph->
evalOpParm(myDistortionAttrib, nodeidx,
"distortionattrib", time, 0);
169 template <
typename T>
176 if (idx.
size() != instance.
size()+1)
181 coerceValue(value, myUsePieceAttrib);
184 coerceValue(value, myPieceAttrib);
187 coerceValue(value, myPieceAttribClass);
190 coerceValue(value, myExtractionMethod);
193 coerceValue(value, myOutputAttribs);
196 coerceValue(value, myComputeDistortion);
199 coerceValue(value, myDistortionAttrib);
215 { doGetParmValue(idx, instance, value); }
217 { doGetParmValue(idx, instance, value); }
219 { doGetParmValue(idx, instance, value); }
221 { doGetParmValue(idx, instance, value); }
223 { doGetParmValue(idx, instance, value); }
225 { doGetParmValue(idx, instance, value); }
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 template <
typename T>
244 if (idx.
size() != instance.
size()+1)
249 coerceValue(myUsePieceAttrib, ( ( value ) ));
252 coerceValue(myPieceAttrib, ( ( value ) ));
255 coerceValue(myPieceAttribClass, clampMinValue(0, clampMaxValue(1, value ) ));
258 coerceValue(myExtractionMethod, clampMinValue(0, clampMaxValue(3, value ) ));
261 coerceValue(myOutputAttribs, clampMinValue(0, clampMaxValue(2, value ) ));
264 coerceValue(myComputeDistortion, ( ( value ) ));
267 coerceValue(myDistortionAttrib, ( ( value ) ));
274 { doSetParmValue(idx, instance, value); }
276 { doSetParmValue(idx, instance, value); }
278 { doSetParmValue(idx, instance, value); }
280 { doSetParmValue(idx, instance, value); }
282 { doSetParmValue(idx, instance, value); }
284 { doSetParmValue(idx, instance, value); }
286 { doSetParmValue(idx, instance, value); }
288 { doSetParmValue(idx, instance, value); }
290 { doSetParmValue(idx, instance, value); }
292 { doSetParmValue(idx, instance, value); }
294 { doSetParmValue(idx, instance, value); }
310 if (fieldnum.
size() < 1)
315 return "usepieceattrib";
317 return "pieceattrib";
319 return "pieceattribclass";
321 return "extractionmethod";
323 return "outputattribs";
325 return "computedistortion";
327 return "distortionattrib";
335 if (fieldnum.
size() < 1)
336 return PARM_UNSUPPORTED;
355 return PARM_UNSUPPORTED;
391 loadData(is, rampdata);
409 int typelen = colon - data.
buffer();
423 {
int64 iv =
v; UTwrite(os, &iv); }
425 { UTwrite<fpreal64>(os, &
v); }
427 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
429 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
430 UTwrite<fpreal64>(os, &v.
z()); }
432 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
433 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
445 if (s) s->save(ostr);
447 saveData(os, result);
454 ostr << s->getDataTypeToken();
459 saveData(os, result);
463 void save(std::ostream &os)
const
467 saveData(os, myUsePieceAttrib);
468 saveData(os, myPieceAttrib);
469 saveData(os, myPieceAttribClass);
470 saveData(os, myExtractionMethod);
471 saveData(os, myOutputAttribs);
472 saveData(os, myComputeDistortion);
473 saveData(os, myDistortionAttrib);
486 loadData(is, myUsePieceAttrib);
487 loadData(is, myPieceAttrib);
488 loadData(is, myPieceAttribClass);
489 loadData(is, myExtractionMethod);
490 loadData(is, myOutputAttribs);
491 loadData(is, myComputeDistortion);
492 loadData(is, myDistortionAttrib);
502 if (!thissop)
return getUsePieceAttrib();
504 OP_Utils::evalOpParm(result, thissop,
"usepieceattrib", cookparms.
getCookTime(), 0);
512 if (!thissop)
return getPieceAttrib();
514 OP_Utils::evalOpParm(result, thissop,
"pieceattrib", cookparms.
getCookTime(), 0);
522 if (!thissop)
return getPieceAttribClass();
524 OP_Utils::evalOpParm(result, thissop,
"pieceattribclass", cookparms.
getCookTime(), 0);
532 if (!thissop)
return getExtractionMethod();
534 OP_Utils::evalOpParm(result, thissop,
"extractionmethod", cookparms.
getCookTime(), 0);
542 if (!thissop)
return getOutputAttribs();
544 OP_Utils::evalOpParm(result, thissop,
"outputattribs", cookparms.
getCookTime(), 0);
552 if (!thissop)
return getComputeDistortion();
554 OP_Utils::evalOpParm(result, thissop,
"computedistortion", cookparms.
getCookTime(), 0);
562 if (!thissop)
return getDistortionAttrib();
564 OP_Utils::evalOpParm(result, thissop,
"distortionattrib", cookparms.
getCookTime(), 0);
569 bool myUsePieceAttrib;
571 int64 myPieceAttribClass;
572 int64 myExtractionMethod;
573 int64 myOutputAttribs;
574 bool myComputeDistortion;
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
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
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