20 using namespace UT::Literal;
23 namespace SOP_UVTransform_2_0Enums
93 myKernel =
"wyvill"_sh;
97 myVisualizefalloff = 2;
107 if (myGroup != src.myGroup)
return false;
108 if (myGroupType != src.myGroupType)
return false;
109 if (myUVAttrib != src.myUVAttrib)
return false;
110 if (myXOrd != src.myXOrd)
return false;
111 if (myROrd != src.myROrd)
return false;
112 if (myT != src.myT)
return false;
113 if (myR != src.myR)
return false;
114 if (myS != src.myS)
return false;
115 if (myShear != src.myShear)
return false;
116 if (myP != src.myP)
return false;
117 if (myRad != src.myRad)
return false;
118 if (myType != src.myType)
return false;
119 if (myTandeg != src.myTandeg)
return false;
120 if (myKernel != src.myKernel)
return false;
121 if (myMetric != src.myMetric)
return false;
122 if (myGlobal != src.myGlobal)
return false;
123 if (myUVGlobal != src.myUVGlobal)
return false;
124 if (myVisualizefalloff != src.myVisualizefalloff)
return false;
145 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
148 graph->
evalOpParm(myGroupType, nodeidx,
"grouptype", time, 0);
149 myUVAttrib =
"uv"_sh;
151 graph->
evalOpParm(myUVAttrib, nodeidx,
"uvattrib", time, 0);
154 graph->
evalOpParm(myXOrd, nodeidx,
"xOrd", time, 0);
157 graph->
evalOpParm(myROrd, nodeidx,
"rOrd", time, 0);
160 graph->
evalOpParm(myT, nodeidx,
"t", time, 0);
163 graph->
evalOpParm(myR, nodeidx,
"r", time, 0);
166 graph->
evalOpParm(myS, nodeidx,
"s", time, 0);
169 graph->
evalOpParm(myShear, nodeidx,
"shear", time, 0);
172 graph->
evalOpParm(myP, nodeidx,
"p", time, 0);
175 graph->
evalOpParm(myRad, nodeidx,
"rad", time, 0);
178 graph->
evalOpParm(myType, nodeidx,
"type", time, 0);
180 if (
true && ( (!(((
int64(getType())!=2)))) ) )
181 graph->
evalOpParm(myTandeg, nodeidx,
"tandeg", time, 0);
182 myKernel =
"wyvill"_sh;
183 if (
true && ( (!(((
int64(getType())!=3)))) ) )
184 graph->
evalOpParm(myKernel, nodeidx,
"kernel", time, 0);
187 graph->
evalOpParm(myMetric, nodeidx,
"metric", time, 0);
190 graph->
evalOpParm(myGlobal, nodeidx,
"global", time, 0);
193 graph->
evalOpParm(myUVGlobal, nodeidx,
"uvglobal", time, 0);
194 myVisualizefalloff = 2;
196 graph->
evalOpParm(myVisualizefalloff, nodeidx,
"visualizefalloff", time, 0);
212 template <
typename T>
219 if (idx.
size() != instance.
size()+1)
224 coerceValue(value, myGroup);
227 coerceValue(value, myGroupType);
230 coerceValue(value, myUVAttrib);
233 coerceValue(value, myXOrd);
236 coerceValue(value, myROrd);
239 coerceValue(value, myT);
242 coerceValue(value, myR);
245 coerceValue(value, myS);
248 coerceValue(value, myShear);
251 coerceValue(value, myP);
254 coerceValue(value, myRad);
257 coerceValue(value, myType);
260 coerceValue(value, myTandeg);
263 coerceValue(value, myKernel);
266 coerceValue(value, myMetric);
269 coerceValue(value, myGlobal);
272 coerceValue(value, myUVGlobal);
275 coerceValue(value, myVisualizefalloff);
282 { doGetParmValue(idx, instance, value); }
284 { doGetParmValue(idx, instance, value); }
286 { doGetParmValue(idx, instance, value); }
288 { doGetParmValue(idx, instance, value); }
290 { doGetParmValue(idx, instance, value); }
292 { doGetParmValue(idx, instance, value); }
294 { doGetParmValue(idx, instance, value); }
296 { doGetParmValue(idx, instance, value); }
298 { doGetParmValue(idx, instance, value); }
300 { doGetParmValue(idx, instance, value); }
302 { doGetParmValue(idx, instance, value); }
304 template <
typename T>
311 if (idx.
size() != instance.
size()+1)
316 coerceValue(myGroup, value);
319 coerceValue(myGroupType, value);
322 coerceValue(myUVAttrib, value);
325 coerceValue(myXOrd, value);
328 coerceValue(myROrd, value);
331 coerceValue(myT, value);
334 coerceValue(myR, value);
337 coerceValue(myS, value);
340 coerceValue(myShear, value);
343 coerceValue(myP, value);
346 coerceValue(myRad, value);
349 coerceValue(myType, value);
352 coerceValue(myTandeg, value);
355 coerceValue(myKernel, value);
358 coerceValue(myMetric, value);
361 coerceValue(myGlobal, value);
364 coerceValue(myUVGlobal, value);
367 coerceValue(myVisualizefalloff, value);
374 { doSetParmValue(idx, instance, value); }
376 { doSetParmValue(idx, instance, value); }
378 { doSetParmValue(idx, instance, value); }
380 { doSetParmValue(idx, instance, value); }
382 { doSetParmValue(idx, instance, value); }
384 { doSetParmValue(idx, instance, value); }
386 { doSetParmValue(idx, instance, value); }
388 { doSetParmValue(idx, instance, value); }
390 { doSetParmValue(idx, instance, value); }
392 { doSetParmValue(idx, instance, value); }
394 { doSetParmValue(idx, instance, value); }
410 if (fieldnum.
size() < 1)
449 return "visualizefalloff";
457 if (fieldnum.
size() < 1)
458 return PARM_UNSUPPORTED;
499 return PARM_UNSUPPORTED;
535 loadData(is, rampdata);
553 int typelen = colon - data.
buffer();
567 {
int64 iv =
v; UTwrite(os, &iv); }
569 { UTwrite<fpreal64>(os, &
v); }
571 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
573 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
574 UTwrite<fpreal64>(os, &v.
z()); }
576 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
577 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
589 if (s) s->save(ostr);
591 saveData(os, result);
598 ostr << s->getDataTypeToken();
603 saveData(os, result);
607 void save(std::ostream &os)
const
611 saveData(os, myGroup);
612 saveData(os, myGroupType);
613 saveData(os, myUVAttrib);
614 saveData(os, myXOrd);
615 saveData(os, myROrd);
619 saveData(os, myShear);
622 saveData(os, myType);
623 saveData(os, myTandeg);
624 saveData(os, myKernel);
625 saveData(os, myMetric);
626 saveData(os, myGlobal);
627 saveData(os, myUVGlobal);
628 saveData(os, myVisualizefalloff);
641 loadData(is, myGroup);
642 loadData(is, myGroupType);
643 loadData(is, myUVAttrib);
644 loadData(is, myXOrd);
645 loadData(is, myROrd);
649 loadData(is, myShear);
652 loadData(is, myType);
653 loadData(is, myTandeg);
654 loadData(is, myKernel);
655 loadData(is, myMetric);
656 loadData(is, myGlobal);
657 loadData(is, myUVGlobal);
658 loadData(is, myVisualizefalloff);
668 if (!thissop)
return getGroup();
670 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
678 if (!thissop)
return getGroupType();
680 OP_Utils::evalOpParm(result, thissop,
"grouptype", cookparms.
getCookTime(), 0);
688 if (!thissop)
return getUVAttrib();
690 OP_Utils::evalOpParm(result, thissop,
"uvattrib", cookparms.
getCookTime(), 0);
698 if (!thissop)
return getXOrd();
700 OP_Utils::evalOpParm(result, thissop,
"xOrd", cookparms.
getCookTime(), 0);
708 if (!thissop)
return getROrd();
710 OP_Utils::evalOpParm(result, thissop,
"rOrd", cookparms.
getCookTime(), 0);
718 if (!thissop)
return getT();
720 OP_Utils::evalOpParm(result, thissop,
"t", cookparms.
getCookTime(), 0);
728 if (!thissop)
return getR();
730 OP_Utils::evalOpParm(result, thissop,
"r", cookparms.
getCookTime(), 0);
738 if (!thissop)
return getS();
740 OP_Utils::evalOpParm(result, thissop,
"s", cookparms.
getCookTime(), 0);
748 if (!thissop)
return getShear();
750 OP_Utils::evalOpParm(result, thissop,
"shear", cookparms.
getCookTime(), 0);
758 if (!thissop)
return getP();
760 OP_Utils::evalOpParm(result, thissop,
"p", cookparms.
getCookTime(), 0);
768 if (!thissop)
return getRad();
770 OP_Utils::evalOpParm(result, thissop,
"rad", cookparms.
getCookTime(), 0);
778 if (!thissop)
return getType();
780 OP_Utils::evalOpParm(result, thissop,
"type", cookparms.
getCookTime(), 0);
788 if (!thissop)
return getTandeg();
790 OP_Utils::evalOpParm(result, thissop,
"tandeg", cookparms.
getCookTime(), 0);
798 if (!thissop)
return getKernel();
800 OP_Utils::evalOpParm(result, thissop,
"kernel", cookparms.
getCookTime(), 0);
808 if (!thissop)
return getMetric();
810 OP_Utils::evalOpParm(result, thissop,
"metric", cookparms.
getCookTime(), 0);
818 if (!thissop)
return getGlobal();
820 OP_Utils::evalOpParm(result, thissop,
"global", cookparms.
getCookTime(), 0);
828 if (!thissop)
return getUVGlobal();
830 OP_Utils::evalOpParm(result, thissop,
"uvglobal", cookparms.
getCookTime(), 0);
838 if (!thissop)
return getVisualizefalloff();
840 OP_Utils::evalOpParm(result, thissop,
"visualizefalloff", cookparms.
getCookTime(), 0);
862 int64 myVisualizefalloff;
SOP_Node * getNode() const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
UT_Vector2T< fpreal64 > UT_Vector2D
GLuint const GLfloat * val
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
An output stream object that owns its own string buffer storage.
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
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.
GLint GLenum GLsizei GLint GLsizei const void * data
UT_Vector3T< fpreal64 > UT_Vector3D
void saveBinary(std::ostream &os) const
Save string to binary stream.
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Utility class for containing a color ramp.
GLdouble GLdouble GLdouble r
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
fpreal getCookTime() const
const char * findChar(int c) const
GLsizei const GLfloat * value
const OP_Context & context() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)