31 mySetcomponents =
false;
33 myXgroup =
"@name=*.x"_UTsh;
34 myYgroup =
"@name=*.y"_UTsh;
35 myZgroup =
"@name=*.z"_UTsh;
36 myWgroup =
"@name=*.w"_UTsh;
50 if (mySetcomponents != src.mySetcomponents)
return false;
51 if (myComponents != src.myComponents)
return false;
52 if (myXgroup != src.myXgroup)
return false;
53 if (myYgroup != src.myYgroup)
return false;
54 if (myZgroup != src.myZgroup)
return false;
55 if (myWgroup != src.myWgroup)
return false;
56 if (myKeep != src.myKeep)
return false;
69 mySetcomponents =
false;
71 graph->
evalOpParm(mySetcomponents, nodeidx,
"setcomponents", time, 0);
73 if (
true && ( (
true&&!(((getSetcomponents()==0)))) ) )
74 graph->
evalOpParm(myComponents, nodeidx,
"components", time, 0);
75 myXgroup =
"@name=*.x"_UTsh;
77 graph->
evalOpParm(myXgroup, nodeidx,
"xgroup", time, 0);
78 myYgroup =
"@name=*.y"_UTsh;
79 if (
true && ( (
true&&!(((getSetcomponents()==1)&&(
int64(getComponents())<2)))) ) )
80 graph->
evalOpParm(myYgroup, nodeidx,
"ygroup", time, 0);
81 myZgroup =
"@name=*.z"_UTsh;
82 if (
true && ( (
true&&!(((getSetcomponents()==1)&&(
int64(getComponents())<3)))) ) )
83 graph->
evalOpParm(myZgroup, nodeidx,
"zgroup", time, 0);
84 myWgroup =
"@name=*.w"_UTsh;
85 if (
true && ( (
true&&!(((getSetcomponents()==1)&&(
int64(getComponents())<4)))) ) )
86 graph->
evalOpParm(myWgroup, nodeidx,
"wgroup", time, 0);
89 graph->
evalOpParm(myKeep, nodeidx,
"keep", time, 0);
105 template <
typename T>
112 if (idx.
size() != instance.
size()+1)
151 { doGetParmValue(idx, instance, value); }
153 { doGetParmValue(idx, instance, value); }
155 { doGetParmValue(idx, instance, value); }
157 { doGetParmValue(idx, instance, value); }
159 { doGetParmValue(idx, instance, value); }
161 { doGetParmValue(idx, instance, value); }
163 { doGetParmValue(idx, instance, value); }
165 { doGetParmValue(idx, instance, value); }
167 { doGetParmValue(idx, instance, value); }
169 { doGetParmValue(idx, instance, value); }
171 { doGetParmValue(idx, instance, value); }
173 template <
typename T>
180 if (idx.
size() != instance.
size()+1)
210 { doSetParmValue(idx, instance, value); }
212 { doSetParmValue(idx, instance, value); }
214 { doSetParmValue(idx, instance, value); }
216 { doSetParmValue(idx, instance, value); }
218 { doSetParmValue(idx, instance, value); }
220 { doSetParmValue(idx, instance, value); }
222 { doSetParmValue(idx, instance, value); }
224 { doSetParmValue(idx, instance, value); }
226 { doSetParmValue(idx, instance, value); }
228 { doSetParmValue(idx, instance, value); }
230 { doSetParmValue(idx, instance, value); }
246 if (fieldnum.
size() < 1)
251 return "setcomponents";
271 if (fieldnum.
size() < 1)
272 return PARM_UNSUPPORTED;
327 loadData(is, rampdata);
345 int typelen = colon - data.
buffer();
359 {
int64 iv =
v; UTwrite(os, &iv); }
361 { UTwrite<fpreal64>(os, &
v); }
363 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
365 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
366 UTwrite<fpreal64>(os, &v.
z()); }
368 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
369 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
381 if (s) s->save(ostr);
383 saveData(os, result);
390 ostr << s->getDataTypeToken();
395 saveData(os, result);
399 void save(std::ostream &os)
const
403 saveData(os, mySetcomponents);
404 saveData(os, myComponents);
405 saveData(os, myXgroup);
406 saveData(os, myYgroup);
407 saveData(os, myZgroup);
408 saveData(os, myWgroup);
409 saveData(os, myKeep);
422 loadData(is, mySetcomponents);
423 loadData(is, myComponents);
424 loadData(is, myXgroup);
425 loadData(is, myYgroup);
426 loadData(is, myZgroup);
427 loadData(is, myWgroup);
428 loadData(is, myKeep);
438 if (!thissop)
return getSetcomponents();
440 OP_Utils::evalOpParm(result, thissop,
"setcomponents", cookparms.
getCookTime(), 0);
448 if (!thissop)
return getComponents();
450 OP_Utils::evalOpParm(result, thissop,
"components", cookparms.
getCookTime(), 0);
458 if (!thissop)
return getXgroup();
460 OP_Utils::evalOpParm(result, thissop,
"xgroup", cookparms.
getCookTime(), 0);
468 if (!thissop)
return getYgroup();
470 OP_Utils::evalOpParm(result, thissop,
"ygroup", cookparms.
getCookTime(), 0);
478 if (!thissop)
return getZgroup();
480 OP_Utils::evalOpParm(result, thissop,
"zgroup", cookparms.
getCookTime(), 0);
488 if (!thissop)
return getWgroup();
490 OP_Utils::evalOpParm(result, thissop,
"wgroup", cookparms.
getCookTime(), 0);
498 if (!thissop)
return getKeep();
500 OP_Utils::evalOpParm(result, thissop,
"keep", cookparms.
getCookTime(), 0);
505 bool mySetcomponents;
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
bool opSetcomponents(const SOP_NodeVerb::CookParms &cookparms) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
const char * getNestParmName(TempIndex fieldnum) const override
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
SOP_Node * getNode() const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void loadData(UT_IStream &is, fpreal64 &v)
void setSetcomponents(bool val)
T clampMaxValue(fpreal maxvalue, const T &src) const
UT_StringHolder opYgroup(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector4D v)
static void saveData(std::ostream &os, bool v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setZgroup(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Vector2D v)
const OP_Context & context() const
exint getNestNumParms(TempIndex idx) const override
constexpr SYS_FORCE_INLINE T & z() noexcept
static void saveData(std::ostream &os, UT_Matrix2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void loadData(UT_IStream &is, UT_Vector3I &v)
SYS_FORCE_INLINE const char * buffer() const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
An output stream object that owns its own string buffer storage.
const UT_StringHolder & getXgroup() const
**But if you need a result
static void saveData(std::ostream &os, PRM_DataItemHandle s)
T clampMinValue(fpreal minvalue, const T &src) const
UT_StringHolder opXgroup(const SOP_NodeVerb::CookParms &cookparms) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void save(std::ostream &os) const
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void loadData(UT_IStream &is, UT_Vector2D &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
void copyFrom(const OP_NodeParms *src) override
static void loadData(UT_IStream &is, UT_Vector3D &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void loadFromOpSubclass(const LoadParms &loadparms) override
int64 getComponents() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setComponents(int64 val)
UT_StringHolder opWgroup(const SOP_NodeVerb::CookParms &cookparms) const
SOP_VolumeVectorJoinParms()
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
ParmType getNestParmType(TempIndex fieldnum) const override
const UT_StringHolder & getWgroup() 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
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
const OP_GraphProxy * graph() const
static void loadData(UT_IStream &is, UT_Vector4I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
UT_StringHolder opZgroup(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_Matrix4D v)
const UT_StringHolder & getYgroup() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setYgroup(const UT_StringHolder &val)
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
bool operator==(const SOP_VolumeVectorJoinParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
const UT_StringHolder & getZgroup() const
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, int64 &v)
void coerceValue(T &result, const S &src) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
DEP_MicroNode * depnode() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
int64 opComponents(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
Utility class for containing a color ramp.
static void saveData(std::ostream &os, UT_StringHolder s)
constexpr SYS_FORCE_INLINE T & w() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool operator!=(const SOP_VolumeVectorJoinParms &src) const
fpreal getCookTime() const
const char * findChar(int c) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void setXgroup(const UT_StringHolder &val)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
constexpr SYS_FORCE_INLINE T & y() noexcept
static void saveData(std::ostream &os, UT_Matrix3D v)
static void saveData(std::ostream &os, UT_Vector3D v)
bool isParmColorRamp(exint idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
bool load(UT_IStream &is)
void setWgroup(const UT_StringHolder &val)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
static void saveData(std::ostream &os, fpreal64 v)
bool getSetcomponents() const
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
OP_NodeParms & operator=(const OP_NodeParms &)=default
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool opKeep(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept