23 namespace SOP_VisibilityEnums
34 using namespace UT::Literal;
51 using namespace UT::Literal;
69 using namespace UT::Literal;
105 if (myGroup != src.myGroup)
return false;
106 if (myAction != src.myAction)
return false;
107 if (myApplyTo != src.myApplyTo)
return false;
108 if (myViewport != src.myViewport)
return false;
109 if (myCumulative != src.myCumulative)
return false;
130 graph->
evalOpParm(myGroup, nodeidx,
"group", time, graph->
isDirect()?
nullptr:depnode);
133 graph->
evalOpParm(myAction, nodeidx,
"action", time, graph->
isDirect()?
nullptr:depnode);
136 graph->
evalOpParm(myApplyTo, nodeidx,
"applyto", time, graph->
isDirect()?
nullptr:depnode);
139 graph->
evalOpParm(myViewport, nodeidx,
"viewport", time, graph->
isDirect()?
nullptr:depnode);
142 graph->
evalOpParm(myCumulative, nodeidx,
"cumulative", time, graph->
isDirect()?
nullptr:depnode);
158 template <
typename T>
165 if (idx.
size() != instance.
size()+1)
170 coerceValue(value, myGroup);
173 coerceValue(value, myAction);
176 coerceValue(value, myApplyTo);
179 coerceValue(value, myViewport);
182 coerceValue(value, myCumulative);
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 { doGetParmValue(idx, instance, value); }
210 { doGetParmValue(idx, instance, value); }
212 { doGetParmValue(idx, instance, value); }
214 { doGetParmValue(idx, instance, value); }
216 { doGetParmValue(idx, instance, value); }
218 { doGetParmValue(idx, instance, value); }
220 template <
typename T>
227 if (idx.
size() != instance.
size()+1)
232 coerceValue(myGroup, ( ( value ) ));
235 coerceValue(myAction, clampMinValue(0, clampMaxValue(1, value ) ));
238 coerceValue(myApplyTo, clampMinValue(0, clampMaxValue(1, value ) ));
241 coerceValue(myViewport, clampMinValue(0, clampMaxValue(2, value ) ));
244 coerceValue(myCumulative, ( ( 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); }
261 { doSetParmValue(idx, instance, value); }
263 { doSetParmValue(idx, instance, value); }
265 { doSetParmValue(idx, instance, value); }
267 { doSetParmValue(idx, instance, value); }
269 { doSetParmValue(idx, instance, value); }
271 { doSetParmValue(idx, instance, value); }
287 if (fieldnum.
size() < 1)
308 if (fieldnum.
size() < 1)
309 return PARM_UNSUPPORTED;
324 return PARM_UNSUPPORTED;
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, myAction);
438 saveData(os, myApplyTo);
439 saveData(os, myViewport);
440 saveData(os, myCumulative);
453 loadData(is, myGroup);
454 loadData(is, myAction);
455 loadData(is, myApplyTo);
456 loadData(is, myViewport);
457 loadData(is, myCumulative);
467 if (!thissop)
return getGroup();
469 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
477 if (!thissop)
return getAction();
479 OP_Utils::evalOpParm(result, thissop,
"action", cookparms.
getCookTime(), 0);
487 if (!thissop)
return getApplyTo();
489 OP_Utils::evalOpParm(result, thissop,
"applyto", cookparms.
getCookTime(), 0);
497 if (!thissop)
return getViewport();
499 OP_Utils::evalOpParm(result, thissop,
"viewport", cookparms.
getCookTime(), 0);
507 if (!thissop)
return getCumulative();
509 OP_Utils::evalOpParm(result, thissop,
"cumulative", cookparms.
getCookTime(), 0);
bool opCumulative(const SOP_NodeVerb::CookParms &cookparms) const
void setGroup(const UT_StringHolder &val)
SOP_Node * getNode() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
ParmType getNestParmType(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, UT_Vector4I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void saveData(std::ostream &os, UT_StringHolder s)
static void saveData(std::ostream &os, UT_Matrix4D v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
GLsizei const GLfloat * value
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
const OP_Context & context() const
static void loadData(UT_IStream &is, UT_Vector4D &v)
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
Viewport opViewport(const SOP_NodeVerb::CookParms &cookparms) const
void setApplyTo(ApplyTo val)
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, UT_Vector2D v)
static void loadData(UT_IStream &is, int64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
**But if you need a result
ApplyTo getApplyTo() const
bool operator==(const SOP_VisibilityParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setViewport(Viewport val)
bool isParmColorRamp(exint idx) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & x() noexcept
void loadFromOpSubclass(const LoadParms &loadparms) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
bool getCumulative() const
const UT_StringHolder & getGroup() const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
Action opAction(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
static void saveData(std::ostream &os, int64 v)
constexpr SYS_FORCE_INLINE T & z() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
const OP_GraphProxy * graph() const
bool load(UT_IStream &is)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
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_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void saveBinary(std::ostream &os) const
Save string to binary stream.
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
GT_API const UT_StringHolder version
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void copyFrom(const OP_NodeParms *src) override
static void loadData(UT_IStream &is, fpreal64 &v)
ApplyTo opApplyTo(const SOP_NodeVerb::CookParms &cookparms) const
Viewport getViewport() const
const char * getNestParmName(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setAction(Action val)
void setCumulative(bool val)
static void saveData(std::ostream &os, UT_Vector3D v)
bool operator!=(const SOP_VisibilityParms &src) const
DEP_MicroNode * depnode() const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
SYS_FORCE_INLINE UT_StringHolder getToken(Action enum_value)
static void loadData(UT_IStream &is, bool &v)
constexpr SYS_FORCE_INLINE T & w() noexcept
virtual UT_StringHolder baseGetSignature() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
fpreal getCookTime() const
static void saveData(std::ostream &os, bool v)
const char * findChar(int c) const
static void saveData(std::ostream &os, UT_Vector4D v)
exint getNestNumParms(TempIndex idx) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
void save(std::ostream &os) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void saveData(std::ostream &os, UT_Matrix2D v)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void saveData(std::ostream &os, fpreal64 v)
static void loadData(UT_IStream &is, UT_Vector2I &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