23 namespace SOP_UVTransform_2_0Enums
37 using namespace UT::Literal;
61 using namespace UT::Literal;
86 using namespace UT::Literal;
109 using namespace UT::Literal;
110 switch (enum_value) {
129 using namespace UT::Literal;
130 switch (enum_value) {
148 using namespace UT::Literal;
149 switch (enum_value) {
169 myUVAttrib =
"uv"_UTsh;
180 myKernel =
"wyvill"_UTsh;
184 myVisualizefalloff = 2;
197 if (myGroup != src.myGroup)
return false;
198 if (myGroupType != src.myGroupType)
return false;
199 if (myUVAttrib != src.myUVAttrib)
return false;
200 if (myXOrd != src.myXOrd)
return false;
201 if (myROrd != src.myROrd)
return false;
202 if (myT != src.myT)
return false;
203 if (myR != src.myR)
return false;
204 if (myS != src.myS)
return false;
205 if (myShear != src.myShear)
return false;
206 if (myP != src.myP)
return false;
207 if (myRad != src.myRad)
return false;
208 if (myType != src.myType)
return false;
209 if (myTandeg != src.myTandeg)
return false;
210 if (myKernel != src.myKernel)
return false;
211 if (myMetric != src.myMetric)
return false;
212 if (myGlobal != src.myGlobal)
return false;
213 if (myUVGlobal != src.myUVGlobal)
return false;
214 if (myVisualizefalloff != src.myVisualizefalloff)
return false;
238 graph->
evalOpParm(myGroup, nodeidx,
"group", time, graph->
isDirect()?
nullptr:depnode);
241 graph->
evalOpParm(myGroupType, nodeidx,
"grouptype", time, graph->
isDirect()?
nullptr:depnode);
242 myUVAttrib =
"uv"_UTsh;
244 graph->
evalOpParm(myUVAttrib, nodeidx,
"uvattrib", time, graph->
isDirect()?
nullptr:depnode);
262 graph->
evalOpParm(myShear, nodeidx,
"shear", time, graph->
isDirect()?
nullptr:depnode);
273 if (
true && ( (
true&&!(((
int64(getType())!=2)))) ) )
274 graph->
evalOpParm(myTandeg, nodeidx,
"tandeg", time, graph->
isDirect()?
nullptr:depnode);
275 myKernel =
"wyvill"_UTsh;
276 if (
true && ( (
true&&!(((
int64(getType())!=3)))) ) )
277 graph->
evalOpParm(myKernel, nodeidx,
"kernel", time, graph->
isDirect()?
nullptr:depnode);
280 graph->
evalOpParm(myMetric, nodeidx,
"metric", time, graph->
isDirect()?
nullptr:depnode);
283 graph->
evalOpParm(myGlobal, nodeidx,
"global", time, graph->
isDirect()?
nullptr:depnode);
286 graph->
evalOpParm(myUVGlobal, nodeidx,
"uvglobal", time, graph->
isDirect()?
nullptr:depnode);
287 myVisualizefalloff = 2;
289 graph->
evalOpParm(myVisualizefalloff, nodeidx,
"visualizefalloff", time, graph->
isDirect()?
nullptr:depnode);
305 template <
typename T>
312 if (idx.
size() != instance.
size()+1)
317 coerceValue(value, myGroup);
320 coerceValue(value, myGroupType);
323 coerceValue(value, myUVAttrib);
326 coerceValue(value, myXOrd);
329 coerceValue(value, myROrd);
332 coerceValue(value, myT);
335 coerceValue(value, myR);
338 coerceValue(value, myS);
341 coerceValue(value, myShear);
344 coerceValue(value, myP);
347 coerceValue(value, myRad);
350 coerceValue(value, myType);
353 coerceValue(value, myTandeg);
356 coerceValue(value, myKernel);
359 coerceValue(value, myMetric);
362 coerceValue(value, myGlobal);
365 coerceValue(value, myUVGlobal);
368 coerceValue(value, myVisualizefalloff);
384 { doGetParmValue(idx, instance, value); }
386 { doGetParmValue(idx, instance, value); }
388 { doGetParmValue(idx, instance, value); }
390 { doGetParmValue(idx, instance, value); }
392 { doGetParmValue(idx, instance, value); }
394 { doGetParmValue(idx, instance, value); }
396 { doGetParmValue(idx, instance, value); }
398 { doGetParmValue(idx, instance, value); }
400 { doGetParmValue(idx, instance, value); }
402 { doGetParmValue(idx, instance, value); }
404 { doGetParmValue(idx, instance, value); }
406 template <
typename T>
413 if (idx.
size() != instance.
size()+1)
418 coerceValue(myGroup, ( ( value ) ));
421 coerceValue(myGroupType, clampMinValue(0, clampMaxValue(4, value ) ));
424 coerceValue(myUVAttrib, ( ( value ) ));
427 coerceValue(myXOrd, clampMinValue(0, clampMaxValue(5, value ) ));
430 coerceValue(myROrd, clampMinValue(0, clampMaxValue(5, value ) ));
433 coerceValue(myT, ( ( value ) ));
436 coerceValue(myR, ( ( value ) ));
439 coerceValue(myS, ( ( value ) ));
442 coerceValue(myShear, ( ( value ) ));
445 coerceValue(myP, ( ( value ) ));
448 coerceValue(myRad, clampMinValue(0, ( value ) ));
451 coerceValue(myType, clampMinValue(0, clampMaxValue(3, value ) ));
454 coerceValue(myTandeg, ( ( value ) ));
457 coerceValue(myKernel, ( ( value ) ));
460 coerceValue(myMetric, clampMinValue(0, clampMaxValue(2, value ) ));
463 coerceValue(myGlobal, ( ( value ) ));
466 coerceValue(myUVGlobal, ( ( value ) ));
469 coerceValue(myVisualizefalloff, clampMinValue(0, clampMaxValue(2, value ) ));
476 { doSetParmValue(idx, instance, value); }
478 { doSetParmValue(idx, instance, value); }
480 { doSetParmValue(idx, instance, value); }
482 { doSetParmValue(idx, instance, value); }
484 { doSetParmValue(idx, instance, value); }
486 { doSetParmValue(idx, instance, value); }
488 { doSetParmValue(idx, instance, value); }
490 { doSetParmValue(idx, instance, value); }
492 { doSetParmValue(idx, instance, value); }
494 { doSetParmValue(idx, instance, value); }
496 { doSetParmValue(idx, instance, value); }
512 if (fieldnum.
size() < 1)
551 return "visualizefalloff";
559 if (fieldnum.
size() < 1)
560 return PARM_UNSUPPORTED;
601 return PARM_UNSUPPORTED;
637 loadData(is, rampdata);
655 int typelen = colon - data.
buffer();
669 {
int64 iv =
v; UTwrite(os, &iv); }
671 { UTwrite<fpreal64>(os, &
v); }
673 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
675 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
676 UTwrite<fpreal64>(os, &v.
z()); }
678 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
679 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
691 if (s) s->save(ostr);
693 saveData(os, result);
700 ostr << s->getDataTypeToken();
705 saveData(os, result);
709 void save(std::ostream &os)
const
713 saveData(os, myGroup);
714 saveData(os, myGroupType);
715 saveData(os, myUVAttrib);
716 saveData(os, myXOrd);
717 saveData(os, myROrd);
721 saveData(os, myShear);
724 saveData(os, myType);
725 saveData(os, myTandeg);
726 saveData(os, myKernel);
727 saveData(os, myMetric);
728 saveData(os, myGlobal);
729 saveData(os, myUVGlobal);
730 saveData(os, myVisualizefalloff);
743 loadData(is, myGroup);
744 loadData(is, myGroupType);
745 loadData(is, myUVAttrib);
746 loadData(is, myXOrd);
747 loadData(is, myROrd);
751 loadData(is, myShear);
754 loadData(is, myType);
755 loadData(is, myTandeg);
756 loadData(is, myKernel);
757 loadData(is, myMetric);
758 loadData(is, myGlobal);
759 loadData(is, myUVGlobal);
760 loadData(is, myVisualizefalloff);
770 if (!thissop)
return getGroup();
772 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
780 if (!thissop)
return getGroupType();
782 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
790 if (!thissop)
return getUVAttrib();
792 OP_Utils::evalOpParm(result, thissop,
"uvattrib", cookparms.
getCookTime(), 0);
800 if (!thissop)
return getXOrd();
802 OP_Utils::evalOpParm(result, thissop,
"xOrd", cookparms.
getCookTime(), 0);
810 if (!thissop)
return getROrd();
812 OP_Utils::evalOpParm(result, thissop,
"rOrd", cookparms.
getCookTime(), 0);
820 if (!thissop)
return getT();
822 OP_Utils::evalOpParm(result, thissop,
"t", cookparms.
getCookTime(), 0);
830 if (!thissop)
return getR();
832 OP_Utils::evalOpParm(result, thissop,
"r", cookparms.
getCookTime(), 0);
840 if (!thissop)
return getS();
842 OP_Utils::evalOpParm(result, thissop,
"s", cookparms.
getCookTime(), 0);
850 if (!thissop)
return getShear();
852 OP_Utils::evalOpParm(result, thissop,
"shear", cookparms.
getCookTime(), 0);
860 if (!thissop)
return getP();
862 OP_Utils::evalOpParm(result, thissop,
"p", cookparms.
getCookTime(), 0);
870 if (!thissop)
return getRad();
872 OP_Utils::evalOpParm(result, thissop,
"rad", cookparms.
getCookTime(), 0);
880 if (!thissop)
return getType();
882 OP_Utils::evalOpParm(result, thissop,
"type", cookparms.
getCookTime(), 0);
890 if (!thissop)
return getTandeg();
892 OP_Utils::evalOpParm(result, thissop,
"tandeg", cookparms.
getCookTime(), 0);
900 if (!thissop)
return getKernel();
902 OP_Utils::evalOpParm(result, thissop,
"kernel", cookparms.
getCookTime(), 0);
910 if (!thissop)
return getMetric();
912 OP_Utils::evalOpParm(result, thissop,
"metric", cookparms.
getCookTime(), 0);
920 if (!thissop)
return getGlobal();
922 OP_Utils::evalOpParm(result, thissop,
"global", cookparms.
getCookTime(), 0);
930 if (!thissop)
return getUVGlobal();
932 OP_Utils::evalOpParm(result, thissop,
"uvglobal", cookparms.
getCookTime(), 0);
940 if (!thissop)
return getVisualizefalloff();
942 OP_Utils::evalOpParm(result, thissop,
"visualizefalloff", cookparms.
getCookTime(), 0);
964 int64 myVisualizefalloff;
SOP_Node * getNode() const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
UT_Vector2T< fpreal64 > UT_Vector2D
GLsizei const GLfloat * value
const OP_Context & context() const
constexpr SYS_FORCE_INLINE T & z() noexcept
SYS_FORCE_INLINE const char * buffer() const
An output stream object that owns its own string buffer storage.
**But if you need a result
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
constexpr SYS_FORCE_INLINE T & x() noexcept
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
constexpr SYS_FORCE_INLINE T & x() noexcept
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
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
const OP_GraphProxy * graph() const
UT_Vector3T< fpreal64 > UT_Vector3D
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
constexpr SYS_FORCE_INLINE T & w() noexcept
virtual UT_StringHolder baseGetSignature() const
fpreal getCookTime() const
const char * findChar(int c) const
constexpr SYS_FORCE_INLINE T & y() noexcept
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
constexpr SYS_FORCE_INLINE T & x() noexcept