31 myUsePackedInputComponent =
false;
32 myUsePackedTargetComponent =
false;
33 myInputValidityAttribute =
"isvalid"_UTsh;
34 myTargetValidityAttribute =
"isvalid"_UTsh;
47 if (myUsePackedInputComponent != src.myUsePackedInputComponent)
return false;
48 if (myUsePackedTargetComponent != src.myUsePackedTargetComponent)
return false;
49 if (myInputValidityAttribute != src.myInputValidityAttribute)
return false;
50 if (myTargetValidityAttribute != src.myTargetValidityAttribute)
return false;
66 myUsePackedInputComponent =
false;
68 graph->
evalOpParm(myUsePackedInputComponent, nodeidx,
"usepackedinputcomponent", time, graph->
isDirect()?
nullptr:depnode);
69 myUsePackedTargetComponent =
false;
71 graph->
evalOpParm(myUsePackedTargetComponent, nodeidx,
"usepackedtargetcomponent", time, graph->
isDirect()?
nullptr:depnode);
72 myInputValidityAttribute =
"isvalid"_UTsh;
74 graph->
evalOpParm(myInputValidityAttribute, nodeidx,
"inputvalidityattribute", time, graph->
isDirect()?
nullptr:depnode);
75 myTargetValidityAttribute =
"isvalid"_UTsh;
77 graph->
evalOpParm(myTargetValidityAttribute, nodeidx,
"targetvalidityattribute", time, graph->
isDirect()?
nullptr:depnode);
100 if (idx.
size() != instance.
size()+1)
130 { doGetParmValue(idx, instance, value); }
132 { doGetParmValue(idx, instance, value); }
134 { doGetParmValue(idx, instance, value); }
136 { doGetParmValue(idx, instance, value); }
138 { doGetParmValue(idx, instance, value); }
140 { doGetParmValue(idx, instance, value); }
142 { doGetParmValue(idx, instance, value); }
144 { doGetParmValue(idx, instance, value); }
146 { doGetParmValue(idx, instance, value); }
148 { doGetParmValue(idx, instance, value); }
150 { doGetParmValue(idx, instance, value); }
152 template <
typename T>
159 if (idx.
size() != instance.
size()+1)
164 coerceValue(myUsePackedInputComponent, ( ( value ) ));
167 coerceValue(myUsePackedTargetComponent, ( ( value ) ));
170 coerceValue(myInputValidityAttribute, ( ( value ) ));
173 coerceValue(myTargetValidityAttribute, ( ( value ) ));
180 { doSetParmValue(idx, instance, value); }
182 { doSetParmValue(idx, instance, value); }
184 { doSetParmValue(idx, instance, value); }
186 { doSetParmValue(idx, instance, value); }
188 { doSetParmValue(idx, instance, value); }
190 { doSetParmValue(idx, instance, value); }
192 { doSetParmValue(idx, instance, value); }
194 { doSetParmValue(idx, instance, value); }
196 { doSetParmValue(idx, instance, value); }
198 { doSetParmValue(idx, instance, value); }
200 { doSetParmValue(idx, instance, value); }
216 if (fieldnum.
size() < 1)
221 return "usepackedinputcomponent";
223 return "usepackedtargetcomponent";
225 return "inputvalidityattribute";
227 return "targetvalidityattribute";
235 if (fieldnum.
size() < 1)
236 return PARM_UNSUPPORTED;
285 loadData(is, rampdata);
303 int typelen = colon - data.
buffer();
317 {
int64 iv =
v; UTwrite(os, &iv); }
319 { UTwrite<fpreal64>(os, &
v); }
321 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
323 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
324 UTwrite<fpreal64>(os, &v.
z()); }
326 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
327 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
339 if (s) s->save(ostr);
341 saveData(os, result);
348 ostr << s->getDataTypeToken();
353 saveData(os, result);
357 void save(std::ostream &os)
const
361 saveData(os, myUsePackedInputComponent);
362 saveData(os, myUsePackedTargetComponent);
363 saveData(os, myInputValidityAttribute);
364 saveData(os, myTargetValidityAttribute);
377 loadData(is, myUsePackedInputComponent);
378 loadData(is, myUsePackedTargetComponent);
379 loadData(is, myInputValidityAttribute);
380 loadData(is, myTargetValidityAttribute);
390 if (!thissop)
return getUsePackedInputComponent();
392 OP_Utils::evalOpParm(result, thissop,
"usepackedinputcomponent", cookparms.
getCookTime(), 0);
400 if (!thissop)
return getUsePackedTargetComponent();
402 OP_Utils::evalOpParm(result, thissop,
"usepackedtargetcomponent", cookparms.
getCookTime(), 0);
410 if (!thissop)
return getInputValidityAttribute();
412 OP_Utils::evalOpParm(result, thissop,
"inputvalidityattribute", cookparms.
getCookTime(), 0);
420 if (!thissop)
return getTargetValidityAttribute();
422 OP_Utils::evalOpParm(result, thissop,
"targetvalidityattribute", cookparms.
getCookTime(), 0);
427 bool myUsePackedInputComponent;
428 bool myUsePackedTargetComponent;
exint getNestNumParms(TempIndex idx) const override
void setTargetValidityAttribute(const UT_StringHolder &val)
const UT_StringHolder & getInputValidityAttribute() const
bool getUsePackedInputComponent() const
static void saveData(std::ostream &os, bool v)
bool getUsePackedTargetComponent() const
const UT_StringHolder & getTargetValidityAttribute() const
SOP_Node * getNode() const
void copyFrom(const OP_NodeParms *src) override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
static void saveData(std::ostream &os, UT_Vector2D v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
GLsizei const GLfloat * value
bool operator!=(const SOP_MLExampleCreateCoreParms &src) const
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
static void loadData(UT_IStream &is, UT_Vector3D &v)
SYS_FORCE_INLINE const char * buffer() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
An output stream object that owns its own string buffer storage.
**But if you need a result
void save(std::ostream &os) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void saveData(std::ostream &os, UT_Matrix3D v)
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
static void loadData(UT_IStream &is, UT_Vector3I &v)
ParmType getNestParmType(TempIndex fieldnum) const override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & x() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void loadData(UT_IStream &is, int64 &v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
bool operator==(const SOP_MLExampleCreateCoreParms &src) const
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
bool isParmColorRamp(exint idx) const override
static void saveData(std::ostream &os, UT_Matrix2D v)
static void loadData(UT_IStream &is, bool &v)
const OP_GraphProxy * graph() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void saveData(std::ostream &os, int64 v)
void setInputValidityAttribute(const UT_StringHolder &val)
bool load(UT_IStream &is)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void saveData(std::ostream &os, fpreal64 v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
void loadFromOpSubclass(const LoadParms &loadparms) override
bool opUsePackedTargetComponent(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder version
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setUsePackedTargetComponent(bool val)
static void saveData(std::ostream &os, UT_Matrix4D v)
void coerceValue(T &result, const S &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void loadData(UT_IStream &is, UT_Vector4I &v)
UT_StringHolder opInputValidityAttribute(const SOP_NodeVerb::CookParms &cookparms) const
DEP_MicroNode * depnode() const
bool opUsePackedInputComponent(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void loadData(UT_IStream &is, fpreal64 &v)
Utility class for containing a color ramp.
SOP_MLExampleCreateCoreParms()
constexpr SYS_FORCE_INLINE T & w() noexcept
virtual UT_StringHolder baseGetSignature() const
fpreal getCookTime() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
const char * findChar(int c) const
static void saveData(std::ostream &os, UT_Vector3D v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
exint bread(uint8 *buffer, exint asize=1)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setUsePackedInputComponent(bool val)
const char * getNestParmName(TempIndex fieldnum) const override
UT_StringHolder opTargetValidityAttribute(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
static void saveData(std::ostream &os, UT_StringHolder s)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void saveData(std::ostream &os, UT_Vector4D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept