23 namespace SOP_AttribPromoteEnums
36 using namespace UT::Literal;
57 using namespace UT::Literal;
85 using namespace UT::Literal;
115 myUsePieceAttrib =
false;
116 myPieceAttrib =
"name"_UTsh;
118 myUseoutname =
false;
133 if (myInname != src.myInname)
return false;
134 if (myInclass != src.myInclass)
return false;
135 if (myOutclass != src.myOutclass)
return false;
136 if (myUsePieceAttrib != src.myUsePieceAttrib)
return false;
137 if (myPieceAttrib != src.myPieceAttrib)
return false;
138 if (myMethod != src.myMethod)
return false;
139 if (myUseoutname != src.myUseoutname)
return false;
140 if (myOutname != src.myOutname)
return false;
141 if (myDeletein != src.myDeletein)
return false;
159 graph->
evalOpParm(myInname, nodeidx,
"inname", time, 0);
162 graph->
evalOpParm(myInclass, nodeidx,
"inclass", time, 0);
165 graph->
evalOpParm(myOutclass, nodeidx,
"outclass", time, 0);
166 myUsePieceAttrib =
false;
167 if (
true && ( (
true&&!(((
int64(getOutclass())==0))||((
int64(getInclass())==0)))) ) )
168 graph->
evalOpParm(myUsePieceAttrib, nodeidx,
"usepieceattrib", time, 0);
169 myPieceAttrib =
"name"_UTsh;
170 if (
true && ( (
true&&!(((getUsePieceAttrib()==0))||((
int64(getOutclass())==0))||((
int64(getInclass())==0)))) ) )
171 graph->
evalOpParm(myPieceAttrib, nodeidx,
"pieceattrib", time, 0);
174 graph->
evalOpParm(myMethod, nodeidx,
"method", time, 0);
175 myUseoutname =
false;
177 graph->
evalOpParm(myUseoutname, nodeidx,
"useoutname", time, 0);
179 if (
true && ( (
true&&!(((getUseoutname()==0)))) ) )
180 graph->
evalOpParm(myOutname, nodeidx,
"outname", time, 0);
182 if (
true && ( (
true&&!(((getUseoutname()==0)&&(
int64(getInclass())==2)&&(
int64(getOutclass())==3))||((getUseoutname()==0)&&(
int64(getInclass())==3)&&(
int64(getOutclass())==2)))) ) )
183 graph->
evalOpParm(myDeletein, nodeidx,
"deletein", time, 0);
199 template <
typename T>
206 if (idx.
size() != instance.
size()+1)
211 coerceValue(value, myInname);
214 coerceValue(value, myInclass);
217 coerceValue(value, myOutclass);
220 coerceValue(value, myUsePieceAttrib);
223 coerceValue(value, myPieceAttrib);
226 coerceValue(value, myMethod);
229 coerceValue(value, myUseoutname);
232 coerceValue(value, myOutname);
235 coerceValue(value, myDeletein);
251 { doGetParmValue(idx, instance, value); }
253 { doGetParmValue(idx, instance, value); }
255 { doGetParmValue(idx, instance, value); }
257 { doGetParmValue(idx, instance, value); }
259 { doGetParmValue(idx, instance, value); }
261 { doGetParmValue(idx, instance, value); }
263 { doGetParmValue(idx, instance, value); }
265 { doGetParmValue(idx, instance, value); }
267 { doGetParmValue(idx, instance, value); }
269 { doGetParmValue(idx, instance, value); }
271 { doGetParmValue(idx, instance, value); }
273 template <
typename T>
280 if (idx.
size() != instance.
size()+1)
285 coerceValue(myInname, ( ( value ) ));
288 coerceValue(myInclass, clampMinValue(0, clampMaxValue(3, value ) ));
291 coerceValue(myOutclass, clampMinValue(0, clampMaxValue(3, value ) ));
294 coerceValue(myUsePieceAttrib, ( ( value ) ));
297 coerceValue(myPieceAttrib, ( ( value ) ));
300 coerceValue(myMethod, clampMinValue(0, clampMaxValue(10, value ) ));
303 coerceValue(myUseoutname, ( ( value ) ));
306 coerceValue(myOutname, ( ( value ) ));
309 coerceValue(myDeletein, ( ( value ) ));
316 { doSetParmValue(idx, instance, value); }
318 { doSetParmValue(idx, instance, value); }
320 { doSetParmValue(idx, instance, value); }
322 { doSetParmValue(idx, instance, value); }
324 { doSetParmValue(idx, instance, value); }
326 { doSetParmValue(idx, instance, value); }
328 { doSetParmValue(idx, instance, value); }
330 { doSetParmValue(idx, instance, value); }
332 { doSetParmValue(idx, instance, value); }
334 { doSetParmValue(idx, instance, value); }
336 { doSetParmValue(idx, instance, value); }
352 if (fieldnum.
size() < 1)
363 return "usepieceattrib";
365 return "pieceattrib";
381 if (fieldnum.
size() < 1)
382 return PARM_UNSUPPORTED;
405 return PARM_UNSUPPORTED;
441 loadData(is, rampdata);
459 int typelen = colon - data.
buffer();
473 {
int64 iv =
v; UTwrite(os, &iv); }
475 { UTwrite<fpreal64>(os, &
v); }
477 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
479 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
480 UTwrite<fpreal64>(os, &v.
z()); }
482 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
483 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
495 if (s) s->save(ostr);
497 saveData(os, result);
504 ostr << s->getDataTypeToken();
509 saveData(os, result);
513 void save(std::ostream &os)
const
517 saveData(os, myInname);
518 saveData(os, myInclass);
519 saveData(os, myOutclass);
520 saveData(os, myUsePieceAttrib);
521 saveData(os, myPieceAttrib);
522 saveData(os, myMethod);
523 saveData(os, myUseoutname);
524 saveData(os, myOutname);
525 saveData(os, myDeletein);
538 loadData(is, myInname);
539 loadData(is, myInclass);
540 loadData(is, myOutclass);
541 loadData(is, myUsePieceAttrib);
542 loadData(is, myPieceAttrib);
543 loadData(is, myMethod);
544 loadData(is, myUseoutname);
545 loadData(is, myOutname);
546 loadData(is, myDeletein);
556 if (!thissop)
return getInname();
558 OP_Utils::evalOpParm(result, thissop,
"inname", cookparms.
getCookTime(), 0);
566 if (!thissop)
return getInclass();
568 OP_Utils::evalOpParm(result, thissop,
"inclass", cookparms.
getCookTime(), 0);
576 if (!thissop)
return getOutclass();
578 OP_Utils::evalOpParm(result, thissop,
"outclass", cookparms.
getCookTime(), 0);
586 if (!thissop)
return getUsePieceAttrib();
588 OP_Utils::evalOpParm(result, thissop,
"usepieceattrib", cookparms.
getCookTime(), 0);
596 if (!thissop)
return getPieceAttrib();
598 OP_Utils::evalOpParm(result, thissop,
"pieceattrib", cookparms.
getCookTime(), 0);
606 if (!thissop)
return getMethod();
608 OP_Utils::evalOpParm(result, thissop,
"method", cookparms.
getCookTime(), 0);
616 if (!thissop)
return getUseoutname();
618 OP_Utils::evalOpParm(result, thissop,
"useoutname", cookparms.
getCookTime(), 0);
626 if (!thissop)
return getOutname();
628 OP_Utils::evalOpParm(result, thissop,
"outname", cookparms.
getCookTime(), 0);
636 if (!thissop)
return getDeletein();
638 OP_Utils::evalOpParm(result, thissop,
"deletein", cookparms.
getCookTime(), 0);
646 bool myUsePieceAttrib;
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