23 namespace SOP_UVFuseEnums
37 using namespace UT::Literal;
57 using namespace UT::Literal;
75 using namespace UT::Literal;
94 using namespace UT::Literal;
113 using namespace UT::Literal;
114 switch (enum_value) {
132 myUvattrib =
"uv"_UTsh;
160 if (myUvattrib != src.myUvattrib)
return false;
161 if (myGroup != src.myGroup)
return false;
162 if (myGrouptype != src.myGrouptype)
return false;
163 if (myPostype != src.myPostype)
return false;
164 if (myUsedist != src.myUsedist)
return false;
165 if (myDist != src.myDist)
return false;
166 if (myMetric != src.myMetric)
return false;
167 if (myManpos != src.myManpos)
return false;
168 if (myUvw != src.myUvw)
return false;
169 if (myGridtype != src.myGridtype)
return false;
170 if (myGridspacing != src.myGridspacing)
return false;
171 if (myGridlines != src.myGridlines)
return false;
172 if (myGridpow2 != src.myGridpow2)
return false;
173 if (myGridoffset != src.myGridoffset)
return false;
174 if (myGridround != src.myGridround)
return false;
175 if (myGridtol != src.myGridtol)
return false;
196 myUvattrib =
"uv"_UTsh;
198 graph->
evalOpParm(myUvattrib, nodeidx,
"uvattrib", time, graph->
isDirect()?
nullptr:depnode);
201 graph->
evalOpParm(myGroup, nodeidx,
"group", time, graph->
isDirect()?
nullptr:depnode);
204 graph->
evalOpParm(myGrouptype, nodeidx,
"grouptype", time, graph->
isDirect()?
nullptr:depnode);
207 graph->
evalOpParm(myPostype, nodeidx,
"postype", time, graph->
isDirect()?
nullptr:depnode);
210 graph->
evalOpParm(myUsedist, nodeidx,
"usedist", time, graph->
isDirect()?
nullptr:depnode);
212 if (
true && ( (
true&&!(((getUsedist()==0)))) ) )
215 if (
true && ( (
true&&!(((getUsedist()==0)))) ) )
216 graph->
evalOpParm(myMetric, nodeidx,
"metric", time, graph->
isDirect()?
nullptr:depnode);
219 graph->
evalOpParm(myManpos, nodeidx,
"manpos", time, graph->
isDirect()?
nullptr:depnode);
225 graph->
evalOpParm(myGridtype, nodeidx,
"gridtype", time, graph->
isDirect()?
nullptr:depnode);
227 if (
true && ( (
true&&!(((
int64(getGridtype())!=0)))) ) )
228 graph->
evalOpParm(myGridspacing, nodeidx,
"gridspacing", time, graph->
isDirect()?
nullptr:depnode);
230 if (
true && ( (
true&&!(((
int64(getGridtype())!=1)))) ) )
231 graph->
evalOpParm(myGridlines, nodeidx,
"gridlines", time, graph->
isDirect()?
nullptr:depnode);
233 if (
true && ( (
true&&!(((
int64(getGridtype())!=2)))) ) )
234 graph->
evalOpParm(myGridpow2, nodeidx,
"gridpow2", time, graph->
isDirect()?
nullptr:depnode);
237 graph->
evalOpParm(myGridoffset, nodeidx,
"gridoffset", time, graph->
isDirect()?
nullptr:depnode);
240 graph->
evalOpParm(myGridround, nodeidx,
"gridround", time, graph->
isDirect()?
nullptr:depnode);
243 graph->
evalOpParm(myGridtol, nodeidx,
"gridtol", time, graph->
isDirect()?
nullptr:depnode);
259 template <
typename T>
266 if (idx.
size() != instance.
size()+1)
271 coerceValue(value, myUvattrib);
274 coerceValue(value, myGroup);
277 coerceValue(value, myGrouptype);
280 coerceValue(value, myPostype);
283 coerceValue(value, myUsedist);
286 coerceValue(value, myDist);
289 coerceValue(value, myMetric);
292 coerceValue(value, myManpos);
295 coerceValue(value, myUvw);
298 coerceValue(value, myGridtype);
301 coerceValue(value, myGridspacing);
304 coerceValue(value, myGridlines);
307 coerceValue(value, myGridpow2);
310 coerceValue(value, myGridoffset);
313 coerceValue(value, myGridround);
316 coerceValue(value, myGridtol);
332 { doGetParmValue(idx, instance, value); }
334 { doGetParmValue(idx, instance, value); }
336 { doGetParmValue(idx, instance, value); }
338 { doGetParmValue(idx, instance, value); }
340 { doGetParmValue(idx, instance, value); }
342 { doGetParmValue(idx, instance, value); }
344 { doGetParmValue(idx, instance, value); }
346 { doGetParmValue(idx, instance, value); }
348 { doGetParmValue(idx, instance, value); }
350 { doGetParmValue(idx, instance, value); }
352 { doGetParmValue(idx, instance, value); }
354 template <
typename T>
361 if (idx.
size() != instance.
size()+1)
366 coerceValue(myUvattrib, ( ( value ) ));
369 coerceValue(myGroup, ( ( value ) ));
372 coerceValue(myGrouptype, clampMinValue(0, clampMaxValue(4, value ) ));
375 coerceValue(myPostype, clampMinValue(0, clampMaxValue(1, value ) ));
378 coerceValue(myUsedist, ( ( value ) ));
381 coerceValue(myDist, clampMinValue(0, ( value ) ));
384 coerceValue(myMetric, clampMinValue(0, clampMaxValue(2, value ) ));
387 coerceValue(myManpos, ( ( value ) ));
390 coerceValue(myUvw, ( ( value ) ));
393 coerceValue(myGridtype, clampMinValue(0, clampMaxValue(2, value ) ));
396 coerceValue(myGridspacing, ( ( value ) ));
399 coerceValue(myGridlines, ( ( value ) ));
402 coerceValue(myGridpow2, ( ( value ) ));
405 coerceValue(myGridoffset, ( ( value ) ));
408 coerceValue(myGridround, clampMinValue(0, clampMaxValue(2, value ) ));
411 coerceValue(myGridtol, clampMinValue(0, ( value ) ));
418 { doSetParmValue(idx, instance, value); }
420 { doSetParmValue(idx, instance, value); }
422 { doSetParmValue(idx, instance, value); }
424 { doSetParmValue(idx, instance, value); }
426 { doSetParmValue(idx, instance, value); }
428 { doSetParmValue(idx, instance, value); }
430 { doSetParmValue(idx, instance, value); }
432 { doSetParmValue(idx, instance, value); }
434 { doSetParmValue(idx, instance, value); }
436 { doSetParmValue(idx, instance, value); }
438 { doSetParmValue(idx, instance, value); }
454 if (fieldnum.
size() < 1)
479 return "gridspacing";
497 if (fieldnum.
size() < 1)
498 return PARM_UNSUPPORTED;
535 return PARM_UNSUPPORTED;
571 loadData(is, rampdata);
589 int typelen = colon - data.
buffer();
603 {
int64 iv =
v; UTwrite(os, &iv); }
605 { UTwrite<fpreal64>(os, &
v); }
607 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
609 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
610 UTwrite<fpreal64>(os, &v.
z()); }
612 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
613 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
625 if (s) s->save(ostr);
627 saveData(os, result);
634 ostr << s->getDataTypeToken();
639 saveData(os, result);
643 void save(std::ostream &os)
const
647 saveData(os, myUvattrib);
648 saveData(os, myGroup);
649 saveData(os, myGrouptype);
650 saveData(os, myPostype);
651 saveData(os, myUsedist);
652 saveData(os, myDist);
653 saveData(os, myMetric);
654 saveData(os, myManpos);
656 saveData(os, myGridtype);
657 saveData(os, myGridspacing);
658 saveData(os, myGridlines);
659 saveData(os, myGridpow2);
660 saveData(os, myGridoffset);
661 saveData(os, myGridround);
662 saveData(os, myGridtol);
675 loadData(is, myUvattrib);
676 loadData(is, myGroup);
677 loadData(is, myGrouptype);
678 loadData(is, myPostype);
679 loadData(is, myUsedist);
680 loadData(is, myDist);
681 loadData(is, myMetric);
682 loadData(is, myManpos);
684 loadData(is, myGridtype);
685 loadData(is, myGridspacing);
686 loadData(is, myGridlines);
687 loadData(is, myGridpow2);
688 loadData(is, myGridoffset);
689 loadData(is, myGridround);
690 loadData(is, myGridtol);
700 if (!thissop)
return getUvattrib();
702 OP_Utils::evalOpParm(result, thissop,
"uvattrib", cookparms.
getCookTime(), 0);
710 if (!thissop)
return getGroup();
712 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
720 if (!thissop)
return getGrouptype();
722 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
730 if (!thissop)
return getPostype();
732 OP_Utils::evalOpParm(result, thissop,
"postype", cookparms.
getCookTime(), 0);
740 if (!thissop)
return getUsedist();
742 OP_Utils::evalOpParm(result, thissop,
"usedist", cookparms.
getCookTime(), 0);
750 if (!thissop)
return getDist();
752 OP_Utils::evalOpParm(result, thissop,
"dist", cookparms.
getCookTime(), 0);
760 if (!thissop)
return getMetric();
762 OP_Utils::evalOpParm(result, thissop,
"metric", cookparms.
getCookTime(), 0);
770 if (!thissop)
return getManpos();
772 OP_Utils::evalOpParm(result, thissop,
"manpos", cookparms.
getCookTime(), 0);
780 if (!thissop)
return getUvw();
782 OP_Utils::evalOpParm(result, thissop,
"uvw", cookparms.
getCookTime(), 0);
790 if (!thissop)
return getGridtype();
792 OP_Utils::evalOpParm(result, thissop,
"gridtype", cookparms.
getCookTime(), 0);
800 if (!thissop)
return getGridspacing();
802 OP_Utils::evalOpParm(result, thissop,
"gridspacing", cookparms.
getCookTime(), 0);
810 if (!thissop)
return getGridlines();
812 OP_Utils::evalOpParm(result, thissop,
"gridlines", cookparms.
getCookTime(), 0);
820 if (!thissop)
return getGridpow2();
822 OP_Utils::evalOpParm(result, thissop,
"gridpow2", cookparms.
getCookTime(), 0);
830 if (!thissop)
return getGridoffset();
832 OP_Utils::evalOpParm(result, thissop,
"gridoffset", cookparms.
getCookTime(), 0);
840 if (!thissop)
return getGridround();
842 OP_Utils::evalOpParm(result, thissop,
"gridround", cookparms.
getCookTime(), 0);
850 if (!thissop)
return getGridtol();
852 OP_Utils::evalOpParm(result, thissop,
"gridtol", cookparms.
getCookTime(), 0);
bool opUsedist(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
SOP_Node * getNode() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
Gridround opGridround(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void loadData(UT_IStream &is, UT_Vector4D &v)
UT_Vector3D opGridspacing(const SOP_NodeVerb::CookParms &cookparms) const
void setUsedist(bool val)
ParmType getNestParmType(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Matrix4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
Gridtype opGridtype(const SOP_NodeVerb::CookParms &cookparms) const
exint bread(int32 *buffer, exint asize=1)
UT_Vector3I opGridpow2(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
void setGrouptype(Grouptype val)
void save(std::ostream &os) const
Gridround getGridround() const
GLsizei const GLfloat * value
static void loadData(UT_IStream &is, UT_Vector2I &v)
fpreal64 opGridtol(const SOP_NodeVerb::CookParms &cookparms) const
Grouptype getGrouptype() const
Gridtype getGridtype() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, fpreal64 v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
bool load(UT_IStream &is)
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
void setGroup(const UT_StringHolder &val)
SYS_FORCE_INLINE const char * buffer() const
void copyFrom(const OP_NodeParms *src) override
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setGridtol(fpreal64 val)
static void saveData(std::ostream &os, UT_Vector2D v)
void setGridpow2(UT_Vector3I val)
**But if you need a result
UT_Vector3D getGridoffset() const
UT_Vector3T< int64 > UT_Vector3I
static void saveData(std::ostream &os, int64 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_Matrix3D &v)
static void loadData(UT_IStream &is, int64 &v)
fpreal64 opDist(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
void setGridoffset(UT_Vector3D val)
UT_Vector3D opUvw(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
exint getNestNumParms(TempIndex idx) const override
void setGridtype(Gridtype val)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void setMetric(Metric val)
void setDist(fpreal64 val)
static void loadData(UT_IStream &is, UT_Vector2D &v)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
void setGridspacing(UT_Vector3D val)
constexpr SYS_FORCE_INLINE T & z() noexcept
static void loadData(UT_IStream &is, UT_Vector3D &v)
Postype getPostype() const
UT_Vector3D getGridlines() const
const OP_GraphProxy * graph() const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
UT_Vector3T< fpreal64 > UT_Vector3D
Postype opPostype(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void loadFromOpSubclass(const LoadParms &loadparms) override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
UT_Vector3D getUvw() const
void setGridlines(UT_Vector3D val)
int64 opManpos(const SOP_NodeVerb::CookParms &cookparms) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
const char * getNestParmName(TempIndex fieldnum) const override
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_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_Matrix2D v)
static void saveData(std::ostream &os, bool v)
bool isParmColorRamp(exint idx) const override
Metric opMetric(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
SYS_FORCE_INLINE UT_StringHolder getToken(Grouptype enum_value)
void setPostype(Postype val)
DEP_MicroNode * depnode() const
static void loadData(UT_IStream &is, bool &v)
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
constexpr SYS_FORCE_INLINE T & w() noexcept
const UT_StringHolder & getGroup() const
virtual UT_StringHolder baseGetSignature() const
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setGridround(Gridround val)
fpreal getCookTime() const
static void saveData(std::ostream &os, UT_StringHolder s)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, UT_Vector3I &v)
UT_Vector3I getGridpow2() const
const char * findChar(int c) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
UT_StringHolder opUvattrib(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
bool operator==(const SOP_UVFuseParms &src) const
static void loadData(UT_IStream &is, fpreal64 &v)
Grouptype opGrouptype(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D opGridlines(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
bool operator!=(const SOP_UVFuseParms &src) const
void setUvw(UT_Vector3D val)
UT_Vector3D getGridspacing() const
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
void setUvattrib(const UT_StringHolder &val)
void setManpos(int64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
const UT_StringHolder & getUvattrib() const
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
UT_Vector3D opGridoffset(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void saveData(std::ostream &os, UT_Vector4D v)
fpreal64 getGridtol() const
constexpr SYS_FORCE_INLINE T & x() noexcept
static void saveData(std::ostream &os, UT_Vector3D v)