23 namespace SOP_SoftTransformEnums
38 using namespace UT::Literal;
63 using namespace UT::Literal;
87 using namespace UT::Literal;
109 using namespace UT::Literal;
110 switch (enum_value) {
129 using namespace UT::Literal;
130 switch (enum_value) {
158 myApplyrolloff =
false;
159 myDistattr =
""_UTsh;
163 myKernel =
"wyvill"_UTsh;
164 myAttribs =
"*"_UTsh;
165 myUpdatenmls =
false;
166 myUpdateaffectednmls =
true;
168 myVisualizefalloff = 2;
169 myLocalspace =
false;
183 if (myGroup != src.myGroup)
return false;
184 if (myXord != src.myXord)
return false;
185 if (myRord != src.myRord)
return false;
186 if (myT != src.myT)
return false;
187 if (myR != src.myR)
return false;
188 if (myS != src.myS)
return false;
189 if (myShear != src.myShear)
return false;
190 if (myP != src.myP)
return false;
191 if (myPr != src.myPr)
return false;
192 if (myDistmetric != src.myDistmetric)
return false;
193 if (myApplyrolloff != src.myApplyrolloff)
return false;
194 if (myDistattr != src.myDistattr)
return false;
195 if (myRad != src.myRad)
return false;
196 if (myType != src.myType)
return false;
197 if (myTandeg != src.myTandeg)
return false;
198 if (myKernel != src.myKernel)
return false;
199 if (myAttribs != src.myAttribs)
return false;
200 if (myUpdatenmls != src.myUpdatenmls)
return false;
201 if (myUpdateaffectednmls != src.myUpdateaffectednmls)
return false;
202 if (myVlength != src.myVlength)
return false;
203 if (myVisualizefalloff != src.myVisualizefalloff)
return false;
204 if (myLocalspace != src.myLocalspace)
return false;
205 if (myUpvector != src.myUpvector)
return false;
228 graph->
evalOpParm(myGroup, nodeidx,
"group", time, graph->
isDirect()?
nullptr:depnode);
246 graph->
evalOpParm(myShear, nodeidx,
"shear", time, graph->
isDirect()?
nullptr:depnode);
255 graph->
evalOpParm(myDistmetric, nodeidx,
"distmetric", time, graph->
isDirect()?
nullptr:depnode);
256 myApplyrolloff =
false;
257 if (
true && ( (
true&&!(((
int64(getDistmetric())!=0)))) ) )
258 graph->
evalOpParm(myApplyrolloff, nodeidx,
"applyrolloff", time, graph->
isDirect()?
nullptr:depnode);
259 myDistattr =
""_UTsh;
260 if (
true && ( (
true&&!(((
int64(getDistmetric())!=0)))) ) )
261 graph->
evalOpParm(myDistattr, nodeidx,
"distattr", time, graph->
isDirect()?
nullptr:depnode);
263 if (
true && ( (
true&&!(((
int64(getDistmetric())==0)&&(getApplyrolloff()==0)))) ) )
266 if (
true && ( (
true&&!(((
int64(getDistmetric())==0)&&(getApplyrolloff()==0)))) ) )
269 if (
true && ( (
true&&!(((
int64(getType())!=2))||((
int64(getDistmetric())==0)&&(getApplyrolloff()==0)))) ) )
270 graph->
evalOpParm(myTandeg, nodeidx,
"tandeg", time, graph->
isDirect()?
nullptr:depnode);
271 myKernel =
"wyvill"_UTsh;
272 if (
true && ( (
true&&!(((
int64(getType())!=3))||((
int64(getDistmetric())==0)&&(getApplyrolloff()==0)))) ) )
273 graph->
evalOpParm(myKernel, nodeidx,
"kernel", time, graph->
isDirect()?
nullptr:depnode);
274 myAttribs =
"*"_UTsh;
276 graph->
evalOpParm(myAttribs, nodeidx,
"attribs", time, graph->
isDirect()?
nullptr:depnode);
277 myUpdatenmls =
false;
279 graph->
evalOpParm(myUpdatenmls, nodeidx,
"updatenmls", time, graph->
isDirect()?
nullptr:depnode);
280 myUpdateaffectednmls =
true;
281 if (
true && ( (
true&&!(((getUpdatenmls()==1)))) ) )
282 graph->
evalOpParm(myUpdateaffectednmls, nodeidx,
"updateaffectednmls", time, graph->
isDirect()?
nullptr:depnode);
284 if (
true && ( (
true&&!(((getUpdatenmls()==1)))) ) )
285 graph->
evalOpParm(myVlength, nodeidx,
"vlength", time, graph->
isDirect()?
nullptr:depnode);
286 myVisualizefalloff = 2;
288 graph->
evalOpParm(myVisualizefalloff, nodeidx,
"visualizefalloff", time, graph->
isDirect()?
nullptr:depnode);
289 myLocalspace =
false;
291 graph->
evalOpParm(myLocalspace, nodeidx,
"localspace", time, graph->
isDirect()?
nullptr:depnode);
293 if (
true && ( (
true&&!(((getLocalspace()==0)))) ) )
294 graph->
evalOpParm(myUpvector, nodeidx,
"upvector", time, graph->
isDirect()?
nullptr:depnode);
310 template <
typename T>
317 if (idx.
size() != instance.
size()+1)
322 coerceValue(value, myGroup);
325 coerceValue(value, myXord);
328 coerceValue(value, myRord);
331 coerceValue(value, myT);
334 coerceValue(value, myR);
337 coerceValue(value, myS);
340 coerceValue(value, myShear);
343 coerceValue(value, myP);
346 coerceValue(value, myPr);
349 coerceValue(value, myDistmetric);
352 coerceValue(value, myApplyrolloff);
355 coerceValue(value, myDistattr);
358 coerceValue(value, myRad);
361 coerceValue(value, myType);
364 coerceValue(value, myTandeg);
367 coerceValue(value, myKernel);
370 coerceValue(value, myAttribs);
373 coerceValue(value, myUpdatenmls);
376 coerceValue(value, myUpdateaffectednmls);
379 coerceValue(value, myVlength);
382 coerceValue(value, myVisualizefalloff);
385 coerceValue(value, myLocalspace);
388 coerceValue(value, myUpvector);
404 { doGetParmValue(idx, instance, value); }
406 { doGetParmValue(idx, instance, value); }
408 { doGetParmValue(idx, instance, value); }
410 { doGetParmValue(idx, instance, value); }
412 { doGetParmValue(idx, instance, value); }
414 { doGetParmValue(idx, instance, value); }
416 { doGetParmValue(idx, instance, value); }
418 { doGetParmValue(idx, instance, value); }
420 { doGetParmValue(idx, instance, value); }
422 { doGetParmValue(idx, instance, value); }
424 { doGetParmValue(idx, instance, value); }
426 template <
typename T>
433 if (idx.
size() != instance.
size()+1)
438 coerceValue(myGroup, ( ( value ) ));
441 coerceValue(myXord, clampMinValue(0, clampMaxValue(5, value ) ));
444 coerceValue(myRord, clampMinValue(0, clampMaxValue(5, value ) ));
447 coerceValue(myT, ( ( value ) ));
450 coerceValue(myR, ( ( value ) ));
453 coerceValue(myS, ( ( value ) ));
456 coerceValue(myShear, ( ( value ) ));
459 coerceValue(myP, ( ( value ) ));
462 coerceValue(myPr, ( ( value ) ));
465 coerceValue(myDistmetric, clampMinValue(0, clampMaxValue(4, value ) ));
468 coerceValue(myApplyrolloff, ( ( value ) ));
471 coerceValue(myDistattr, ( ( value ) ));
474 coerceValue(myRad, clampMinValue(0, ( value ) ));
477 coerceValue(myType, clampMinValue(0, clampMaxValue(3, value ) ));
480 coerceValue(myTandeg, ( ( value ) ));
483 coerceValue(myKernel, ( ( value ) ));
486 coerceValue(myAttribs, ( ( value ) ));
489 coerceValue(myUpdatenmls, ( ( value ) ));
492 coerceValue(myUpdateaffectednmls, ( ( value ) ));
495 coerceValue(myVlength, ( ( value ) ));
498 coerceValue(myVisualizefalloff, clampMinValue(0, clampMaxValue(2, value ) ));
501 coerceValue(myLocalspace, ( ( value ) ));
504 coerceValue(myUpvector, ( ( value ) ));
511 { doSetParmValue(idx, instance, value); }
513 { doSetParmValue(idx, instance, value); }
515 { doSetParmValue(idx, instance, value); }
517 { doSetParmValue(idx, instance, value); }
519 { doSetParmValue(idx, instance, value); }
521 { doSetParmValue(idx, instance, value); }
523 { doSetParmValue(idx, instance, value); }
525 { doSetParmValue(idx, instance, value); }
527 { doSetParmValue(idx, instance, value); }
529 { doSetParmValue(idx, instance, value); }
531 { doSetParmValue(idx, instance, value); }
547 if (fieldnum.
size() < 1)
572 return "applyrolloff";
588 return "updateaffectednmls";
592 return "visualizefalloff";
604 if (fieldnum.
size() < 1)
605 return PARM_UNSUPPORTED;
656 return PARM_UNSUPPORTED;
692 loadData(is, rampdata);
710 int typelen = colon - data.
buffer();
724 {
int64 iv =
v; UTwrite(os, &iv); }
726 { UTwrite<fpreal64>(os, &
v); }
728 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
730 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
731 UTwrite<fpreal64>(os, &v.
z()); }
733 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
734 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
746 if (s) s->save(ostr);
748 saveData(os, result);
755 ostr << s->getDataTypeToken();
760 saveData(os, result);
764 void save(std::ostream &os)
const
768 saveData(os, myGroup);
769 saveData(os, myXord);
770 saveData(os, myRord);
774 saveData(os, myShear);
777 saveData(os, myDistmetric);
778 saveData(os, myApplyrolloff);
779 saveData(os, myDistattr);
781 saveData(os, myType);
782 saveData(os, myTandeg);
783 saveData(os, myKernel);
784 saveData(os, myAttribs);
785 saveData(os, myUpdatenmls);
786 saveData(os, myUpdateaffectednmls);
787 saveData(os, myVlength);
788 saveData(os, myVisualizefalloff);
789 saveData(os, myLocalspace);
790 saveData(os, myUpvector);
803 loadData(is, myGroup);
804 loadData(is, myXord);
805 loadData(is, myRord);
809 loadData(is, myShear);
812 loadData(is, myDistmetric);
813 loadData(is, myApplyrolloff);
814 loadData(is, myDistattr);
816 loadData(is, myType);
817 loadData(is, myTandeg);
818 loadData(is, myKernel);
819 loadData(is, myAttribs);
820 loadData(is, myUpdatenmls);
821 loadData(is, myUpdateaffectednmls);
822 loadData(is, myVlength);
823 loadData(is, myVisualizefalloff);
824 loadData(is, myLocalspace);
825 loadData(is, myUpvector);
835 if (!thissop)
return getGroup();
837 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
845 if (!thissop)
return getXord();
847 OP_Utils::evalOpParm(result, thissop,
"xOrd", cookparms.
getCookTime(), 0);
855 if (!thissop)
return getRord();
857 OP_Utils::evalOpParm(result, thissop,
"rOrd", cookparms.
getCookTime(), 0);
865 if (!thissop)
return getT();
867 OP_Utils::evalOpParm(result, thissop,
"t", cookparms.
getCookTime(), 0);
875 if (!thissop)
return getR();
877 OP_Utils::evalOpParm(result, thissop,
"r", cookparms.
getCookTime(), 0);
885 if (!thissop)
return getS();
887 OP_Utils::evalOpParm(result, thissop,
"s", cookparms.
getCookTime(), 0);
895 if (!thissop)
return getShear();
897 OP_Utils::evalOpParm(result, thissop,
"shear", cookparms.
getCookTime(), 0);
905 if (!thissop)
return getP();
907 OP_Utils::evalOpParm(result, thissop,
"p", cookparms.
getCookTime(), 0);
915 if (!thissop)
return getPr();
917 OP_Utils::evalOpParm(result, thissop,
"pr", cookparms.
getCookTime(), 0);
925 if (!thissop)
return getDistmetric();
927 OP_Utils::evalOpParm(result, thissop,
"distmetric", cookparms.
getCookTime(), 0);
935 if (!thissop)
return getApplyrolloff();
937 OP_Utils::evalOpParm(result, thissop,
"applyrolloff", cookparms.
getCookTime(), 0);
945 if (!thissop)
return getDistattr();
947 OP_Utils::evalOpParm(result, thissop,
"distattr", cookparms.
getCookTime(), 0);
955 if (!thissop)
return getRad();
957 OP_Utils::evalOpParm(result, thissop,
"rad", cookparms.
getCookTime(), 0);
965 if (!thissop)
return getType();
967 OP_Utils::evalOpParm(result, thissop,
"type", cookparms.
getCookTime(), 0);
975 if (!thissop)
return getTandeg();
977 OP_Utils::evalOpParm(result, thissop,
"tandeg", cookparms.
getCookTime(), 0);
985 if (!thissop)
return getKernel();
987 OP_Utils::evalOpParm(result, thissop,
"kernel", cookparms.
getCookTime(), 0);
995 if (!thissop)
return getAttribs();
997 OP_Utils::evalOpParm(result, thissop,
"attribs", cookparms.
getCookTime(), 0);
1005 if (!thissop)
return getUpdatenmls();
1007 OP_Utils::evalOpParm(result, thissop,
"updatenmls", cookparms.
getCookTime(), 0);
1015 if (!thissop)
return getUpdateaffectednmls();
1017 OP_Utils::evalOpParm(result, thissop,
"updateaffectednmls", cookparms.
getCookTime(), 0);
1025 if (!thissop)
return getVlength();
1027 OP_Utils::evalOpParm(result, thissop,
"vlength", cookparms.
getCookTime(), 0);
1035 if (!thissop)
return getVisualizefalloff();
1037 OP_Utils::evalOpParm(result, thissop,
"visualizefalloff", cookparms.
getCookTime(), 0);
1045 if (!thissop)
return getLocalspace();
1047 OP_Utils::evalOpParm(result, thissop,
"localspace", cookparms.
getCookTime(), 0);
1055 if (!thissop)
return getUpvector();
1057 OP_Utils::evalOpParm(result, thissop,
"upvector", cookparms.
getCookTime(), 0);
1072 bool myApplyrolloff;
1080 bool myUpdateaffectednmls;
1082 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