23 namespace SOP_ConvertEnums
51 using namespace UT::Literal;
97 using namespace UT::Literal;
131 using namespace UT::Literal;
132 switch (enum_value) {
153 using namespace UT::Literal;
154 switch (enum_value) {
170 using namespace UT::Literal;
171 switch (enum_value) {
198 myInterphull =
false;
218 if (myGroup != src.myGroup)
return false;
219 if (myFromtype != src.myFromtype)
return false;
220 if (myTotype != src.myTotype)
return false;
221 if (mySurftype != src.mySurftype)
return false;
222 if (myStdswitcher != src.myStdswitcher)
return false;
223 if (myOrderu != src.myOrderu)
return false;
224 if (myOrderv != src.myOrderv)
return false;
225 if (myPastecoord != src.myPastecoord)
return false;
226 if (myPasteattrib != src.myPasteattrib)
return false;
227 if (myNew != src.myNew)
return false;
228 if (myInterphull != src.myInterphull)
return false;
229 if (myOffset != src.myOffset)
return false;
230 if (myLodu != src.myLodu)
return false;
231 if (myLodv != src.myLodv)
return false;
232 if (myLodtrim != src.myLodtrim)
return false;
233 if (myDivu != src.myDivu)
return false;
234 if (myDivv != src.myDivv)
return false;
235 if (myDivtrim != src.myDivtrim)
return false;
255 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
258 graph->
evalOpParm(myFromtype, nodeidx,
"fromtype", time, 0);
261 graph->
evalOpParm(myTotype, nodeidx,
"totype", time, 0);
263 if (
true && ( (
true&&!(((
int64(getTotype())!=3)&&(
int64(getTotype())!=5)&&(
int64(getTotype())!=1)&&(
int64(getTotype())!=0)&&(
int64(getTotype())!=11)))) ) )
264 graph->
evalOpParm(mySurftype, nodeidx,
"surftype", time, 0);
267 graph->
evalOpParm(myStdswitcher, nodeidx,
"stdswitcher", time, 0);
269 if (
true && ( (
true&&!(((
int64(getTotype())!=2)&&(
int64(getTotype())!=4)&&(
int64(getTotype())!=3)&&(
int64(getTotype())!=5)))) ) )
270 graph->
evalOpParm(myOrderu, nodeidx,
"orderu", time, 0);
272 if (
true && ( (
true&&!(((
int64(getTotype())!=3)&&(
int64(getTotype())!=5)))) ) )
273 graph->
evalOpParm(myOrderv, nodeidx,
"orderv", time, 0);
276 graph->
evalOpParm(myPastecoord, nodeidx,
"pastecoord", time, 0);
279 graph->
evalOpParm(myPasteattrib, nodeidx,
"pasteattrib", time, 0);
282 graph->
evalOpParm(myNew, nodeidx,
"new", time, 0);
283 myInterphull =
false;
285 graph->
evalOpParm(myInterphull, nodeidx,
"interphull", time, 0);
288 graph->
evalOpParm(myOffset, nodeidx,
"offset", time, 0);
290 if (
true && ( (
true&&!(((getInterphull()==1)))) ) )
291 graph->
evalOpParm(myLodu, nodeidx,
"lodu", time, 0);
293 if (
true && ( (
true&&!(((getInterphull()==1)))) ) )
294 graph->
evalOpParm(myLodv, nodeidx,
"lodv", time, 0);
296 if (
true && ( (
true&&!(((getInterphull()==1)))) ) )
297 graph->
evalOpParm(myLodtrim, nodeidx,
"lodtrim", time, 0);
299 if (
true && ( (
true&&!(((getInterphull()==1)))) ) )
300 graph->
evalOpParm(myDivu, nodeidx,
"divu", time, 0);
302 if (
true && ( (
true&&!(((getInterphull()==1)))) ) )
303 graph->
evalOpParm(myDivv, nodeidx,
"divv", time, 0);
305 if (
true && ( (
true&&!(((getInterphull()==1)))) ) )
306 graph->
evalOpParm(myDivtrim, nodeidx,
"divtrim", time, 0);
322 template <
typename T>
329 if (idx.
size() != instance.
size()+1)
334 coerceValue(value, myGroup);
337 coerceValue(value, myFromtype);
340 coerceValue(value, myTotype);
343 coerceValue(value, mySurftype);
346 coerceValue(value, myStdswitcher);
349 coerceValue(value, myOrderu);
352 coerceValue(value, myOrderv);
355 coerceValue(value, myPastecoord);
358 coerceValue(value, myPasteattrib);
361 coerceValue(value, myNew);
364 coerceValue(value, myInterphull);
367 coerceValue(value, myOffset);
370 coerceValue(value, myLodu);
373 coerceValue(value, myLodv);
376 coerceValue(value, myLodtrim);
379 coerceValue(value, myDivu);
382 coerceValue(value, myDivv);
385 coerceValue(value, myDivtrim);
401 { doGetParmValue(idx, instance, value); }
403 { doGetParmValue(idx, instance, value); }
405 { doGetParmValue(idx, instance, value); }
407 { doGetParmValue(idx, instance, value); }
409 { doGetParmValue(idx, instance, value); }
411 { doGetParmValue(idx, instance, value); }
413 { doGetParmValue(idx, instance, value); }
415 { doGetParmValue(idx, instance, value); }
417 { doGetParmValue(idx, instance, value); }
419 { doGetParmValue(idx, instance, value); }
421 { doGetParmValue(idx, instance, value); }
423 template <
typename T>
430 if (idx.
size() != instance.
size()+1)
435 coerceValue(myGroup, ( ( value ) ));
438 coerceValue(myFromtype, clampMinValue(0, clampMaxValue(18, value ) ));
441 coerceValue(myTotype, clampMinValue(0, clampMaxValue(13, value ) ));
444 coerceValue(mySurftype, clampMinValue(0, clampMaxValue(6, value ) ));
447 coerceValue(myStdswitcher, ( ( value ) ));
450 coerceValue(myOrderu, clampMinValue(2, clampMaxValue(11, value ) ));
453 coerceValue(myOrderv, clampMinValue(2, clampMaxValue(11, value ) ));
456 coerceValue(myPastecoord, clampMinValue(0, clampMaxValue(1, value ) ));
459 coerceValue(myPasteattrib, clampMinValue(0, clampMaxValue(1, value ) ));
462 coerceValue(myNew, ( ( value ) ));
465 coerceValue(myInterphull, ( ( value ) ));
468 coerceValue(myOffset, ( ( value ) ));
471 coerceValue(myLodu, clampMinValue(0.001, ( value ) ));
474 coerceValue(myLodv, clampMinValue(0.001, ( value ) ));
477 coerceValue(myLodtrim, clampMinValue(0.001, ( value ) ));
480 coerceValue(myDivu, clampMinValue(0, ( value ) ));
483 coerceValue(myDivv, clampMinValue(0, ( value ) ));
486 coerceValue(myDivtrim, clampMinValue(1, ( value ) ));
493 { doSetParmValue(idx, instance, value); }
495 { doSetParmValue(idx, instance, value); }
497 { doSetParmValue(idx, instance, value); }
499 { doSetParmValue(idx, instance, value); }
501 { doSetParmValue(idx, instance, value); }
503 { doSetParmValue(idx, instance, value); }
505 { doSetParmValue(idx, instance, value); }
507 { doSetParmValue(idx, instance, value); }
509 { doSetParmValue(idx, instance, value); }
511 { doSetParmValue(idx, instance, value); }
513 { doSetParmValue(idx, instance, value); }
529 if (fieldnum.
size() < 1)
542 return "stdswitcher";
550 return "pasteattrib";
576 if (fieldnum.
size() < 1)
577 return PARM_UNSUPPORTED;
618 return PARM_UNSUPPORTED;
654 loadData(is, rampdata);
672 int typelen = colon - data.
buffer();
686 {
int64 iv =
v; UTwrite(os, &iv); }
688 { UTwrite<fpreal64>(os, &
v); }
690 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
692 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
693 UTwrite<fpreal64>(os, &v.
z()); }
695 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
696 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
708 if (s) s->save(ostr);
710 saveData(os, result);
717 ostr << s->getDataTypeToken();
722 saveData(os, result);
726 void save(std::ostream &os)
const
730 saveData(os, myGroup);
731 saveData(os, myFromtype);
732 saveData(os, myTotype);
733 saveData(os, mySurftype);
734 saveData(os, myStdswitcher);
735 saveData(os, myOrderu);
736 saveData(os, myOrderv);
737 saveData(os, myPastecoord);
738 saveData(os, myPasteattrib);
740 saveData(os, myInterphull);
741 saveData(os, myOffset);
742 saveData(os, myLodu);
743 saveData(os, myLodv);
744 saveData(os, myLodtrim);
745 saveData(os, myDivu);
746 saveData(os, myDivv);
747 saveData(os, myDivtrim);
760 loadData(is, myGroup);
761 loadData(is, myFromtype);
762 loadData(is, myTotype);
763 loadData(is, mySurftype);
764 loadData(is, myStdswitcher);
765 loadData(is, myOrderu);
766 loadData(is, myOrderv);
767 loadData(is, myPastecoord);
768 loadData(is, myPasteattrib);
770 loadData(is, myInterphull);
771 loadData(is, myOffset);
772 loadData(is, myLodu);
773 loadData(is, myLodv);
774 loadData(is, myLodtrim);
775 loadData(is, myDivu);
776 loadData(is, myDivv);
777 loadData(is, myDivtrim);
787 if (!thissop)
return getGroup();
789 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
797 if (!thissop)
return getFromtype();
799 OP_Utils::evalOpParm(result, thissop,
"fromtype", cookparms.
getCookTime(), 0);
807 if (!thissop)
return getTotype();
809 OP_Utils::evalOpParm(result, thissop,
"totype", cookparms.
getCookTime(), 0);
817 if (!thissop)
return getSurftype();
819 OP_Utils::evalOpParm(result, thissop,
"surftype", cookparms.
getCookTime(), 0);
827 if (!thissop)
return getStdswitcher();
829 OP_Utils::evalOpParm(result, thissop,
"stdswitcher", cookparms.
getCookTime(), 0);
837 if (!thissop)
return getOrderu();
839 OP_Utils::evalOpParm(result, thissop,
"orderu", cookparms.
getCookTime(), 0);
847 if (!thissop)
return getOrderv();
849 OP_Utils::evalOpParm(result, thissop,
"orderv", cookparms.
getCookTime(), 0);
857 if (!thissop)
return getPastecoord();
859 OP_Utils::evalOpParm(result, thissop,
"pastecoord", cookparms.
getCookTime(), 0);
867 if (!thissop)
return getPasteattrib();
869 OP_Utils::evalOpParm(result, thissop,
"pasteattrib", cookparms.
getCookTime(), 0);
877 if (!thissop)
return getNew();
879 OP_Utils::evalOpParm(result, thissop,
"new", cookparms.
getCookTime(), 0);
887 if (!thissop)
return getInterphull();
889 OP_Utils::evalOpParm(result, thissop,
"interphull", cookparms.
getCookTime(), 0);
897 if (!thissop)
return getOffset();
899 OP_Utils::evalOpParm(result, thissop,
"offset", cookparms.
getCookTime(), 0);
907 if (!thissop)
return getLodu();
909 OP_Utils::evalOpParm(result, thissop,
"lodu", cookparms.
getCookTime(), 0);
917 if (!thissop)
return getLodv();
919 OP_Utils::evalOpParm(result, thissop,
"lodv", cookparms.
getCookTime(), 0);
927 if (!thissop)
return getLodtrim();
929 OP_Utils::evalOpParm(result, thissop,
"lodtrim", cookparms.
getCookTime(), 0);
937 if (!thissop)
return getDivu();
939 OP_Utils::evalOpParm(result, thissop,
"divu", cookparms.
getCookTime(), 0);
947 if (!thissop)
return getDivv();
949 OP_Utils::evalOpParm(result, thissop,
"divv", cookparms.
getCookTime(), 0);
957 if (!thissop)
return getDivtrim();
959 OP_Utils::evalOpParm(result, thissop,
"divtrim", cookparms.
getCookTime(), 0);
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void saveData(std::ostream &os, UT_StringHolder s)
fpreal64 opLodu(const SOP_NodeVerb::CookParms &cookparms) const
int64 opOrderu(const SOP_NodeVerb::CookParms &cookparms) const
int64 opOrderv(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, int64 v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
SOP_Node * getNode() const
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool operator==(const SOP_ConvertParms &src) const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Fromtype opFromtype(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
Totype opTotype(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
void setSurftype(Surftype val)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
constexpr SYS_FORCE_INLINE T & z() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
SYS_FORCE_INLINE const char * buffer() const
bool isParmColorRamp(exint idx) const override
Pasteattrib getPasteattrib() const
void save(std::ostream &os) const
static void saveData(std::ostream &os, UT_Vector2D v)
An output stream object that owns its own string buffer storage.
int64 getStdswitcher() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
**But if you need a result
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setLodv(fpreal64 val)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
Pastecoord getPastecoord() const
static void saveData(std::ostream &os, UT_Matrix2D v)
constexpr SYS_FORCE_INLINE T & x() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Surftype opSurftype(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector3D v)
void setLodu(fpreal64 val)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
constexpr SYS_FORCE_INLINE T & z() noexcept
static void saveData(std::ostream &os, UT_Matrix4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
const OP_GraphProxy * graph() const
fpreal64 getLodtrim() const
void setGroup(const UT_StringHolder &val)
static void saveData(std::ostream &os, fpreal64 v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setPastecoord(Pastecoord val)
static void saveData(std::ostream &os, bool v)
Fromtype getFromtype() const
SYS_FORCE_INLINE UT_StringHolder getToken(Fromtype enum_value)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setTotype(Totype val)
void setOffset(fpreal64 val)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setPasteattrib(Pasteattrib val)
void setInterphull(bool val)
Pastecoord opPastecoord(const SOP_NodeVerb::CookParms &cookparms) const
void setStdswitcher(int64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
const UT_StringHolder & getGroup() const
static void saveData(std::ostream &os, UT_Matrix3D v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, PRM_DataItemHandle s)
exint getNestNumParms(TempIndex idx) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
fpreal64 opOffset(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
int64 opDivtrim(const SOP_NodeVerb::CookParms &cookparms) const
void setDivtrim(int64 val)
static void saveData(std::ostream &os, UT_Vector4D v)
void loadFromOpSubclass(const LoadParms &loadparms) override
bool getInterphull() const
void setOrderu(int64 val)
int64 opDivv(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opLodtrim(const SOP_NodeVerb::CookParms &cookparms) const
void setOrderv(int64 val)
DEP_MicroNode * depnode() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
bool opNew(const SOP_NodeVerb::CookParms &cookparms) const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
ParmType getNestParmType(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Vector2D &v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getOffset() const
constexpr SYS_FORCE_INLINE T & w() noexcept
bool opInterphull(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void copyFrom(const OP_NodeParms *src) override
bool operator!=(const SOP_ConvertParms &src) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
int64 opStdswitcher(const SOP_NodeVerb::CookParms &cookparms) const
fpreal getCookTime() const
const char * findChar(int c) const
int64 opDivu(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, int64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
static void loadData(UT_IStream &is, UT_Matrix2D &v)
fpreal64 opLodv(const SOP_NodeVerb::CookParms &cookparms) const
bool load(UT_IStream &is)
void setFromtype(Fromtype val)
void setLodtrim(fpreal64 val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, UT_Vector3I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
Surftype getSurftype() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Pasteattrib opPasteattrib(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept