23 namespace SOP_VisibilityEnums
68 if (myGroup != src.myGroup)
return false;
69 if (myAction != src.myAction)
return false;
70 if (myApplyTo != src.myApplyTo)
return false;
71 if (myViewport != src.myViewport)
return false;
72 if (myCumulative != src.myCumulative)
return false;
90 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
93 graph->
evalOpParm(myAction, nodeidx,
"action", time, 0);
96 graph->
evalOpParm(myApplyTo, nodeidx,
"applyto", time, 0);
99 graph->
evalOpParm(myViewport, nodeidx,
"viewport", time, 0);
102 graph->
evalOpParm(myCumulative, nodeidx,
"cumulative", time, 0);
118 template <
typename T>
125 if (idx.
size() != instance.
size()+1)
158 { doGetParmValue(idx, instance, value); }
160 { doGetParmValue(idx, instance, value); }
162 { doGetParmValue(idx, instance, value); }
164 { doGetParmValue(idx, instance, value); }
166 { doGetParmValue(idx, instance, value); }
168 { doGetParmValue(idx, instance, value); }
170 { doGetParmValue(idx, instance, value); }
172 { doGetParmValue(idx, instance, value); }
174 { doGetParmValue(idx, instance, value); }
176 { doGetParmValue(idx, instance, value); }
178 { doGetParmValue(idx, instance, value); }
180 template <
typename T>
187 if (idx.
size() != instance.
size()+1)
211 { doSetParmValue(idx, instance, value); }
213 { doSetParmValue(idx, instance, value); }
215 { doSetParmValue(idx, instance, value); }
217 { doSetParmValue(idx, instance, value); }
219 { doSetParmValue(idx, instance, value); }
221 { doSetParmValue(idx, instance, value); }
223 { doSetParmValue(idx, instance, value); }
225 { doSetParmValue(idx, instance, value); }
227 { doSetParmValue(idx, instance, value); }
229 { doSetParmValue(idx, instance, value); }
231 { doSetParmValue(idx, instance, value); }
247 if (fieldnum.
size() < 1)
268 if (fieldnum.
size() < 1)
269 return PARM_UNSUPPORTED;
303 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
305 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
307 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
320 loadData(is, rampdata);
338 int typelen = colon - data.
buffer();
352 {
int64 iv =
v; UTwrite(os, &iv); }
354 { UTwrite<fpreal64>(os, &
v); }
356 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
358 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
359 UTwrite<fpreal64>(os, &v.
z()); }
361 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
362 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
374 if (s) s->save(ostr);
376 saveData(os, result);
383 ostr << s->getDataTypeToken();
388 saveData(os, result);
392 void save(std::ostream &os)
const
396 saveData(os, myGroup);
397 saveData(os, myAction);
398 saveData(os, myApplyTo);
399 saveData(os, myViewport);
400 saveData(os, myCumulative);
413 loadData(is, myGroup);
414 loadData(is, myAction);
415 loadData(is, myApplyTo);
416 loadData(is, myViewport);
417 loadData(is, myCumulative);
427 if (!thissop)
return getGroup();
429 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
437 if (!thissop)
return getAction();
439 OP_Utils::evalOpParm(result, thissop,
"action", cookparms.
getCookTime(), 0);
447 if (!thissop)
return getApplyTo();
449 OP_Utils::evalOpParm(result, thissop,
"applyto", cookparms.
getCookTime(), 0);
457 if (!thissop)
return getViewport();
459 OP_Utils::evalOpParm(result, thissop,
"viewport", cookparms.
getCookTime(), 0);
467 if (!thissop)
return getCumulative();
469 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)
T clampMaxValue(fpreal maxvalue, const T &src) const
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)
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
T clampMinValue(fpreal minvalue, const T &src) 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
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 coerceValue(T &result, const S &src) const
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
Utility class for containing a color ramp.
static void loadData(UT_IStream &is, bool &v)
constexpr SYS_FORCE_INLINE T & w() noexcept
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)
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)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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