23 namespace SOP_SBlend_2_0Enums
56 myPtIDAttr =
"id"_UTsh;
57 myUnmatchedPoints = 0;
58 myUnmatchedPointGroup =
"unmatched"_UTsh;
59 myPrimIDAttr =
"name"_UTsh;
61 myAdvectionDT = 0.0416667;
62 myVelocityField =
"vel"_UTsh;
65 myUseVForPInterp =
false;
79 if (myBlend != src.myBlend)
return false;
80 if (myAttribs != src.myAttribs)
return false;
81 if (myPtIDAttr != src.myPtIDAttr)
return false;
82 if (myUnmatchedPoints != src.myUnmatchedPoints)
return false;
83 if (myUnmatchedPointGroup != src.myUnmatchedPointGroup)
return false;
84 if (myPrimIDAttr != src.myPrimIDAttr)
return false;
85 if (myVoxelBlend != src.myVoxelBlend)
return false;
86 if (myAdvectionDT != src.myAdvectionDT)
return false;
87 if (myVelocityField != src.myVelocityField)
return false;
88 if (myDoSlerp != src.myDoSlerp)
return false;
89 if (myInterp != src.myInterp)
return false;
90 if (myUseVForPInterp != src.myUseVForPInterp)
return false;
91 if (myTimeStep != src.myTimeStep)
return false;
109 graph->
evalOpParm(myBlend, nodeidx,
"blend", time, 0);
110 myAttribs =
"*"_UTsh;
112 graph->
evalOpParm(myAttribs, nodeidx,
"attribs", time, 0);
113 myPtIDAttr =
"id"_UTsh;
115 graph->
evalOpParm(myPtIDAttr, nodeidx,
"ptidattr", time, 0);
116 myUnmatchedPoints = 0;
118 graph->
evalOpParm(myUnmatchedPoints, nodeidx,
"unmatchedpts", time, 0);
119 myUnmatchedPointGroup =
"unmatched"_UTsh;
120 if (
true && ( (
true&&!(((
int64(getUnmatchedPoints())!=2)))) ) )
121 graph->
evalOpParm(myUnmatchedPointGroup, nodeidx,
"unmatchedgroup", time, 0);
122 myPrimIDAttr =
"name"_UTsh;
124 graph->
evalOpParm(myPrimIDAttr, nodeidx,
"primidattr", time, 0);
127 graph->
evalOpParm(myVoxelBlend, nodeidx,
"voxelblend", time, 0);
128 myAdvectionDT = 0.0416667;
129 if (
true && ( (
true&&!(((
int64(getVoxelBlend())!=3)))) ) )
130 graph->
evalOpParm(myAdvectionDT, nodeidx,
"adt", time, 0);
131 myVelocityField =
"vel"_UTsh;
132 if (
true && ( (
true&&!(((
int64(getVoxelBlend())!=3)))) ) )
133 graph->
evalOpParm(myVelocityField, nodeidx,
"velocity", time, 0);
136 graph->
evalOpParm(myDoSlerp, nodeidx,
"doslerp", time, 0);
139 graph->
evalOpParm(myInterp, nodeidx,
"interp", time, 0);
140 myUseVForPInterp =
false;
141 if (
true && ( (
true&&!(((
int64(getInterp())!=0)))) ) )
142 graph->
evalOpParm(myUseVForPInterp, nodeidx,
"usevforpinterp", time, 0);
144 if (
true && ( (
true&&!(((getUseVForPInterp()==0)&&(
int64(getVoxelBlend())!=3)))) ) )
145 graph->
evalOpParm(myTimeStep, nodeidx,
"timestep", time, 0);
161 template <
typename T>
168 if (idx.
size() != instance.
size()+1)
225 { doGetParmValue(idx, instance, value); }
227 { doGetParmValue(idx, instance, value); }
229 { doGetParmValue(idx, instance, value); }
231 { doGetParmValue(idx, instance, value); }
233 { doGetParmValue(idx, instance, value); }
235 { doGetParmValue(idx, instance, value); }
237 { doGetParmValue(idx, instance, value); }
239 { doGetParmValue(idx, instance, value); }
241 { doGetParmValue(idx, instance, value); }
243 { doGetParmValue(idx, instance, value); }
245 { doGetParmValue(idx, instance, value); }
247 template <
typename T>
254 if (idx.
size() != instance.
size()+1)
302 { doSetParmValue(idx, instance, value); }
304 { doSetParmValue(idx, instance, value); }
306 { doSetParmValue(idx, instance, value); }
308 { doSetParmValue(idx, instance, value); }
310 { doSetParmValue(idx, instance, value); }
312 { doSetParmValue(idx, instance, value); }
314 { doSetParmValue(idx, instance, value); }
316 { doSetParmValue(idx, instance, value); }
318 { doSetParmValue(idx, instance, value); }
320 { doSetParmValue(idx, instance, value); }
322 { doSetParmValue(idx, instance, value); }
338 if (fieldnum.
size() < 1)
349 return "unmatchedpts";
351 return "unmatchedgroup";
365 return "usevforpinterp";
375 if (fieldnum.
size() < 1)
376 return PARM_UNSUPPORTED;
426 {
for (
int r = 0;
r < 2;
r++)
for (
int c = 0; c < 2; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
428 {
for (
int r = 0;
r < 3;
r++)
for (
int c = 0; c < 3; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
430 {
for (
int r = 0;
r < 4;
r++)
for (
int c = 0; c < 4; c++) is.
bread<
fpreal64>(&v(
r, c), 1); }
443 loadData(is, rampdata);
461 int typelen = colon - data.
buffer();
475 {
int64 iv =
v; UTwrite(os, &iv); }
477 { UTwrite<fpreal64>(os, &
v); }
479 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
481 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
482 UTwrite<fpreal64>(os, &v.
z()); }
484 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
485 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
497 if (s) s->save(ostr);
499 saveData(os, result);
506 ostr << s->getDataTypeToken();
511 saveData(os, result);
515 void save(std::ostream &os)
const
519 saveData(os, myBlend);
520 saveData(os, myAttribs);
521 saveData(os, myPtIDAttr);
522 saveData(os, myUnmatchedPoints);
523 saveData(os, myUnmatchedPointGroup);
524 saveData(os, myPrimIDAttr);
525 saveData(os, myVoxelBlend);
526 saveData(os, myAdvectionDT);
527 saveData(os, myVelocityField);
528 saveData(os, myDoSlerp);
529 saveData(os, myInterp);
530 saveData(os, myUseVForPInterp);
531 saveData(os, myTimeStep);
544 loadData(is, myBlend);
545 loadData(is, myAttribs);
546 loadData(is, myPtIDAttr);
547 loadData(is, myUnmatchedPoints);
548 loadData(is, myUnmatchedPointGroup);
549 loadData(is, myPrimIDAttr);
550 loadData(is, myVoxelBlend);
551 loadData(is, myAdvectionDT);
552 loadData(is, myVelocityField);
553 loadData(is, myDoSlerp);
554 loadData(is, myInterp);
555 loadData(is, myUseVForPInterp);
556 loadData(is, myTimeStep);
566 if (!thissop)
return getBlend();
568 OP_Utils::evalOpParm(result, thissop,
"blend", cookparms.
getCookTime(), 0);
576 if (!thissop)
return getAttribs();
578 OP_Utils::evalOpParm(result, thissop,
"attribs", cookparms.
getCookTime(), 0);
586 if (!thissop)
return getPtIDAttr();
588 OP_Utils::evalOpParm(result, thissop,
"ptidattr", cookparms.
getCookTime(), 0);
596 if (!thissop)
return getUnmatchedPoints();
598 OP_Utils::evalOpParm(result, thissop,
"unmatchedpts", cookparms.
getCookTime(), 0);
606 if (!thissop)
return getUnmatchedPointGroup();
608 OP_Utils::evalOpParm(result, thissop,
"unmatchedgroup", cookparms.
getCookTime(), 0);
616 if (!thissop)
return getPrimIDAttr();
618 OP_Utils::evalOpParm(result, thissop,
"primidattr", cookparms.
getCookTime(), 0);
626 if (!thissop)
return getVoxelBlend();
628 OP_Utils::evalOpParm(result, thissop,
"voxelblend", cookparms.
getCookTime(), 0);
636 if (!thissop)
return getAdvectionDT();
638 OP_Utils::evalOpParm(result, thissop,
"adt", cookparms.
getCookTime(), 0);
646 if (!thissop)
return getVelocityField();
648 OP_Utils::evalOpParm(result, thissop,
"velocity", cookparms.
getCookTime(), 0);
656 if (!thissop)
return getDoSlerp();
658 OP_Utils::evalOpParm(result, thissop,
"doslerp", cookparms.
getCookTime(), 0);
666 if (!thissop)
return getInterp();
668 OP_Utils::evalOpParm(result, thissop,
"interp", cookparms.
getCookTime(), 0);
676 if (!thissop)
return getUseVForPInterp();
678 OP_Utils::evalOpParm(result, thissop,
"usevforpinterp", cookparms.
getCookTime(), 0);
686 if (!thissop)
return getTimeStep();
688 OP_Utils::evalOpParm(result, thissop,
"timestep", cookparms.
getCookTime(), 0);
696 int64 myUnmatchedPoints;
704 bool myUseVForPInterp;
exint getNestNumParms(TempIndex idx) const override
UT_StringHolder opPtIDAttr(const SOP_NodeVerb::CookParms &cookparms) const
VoxelBlend getVoxelBlend() const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void loadData(UT_IStream &is, UT_Vector3D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
SOP_Node * getNode() const
fpreal64 getAdvectionDT() const
static void saveData(std::ostream &os, UT_Vector3D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
const UT_StringHolder & getVelocityField() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
T clampMaxValue(fpreal maxvalue, const T &src) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setTimeStep(fpreal64 val)
static void saveData(std::ostream &os, UT_Vector2D v)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
Interp opInterp(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
static void loadData(UT_IStream &is, fpreal64 &v)
SYS_FORCE_INLINE const char * buffer() const
const char * getNestParmName(TempIndex fieldnum) const override
UT_StringHolder opUnmatchedPointGroup(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
bool opUseVForPInterp(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setUseVForPInterp(bool val)
void setVelocityField(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector4I &v)
void save(std::ostream &os) const
UT_StringHolder opVelocityField(const SOP_NodeVerb::CookParms &cookparms) const
**But if you need a result
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setUnmatchedPoints(UnmatchedPoints val)
UnmatchedPoints opUnmatchedPoints(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, fpreal64 v)
T clampMinValue(fpreal minvalue, const T &src) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void saveData(std::ostream &os, UT_Matrix3D v)
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 loadData(UT_IStream &is, UT_StringHolder &v)
VoxelBlend opVoxelBlend(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opAttribs(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
static void saveData(std::ostream &os, UT_StringHolder s)
static void loadData(UT_IStream &is, UT_Vector2I &v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
bool load(UT_IStream &is)
fpreal64 getTimeStep() const
constexpr SYS_FORCE_INLINE T & x() noexcept
static void loadData(UT_IStream &is, UT_Matrix4D &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
const UT_StringHolder & getPrimIDAttr() const
void setVoxelBlend(VoxelBlend val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
SYS_FORCE_INLINE const char * buffer() const
void setBlend(fpreal64 val)
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
void loadFromOpSubclass(const LoadParms &loadparms) override
constexpr SYS_FORCE_INLINE T & z() noexcept
void setAttribs(const UT_StringHolder &val)
bool operator==(const SOP_SBlend_2_0Parms &src) const
ParmType getNestParmType(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Vector4D v)
const OP_GraphProxy * graph() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
bool operator!=(const SOP_SBlend_2_0Parms &src) const
void setAdvectionDT(fpreal64 val)
static void loadData(UT_IStream &is, bool &v)
fpreal64 opAdvectionDT(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, int64 &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void saveData(std::ostream &os, UT_Matrix2D v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
void setInterp(Interp val)
static void loadData(UT_IStream &is, UT_Vector3I &v)
GT_API const UT_StringHolder version
void setPrimIDAttr(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
UnmatchedPoints getUnmatchedPoints() const
void coerceValue(T &result, const S &src) const
UT_StringHolder opPrimIDAttr(const SOP_NodeVerb::CookParms &cookparms) const
DEP_MicroNode * depnode() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
Utility class for containing a color ramp.
static void saveData(std::ostream &os, bool v)
bool isParmColorRamp(exint idx) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
fpreal64 opBlend(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
constexpr SYS_FORCE_INLINE T & w() noexcept
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setPtIDAttr(const UT_StringHolder &val)
void setDoSlerp(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
const UT_StringHolder & getPtIDAttr() const
static void saveData(std::ostream &os, UT_Matrix4D v)
fpreal getCookTime() const
const char * findChar(int c) const
void setUnmatchedPointGroup(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
fpreal64 getBlend() const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
const UT_StringHolder & getUnmatchedPointGroup() const
constexpr SYS_FORCE_INLINE T & y() noexcept
const UT_StringHolder & getAttribs() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
bool opDoSlerp(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void saveData(std::ostream &os, int64 v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
bool getUseVForPInterp() const
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
fpreal64 opTimeStep(const SOP_NodeVerb::CookParms &cookparms) const
void copyFrom(const OP_NodeParms *src) override
constexpr SYS_FORCE_INLINE T & x() noexcept