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;
235 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
238 graph->
evalOpParm(myGroupType, nodeidx,
"grouptype", time, 0);
239 myUVAttrib =
"uv"_UTsh;
241 graph->
evalOpParm(myUVAttrib, nodeidx,
"uvattrib", time, 0);
244 graph->
evalOpParm(myXOrd, nodeidx,
"xOrd", time, 0);
247 graph->
evalOpParm(myROrd, nodeidx,
"rOrd", time, 0);
250 graph->
evalOpParm(myT, nodeidx,
"t", time, 0);
253 graph->
evalOpParm(myR, nodeidx,
"r", time, 0);
256 graph->
evalOpParm(myS, nodeidx,
"s", time, 0);
259 graph->
evalOpParm(myShear, nodeidx,
"shear", time, 0);
262 graph->
evalOpParm(myP, nodeidx,
"p", time, 0);
265 graph->
evalOpParm(myRad, nodeidx,
"rad", time, 0);
268 graph->
evalOpParm(myType, nodeidx,
"type", time, 0);
270 if (
true && ( (
true&&!(((
int64(getType())!=2)))) ) )
271 graph->
evalOpParm(myTandeg, nodeidx,
"tandeg", time, 0);
272 myKernel =
"wyvill"_UTsh;
273 if (
true && ( (
true&&!(((
int64(getType())!=3)))) ) )
274 graph->
evalOpParm(myKernel, nodeidx,
"kernel", time, 0);
277 graph->
evalOpParm(myMetric, nodeidx,
"metric", time, 0);
280 graph->
evalOpParm(myGlobal, nodeidx,
"global", time, 0);
283 graph->
evalOpParm(myUVGlobal, nodeidx,
"uvglobal", time, 0);
284 myVisualizefalloff = 2;
286 graph->
evalOpParm(myVisualizefalloff, nodeidx,
"visualizefalloff", time, 0);
302 template <
typename T>
309 if (idx.
size() != instance.
size()+1)
314 coerceValue(value, myGroup);
317 coerceValue(value, myGroupType);
320 coerceValue(value, myUVAttrib);
323 coerceValue(value, myXOrd);
326 coerceValue(value, myROrd);
329 coerceValue(value, myT);
332 coerceValue(value, myR);
335 coerceValue(value, myS);
338 coerceValue(value, myShear);
341 coerceValue(value, myP);
344 coerceValue(value, myRad);
347 coerceValue(value, myType);
350 coerceValue(value, myTandeg);
353 coerceValue(value, myKernel);
356 coerceValue(value, myMetric);
359 coerceValue(value, myGlobal);
362 coerceValue(value, myUVGlobal);
365 coerceValue(value, myVisualizefalloff);
381 { doGetParmValue(idx, instance, value); }
383 { doGetParmValue(idx, instance, value); }
385 { doGetParmValue(idx, instance, value); }
387 { doGetParmValue(idx, instance, value); }
389 { doGetParmValue(idx, instance, value); }
391 { doGetParmValue(idx, instance, value); }
393 { doGetParmValue(idx, instance, value); }
395 { doGetParmValue(idx, instance, value); }
397 { doGetParmValue(idx, instance, value); }
399 { doGetParmValue(idx, instance, value); }
401 { doGetParmValue(idx, instance, value); }
403 template <
typename T>
410 if (idx.
size() != instance.
size()+1)
415 coerceValue(myGroup, ( ( value ) ));
418 coerceValue(myGroupType, clampMinValue(0, clampMaxValue(4, value ) ));
421 coerceValue(myUVAttrib, ( ( value ) ));
424 coerceValue(myXOrd, clampMinValue(0, clampMaxValue(5, value ) ));
427 coerceValue(myROrd, clampMinValue(0, clampMaxValue(5, value ) ));
430 coerceValue(myT, ( ( value ) ));
433 coerceValue(myR, ( ( value ) ));
436 coerceValue(myS, ( ( value ) ));
439 coerceValue(myShear, ( ( value ) ));
442 coerceValue(myP, ( ( value ) ));
445 coerceValue(myRad, clampMinValue(0, ( value ) ));
448 coerceValue(myType, clampMinValue(0, clampMaxValue(3, value ) ));
451 coerceValue(myTandeg, ( ( value ) ));
454 coerceValue(myKernel, ( ( value ) ));
457 coerceValue(myMetric, clampMinValue(0, clampMaxValue(2, value ) ));
460 coerceValue(myGlobal, ( ( value ) ));
463 coerceValue(myUVGlobal, ( ( value ) ));
466 coerceValue(myVisualizefalloff, clampMinValue(0, clampMaxValue(2, value ) ));
473 { doSetParmValue(idx, instance, value); }
475 { doSetParmValue(idx, instance, value); }
477 { doSetParmValue(idx, instance, value); }
479 { doSetParmValue(idx, instance, value); }
481 { doSetParmValue(idx, instance, value); }
483 { doSetParmValue(idx, instance, value); }
485 { doSetParmValue(idx, instance, value); }
487 { doSetParmValue(idx, instance, value); }
489 { doSetParmValue(idx, instance, value); }
491 { doSetParmValue(idx, instance, value); }
493 { doSetParmValue(idx, instance, value); }
509 if (fieldnum.
size() < 1)
548 return "visualizefalloff";
556 if (fieldnum.
size() < 1)
557 return PARM_UNSUPPORTED;
598 return PARM_UNSUPPORTED;
634 loadData(is, rampdata);
652 int typelen = colon - data.
buffer();
666 {
int64 iv =
v; UTwrite(os, &iv); }
668 { UTwrite<fpreal64>(os, &
v); }
670 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
672 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
673 UTwrite<fpreal64>(os, &v.
z()); }
675 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
676 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
688 if (s) s->save(ostr);
690 saveData(os, result);
697 ostr << s->getDataTypeToken();
702 saveData(os, result);
706 void save(std::ostream &os)
const
710 saveData(os, myGroup);
711 saveData(os, myGroupType);
712 saveData(os, myUVAttrib);
713 saveData(os, myXOrd);
714 saveData(os, myROrd);
718 saveData(os, myShear);
721 saveData(os, myType);
722 saveData(os, myTandeg);
723 saveData(os, myKernel);
724 saveData(os, myMetric);
725 saveData(os, myGlobal);
726 saveData(os, myUVGlobal);
727 saveData(os, myVisualizefalloff);
740 loadData(is, myGroup);
741 loadData(is, myGroupType);
742 loadData(is, myUVAttrib);
743 loadData(is, myXOrd);
744 loadData(is, myROrd);
748 loadData(is, myShear);
751 loadData(is, myType);
752 loadData(is, myTandeg);
753 loadData(is, myKernel);
754 loadData(is, myMetric);
755 loadData(is, myGlobal);
756 loadData(is, myUVGlobal);
757 loadData(is, myVisualizefalloff);
767 if (!thissop)
return getGroup();
769 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
777 if (!thissop)
return getGroupType();
779 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
787 if (!thissop)
return getUVAttrib();
789 OP_Utils::evalOpParm(result, thissop,
"uvattrib", cookparms.
getCookTime(), 0);
797 if (!thissop)
return getXOrd();
799 OP_Utils::evalOpParm(result, thissop,
"xOrd", cookparms.
getCookTime(), 0);
807 if (!thissop)
return getROrd();
809 OP_Utils::evalOpParm(result, thissop,
"rOrd", cookparms.
getCookTime(), 0);
817 if (!thissop)
return getT();
819 OP_Utils::evalOpParm(result, thissop,
"t", cookparms.
getCookTime(), 0);
827 if (!thissop)
return getR();
829 OP_Utils::evalOpParm(result, thissop,
"r", cookparms.
getCookTime(), 0);
837 if (!thissop)
return getS();
839 OP_Utils::evalOpParm(result, thissop,
"s", cookparms.
getCookTime(), 0);
847 if (!thissop)
return getShear();
849 OP_Utils::evalOpParm(result, thissop,
"shear", cookparms.
getCookTime(), 0);
857 if (!thissop)
return getP();
859 OP_Utils::evalOpParm(result, thissop,
"p", cookparms.
getCookTime(), 0);
867 if (!thissop)
return getRad();
869 OP_Utils::evalOpParm(result, thissop,
"rad", cookparms.
getCookTime(), 0);
877 if (!thissop)
return getType();
879 OP_Utils::evalOpParm(result, thissop,
"type", cookparms.
getCookTime(), 0);
887 if (!thissop)
return getTandeg();
889 OP_Utils::evalOpParm(result, thissop,
"tandeg", cookparms.
getCookTime(), 0);
897 if (!thissop)
return getKernel();
899 OP_Utils::evalOpParm(result, thissop,
"kernel", cookparms.
getCookTime(), 0);
907 if (!thissop)
return getMetric();
909 OP_Utils::evalOpParm(result, thissop,
"metric", cookparms.
getCookTime(), 0);
917 if (!thissop)
return getGlobal();
919 OP_Utils::evalOpParm(result, thissop,
"global", cookparms.
getCookTime(), 0);
927 if (!thissop)
return getUVGlobal();
929 OP_Utils::evalOpParm(result, thissop,
"uvglobal", cookparms.
getCookTime(), 0);
937 if (!thissop)
return getVisualizefalloff();
939 OP_Utils::evalOpParm(result, thissop,
"visualizefalloff", cookparms.
getCookTime(), 0);
961 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
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
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
fpreal getCookTime() const
const char * findChar(int c) const
constexpr SYS_FORCE_INLINE T & y() noexcept
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
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