23 namespace SOP_SBlend_2_0Enums
35 using namespace UT::Literal;
55 using namespace UT::Literal;
75 using namespace UT::Literal;
96 myPtIDAttr =
"id"_UTsh;
97 myUnmatchedPoints = 0;
98 myUnmatchedPointGroup =
"unmatched"_UTsh;
99 myPrimIDAttr =
"name"_UTsh;
101 myAdvectionDT = 0.0416667;
102 myVelocityField =
"vel"_UTsh;
105 myUseVForPInterp =
false;
119 if (myBlend != src.myBlend)
return false;
120 if (myAttribs != src.myAttribs)
return false;
121 if (myPtIDAttr != src.myPtIDAttr)
return false;
122 if (myUnmatchedPoints != src.myUnmatchedPoints)
return false;
123 if (myUnmatchedPointGroup != src.myUnmatchedPointGroup)
return false;
124 if (myPrimIDAttr != src.myPrimIDAttr)
return false;
125 if (myVoxelBlend != src.myVoxelBlend)
return false;
126 if (myAdvectionDT != src.myAdvectionDT)
return false;
127 if (myVelocityField != src.myVelocityField)
return false;
128 if (myDoSlerp != src.myDoSlerp)
return false;
129 if (myInterp != src.myInterp)
return false;
130 if (myUseVForPInterp != src.myUseVForPInterp)
return false;
131 if (myTimeStep != src.myTimeStep)
return false;
149 graph->
evalOpParm(myBlend, nodeidx,
"blend", time, 0);
150 myAttribs =
"*"_UTsh;
152 graph->
evalOpParm(myAttribs, nodeidx,
"attribs", time, 0);
153 myPtIDAttr =
"id"_UTsh;
155 graph->
evalOpParm(myPtIDAttr, nodeidx,
"ptidattr", time, 0);
156 myUnmatchedPoints = 0;
158 graph->
evalOpParm(myUnmatchedPoints, nodeidx,
"unmatchedpts", time, 0);
159 myUnmatchedPointGroup =
"unmatched"_UTsh;
160 if (
true && ( (
true&&!(((
int64(getUnmatchedPoints())!=2)))) ) )
161 graph->
evalOpParm(myUnmatchedPointGroup, nodeidx,
"unmatchedgroup", time, 0);
162 myPrimIDAttr =
"name"_UTsh;
164 graph->
evalOpParm(myPrimIDAttr, nodeidx,
"primidattr", time, 0);
167 graph->
evalOpParm(myVoxelBlend, nodeidx,
"voxelblend", time, 0);
168 myAdvectionDT = 0.0416667;
169 if (
true && ( (
true&&!(((
int64(getVoxelBlend())!=3)))) ) )
170 graph->
evalOpParm(myAdvectionDT, nodeidx,
"adt", time, 0);
171 myVelocityField =
"vel"_UTsh;
172 if (
true && ( (
true&&!(((
int64(getVoxelBlend())!=3)))) ) )
173 graph->
evalOpParm(myVelocityField, nodeidx,
"velocity", time, 0);
176 graph->
evalOpParm(myDoSlerp, nodeidx,
"doslerp", time, 0);
179 graph->
evalOpParm(myInterp, nodeidx,
"interp", time, 0);
180 myUseVForPInterp =
false;
181 if (
true && ( (
true&&!(((
int64(getInterp())!=0)))) ) )
182 graph->
evalOpParm(myUseVForPInterp, nodeidx,
"usevforpinterp", time, 0);
184 if (
true && ( (
true&&!(((getUseVForPInterp()==0)&&(
int64(getVoxelBlend())!=3)))) ) )
185 graph->
evalOpParm(myTimeStep, nodeidx,
"timestep", time, 0);
201 template <
typename T>
208 if (idx.
size() != instance.
size()+1)
213 coerceValue(value, myBlend);
216 coerceValue(value, myAttribs);
219 coerceValue(value, myPtIDAttr);
222 coerceValue(value, myUnmatchedPoints);
225 coerceValue(value, myUnmatchedPointGroup);
228 coerceValue(value, myPrimIDAttr);
231 coerceValue(value, myVoxelBlend);
234 coerceValue(value, myAdvectionDT);
237 coerceValue(value, myVelocityField);
240 coerceValue(value, myDoSlerp);
243 coerceValue(value, myInterp);
246 coerceValue(value, myUseVForPInterp);
249 coerceValue(value, myTimeStep);
265 { doGetParmValue(idx, instance, value); }
267 { doGetParmValue(idx, instance, value); }
269 { doGetParmValue(idx, instance, value); }
271 { doGetParmValue(idx, instance, value); }
273 { doGetParmValue(idx, instance, value); }
275 { doGetParmValue(idx, instance, value); }
277 { doGetParmValue(idx, instance, value); }
279 { doGetParmValue(idx, instance, value); }
281 { doGetParmValue(idx, instance, value); }
283 { doGetParmValue(idx, instance, value); }
285 { doGetParmValue(idx, instance, value); }
287 template <
typename T>
294 if (idx.
size() != instance.
size()+1)
299 coerceValue(myBlend, clampMinValue(0, ( value ) ));
302 coerceValue(myAttribs, ( ( value ) ));
305 coerceValue(myPtIDAttr, ( ( value ) ));
308 coerceValue(myUnmatchedPoints, clampMinValue(0, clampMaxValue(2, value ) ));
311 coerceValue(myUnmatchedPointGroup, ( ( value ) ));
314 coerceValue(myPrimIDAttr, ( ( value ) ));
317 coerceValue(myVoxelBlend, clampMinValue(0, clampMaxValue(3, value ) ));
320 coerceValue(myAdvectionDT, clampMinValue(0, ( value ) ));
323 coerceValue(myVelocityField, ( ( value ) ));
326 coerceValue(myDoSlerp, ( ( value ) ));
329 coerceValue(myInterp, clampMinValue(0, clampMaxValue(2, value ) ));
332 coerceValue(myUseVForPInterp, ( ( value ) ));
335 coerceValue(myTimeStep, clampMinValue(0, ( value ) ));
342 { doSetParmValue(idx, instance, value); }
344 { doSetParmValue(idx, instance, value); }
346 { doSetParmValue(idx, instance, value); }
348 { doSetParmValue(idx, instance, value); }
350 { doSetParmValue(idx, instance, value); }
352 { doSetParmValue(idx, instance, value); }
354 { doSetParmValue(idx, instance, value); }
356 { doSetParmValue(idx, instance, value); }
358 { doSetParmValue(idx, instance, value); }
360 { doSetParmValue(idx, instance, value); }
362 { doSetParmValue(idx, instance, value); }
378 if (fieldnum.
size() < 1)
389 return "unmatchedpts";
391 return "unmatchedgroup";
405 return "usevforpinterp";
415 if (fieldnum.
size() < 1)
416 return PARM_UNSUPPORTED;
447 return PARM_UNSUPPORTED;
483 loadData(is, rampdata);
501 int typelen = colon - data.
buffer();
515 {
int64 iv =
v; UTwrite(os, &iv); }
517 { UTwrite<fpreal64>(os, &
v); }
519 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
521 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
522 UTwrite<fpreal64>(os, &v.
z()); }
524 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
525 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
537 if (s) s->save(ostr);
539 saveData(os, result);
546 ostr << s->getDataTypeToken();
551 saveData(os, result);
555 void save(std::ostream &os)
const
559 saveData(os, myBlend);
560 saveData(os, myAttribs);
561 saveData(os, myPtIDAttr);
562 saveData(os, myUnmatchedPoints);
563 saveData(os, myUnmatchedPointGroup);
564 saveData(os, myPrimIDAttr);
565 saveData(os, myVoxelBlend);
566 saveData(os, myAdvectionDT);
567 saveData(os, myVelocityField);
568 saveData(os, myDoSlerp);
569 saveData(os, myInterp);
570 saveData(os, myUseVForPInterp);
571 saveData(os, myTimeStep);
584 loadData(is, myBlend);
585 loadData(is, myAttribs);
586 loadData(is, myPtIDAttr);
587 loadData(is, myUnmatchedPoints);
588 loadData(is, myUnmatchedPointGroup);
589 loadData(is, myPrimIDAttr);
590 loadData(is, myVoxelBlend);
591 loadData(is, myAdvectionDT);
592 loadData(is, myVelocityField);
593 loadData(is, myDoSlerp);
594 loadData(is, myInterp);
595 loadData(is, myUseVForPInterp);
596 loadData(is, myTimeStep);
606 if (!thissop)
return getBlend();
608 OP_Utils::evalOpParm(result, thissop,
"blend", cookparms.
getCookTime(), 0);
616 if (!thissop)
return getAttribs();
618 OP_Utils::evalOpParm(result, thissop,
"attribs", cookparms.
getCookTime(), 0);
626 if (!thissop)
return getPtIDAttr();
628 OP_Utils::evalOpParm(result, thissop,
"ptidattr", cookparms.
getCookTime(), 0);
636 if (!thissop)
return getUnmatchedPoints();
638 OP_Utils::evalOpParm(result, thissop,
"unmatchedpts", cookparms.
getCookTime(), 0);
646 if (!thissop)
return getUnmatchedPointGroup();
648 OP_Utils::evalOpParm(result, thissop,
"unmatchedgroup", cookparms.
getCookTime(), 0);
656 if (!thissop)
return getPrimIDAttr();
658 OP_Utils::evalOpParm(result, thissop,
"primidattr", cookparms.
getCookTime(), 0);
666 if (!thissop)
return getVoxelBlend();
668 OP_Utils::evalOpParm(result, thissop,
"voxelblend", cookparms.
getCookTime(), 0);
676 if (!thissop)
return getAdvectionDT();
678 OP_Utils::evalOpParm(result, thissop,
"adt", cookparms.
getCookTime(), 0);
686 if (!thissop)
return getVelocityField();
688 OP_Utils::evalOpParm(result, thissop,
"velocity", cookparms.
getCookTime(), 0);
696 if (!thissop)
return getDoSlerp();
698 OP_Utils::evalOpParm(result, thissop,
"doslerp", cookparms.
getCookTime(), 0);
706 if (!thissop)
return getInterp();
708 OP_Utils::evalOpParm(result, thissop,
"interp", cookparms.
getCookTime(), 0);
716 if (!thissop)
return getUseVForPInterp();
718 OP_Utils::evalOpParm(result, thissop,
"usevforpinterp", cookparms.
getCookTime(), 0);
726 if (!thissop)
return getTimeStep();
728 OP_Utils::evalOpParm(result, thissop,
"timestep", cookparms.
getCookTime(), 0);
736 int64 myUnmatchedPoints;
744 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
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)
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
SYS_FORCE_INLINE UT_StringHolder getToken(UnmatchedPoints enum_value)
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
UT_StringHolder opPrimIDAttr(const SOP_NodeVerb::CookParms &cookparms) const
DEP_MicroNode * depnode() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
LeafData & operator=(const LeafData &)=delete
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)
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