23 namespace SOP_AttribFillEnums
50 myUnreachableval = -1;
63 if (myMode != src.myMode)
return false;
64 if (myAttrib != src.myAttrib)
return false;
65 if (mySource != src.mySource)
return false;
66 if (myWeights != src.myWeights)
return false;
67 if (mySpeed != src.mySpeed)
return false;
68 if (myBoundary != src.myBoundary)
return false;
69 if (myMindist != src.myMindist)
return false;
70 if (myMinspeed != src.myMinspeed)
return false;
71 if (myTimestep != src.myTimestep)
return false;
72 if (myUnreachableval != src.myUnreachableval)
return false;
88 graph->
evalOpParm(myMode, nodeidx,
"mode", time, 0);
91 graph->
evalOpParm(myAttrib, nodeidx,
"attrib", time, 0);
93 if (
true && ( (
true&&!(((
int64(getMode())!=1)))) ) )
94 graph->
evalOpParm(mySource, nodeidx,
"source", time, 0);
96 if (
true && ( (
true&&!(((
int64(getMode())!=1)))) ) )
97 graph->
evalOpParm(myWeights, nodeidx,
"weights", time, 0);
99 if (
true && ( (
true&&!(((
int64(getMode())!=0)&&(
int64(getMode())!=2)))) ) )
100 graph->
evalOpParm(mySpeed, nodeidx,
"speed", time, 0);
101 myBoundary =
""_UTsh;
103 graph->
evalOpParm(myBoundary, nodeidx,
"boundary", time, 0);
105 if (
true && ( (
true&&!(((
int64(getMode())!=1)&&(
int64(getMode())!=2)))) ) )
106 graph->
evalOpParm(myMindist, nodeidx,
"mindist", time, 0);
108 if (
true && ( (
true&&!(((
int64(getMode())!=2)))) ) )
109 graph->
evalOpParm(myMinspeed, nodeidx,
"minspeed", time, 0);
111 if (
true && ( (
true&&!(((
int64(getMode())!=2)))) ) )
112 graph->
evalOpParm(myTimestep, nodeidx,
"timestep", time, 0);
113 myUnreachableval = -1;
114 if (
true && ( (
true&&!(((
int64(getMode())!=0)))) ) )
115 graph->
evalOpParm(myUnreachableval, nodeidx,
"unreachableval", time, 0);
131 template <
typename T>
138 if (idx.
size() != instance.
size()+1)
186 { doGetParmValue(idx, instance, value); }
188 { doGetParmValue(idx, instance, value); }
190 { doGetParmValue(idx, instance, value); }
192 { doGetParmValue(idx, instance, value); }
194 { doGetParmValue(idx, instance, value); }
196 { doGetParmValue(idx, instance, value); }
198 { doGetParmValue(idx, instance, value); }
200 { doGetParmValue(idx, instance, value); }
202 { doGetParmValue(idx, instance, value); }
204 { doGetParmValue(idx, instance, value); }
206 { doGetParmValue(idx, instance, value); }
208 template <
typename T>
215 if (idx.
size() != instance.
size()+1)
254 { doSetParmValue(idx, instance, value); }
256 { doSetParmValue(idx, instance, value); }
258 { doSetParmValue(idx, instance, value); }
260 { doSetParmValue(idx, instance, value); }
262 { doSetParmValue(idx, instance, value); }
264 { doSetParmValue(idx, instance, value); }
266 { doSetParmValue(idx, instance, value); }
268 { doSetParmValue(idx, instance, value); }
270 { doSetParmValue(idx, instance, value); }
272 { doSetParmValue(idx, instance, value); }
274 { doSetParmValue(idx, instance, value); }
290 if (fieldnum.
size() < 1)
313 return "unreachableval";
321 if (fieldnum.
size() < 1)
322 return PARM_UNSUPPORTED;
366 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
368 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
370 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
383 loadData(is, rampdata);
401 int typelen = colon - data.
buffer();
415 {
int64 iv =
v; UTwrite(os, &iv); }
417 { UTwrite<fpreal64>(os, &
v); }
419 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
421 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
422 UTwrite<fpreal64>(os, &v.
z()); }
424 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
425 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
437 if (s) s->save(ostr);
439 saveData(os, result);
446 ostr << s->getDataTypeToken();
451 saveData(os, result);
455 void save(std::ostream &os)
const
459 saveData(os, myMode);
460 saveData(os, myAttrib);
461 saveData(os, mySource);
462 saveData(os, myWeights);
463 saveData(os, mySpeed);
464 saveData(os, myBoundary);
465 saveData(os, myMindist);
466 saveData(os, myMinspeed);
467 saveData(os, myTimestep);
468 saveData(os, myUnreachableval);
481 loadData(is, myMode);
482 loadData(is, myAttrib);
483 loadData(is, mySource);
484 loadData(is, myWeights);
485 loadData(is, mySpeed);
486 loadData(is, myBoundary);
487 loadData(is, myMindist);
488 loadData(is, myMinspeed);
489 loadData(is, myTimestep);
490 loadData(is, myUnreachableval);
500 if (!thissop)
return getMode();
502 OP_Utils::evalOpParm(result, thissop,
"mode", cookparms.
getCookTime(), 0);
510 if (!thissop)
return getAttrib();
512 OP_Utils::evalOpParm(result, thissop,
"attrib", cookparms.
getCookTime(), 0);
522 OP_Utils::evalOpParm(result, thissop,
"source", cookparms.
getCookTime(), 0);
530 if (!thissop)
return getWeights();
532 OP_Utils::evalOpParm(result, thissop,
"weights", cookparms.
getCookTime(), 0);
540 if (!thissop)
return getSpeed();
542 OP_Utils::evalOpParm(result, thissop,
"speed", cookparms.
getCookTime(), 0);
550 if (!thissop)
return getBoundary();
552 OP_Utils::evalOpParm(result, thissop,
"boundary", cookparms.
getCookTime(), 0);
560 if (!thissop)
return getMindist();
562 OP_Utils::evalOpParm(result, thissop,
"mindist", cookparms.
getCookTime(), 0);
570 if (!thissop)
return getMinspeed();
572 OP_Utils::evalOpParm(result, thissop,
"minspeed", cookparms.
getCookTime(), 0);
580 if (!thissop)
return getTimestep();
582 OP_Utils::evalOpParm(result, thissop,
"timestep", cookparms.
getCookTime(), 0);
590 if (!thissop)
return getUnreachableval();
592 OP_Utils::evalOpParm(result, thissop,
"unreachableval", cookparms.
getCookTime(), 0);
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
fpreal64 opMindist(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opSpeed(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
fpreal64 opMinspeed(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix2D v)
SOP_Node * getNode() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
const UT_StringHolder & getAttrib() const
static void saveData(std::ostream &os, UT_StringHolder s)
void setMinspeed(fpreal64 val)
Mode opMode(const SOP_NodeVerb::CookParms &cookparms) const
void setUnreachableval(fpreal64 val)
T clampMaxValue(fpreal maxvalue, const T &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
exint bread(int32 *buffer, exint asize=1)
static void loadData(UT_IStream &is, UT_StringHolder &v)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
bool load(UT_IStream &is)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
ParmType getNestParmType(TempIndex fieldnum) const override
void setMindist(fpreal64 val)
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
fpreal64 opUnreachableval(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
UT_StringHolder opSource(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
bool operator!=(const SOP_AttribFillParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, UT_Vector2D &v)
**But if you need a result
T clampMinValue(fpreal minvalue, const T &src) const
const UT_StringHolder & getBoundary() const
static void saveData(std::ostream &os, bool v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
exint getNestNumParms(TempIndex idx) const override
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
fpreal64 opTimestep(const SOP_NodeVerb::CookParms &cookparms) const
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void loadData(UT_IStream &is, UT_Matrix3D &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
static void saveData(std::ostream &os, int64 v)
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
const UT_StringHolder & getWeights() const
static void loadData(UT_IStream &is, bool &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void saveData(std::ostream &os, UT_Matrix4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void saveData(std::ostream &os, UT_Vector3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void save(std::ostream &os) const
UT_StringHolder opWeights(const SOP_NodeVerb::CookParms &cookparms) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void saveData(std::ostream &os, fpreal64 v)
fpreal64 getMindist() const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
fpreal64 getUnreachableval() const
void setBoundary(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & z() noexcept
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, int64 &v)
const OP_GraphProxy * graph() const
static void saveData(std::ostream &os, UT_Vector2D v)
bool operator==(const SOP_AttribFillParms &src) const
bool isParmColorRamp(exint idx) const override
const UT_StringHolder & getSpeed() const
fpreal64 getMinspeed() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setTimestep(fpreal64 val)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void saveBinary(std::ostream &os) const
Save string to binary stream.
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
GT_API const UT_StringHolder version
void setWeights(const UT_StringHolder &val)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void copyFrom(const OP_NodeParms *src) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setSource(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void coerceValue(T &result, const S &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
DEP_MicroNode * depnode() const
void setAttrib(const UT_StringHolder &val)
Utility class for containing a color ramp.
static void saveData(std::ostream &os, UT_Matrix3D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
constexpr SYS_FORCE_INLINE T & w() noexcept
UT_StringHolder opBoundary(const SOP_NodeVerb::CookParms &cookparms) const
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
const UT_StringHolder & getSource() const
fpreal getCookTime() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void loadData(UT_IStream &is, UT_Vector3I &v)
const char * findChar(int c) const
void loadFromOpSubclass(const LoadParms &loadparms) override
UT_StringHolder opAttrib(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getTimestep() const
constexpr SYS_FORCE_INLINE T & y() noexcept
void setSpeed(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void loadData(UT_IStream &is, fpreal64 &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void saveData(std::ostream &os, UT_Vector4D v)
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