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;
152 graph->
evalOpParm(myBlend, nodeidx,
"blend", time, graph->
isDirect()?
nullptr:depnode);
153 myAttribs =
"*"_UTsh;
155 graph->
evalOpParm(myAttribs, nodeidx,
"attribs", time, graph->
isDirect()?
nullptr:depnode);
156 myPtIDAttr =
"id"_UTsh;
158 graph->
evalOpParm(myPtIDAttr, nodeidx,
"ptidattr", time, graph->
isDirect()?
nullptr:depnode);
159 myUnmatchedPoints = 0;
161 graph->
evalOpParm(myUnmatchedPoints, nodeidx,
"unmatchedpts", time, graph->
isDirect()?
nullptr:depnode);
162 myUnmatchedPointGroup =
"unmatched"_UTsh;
163 if (
true && ( (
true&&!(((
int64(getUnmatchedPoints())!=2)))) ) )
164 graph->
evalOpParm(myUnmatchedPointGroup, nodeidx,
"unmatchedgroup", time, graph->
isDirect()?
nullptr:depnode);
165 myPrimIDAttr =
"name"_UTsh;
167 graph->
evalOpParm(myPrimIDAttr, nodeidx,
"primidattr", time, graph->
isDirect()?
nullptr:depnode);
170 graph->
evalOpParm(myVoxelBlend, nodeidx,
"voxelblend", time, graph->
isDirect()?
nullptr:depnode);
171 myAdvectionDT = 0.0416667;
172 if (
true && ( (
true&&!(((
int64(getVoxelBlend())!=3)))) ) )
173 graph->
evalOpParm(myAdvectionDT, nodeidx,
"adt", time, graph->
isDirect()?
nullptr:depnode);
174 myVelocityField =
"vel"_UTsh;
175 if (
true && ( (
true&&!(((
int64(getVoxelBlend())!=3)))) ) )
176 graph->
evalOpParm(myVelocityField, nodeidx,
"velocity", time, graph->
isDirect()?
nullptr:depnode);
179 graph->
evalOpParm(myDoSlerp, nodeidx,
"doslerp", time, graph->
isDirect()?
nullptr:depnode);
182 graph->
evalOpParm(myInterp, nodeidx,
"interp", time, graph->
isDirect()?
nullptr:depnode);
183 myUseVForPInterp =
false;
184 if (
true && ( (
true&&!(((
int64(getInterp())!=0)))) ) )
185 graph->
evalOpParm(myUseVForPInterp, nodeidx,
"usevforpinterp", time, graph->
isDirect()?
nullptr:depnode);
187 if (
true && ( (
true&&!(((getUseVForPInterp()==0)&&(
int64(getVoxelBlend())!=3)))) ) )
188 graph->
evalOpParm(myTimeStep, nodeidx,
"timestep", time, graph->
isDirect()?
nullptr:depnode);
204 template <
typename T>
211 if (idx.
size() != instance.
size()+1)
216 coerceValue(value, myBlend);
219 coerceValue(value, myAttribs);
222 coerceValue(value, myPtIDAttr);
225 coerceValue(value, myUnmatchedPoints);
228 coerceValue(value, myUnmatchedPointGroup);
231 coerceValue(value, myPrimIDAttr);
234 coerceValue(value, myVoxelBlend);
237 coerceValue(value, myAdvectionDT);
240 coerceValue(value, myVelocityField);
243 coerceValue(value, myDoSlerp);
246 coerceValue(value, myInterp);
249 coerceValue(value, myUseVForPInterp);
252 coerceValue(value, myTimeStep);
268 { doGetParmValue(idx, instance, value); }
270 { doGetParmValue(idx, instance, value); }
272 { doGetParmValue(idx, instance, value); }
274 { doGetParmValue(idx, instance, value); }
276 { doGetParmValue(idx, instance, value); }
278 { doGetParmValue(idx, instance, value); }
280 { doGetParmValue(idx, instance, value); }
282 { doGetParmValue(idx, instance, value); }
284 { doGetParmValue(idx, instance, value); }
286 { doGetParmValue(idx, instance, value); }
288 { doGetParmValue(idx, instance, value); }
290 template <
typename T>
297 if (idx.
size() != instance.
size()+1)
302 coerceValue(myBlend, clampMinValue(0, ( value ) ));
305 coerceValue(myAttribs, ( ( value ) ));
308 coerceValue(myPtIDAttr, ( ( value ) ));
311 coerceValue(myUnmatchedPoints, clampMinValue(0, clampMaxValue(2, value ) ));
314 coerceValue(myUnmatchedPointGroup, ( ( value ) ));
317 coerceValue(myPrimIDAttr, ( ( value ) ));
320 coerceValue(myVoxelBlend, clampMinValue(0, clampMaxValue(3, value ) ));
323 coerceValue(myAdvectionDT, clampMinValue(0, ( value ) ));
326 coerceValue(myVelocityField, ( ( value ) ));
329 coerceValue(myDoSlerp, ( ( value ) ));
332 coerceValue(myInterp, clampMinValue(0, clampMaxValue(2, value ) ));
335 coerceValue(myUseVForPInterp, ( ( value ) ));
338 coerceValue(myTimeStep, clampMinValue(0, ( value ) ));
345 { doSetParmValue(idx, instance, value); }
347 { doSetParmValue(idx, instance, value); }
349 { doSetParmValue(idx, instance, value); }
351 { doSetParmValue(idx, instance, value); }
353 { doSetParmValue(idx, instance, value); }
355 { doSetParmValue(idx, instance, value); }
357 { doSetParmValue(idx, instance, value); }
359 { doSetParmValue(idx, instance, value); }
361 { doSetParmValue(idx, instance, value); }
363 { doSetParmValue(idx, instance, value); }
365 { doSetParmValue(idx, instance, value); }
381 if (fieldnum.
size() < 1)
392 return "unmatchedpts";
394 return "unmatchedgroup";
408 return "usevforpinterp";
418 if (fieldnum.
size() < 1)
419 return PARM_UNSUPPORTED;
450 return PARM_UNSUPPORTED;
486 loadData(is, rampdata);
504 int typelen = colon - data.
buffer();
518 {
int64 iv =
v; UTwrite(os, &iv); }
520 { UTwrite<fpreal64>(os, &
v); }
522 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
524 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
525 UTwrite<fpreal64>(os, &v.
z()); }
527 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
528 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
540 if (s) s->save(ostr);
542 saveData(os, result);
549 ostr << s->getDataTypeToken();
554 saveData(os, result);
558 void save(std::ostream &os)
const
562 saveData(os, myBlend);
563 saveData(os, myAttribs);
564 saveData(os, myPtIDAttr);
565 saveData(os, myUnmatchedPoints);
566 saveData(os, myUnmatchedPointGroup);
567 saveData(os, myPrimIDAttr);
568 saveData(os, myVoxelBlend);
569 saveData(os, myAdvectionDT);
570 saveData(os, myVelocityField);
571 saveData(os, myDoSlerp);
572 saveData(os, myInterp);
573 saveData(os, myUseVForPInterp);
574 saveData(os, myTimeStep);
587 loadData(is, myBlend);
588 loadData(is, myAttribs);
589 loadData(is, myPtIDAttr);
590 loadData(is, myUnmatchedPoints);
591 loadData(is, myUnmatchedPointGroup);
592 loadData(is, myPrimIDAttr);
593 loadData(is, myVoxelBlend);
594 loadData(is, myAdvectionDT);
595 loadData(is, myVelocityField);
596 loadData(is, myDoSlerp);
597 loadData(is, myInterp);
598 loadData(is, myUseVForPInterp);
599 loadData(is, myTimeStep);
609 if (!thissop)
return getBlend();
611 OP_Utils::evalOpParm(result, thissop,
"blend", cookparms.
getCookTime(), 0);
619 if (!thissop)
return getAttribs();
621 OP_Utils::evalOpParm(result, thissop,
"attribs", cookparms.
getCookTime(), 0);
629 if (!thissop)
return getPtIDAttr();
631 OP_Utils::evalOpParm(result, thissop,
"ptidattr", cookparms.
getCookTime(), 0);
639 if (!thissop)
return getUnmatchedPoints();
641 OP_Utils::evalOpParm(result, thissop,
"unmatchedpts", cookparms.
getCookTime(), 0);
649 if (!thissop)
return getUnmatchedPointGroup();
651 OP_Utils::evalOpParm(result, thissop,
"unmatchedgroup", cookparms.
getCookTime(), 0);
659 if (!thissop)
return getPrimIDAttr();
661 OP_Utils::evalOpParm(result, thissop,
"primidattr", cookparms.
getCookTime(), 0);
669 if (!thissop)
return getVoxelBlend();
671 OP_Utils::evalOpParm(result, thissop,
"voxelblend", cookparms.
getCookTime(), 0);
679 if (!thissop)
return getAdvectionDT();
681 OP_Utils::evalOpParm(result, thissop,
"adt", cookparms.
getCookTime(), 0);
689 if (!thissop)
return getVelocityField();
691 OP_Utils::evalOpParm(result, thissop,
"velocity", cookparms.
getCookTime(), 0);
699 if (!thissop)
return getDoSlerp();
701 OP_Utils::evalOpParm(result, thissop,
"doslerp", cookparms.
getCookTime(), 0);
709 if (!thissop)
return getInterp();
711 OP_Utils::evalOpParm(result, thissop,
"interp", cookparms.
getCookTime(), 0);
719 if (!thissop)
return getUseVForPInterp();
721 OP_Utils::evalOpParm(result, thissop,
"usevforpinterp", cookparms.
getCookTime(), 0);
729 if (!thissop)
return getTimeStep();
731 OP_Utils::evalOpParm(result, thissop,
"timestep", cookparms.
getCookTime(), 0);
739 int64 myUnmatchedPoints;
747 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
GLsizei const GLfloat * value
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)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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)
virtual UT_StringHolder baseGetSignature() const
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
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
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)
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