23 namespace SOP_PackInjectEnums
51 myMatchAttrib =
"name"_UTsh;
52 mySrcAttrib =
"name"_UTsh;
53 myIgnoremissing =
true;
54 myPreservetype =
true;
67 if (myGroup != src.myGroup)
return false;
68 if (myMethod != src.myMethod)
return false;
69 if (myCollate != src.myCollate)
return false;
70 if (mySource != src.mySource)
return false;
71 if (myMatchAttrib != src.myMatchAttrib)
return false;
72 if (mySrcAttrib != src.mySrcAttrib)
return false;
73 if (myIgnoremissing != src.myIgnoremissing)
return false;
74 if (myPreservetype != src.myPreservetype)
return false;
91 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
94 graph->
evalOpParm(myMethod, nodeidx,
"method", time, 0);
96 if (
true && ( (
true&&!(((
int64(getMethod())!=1)))) ) )
97 graph->
evalOpParm(myCollate, nodeidx,
"collate", time, 0);
99 if (
true && ( (
true&&!(((
int64(getMethod())!=1))||((
int64(getCollate())!=0)))) ) )
100 graph->
evalOpParm(mySource, nodeidx,
"source", time, 0);
101 myMatchAttrib =
"name"_UTsh;
102 if (
true && ( (
true&&!(((
int64(getMethod())!=1))||((
int64(getCollate())==1)&&(
int64(getCollate())==0)))) ) )
103 graph->
evalOpParm(myMatchAttrib, nodeidx,
"matchattrib", time, 0);
104 mySrcAttrib =
"name"_UTsh;
105 if (
true && ( (
true&&!(((
int64(getMethod())!=1))||((
int64(getCollate())!=3)))) ) )
106 graph->
evalOpParm(mySrcAttrib, nodeidx,
"srcattrib", time, 0);
107 myIgnoremissing =
true;
108 if (
true && ( (
true&&!(((
int64(getMethod())!=1)))) ) )
109 graph->
evalOpParm(myIgnoremissing, nodeidx,
"ignoremissing", time, 0);
110 myPreservetype =
true;
111 if (
true && ( (
true&&!(((
int64(getMethod())!=1)))) ) )
112 graph->
evalOpParm(myPreservetype, nodeidx,
"preservetype", time, 0);
128 template <
typename T>
135 if (idx.
size() != instance.
size()+1)
177 { doGetParmValue(idx, instance, value); }
179 { doGetParmValue(idx, instance, value); }
181 { doGetParmValue(idx, instance, value); }
183 { doGetParmValue(idx, instance, value); }
185 { doGetParmValue(idx, instance, value); }
187 { doGetParmValue(idx, instance, value); }
189 { doGetParmValue(idx, instance, value); }
191 { doGetParmValue(idx, instance, value); }
193 { doGetParmValue(idx, instance, value); }
195 { doGetParmValue(idx, instance, value); }
197 { doGetParmValue(idx, instance, value); }
199 template <
typename T>
206 if (idx.
size() != instance.
size()+1)
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); }
257 { doSetParmValue(idx, instance, value); }
259 { doSetParmValue(idx, instance, value); }
275 if (fieldnum.
size() < 1)
288 return "matchattrib";
292 return "ignoremissing";
294 return "preservetype";
302 if (fieldnum.
size() < 1)
303 return PARM_UNSUPPORTED;
343 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
345 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
347 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
360 loadData(is, rampdata);
378 int typelen = colon - data.
buffer();
392 {
int64 iv =
v; UTwrite(os, &iv); }
394 { UTwrite<fpreal64>(os, &
v); }
396 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
398 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
399 UTwrite<fpreal64>(os, &v.
z()); }
401 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
402 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
414 if (s) s->save(ostr);
416 saveData(os, result);
423 ostr << s->getDataTypeToken();
428 saveData(os, result);
432 void save(std::ostream &os)
const
436 saveData(os, myGroup);
437 saveData(os, myMethod);
438 saveData(os, myCollate);
439 saveData(os, mySource);
440 saveData(os, myMatchAttrib);
441 saveData(os, mySrcAttrib);
442 saveData(os, myIgnoremissing);
443 saveData(os, myPreservetype);
456 loadData(is, myGroup);
457 loadData(is, myMethod);
458 loadData(is, myCollate);
459 loadData(is, mySource);
460 loadData(is, myMatchAttrib);
461 loadData(is, mySrcAttrib);
462 loadData(is, myIgnoremissing);
463 loadData(is, myPreservetype);
473 if (!thissop)
return getGroup();
475 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
483 if (!thissop)
return getMethod();
485 OP_Utils::evalOpParm(result, thissop,
"method", cookparms.
getCookTime(), 0);
493 if (!thissop)
return getCollate();
495 OP_Utils::evalOpParm(result, thissop,
"collate", cookparms.
getCookTime(), 0);
505 OP_Utils::evalOpParm(result, thissop,
"source", cookparms.
getCookTime(), 0);
513 if (!thissop)
return getMatchAttrib();
515 OP_Utils::evalOpParm(result, thissop,
"matchattrib", cookparms.
getCookTime(), 0);
523 if (!thissop)
return getSrcAttrib();
525 OP_Utils::evalOpParm(result, thissop,
"srcattrib", cookparms.
getCookTime(), 0);
533 if (!thissop)
return getIgnoremissing();
535 OP_Utils::evalOpParm(result, thissop,
"ignoremissing", cookparms.
getCookTime(), 0);
543 if (!thissop)
return getPreservetype();
545 OP_Utils::evalOpParm(result, thissop,
"preservetype", cookparms.
getCookTime(), 0);
556 bool myIgnoremissing;
bool opPreservetype(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
const UT_StringHolder & getGroup() const
static void loadData(UT_IStream &is, fpreal64 &v)
SOP_Node * getNode() const
T clampMaxValue(fpreal maxvalue, const T &src) const
static void loadData(UT_IStream &is, int64 &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void setPreservetype(bool val)
void copyFrom(const OP_NodeParms *src) override
static void saveData(std::ostream &os, UT_Vector2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void loadData(UT_IStream &is, UT_Vector4I &v)
const OP_Context & context() const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & z() noexcept
void setCollate(Collate val)
bool operator==(const SOP_PackInjectParms &src) const
SYS_FORCE_INLINE const char * buffer() const
bool operator!=(const SOP_PackInjectParms &src) const
static void saveData(std::ostream &os, bool v)
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
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void loadFromOpSubclass(const LoadParms &loadparms) override
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void saveData(std::ostream &os, UT_StringHolder s)
void setGroup(const UT_StringHolder &val)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void saveData(std::ostream &os, UT_Matrix4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
const UT_StringHolder & getSrcAttrib() const
constexpr SYS_FORCE_INLINE T & x() noexcept
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setMatchAttrib(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & x() noexcept
static void saveData(std::ostream &os, UT_Vector3D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void loadData(UT_IStream &is, UT_Vector3I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
ParmType getNestParmType(TempIndex fieldnum) const override
bool opIgnoremissing(const SOP_NodeVerb::CookParms &cookparms) const
const char * getNestParmName(TempIndex fieldnum) const override
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
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
bool load(UT_IStream &is)
static void loadData(UT_IStream &is, UT_Vector3D &v)
bool getIgnoremissing() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
UT_StringHolder opMatchAttrib(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, int64 v)
bool getPreservetype() const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void save(std::ostream &os) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
const UT_StringHolder & getMatchAttrib() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
UT_StringHolder opSrcAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void coerceValue(T &result, const S &src) const
Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setSource(int64 val)
exint getNestNumParms(TempIndex idx) const override
DEP_MicroNode * depnode() const
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setSrcAttrib(const UT_StringHolder &val)
fpreal getCookTime() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void saveData(std::ostream &os, fpreal64 v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
const char * findChar(int c) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void loadData(UT_IStream &is, bool &v)
int64 opSource(const SOP_NodeVerb::CookParms &cookparms) const
bool isParmColorRamp(exint idx) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setIgnoremissing(bool val)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setMethod(Method val)
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
Collate getCollate() const
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
Collate opCollate(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
static void saveData(std::ostream &os, UT_Vector4D v)