23 namespace SOP_AttribPromoteEnums
66 myUsePieceAttrib =
false;
67 myPieceAttrib =
"name"_UTsh;
84 if (myInname != src.myInname)
return false;
85 if (myInclass != src.myInclass)
return false;
86 if (myOutclass != src.myOutclass)
return false;
87 if (myUsePieceAttrib != src.myUsePieceAttrib)
return false;
88 if (myPieceAttrib != src.myPieceAttrib)
return false;
89 if (myMethod != src.myMethod)
return false;
90 if (myUseoutname != src.myUseoutname)
return false;
91 if (myOutname != src.myOutname)
return false;
92 if (myDeletein != src.myDeletein)
return false;
110 graph->
evalOpParm(myInname, nodeidx,
"inname", time, 0);
113 graph->
evalOpParm(myInclass, nodeidx,
"inclass", time, 0);
116 graph->
evalOpParm(myOutclass, nodeidx,
"outclass", time, 0);
117 myUsePieceAttrib =
false;
118 if (
true && ( (
true&&!(((
int64(getOutclass())==0))||((
int64(getInclass())==0)))) ) )
119 graph->
evalOpParm(myUsePieceAttrib, nodeidx,
"usepieceattrib", time, 0);
120 myPieceAttrib =
"name"_UTsh;
121 if (
true && ( (
true&&!(((getUsePieceAttrib()==0))||((
int64(getOutclass())==0))||((
int64(getInclass())==0)))) ) )
122 graph->
evalOpParm(myPieceAttrib, nodeidx,
"pieceattrib", time, 0);
125 graph->
evalOpParm(myMethod, nodeidx,
"method", time, 0);
126 myUseoutname =
false;
128 graph->
evalOpParm(myUseoutname, nodeidx,
"useoutname", time, 0);
130 if (
true && ( (
true&&!(((getUseoutname()==0)))) ) )
131 graph->
evalOpParm(myOutname, nodeidx,
"outname", time, 0);
133 if (
true && ( (
true&&!(((getUseoutname()==0)&&(
int64(getInclass())==2)&&(
int64(getOutclass())==3))||((getUseoutname()==0)&&(
int64(getInclass())==3)&&(
int64(getOutclass())==2)))) ) )
134 graph->
evalOpParm(myDeletein, nodeidx,
"deletein", time, 0);
150 template <
typename T>
157 if (idx.
size() != instance.
size()+1)
202 { doGetParmValue(idx, instance, value); }
204 { doGetParmValue(idx, instance, value); }
206 { doGetParmValue(idx, instance, value); }
208 { doGetParmValue(idx, instance, value); }
210 { doGetParmValue(idx, instance, value); }
212 { doGetParmValue(idx, instance, value); }
214 { doGetParmValue(idx, instance, value); }
216 { doGetParmValue(idx, instance, value); }
218 { doGetParmValue(idx, instance, value); }
220 { doGetParmValue(idx, instance, value); }
222 { doGetParmValue(idx, instance, value); }
224 template <
typename T>
231 if (idx.
size() != instance.
size()+1)
267 { doSetParmValue(idx, instance, value); }
269 { doSetParmValue(idx, instance, value); }
271 { doSetParmValue(idx, instance, value); }
273 { doSetParmValue(idx, instance, value); }
275 { doSetParmValue(idx, instance, 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); }
303 if (fieldnum.
size() < 1)
314 return "usepieceattrib";
316 return "pieceattrib";
332 if (fieldnum.
size() < 1)
333 return PARM_UNSUPPORTED;
375 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
377 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
379 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
392 loadData(is, rampdata);
410 int typelen = colon - data.
buffer();
424 {
int64 iv =
v; UTwrite(os, &iv); }
426 { UTwrite<fpreal64>(os, &
v); }
428 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
430 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
431 UTwrite<fpreal64>(os, &v.
z()); }
433 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
434 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
446 if (s) s->save(ostr);
448 saveData(os, result);
455 ostr << s->getDataTypeToken();
460 saveData(os, result);
464 void save(std::ostream &os)
const
468 saveData(os, myInname);
469 saveData(os, myInclass);
470 saveData(os, myOutclass);
471 saveData(os, myUsePieceAttrib);
472 saveData(os, myPieceAttrib);
473 saveData(os, myMethod);
474 saveData(os, myUseoutname);
475 saveData(os, myOutname);
476 saveData(os, myDeletein);
489 loadData(is, myInname);
490 loadData(is, myInclass);
491 loadData(is, myOutclass);
492 loadData(is, myUsePieceAttrib);
493 loadData(is, myPieceAttrib);
494 loadData(is, myMethod);
495 loadData(is, myUseoutname);
496 loadData(is, myOutname);
497 loadData(is, myDeletein);
507 if (!thissop)
return getInname();
509 OP_Utils::evalOpParm(result, thissop,
"inname", cookparms.
getCookTime(), 0);
517 if (!thissop)
return getInclass();
519 OP_Utils::evalOpParm(result, thissop,
"inclass", cookparms.
getCookTime(), 0);
527 if (!thissop)
return getOutclass();
529 OP_Utils::evalOpParm(result, thissop,
"outclass", cookparms.
getCookTime(), 0);
537 if (!thissop)
return getUsePieceAttrib();
539 OP_Utils::evalOpParm(result, thissop,
"usepieceattrib", cookparms.
getCookTime(), 0);
547 if (!thissop)
return getPieceAttrib();
549 OP_Utils::evalOpParm(result, thissop,
"pieceattrib", cookparms.
getCookTime(), 0);
557 if (!thissop)
return getMethod();
559 OP_Utils::evalOpParm(result, thissop,
"method", cookparms.
getCookTime(), 0);
567 if (!thissop)
return getUseoutname();
569 OP_Utils::evalOpParm(result, thissop,
"useoutname", cookparms.
getCookTime(), 0);
577 if (!thissop)
return getOutname();
579 OP_Utils::evalOpParm(result, thissop,
"outname", cookparms.
getCookTime(), 0);
587 if (!thissop)
return getDeletein();
589 OP_Utils::evalOpParm(result, thissop,
"deletein", cookparms.
getCookTime(), 0);
597 bool myUsePieceAttrib;
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