38 myNmlattrib =
"N"_UTsh;
52 if (myGroup != src.myGroup)
return false;
53 if (myDivs != src.myDivs)
return false;
54 if (mySmooth != src.mySmooth)
return false;
55 if (myScale != src.myScale)
return false;
56 if (mySeed != src.mySeed)
return false;
57 if (myFixed != src.myFixed)
return false;
58 if (myVtxnms != src.myVtxnms)
return false;
59 if (myNmlattrib != src.myNmlattrib)
return false;
60 if (myDir != src.myDir)
return false;
75 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
78 graph->
evalOpParm(myDivs, nodeidx,
"divs", time, 0);
81 graph->
evalOpParm(mySmooth, nodeidx,
"smooth", time, 0);
84 graph->
evalOpParm(myScale, nodeidx,
"scale", time, 0);
87 graph->
evalOpParm(mySeed, nodeidx,
"seed", time, 0);
90 graph->
evalOpParm(myFixed, nodeidx,
"fixed", time, 0);
93 graph->
evalOpParm(myVtxnms, nodeidx,
"vtxnms", time, 0);
94 myNmlattrib =
"N"_UTsh;
95 if (
true && ( (
true&&!(((getVtxnms()==0)))) ) )
96 graph->
evalOpParm(myNmlattrib, nodeidx,
"nmlattrib", time, 0);
98 if (
true && ( (
true&&!(((getVtxnms()==1)))) ) )
99 graph->
evalOpParm(myDir, nodeidx,
"dir", time, 0);
115 template <
typename T>
122 if (idx.
size() != instance.
size()+1)
167 { doGetParmValue(idx, instance, value); }
169 { doGetParmValue(idx, instance, value); }
171 { doGetParmValue(idx, instance, value); }
173 { doGetParmValue(idx, instance, value); }
175 { doGetParmValue(idx, instance, value); }
177 { doGetParmValue(idx, instance, value); }
179 { doGetParmValue(idx, instance, value); }
181 { doGetParmValue(idx, instance, value); }
183 { doGetParmValue(idx, instance, value); }
185 { doGetParmValue(idx, instance, value); }
187 { doGetParmValue(idx, instance, value); }
189 template <
typename T>
196 if (idx.
size() != instance.
size()+1)
232 { doSetParmValue(idx, instance, value); }
234 { doSetParmValue(idx, instance, value); }
236 { doSetParmValue(idx, instance, value); }
238 { doSetParmValue(idx, instance, value); }
240 { doSetParmValue(idx, instance, value); }
242 { doSetParmValue(idx, instance, value); }
244 { doSetParmValue(idx, instance, value); }
246 { doSetParmValue(idx, instance, value); }
248 { doSetParmValue(idx, instance, value); }
250 { doSetParmValue(idx, instance, value); }
252 { doSetParmValue(idx, instance, value); }
268 if (fieldnum.
size() < 1)
297 if (fieldnum.
size() < 1)
298 return PARM_UNSUPPORTED;
357 loadData(is, rampdata);
375 int typelen = colon - data.
buffer();
389 {
int64 iv =
v; UTwrite(os, &iv); }
391 { UTwrite<fpreal64>(os, &
v); }
393 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
395 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
396 UTwrite<fpreal64>(os, &v.
z()); }
398 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
399 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
411 if (s) s->save(ostr);
413 saveData(os, result);
420 ostr << s->getDataTypeToken();
425 saveData(os, result);
429 void save(std::ostream &os)
const
433 saveData(os, myGroup);
434 saveData(os, myDivs);
435 saveData(os, mySmooth);
436 saveData(os, myScale);
437 saveData(os, mySeed);
438 saveData(os, myFixed);
439 saveData(os, myVtxnms);
440 saveData(os, myNmlattrib);
454 loadData(is, myGroup);
455 loadData(is, myDivs);
456 loadData(is, mySmooth);
457 loadData(is, myScale);
458 loadData(is, mySeed);
459 loadData(is, myFixed);
460 loadData(is, myVtxnms);
461 loadData(is, myNmlattrib);
472 if (!thissop)
return getGroup();
474 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
482 if (!thissop)
return getDivs();
484 OP_Utils::evalOpParm(result, thissop,
"divs", cookparms.
getCookTime(), 0);
492 if (!thissop)
return getSmooth();
494 OP_Utils::evalOpParm(result, thissop,
"smooth", cookparms.
getCookTime(), 0);
504 OP_Utils::evalOpParm(result, thissop,
"scale", cookparms.
getCookTime(), 0);
512 if (!thissop)
return getSeed();
514 OP_Utils::evalOpParm(result, thissop,
"seed", cookparms.
getCookTime(), 0);
522 if (!thissop)
return getFixed();
524 OP_Utils::evalOpParm(result, thissop,
"fixed", cookparms.
getCookTime(), 0);
532 if (!thissop)
return getVtxnms();
534 OP_Utils::evalOpParm(result, thissop,
"vtxnms", cookparms.
getCookTime(), 0);
542 if (!thissop)
return getNmlattrib();
544 OP_Utils::evalOpParm(result, thissop,
"nmlattrib", cookparms.
getCookTime(), 0);
552 if (!thissop)
return getDir();
554 OP_Utils::evalOpParm(result, thissop,
"dir", cookparms.
getCookTime(), 0);
bool operator!=(const SOP_FractalParms &src) const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void saveData(std::ostream &os, UT_Matrix4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, UT_Vector2D v)
SOP_Node * getNode() const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void setGroup(const UT_StringHolder &val)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
const UT_StringHolder & getGroup() const
UT_StringHolder opNmlattrib(const SOP_NodeVerb::CookParms &cookparms) const
void setScale(fpreal64 val)
const OP_Context & context() const
const UT_StringHolder & getNmlattrib() const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
bool operator==(const SOP_FractalParms &src) const
const char * getNestParmName(TempIndex fieldnum) const override
An output stream object that owns its own string buffer storage.
**But if you need a result
static void saveData(std::ostream &os, PRM_DataItemHandle s)
T clampMinValue(fpreal minvalue, const T &src) const
fpreal64 opSmooth(const SOP_NodeVerb::CookParms &cookparms) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
constexpr SYS_FORCE_INLINE T & x() noexcept
void copyFrom(const OP_NodeParms *src) override
static void loadData(UT_IStream &is, UT_Vector2I &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
static void loadData(UT_IStream &is, bool &v)
bool opVtxnms(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
bool isParmColorRamp(exint idx) const override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
constexpr SYS_FORCE_INLINE T & z() noexcept
const OP_GraphProxy * graph() const
void setNmlattrib(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getSmooth() const
bool opFixed(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3T< fpreal64 > UT_Vector3D
int64 opDivs(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
UT_Vector3D getDir() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void loadData(UT_IStream &is, fpreal64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
GT_API const UT_StringHolder version
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void saveData(std::ostream &os, UT_StringHolder s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setSmooth(fpreal64 val)
void loadFromOpSubclass(const LoadParms &loadparms) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void coerceValue(T &result, const S &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void saveData(std::ostream &os, UT_Vector4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void saveData(std::ostream &os, fpreal64 v)
DEP_MicroNode * depnode() const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
fpreal64 getScale() const
Vec3< typename MatType::value_type > getScale(const MatType &mat)
Return a Vec3 representing the lengths of the passed matrix's upper 3×3's rows.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void loadData(UT_IStream &is, UT_Vector3D &v)
bool load(UT_IStream &is)
fpreal getCookTime() const
static void loadData(UT_IStream &is, int64 &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
ParmType getNestParmType(TempIndex fieldnum) const override
void save(std::ostream &os) const
int64 opSeed(const SOP_NodeVerb::CookParms &cookparms) const
const char * findChar(int c) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
UT_Vector3D opDir(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void saveData(std::ostream &os, bool v)
static void saveData(std::ostream &os, UT_Matrix3D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
exint getNestNumParms(TempIndex idx) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setDir(UT_Vector3D val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
static void saveData(std::ostream &os, UT_Vector3D v)
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void saveData(std::ostream &os, UT_Matrix2D v)
static void saveData(std::ostream &os, int64 v)
constexpr SYS_FORCE_INLINE T & x() noexcept