23 namespace SOP_TangentFieldDeformEnums
35 using namespace UT::Literal;
55 myFirstFieldAttrib =
"field0"_UTsh;
56 mySecondFieldAttrib =
"field1"_UTsh;
58 myOutFieldAttrib =
"xfield"_UTsh;
59 myHardFeaturePoints =
""_UTsh;
60 myHardFeatureEdges =
""_UTsh;
62 myShowInputField =
true;
77 if (myGroup != src.myGroup)
return false;
78 if (myFirstFieldAttrib != src.myFirstFieldAttrib)
return false;
79 if (mySecondFieldAttrib != src.mySecondFieldAttrib)
return false;
80 if (myWeight != src.myWeight)
return false;
81 if (myOutFieldAttrib != src.myOutFieldAttrib)
return false;
82 if (myHardFeaturePoints != src.myHardFeaturePoints)
return false;
83 if (myHardFeatureEdges != src.myHardFeatureEdges)
return false;
84 if (myShowField != src.myShowField)
return false;
85 if (myShowInputField != src.myShowInputField)
return false;
86 if (myFieldscalemode != src.myFieldscalemode)
return false;
87 if (myFieldscale != src.myFieldscale)
return false;
106 graph->
evalOpParm(myGroup, nodeidx,
"group", time, graph->
isDirect()?
nullptr:depnode);
107 myFirstFieldAttrib =
"field0"_UTsh;
109 graph->
evalOpParm(myFirstFieldAttrib, nodeidx,
"firstfieldattrib", time, graph->
isDirect()?
nullptr:depnode);
110 mySecondFieldAttrib =
"field1"_UTsh;
112 graph->
evalOpParm(mySecondFieldAttrib, nodeidx,
"secondfieldattrib", time, graph->
isDirect()?
nullptr:depnode);
115 graph->
evalOpParm(myWeight, nodeidx,
"weight", time, graph->
isDirect()?
nullptr:depnode);
116 myOutFieldAttrib =
"xfield"_UTsh;
118 graph->
evalOpParm(myOutFieldAttrib, nodeidx,
"outfieldattrib", time, graph->
isDirect()?
nullptr:depnode);
119 myHardFeaturePoints =
""_UTsh;
121 graph->
evalOpParm(myHardFeaturePoints, nodeidx,
"hardfeaturepoints", time, graph->
isDirect()?
nullptr:depnode);
122 myHardFeatureEdges =
""_UTsh;
124 graph->
evalOpParm(myHardFeatureEdges, nodeidx,
"hardfeatureedges", time, graph->
isDirect()?
nullptr:depnode);
127 graph->
evalOpParm(myShowField, nodeidx,
"showfield", time, graph->
isDirect()?
nullptr:depnode);
128 myShowInputField =
true;
130 graph->
evalOpParm(myShowInputField, nodeidx,
"showinputfield", time, graph->
isDirect()?
nullptr:depnode);
131 myFieldscalemode = 0;
132 if (
true && ( (
true&&!(((getShowField()==0)))) ) )
133 graph->
evalOpParm(myFieldscalemode, nodeidx,
"fieldscalemode", time, graph->
isDirect()?
nullptr:depnode);
135 if (
true && ( (
true&&!(((
int64(getFieldscalemode())==1))||((getShowField()==0)))) ) )
136 graph->
evalOpParm(myFieldscale, nodeidx,
"fieldscale", time, graph->
isDirect()?
nullptr:depnode);
152 template <
typename T>
159 if (idx.
size() != instance.
size()+1)
164 coerceValue(value, myGroup);
167 coerceValue(value, myFirstFieldAttrib);
170 coerceValue(value, mySecondFieldAttrib);
173 coerceValue(value, myWeight);
176 coerceValue(value, myOutFieldAttrib);
179 coerceValue(value, myHardFeaturePoints);
182 coerceValue(value, myHardFeatureEdges);
185 coerceValue(value, myShowField);
188 coerceValue(value, myShowInputField);
191 coerceValue(value, myFieldscalemode);
194 coerceValue(value, myFieldscale);
210 { doGetParmValue(idx, instance, value); }
212 { doGetParmValue(idx, instance, value); }
214 { doGetParmValue(idx, instance, value); }
216 { doGetParmValue(idx, instance, value); }
218 { doGetParmValue(idx, instance, value); }
220 { doGetParmValue(idx, instance, value); }
222 { doGetParmValue(idx, instance, value); }
224 { doGetParmValue(idx, instance, value); }
226 { doGetParmValue(idx, instance, value); }
228 { doGetParmValue(idx, instance, value); }
230 { doGetParmValue(idx, instance, value); }
232 template <
typename T>
239 if (idx.
size() != instance.
size()+1)
244 coerceValue(myGroup, ( ( value ) ));
247 coerceValue(myFirstFieldAttrib, ( ( value ) ));
250 coerceValue(mySecondFieldAttrib, ( ( value ) ));
253 coerceValue(myWeight, ( ( value ) ));
256 coerceValue(myOutFieldAttrib, ( ( value ) ));
259 coerceValue(myHardFeaturePoints, ( ( value ) ));
262 coerceValue(myHardFeatureEdges, ( ( value ) ));
265 coerceValue(myShowField, ( ( value ) ));
268 coerceValue(myShowInputField, ( ( value ) ));
271 coerceValue(myFieldscalemode, clampMinValue(0, clampMaxValue(2, value ) ));
274 coerceValue(myFieldscale, clampMinValue(0, ( value ) ));
281 { doSetParmValue(idx, instance, value); }
283 { doSetParmValue(idx, instance, value); }
285 { doSetParmValue(idx, instance, value); }
287 { doSetParmValue(idx, instance, value); }
289 { doSetParmValue(idx, instance, value); }
291 { doSetParmValue(idx, instance, value); }
293 { doSetParmValue(idx, instance, value); }
295 { doSetParmValue(idx, instance, value); }
297 { doSetParmValue(idx, instance, value); }
299 { doSetParmValue(idx, instance, value); }
301 { doSetParmValue(idx, instance, value); }
317 if (fieldnum.
size() < 1)
324 return "firstfieldattrib";
326 return "secondfieldattrib";
330 return "outfieldattrib";
332 return "hardfeaturepoints";
334 return "hardfeatureedges";
338 return "showinputfield";
340 return "fieldscalemode";
350 if (fieldnum.
size() < 1)
351 return PARM_UNSUPPORTED;
378 return PARM_UNSUPPORTED;
414 loadData(is, rampdata);
432 int typelen = colon - data.
buffer();
446 {
int64 iv =
v; UTwrite(os, &iv); }
448 { UTwrite<fpreal64>(os, &
v); }
450 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
452 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
453 UTwrite<fpreal64>(os, &v.
z()); }
455 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
456 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
468 if (s) s->save(ostr);
470 saveData(os, result);
477 ostr << s->getDataTypeToken();
482 saveData(os, result);
486 void save(std::ostream &os)
const
490 saveData(os, myGroup);
491 saveData(os, myFirstFieldAttrib);
492 saveData(os, mySecondFieldAttrib);
493 saveData(os, myWeight);
494 saveData(os, myOutFieldAttrib);
495 saveData(os, myHardFeaturePoints);
496 saveData(os, myHardFeatureEdges);
497 saveData(os, myShowField);
498 saveData(os, myShowInputField);
499 saveData(os, myFieldscalemode);
500 saveData(os, myFieldscale);
513 loadData(is, myGroup);
514 loadData(is, myFirstFieldAttrib);
515 loadData(is, mySecondFieldAttrib);
516 loadData(is, myWeight);
517 loadData(is, myOutFieldAttrib);
518 loadData(is, myHardFeaturePoints);
519 loadData(is, myHardFeatureEdges);
520 loadData(is, myShowField);
521 loadData(is, myShowInputField);
522 loadData(is, myFieldscalemode);
523 loadData(is, myFieldscale);
533 if (!thissop)
return getGroup();
535 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
543 if (!thissop)
return getFirstFieldAttrib();
545 OP_Utils::evalOpParm(result, thissop,
"firstfieldattrib", cookparms.
getCookTime(), 0);
553 if (!thissop)
return getSecondFieldAttrib();
555 OP_Utils::evalOpParm(result, thissop,
"secondfieldattrib", cookparms.
getCookTime(), 0);
563 if (!thissop)
return getWeight();
565 OP_Utils::evalOpParm(result, thissop,
"weight", cookparms.
getCookTime(), 0);
573 if (!thissop)
return getOutFieldAttrib();
575 OP_Utils::evalOpParm(result, thissop,
"outfieldattrib", cookparms.
getCookTime(), 0);
583 if (!thissop)
return getHardFeaturePoints();
585 OP_Utils::evalOpParm(result, thissop,
"hardfeaturepoints", cookparms.
getCookTime(), 0);
593 if (!thissop)
return getHardFeatureEdges();
595 OP_Utils::evalOpParm(result, thissop,
"hardfeatureedges", cookparms.
getCookTime(), 0);
603 if (!thissop)
return getShowField();
605 OP_Utils::evalOpParm(result, thissop,
"showfield", cookparms.
getCookTime(), 0);
613 if (!thissop)
return getShowInputField();
615 OP_Utils::evalOpParm(result, thissop,
"showinputfield", cookparms.
getCookTime(), 0);
623 if (!thissop)
return getFieldscalemode();
625 OP_Utils::evalOpParm(result, thissop,
"fieldscalemode", cookparms.
getCookTime(), 0);
633 if (!thissop)
return getFieldscale();
635 OP_Utils::evalOpParm(result, thissop,
"fieldscale", cookparms.
getCookTime(), 0);
648 bool myShowInputField;
649 int64 myFieldscalemode;
SOP_Node * getNode() const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
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
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