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;
225 graph->
evalOpParm(myGroup, nodeidx,
"group", time, 0);
228 graph->
evalOpParm(myXord, nodeidx,
"xOrd", time, 0);
231 graph->
evalOpParm(myRord, nodeidx,
"rOrd", time, 0);
234 graph->
evalOpParm(myT, nodeidx,
"t", time, 0);
237 graph->
evalOpParm(myR, nodeidx,
"r", time, 0);
240 graph->
evalOpParm(myS, nodeidx,
"s", time, 0);
243 graph->
evalOpParm(myShear, nodeidx,
"shear", time, 0);
246 graph->
evalOpParm(myP, nodeidx,
"p", time, 0);
249 graph->
evalOpParm(myPr, nodeidx,
"pr", time, 0);
252 graph->
evalOpParm(myDistmetric, nodeidx,
"distmetric", time, 0);
253 myApplyrolloff =
false;
254 if (
true && ( (
true&&!(((
int64(getDistmetric())!=0)))) ) )
255 graph->
evalOpParm(myApplyrolloff, nodeidx,
"applyrolloff", time, 0);
256 myDistattr =
""_UTsh;
257 if (
true && ( (
true&&!(((
int64(getDistmetric())!=0)))) ) )
258 graph->
evalOpParm(myDistattr, nodeidx,
"distattr", time, 0);
260 if (
true && ( (
true&&!(((
int64(getDistmetric())==0)&&(getApplyrolloff()==0)))) ) )
261 graph->
evalOpParm(myRad, nodeidx,
"rad", time, 0);
263 if (
true && ( (
true&&!(((
int64(getDistmetric())==0)&&(getApplyrolloff()==0)))) ) )
264 graph->
evalOpParm(myType, nodeidx,
"type", time, 0);
266 if (
true && ( (
true&&!(((
int64(getType())!=2))||((
int64(getDistmetric())==0)&&(getApplyrolloff()==0)))) ) )
267 graph->
evalOpParm(myTandeg, nodeidx,
"tandeg", time, 0);
268 myKernel =
"wyvill"_UTsh;
269 if (
true && ( (
true&&!(((
int64(getType())!=3))||((
int64(getDistmetric())==0)&&(getApplyrolloff()==0)))) ) )
270 graph->
evalOpParm(myKernel, nodeidx,
"kernel", time, 0);
271 myAttribs =
"*"_UTsh;
273 graph->
evalOpParm(myAttribs, nodeidx,
"attribs", time, 0);
274 myUpdatenmls =
false;
276 graph->
evalOpParm(myUpdatenmls, nodeidx,
"updatenmls", time, 0);
277 myUpdateaffectednmls =
true;
278 if (
true && ( (
true&&!(((getUpdatenmls()==1)))) ) )
279 graph->
evalOpParm(myUpdateaffectednmls, nodeidx,
"updateaffectednmls", time, 0);
281 if (
true && ( (
true&&!(((getUpdatenmls()==1)))) ) )
282 graph->
evalOpParm(myVlength, nodeidx,
"vlength", time, 0);
283 myVisualizefalloff = 2;
285 graph->
evalOpParm(myVisualizefalloff, nodeidx,
"visualizefalloff", time, 0);
286 myLocalspace =
false;
288 graph->
evalOpParm(myLocalspace, nodeidx,
"localspace", time, 0);
290 if (
true && ( (
true&&!(((getLocalspace()==0)))) ) )
291 graph->
evalOpParm(myUpvector, nodeidx,
"upvector", time, 0);
307 template <
typename T>
314 if (idx.
size() != instance.
size()+1)
319 coerceValue(value, myGroup);
322 coerceValue(value, myXord);
325 coerceValue(value, myRord);
328 coerceValue(value, myT);
331 coerceValue(value, myR);
334 coerceValue(value, myS);
337 coerceValue(value, myShear);
340 coerceValue(value, myP);
343 coerceValue(value, myPr);
346 coerceValue(value, myDistmetric);
349 coerceValue(value, myApplyrolloff);
352 coerceValue(value, myDistattr);
355 coerceValue(value, myRad);
358 coerceValue(value, myType);
361 coerceValue(value, myTandeg);
364 coerceValue(value, myKernel);
367 coerceValue(value, myAttribs);
370 coerceValue(value, myUpdatenmls);
373 coerceValue(value, myUpdateaffectednmls);
376 coerceValue(value, myVlength);
379 coerceValue(value, myVisualizefalloff);
382 coerceValue(value, myLocalspace);
385 coerceValue(value, myUpvector);
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(myXord, clampMinValue(0, clampMaxValue(5, value ) ));
441 coerceValue(myRord, clampMinValue(0, clampMaxValue(5, value ) ));
444 coerceValue(myT, ( ( value ) ));
447 coerceValue(myR, ( ( value ) ));
450 coerceValue(myS, ( ( value ) ));
453 coerceValue(myShear, ( ( value ) ));
456 coerceValue(myP, ( ( value ) ));
459 coerceValue(myPr, ( ( value ) ));
462 coerceValue(myDistmetric, clampMinValue(0, clampMaxValue(4, value ) ));
465 coerceValue(myApplyrolloff, ( ( value ) ));
468 coerceValue(myDistattr, ( ( value ) ));
471 coerceValue(myRad, clampMinValue(0, ( value ) ));
474 coerceValue(myType, clampMinValue(0, clampMaxValue(3, value ) ));
477 coerceValue(myTandeg, ( ( value ) ));
480 coerceValue(myKernel, ( ( value ) ));
483 coerceValue(myAttribs, ( ( value ) ));
486 coerceValue(myUpdatenmls, ( ( value ) ));
489 coerceValue(myUpdateaffectednmls, ( ( value ) ));
492 coerceValue(myVlength, ( ( value ) ));
495 coerceValue(myVisualizefalloff, clampMinValue(0, clampMaxValue(2, value ) ));
498 coerceValue(myLocalspace, ( ( value ) ));
501 coerceValue(myUpvector, ( ( value ) ));
508 { doSetParmValue(idx, instance, value); }
510 { doSetParmValue(idx, instance, value); }
512 { doSetParmValue(idx, instance, value); }
514 { doSetParmValue(idx, instance, value); }
516 { doSetParmValue(idx, instance, value); }
518 { doSetParmValue(idx, instance, value); }
520 { doSetParmValue(idx, instance, value); }
522 { doSetParmValue(idx, instance, value); }
524 { doSetParmValue(idx, instance, value); }
526 { doSetParmValue(idx, instance, value); }
528 { doSetParmValue(idx, instance, value); }
544 if (fieldnum.
size() < 1)
569 return "applyrolloff";
585 return "updateaffectednmls";
589 return "visualizefalloff";
601 if (fieldnum.
size() < 1)
602 return PARM_UNSUPPORTED;
653 return PARM_UNSUPPORTED;
689 loadData(is, rampdata);
707 int typelen = colon - data.
buffer();
721 {
int64 iv =
v; UTwrite(os, &iv); }
723 { UTwrite<fpreal64>(os, &
v); }
725 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
727 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
728 UTwrite<fpreal64>(os, &v.
z()); }
730 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
731 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
743 if (s) s->save(ostr);
745 saveData(os, result);
752 ostr << s->getDataTypeToken();
757 saveData(os, result);
761 void save(std::ostream &os)
const
765 saveData(os, myGroup);
766 saveData(os, myXord);
767 saveData(os, myRord);
771 saveData(os, myShear);
774 saveData(os, myDistmetric);
775 saveData(os, myApplyrolloff);
776 saveData(os, myDistattr);
778 saveData(os, myType);
779 saveData(os, myTandeg);
780 saveData(os, myKernel);
781 saveData(os, myAttribs);
782 saveData(os, myUpdatenmls);
783 saveData(os, myUpdateaffectednmls);
784 saveData(os, myVlength);
785 saveData(os, myVisualizefalloff);
786 saveData(os, myLocalspace);
787 saveData(os, myUpvector);
800 loadData(is, myGroup);
801 loadData(is, myXord);
802 loadData(is, myRord);
806 loadData(is, myShear);
809 loadData(is, myDistmetric);
810 loadData(is, myApplyrolloff);
811 loadData(is, myDistattr);
813 loadData(is, myType);
814 loadData(is, myTandeg);
815 loadData(is, myKernel);
816 loadData(is, myAttribs);
817 loadData(is, myUpdatenmls);
818 loadData(is, myUpdateaffectednmls);
819 loadData(is, myVlength);
820 loadData(is, myVisualizefalloff);
821 loadData(is, myLocalspace);
822 loadData(is, myUpvector);
832 if (!thissop)
return getGroup();
834 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
842 if (!thissop)
return getXord();
844 OP_Utils::evalOpParm(result, thissop,
"xOrd", cookparms.
getCookTime(), 0);
852 if (!thissop)
return getRord();
854 OP_Utils::evalOpParm(result, thissop,
"rOrd", cookparms.
getCookTime(), 0);
862 if (!thissop)
return getT();
864 OP_Utils::evalOpParm(result, thissop,
"t", cookparms.
getCookTime(), 0);
872 if (!thissop)
return getR();
874 OP_Utils::evalOpParm(result, thissop,
"r", cookparms.
getCookTime(), 0);
882 if (!thissop)
return getS();
884 OP_Utils::evalOpParm(result, thissop,
"s", cookparms.
getCookTime(), 0);
892 if (!thissop)
return getShear();
894 OP_Utils::evalOpParm(result, thissop,
"shear", cookparms.
getCookTime(), 0);
902 if (!thissop)
return getP();
904 OP_Utils::evalOpParm(result, thissop,
"p", cookparms.
getCookTime(), 0);
912 if (!thissop)
return getPr();
914 OP_Utils::evalOpParm(result, thissop,
"pr", cookparms.
getCookTime(), 0);
922 if (!thissop)
return getDistmetric();
924 OP_Utils::evalOpParm(result, thissop,
"distmetric", cookparms.
getCookTime(), 0);
932 if (!thissop)
return getApplyrolloff();
934 OP_Utils::evalOpParm(result, thissop,
"applyrolloff", cookparms.
getCookTime(), 0);
942 if (!thissop)
return getDistattr();
944 OP_Utils::evalOpParm(result, thissop,
"distattr", cookparms.
getCookTime(), 0);
952 if (!thissop)
return getRad();
954 OP_Utils::evalOpParm(result, thissop,
"rad", cookparms.
getCookTime(), 0);
962 if (!thissop)
return getType();
964 OP_Utils::evalOpParm(result, thissop,
"type", cookparms.
getCookTime(), 0);
972 if (!thissop)
return getTandeg();
974 OP_Utils::evalOpParm(result, thissop,
"tandeg", cookparms.
getCookTime(), 0);
982 if (!thissop)
return getKernel();
984 OP_Utils::evalOpParm(result, thissop,
"kernel", cookparms.
getCookTime(), 0);
992 if (!thissop)
return getAttribs();
994 OP_Utils::evalOpParm(result, thissop,
"attribs", cookparms.
getCookTime(), 0);
1002 if (!thissop)
return getUpdatenmls();
1004 OP_Utils::evalOpParm(result, thissop,
"updatenmls", cookparms.
getCookTime(), 0);
1012 if (!thissop)
return getUpdateaffectednmls();
1014 OP_Utils::evalOpParm(result, thissop,
"updateaffectednmls", cookparms.
getCookTime(), 0);
1022 if (!thissop)
return getVlength();
1024 OP_Utils::evalOpParm(result, thissop,
"vlength", cookparms.
getCookTime(), 0);
1032 if (!thissop)
return getVisualizefalloff();
1034 OP_Utils::evalOpParm(result, thissop,
"visualizefalloff", cookparms.
getCookTime(), 0);
1042 if (!thissop)
return getLocalspace();
1044 OP_Utils::evalOpParm(result, thissop,
"localspace", cookparms.
getCookTime(), 0);
1052 if (!thissop)
return getUpvector();
1054 OP_Utils::evalOpParm(result, thissop,
"upvector", cookparms.
getCookTime(), 0);
1069 bool myApplyrolloff;
1077 bool myUpdateaffectednmls;
1079 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