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;
136 myUsePieceAttrib =
false;
138 graph->
evalOpParm(myUsePieceAttrib, nodeidx,
"usepieceattrib", time, graph->
isDirect()?
nullptr:depnode);
139 myPieceAttrib =
"name"_UTsh;
140 if (
true && ( (
true&&!(((getUsePieceAttrib()==0)))) ) )
141 graph->
evalOpParm(myPieceAttrib, nodeidx,
"pieceattrib", time, graph->
isDirect()?
nullptr:depnode);
142 myPieceAttribClass = 0;
143 if (
true && ( (
true&&!(((getUsePieceAttrib()==0)))) ) )
144 graph->
evalOpParm(myPieceAttribClass, nodeidx,
"pieceattribclass", time, graph->
isDirect()?
nullptr:depnode);
145 myExtractionMethod = 0;
147 graph->
evalOpParm(myExtractionMethod, nodeidx,
"extractionmethod", time, graph->
isDirect()?
nullptr:depnode);
150 graph->
evalOpParm(myOutputAttribs, nodeidx,
"outputattribs", time, graph->
isDirect()?
nullptr:depnode);
151 myComputeDistortion =
false;
153 graph->
evalOpParm(myComputeDistortion, nodeidx,
"computedistortion", time, graph->
isDirect()?
nullptr:depnode);
154 myDistortionAttrib =
"distortion"_UTsh;
155 if (
true && ( (
true&&!(((getComputeDistortion()==0)))) ) )
156 graph->
evalOpParm(myDistortionAttrib, nodeidx,
"distortionattrib", time, graph->
isDirect()?
nullptr:depnode);
172 template <
typename T>
179 if (idx.
size() != instance.
size()+1)
184 coerceValue(value, myUsePieceAttrib);
187 coerceValue(value, myPieceAttrib);
190 coerceValue(value, myPieceAttribClass);
193 coerceValue(value, myExtractionMethod);
196 coerceValue(value, myOutputAttribs);
199 coerceValue(value, myComputeDistortion);
202 coerceValue(value, myDistortionAttrib);
218 { doGetParmValue(idx, instance, value); }
220 { doGetParmValue(idx, instance, value); }
222 { doGetParmValue(idx, instance, value); }
224 { doGetParmValue(idx, instance, value); }
226 { doGetParmValue(idx, instance, value); }
228 { doGetParmValue(idx, instance, value); }
230 { doGetParmValue(idx, instance, value); }
232 { doGetParmValue(idx, instance, value); }
234 { doGetParmValue(idx, instance, value); }
236 { doGetParmValue(idx, instance, value); }
238 { doGetParmValue(idx, instance, value); }
240 template <
typename T>
247 if (idx.
size() != instance.
size()+1)
252 coerceValue(myUsePieceAttrib, ( ( value ) ));
255 coerceValue(myPieceAttrib, ( ( value ) ));
258 coerceValue(myPieceAttribClass, clampMinValue(0, clampMaxValue(1, value ) ));
261 coerceValue(myExtractionMethod, clampMinValue(0, clampMaxValue(3, value ) ));
264 coerceValue(myOutputAttribs, clampMinValue(0, clampMaxValue(2, value ) ));
267 coerceValue(myComputeDistortion, ( ( value ) ));
270 coerceValue(myDistortionAttrib, ( ( value ) ));
277 { doSetParmValue(idx, instance, value); }
279 { doSetParmValue(idx, instance, value); }
281 { doSetParmValue(idx, instance, value); }
283 { doSetParmValue(idx, instance, value); }
285 { doSetParmValue(idx, instance, value); }
287 { doSetParmValue(idx, instance, value); }
289 { doSetParmValue(idx, instance, value); }
291 { doSetParmValue(idx, instance, value); }
293 { doSetParmValue(idx, instance, value); }
295 { doSetParmValue(idx, instance, value); }
297 { doSetParmValue(idx, instance, value); }
313 if (fieldnum.
size() < 1)
318 return "usepieceattrib";
320 return "pieceattrib";
322 return "pieceattribclass";
324 return "extractionmethod";
326 return "outputattribs";
328 return "computedistortion";
330 return "distortionattrib";
338 if (fieldnum.
size() < 1)
339 return PARM_UNSUPPORTED;
358 return PARM_UNSUPPORTED;
394 loadData(is, rampdata);
412 int typelen = colon - data.
buffer();
426 {
int64 iv =
v; UTwrite(os, &iv); }
428 { UTwrite<fpreal64>(os, &
v); }
430 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
432 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
433 UTwrite<fpreal64>(os, &v.
z()); }
435 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
436 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
448 if (s) s->save(ostr);
450 saveData(os, result);
457 ostr << s->getDataTypeToken();
462 saveData(os, result);
466 void save(std::ostream &os)
const
470 saveData(os, myUsePieceAttrib);
471 saveData(os, myPieceAttrib);
472 saveData(os, myPieceAttribClass);
473 saveData(os, myExtractionMethod);
474 saveData(os, myOutputAttribs);
475 saveData(os, myComputeDistortion);
476 saveData(os, myDistortionAttrib);
489 loadData(is, myUsePieceAttrib);
490 loadData(is, myPieceAttrib);
491 loadData(is, myPieceAttribClass);
492 loadData(is, myExtractionMethod);
493 loadData(is, myOutputAttribs);
494 loadData(is, myComputeDistortion);
495 loadData(is, myDistortionAttrib);
505 if (!thissop)
return getUsePieceAttrib();
507 OP_Utils::evalOpParm(result, thissop,
"usepieceattrib", cookparms.
getCookTime(), 0);
515 if (!thissop)
return getPieceAttrib();
517 OP_Utils::evalOpParm(result, thissop,
"pieceattrib", cookparms.
getCookTime(), 0);
525 if (!thissop)
return getPieceAttribClass();
527 OP_Utils::evalOpParm(result, thissop,
"pieceattribclass", cookparms.
getCookTime(), 0);
535 if (!thissop)
return getExtractionMethod();
537 OP_Utils::evalOpParm(result, thissop,
"extractionmethod", cookparms.
getCookTime(), 0);
545 if (!thissop)
return getOutputAttribs();
547 OP_Utils::evalOpParm(result, thissop,
"outputattribs", cookparms.
getCookTime(), 0);
555 if (!thissop)
return getComputeDistortion();
557 OP_Utils::evalOpParm(result, thissop,
"computedistortion", cookparms.
getCookTime(), 0);
565 if (!thissop)
return getDistortionAttrib();
567 OP_Utils::evalOpParm(result, thissop,
"distortionattrib", cookparms.
getCookTime(), 0);
572 bool myUsePieceAttrib;
574 int64 myPieceAttribClass;
575 int64 myExtractionMethod;
576 int64 myOutputAttribs;
577 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
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
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
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