23 namespace SOP_AttribFillEnums
36 using namespace UT::Literal;
56 using namespace UT::Literal;
84 myUnreachableval = -1;
85 myExtrapolationtype = 0;
86 myTangentialOnly =
false;
100 if (myMode != src.myMode)
return false;
101 if (myAttrib != src.myAttrib)
return false;
102 if (mySource != src.mySource)
return false;
103 if (myWeights != src.myWeights)
return false;
104 if (mySpeed != src.mySpeed)
return false;
105 if (myBoundary != src.myBoundary)
return false;
106 if (myMindist != src.myMindist)
return false;
107 if (myMinspeed != src.myMinspeed)
return false;
108 if (myTimestep != src.myTimestep)
return false;
109 if (myUnreachableval != src.myUnreachableval)
return false;
110 if (myExtrapolationtype != src.myExtrapolationtype)
return false;
111 if (myTangentialOnly != src.myTangentialOnly)
return false;
112 if (myVectorRotation != src.myVectorRotation)
return false;
135 graph->
evalOpParm(myAttrib, nodeidx,
"attrib", time, graph->
isDirect()?
nullptr:depnode);
137 if (
true && ( (
true&&!(((
int64(getMode())!=1)))) ) )
138 graph->
evalOpParm(mySource, nodeidx,
"source", time, graph->
isDirect()?
nullptr:depnode);
140 if (
true && ( (
true&&!(((
int64(getMode())!=1)))) ) )
141 graph->
evalOpParm(myWeights, nodeidx,
"weights", time, graph->
isDirect()?
nullptr:depnode);
143 if (
true && ( (
true&&!(((
int64(getMode())!=0)&&(
int64(getMode())!=2)))) ) )
144 graph->
evalOpParm(mySpeed, nodeidx,
"speed", time, graph->
isDirect()?
nullptr:depnode);
145 myBoundary =
""_UTsh;
147 graph->
evalOpParm(myBoundary, nodeidx,
"boundary", time, graph->
isDirect()?
nullptr:depnode);
149 if (
true && ( (
true&&!(((
int64(getMode())!=1)&&(
int64(getMode())!=2)))) ) )
150 graph->
evalOpParm(myMindist, nodeidx,
"mindist", time, graph->
isDirect()?
nullptr:depnode);
152 if (
true && ( (
true&&!(((
int64(getMode())!=2)))) ) )
153 graph->
evalOpParm(myMinspeed, nodeidx,
"minspeed", time, graph->
isDirect()?
nullptr:depnode);
155 if (
true && ( (
true&&!(((
int64(getMode())!=2)))) ) )
156 graph->
evalOpParm(myTimestep, nodeidx,
"timestep", time, graph->
isDirect()?
nullptr:depnode);
157 myUnreachableval = -1;
158 if (
true && ( (
true&&!(((
int64(getMode())!=0)))) ) )
159 graph->
evalOpParm(myUnreachableval, nodeidx,
"unreachableval", time, graph->
isDirect()?
nullptr:depnode);
160 myExtrapolationtype = 0;
161 if (
true && ( (
true&&!(((
int64(getMode())!=3)))) ) )
162 graph->
evalOpParm(myExtrapolationtype, nodeidx,
"extrapolationtype", time, graph->
isDirect()?
nullptr:depnode);
163 myTangentialOnly =
false;
164 if (
true && ( (
true&&!(((
int64(getMode())!=3))||((
int64(getExtrapolationtype())==0)))) ) )
165 graph->
evalOpParm(myTangentialOnly, nodeidx,
"tangentialonly", time, graph->
isDirect()?
nullptr:depnode);
166 myVectorRotation = 0;
167 if (
true && ( (
true&&!(((
int64(getMode())!=3))||((
int64(getExtrapolationtype())==0)))) ) )
168 graph->
evalOpParm(myVectorRotation, nodeidx,
"globalrotation", time, graph->
isDirect()?
nullptr:depnode);
184 template <
typename T>
191 if (idx.
size() != instance.
size()+1)
196 coerceValue(value, myMode);
199 coerceValue(value, myAttrib);
202 coerceValue(value, mySource);
205 coerceValue(value, myWeights);
208 coerceValue(value, mySpeed);
211 coerceValue(value, myBoundary);
214 coerceValue(value, myMindist);
217 coerceValue(value, myMinspeed);
220 coerceValue(value, myTimestep);
223 coerceValue(value, myUnreachableval);
226 coerceValue(value, myExtrapolationtype);
229 coerceValue(value, myTangentialOnly);
232 coerceValue(value, myVectorRotation);
248 { doGetParmValue(idx, instance, value); }
250 { doGetParmValue(idx, instance, value); }
252 { doGetParmValue(idx, instance, value); }
254 { doGetParmValue(idx, instance, value); }
256 { doGetParmValue(idx, instance, value); }
258 { doGetParmValue(idx, instance, value); }
260 { doGetParmValue(idx, instance, value); }
262 { doGetParmValue(idx, instance, value); }
264 { doGetParmValue(idx, instance, value); }
266 { doGetParmValue(idx, instance, value); }
268 { doGetParmValue(idx, instance, value); }
270 template <
typename T>
277 if (idx.
size() != instance.
size()+1)
282 coerceValue(myMode, clampMinValue(0, clampMaxValue(3, value ) ));
285 coerceValue(myAttrib, ( ( value ) ));
288 coerceValue(mySource, ( ( value ) ));
291 coerceValue(myWeights, ( ( value ) ));
294 coerceValue(mySpeed, ( ( value ) ));
297 coerceValue(myBoundary, ( ( value ) ));
300 coerceValue(myMindist, clampMinValue(0, ( value ) ));
303 coerceValue(myMinspeed, clampMinValue(0, ( value ) ));
306 coerceValue(myTimestep, clampMinValue(0, ( value ) ));
309 coerceValue(myUnreachableval, ( ( value ) ));
312 coerceValue(myExtrapolationtype, clampMinValue(0, clampMaxValue(2, value ) ));
315 coerceValue(myTangentialOnly, ( ( value ) ));
318 coerceValue(myVectorRotation, ( ( value ) ));
325 { doSetParmValue(idx, instance, value); }
327 { doSetParmValue(idx, instance, value); }
329 { doSetParmValue(idx, instance, value); }
331 { doSetParmValue(idx, instance, value); }
333 { doSetParmValue(idx, instance, value); }
335 { doSetParmValue(idx, instance, value); }
337 { doSetParmValue(idx, instance, value); }
339 { doSetParmValue(idx, instance, value); }
341 { doSetParmValue(idx, instance, value); }
343 { doSetParmValue(idx, instance, value); }
345 { doSetParmValue(idx, instance, value); }
361 if (fieldnum.
size() < 1)
384 return "unreachableval";
386 return "extrapolationtype";
388 return "tangentialonly";
390 return "globalrotation";
398 if (fieldnum.
size() < 1)
399 return PARM_UNSUPPORTED;
430 return PARM_UNSUPPORTED;
466 loadData(is, rampdata);
484 int typelen = colon - data.
buffer();
498 {
int64 iv =
v; UTwrite(os, &iv); }
500 { UTwrite<fpreal64>(os, &
v); }
502 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
504 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
505 UTwrite<fpreal64>(os, &v.
z()); }
507 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
508 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
520 if (s) s->save(ostr);
522 saveData(os, result);
529 ostr << s->getDataTypeToken();
534 saveData(os, result);
538 void save(std::ostream &os)
const
542 saveData(os, myMode);
543 saveData(os, myAttrib);
544 saveData(os, mySource);
545 saveData(os, myWeights);
546 saveData(os, mySpeed);
547 saveData(os, myBoundary);
548 saveData(os, myMindist);
549 saveData(os, myMinspeed);
550 saveData(os, myTimestep);
551 saveData(os, myUnreachableval);
552 saveData(os, myExtrapolationtype);
553 saveData(os, myTangentialOnly);
554 saveData(os, myVectorRotation);
567 loadData(is, myMode);
568 loadData(is, myAttrib);
569 loadData(is, mySource);
570 loadData(is, myWeights);
571 loadData(is, mySpeed);
572 loadData(is, myBoundary);
573 loadData(is, myMindist);
574 loadData(is, myMinspeed);
575 loadData(is, myTimestep);
576 loadData(is, myUnreachableval);
577 loadData(is, myExtrapolationtype);
578 loadData(is, myTangentialOnly);
579 loadData(is, myVectorRotation);
589 if (!thissop)
return getMode();
591 OP_Utils::evalOpParm(result, thissop,
"mode", cookparms.
getCookTime(), 0);
599 if (!thissop)
return getAttrib();
601 OP_Utils::evalOpParm(result, thissop,
"attrib", cookparms.
getCookTime(), 0);
611 OP_Utils::evalOpParm(result, thissop,
"source", cookparms.
getCookTime(), 0);
619 if (!thissop)
return getWeights();
621 OP_Utils::evalOpParm(result, thissop,
"weights", cookparms.
getCookTime(), 0);
629 if (!thissop)
return getSpeed();
631 OP_Utils::evalOpParm(result, thissop,
"speed", cookparms.
getCookTime(), 0);
639 if (!thissop)
return getBoundary();
641 OP_Utils::evalOpParm(result, thissop,
"boundary", cookparms.
getCookTime(), 0);
649 if (!thissop)
return getMindist();
651 OP_Utils::evalOpParm(result, thissop,
"mindist", cookparms.
getCookTime(), 0);
659 if (!thissop)
return getMinspeed();
661 OP_Utils::evalOpParm(result, thissop,
"minspeed", cookparms.
getCookTime(), 0);
669 if (!thissop)
return getTimestep();
671 OP_Utils::evalOpParm(result, thissop,
"timestep", cookparms.
getCookTime(), 0);
679 if (!thissop)
return getUnreachableval();
681 OP_Utils::evalOpParm(result, thissop,
"unreachableval", cookparms.
getCookTime(), 0);
689 if (!thissop)
return getExtrapolationtype();
691 OP_Utils::evalOpParm(result, thissop,
"extrapolationtype", cookparms.
getCookTime(), 0);
699 if (!thissop)
return getTangentialOnly();
701 OP_Utils::evalOpParm(result, thissop,
"tangentialonly", cookparms.
getCookTime(), 0);
709 if (!thissop)
return getVectorRotation();
711 OP_Utils::evalOpParm(result, thissop,
"globalrotation", cookparms.
getCookTime(), 0);
726 int64 myExtrapolationtype;
727 bool myTangentialOnly;
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)
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)
GLsizei const GLfloat * value
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
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
void setVectorRotation(fpreal64 val)
static void saveData(std::ostream &os, int64 v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
bool getTangentialOnly() const
constexpr SYS_FORCE_INLINE T & x() noexcept
fpreal64 getVectorRotation() const
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 setExtrapolationtype(Extrapolationtype val)
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
fpreal64 opVectorRotation(const SOP_NodeVerb::CookParms &cookparms) const
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 setTangentialOnly(bool val)
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 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
LeafData & operator=(const LeafData &)=delete
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
virtual UT_StringHolder baseGetSignature() const
bool opTangentialOnly(const SOP_NodeVerb::CookParms &cookparms) const
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
Extrapolationtype getExtrapolationtype() const
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
Extrapolationtype opExtrapolationtype(const SOP_NodeVerb::CookParms &cookparms) const
void loadFromOpSubclass(const LoadParms &loadparms) override
UT_StringHolder opAttrib(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE UT_StringHolder getToken(Mode enum_value)
fpreal64 getTimestep() const
constexpr SYS_FORCE_INLINE T & y() noexcept
void setSpeed(const UT_StringHolder &val)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void loadData(UT_IStream &is, fpreal64 &v)
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
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept