HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Peak.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <OP/OP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 namespace SOP_PeakEnums
24 {
25  enum class Grouptype
26  {
27  GUESS = 0,
29  EDGES,
30  POINTS,
31  PRIMS
32  };
33 
35  getToken(Grouptype enum_value)
36  {
37  using namespace UT::Literal;
38  switch (enum_value) {
39  case Grouptype::GUESS: return "guess"_sh;
40  case Grouptype::BREAKPOINTS: return "breakpoints"_sh;
41  case Grouptype::EDGES: return "edges"_sh;
42  case Grouptype::POINTS: return "points"_sh;
43  case Grouptype::PRIMS: return "prims"_sh;
44  default: UT_ASSERT(false); return ""_sh;
45  }
46  }
47 
48  enum class Enablemaskattrib
49  {
50  NOSCALING = 0,
51  BYATTRIB
52  };
53 
56  {
57  using namespace UT::Literal;
58  switch (enum_value) {
59  case Enablemaskattrib::NOSCALING: return "noscaling"_sh;
60  case Enablemaskattrib::BYATTRIB: return "byattrib"_sh;
61  default: UT_ASSERT(false); return ""_sh;
62  }
63  }
64 
65 }
66 
67 
69 {
70 public:
71  static int version() { return 1; }
72 
74  {
75  myGroup = ""_UTsh;
76  myGrouptype = 0;
77  myMask = 1;
78  myEnablemaskattrib = 0;
79  myMaskattrib = "mask"_UTsh;
80  myUsecustomattrib = false;
81  myCustomattrib = "N"_UTsh;
82  myNormalizeattrib = true;
83  myDist = 0;
84  myUpdatenmls = true;
85 
86  }
87 
88  explicit SOP_PeakParms(const SOP_PeakParms &) = default;
89  SOP_PeakParms &operator=(const SOP_PeakParms &) = default;
90  SOP_PeakParms(SOP_PeakParms &&) noexcept = default;
91  SOP_PeakParms &operator=(SOP_PeakParms &&) noexcept = default;
92 
93  ~SOP_PeakParms() override {}
94 
95  bool operator==(const SOP_PeakParms &src) const
96  {
97  if (myGroup != src.myGroup) return false;
98  if (myGrouptype != src.myGrouptype) return false;
99  if (myMask != src.myMask) return false;
100  if (myEnablemaskattrib != src.myEnablemaskattrib) return false;
101  if (myMaskattrib != src.myMaskattrib) return false;
102  if (myUsecustomattrib != src.myUsecustomattrib) return false;
103  if (myCustomattrib != src.myCustomattrib) return false;
104  if (myNormalizeattrib != src.myNormalizeattrib) return false;
105  if (myDist != src.myDist) return false;
106  if (myUpdatenmls != src.myUpdatenmls) return false;
107 
108 
109  if (baseGetSignature() != src.baseGetSignature()) return false;
110 
111  return true;
112  }
113  bool operator!=(const SOP_PeakParms &src) const
114  {
115  return !operator==(src);
116  }
119 
120 
121 
122  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
123  {
124  myGroup = ""_UTsh;
125  if (true)
126  graph->evalOpParm(myGroup, nodeidx, "group", time, graph->isDirect()?nullptr:depnode);
127  myGrouptype = 0;
128  if (true)
129  graph->evalOpParm(myGrouptype, nodeidx, "grouptype", time, graph->isDirect()?nullptr:depnode);
130  myMask = 1;
131  if (true)
132  graph->evalOpParm(myMask, nodeidx, "mask", time, graph->isDirect()?nullptr:depnode);
133  myEnablemaskattrib = 0;
134  if (true)
135  graph->evalOpParm(myEnablemaskattrib, nodeidx, "enablemaskattrib", time, graph->isDirect()?nullptr:depnode);
136  myMaskattrib = "mask"_UTsh;
137  if (true && ( (true&&!(((int64(getEnablemaskattrib())==0)))) ) )
138  graph->evalOpParm(myMaskattrib, nodeidx, "maskattrib", time, graph->isDirect()?nullptr:depnode);
139  myUsecustomattrib = false;
140  if (true)
141  graph->evalOpParm(myUsecustomattrib, nodeidx, "usecustomattrib", time, graph->isDirect()?nullptr:depnode);
142  myCustomattrib = "N"_UTsh;
143  if (true && ( (true&&!(((getUsecustomattrib()==0))||((int64(getGrouptype())==1)))) ) )
144  graph->evalOpParm(myCustomattrib, nodeidx, "customattrib", time, graph->isDirect()?nullptr:depnode);
145  myNormalizeattrib = true;
146  if (true && ( (true&&!(((getUsecustomattrib()==0))||((int64(getGrouptype())==1)))) ) )
147  graph->evalOpParm(myNormalizeattrib, nodeidx, "normalizeattrib", time, graph->isDirect()?nullptr:depnode);
148  myDist = 0;
149  if (true)
150  graph->evalOpParm(myDist, nodeidx, "dist", time, graph->isDirect()?nullptr:depnode);
151  myUpdatenmls = true;
152  if (true)
153  graph->evalOpParm(myUpdatenmls, nodeidx, "updatenmls", time, graph->isDirect()?nullptr:depnode);
154 
155  }
156 
157 
158  void loadFromOpSubclass(const LoadParms &loadparms) override
159  {
160  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
161  }
162 
163 
164  void copyFrom(const OP_NodeParms *src) override
165  {
166  *this = *((const SOP_PeakParms *)src);
167  }
168 
169  template <typename T>
170  void
171  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
172  {
173  if (idx.size() < 1)
174  return;
175  UT_ASSERT(idx.size() == instance.size()+1);
176  if (idx.size() != instance.size()+1)
177  return;
178  switch (idx[0])
179  {
180  case 0:
181  coerceValue(value, myGroup);
182  break;
183  case 1:
184  coerceValue(value, myGrouptype);
185  break;
186  case 2:
187  coerceValue(value, myMask);
188  break;
189  case 3:
190  coerceValue(value, myEnablemaskattrib);
191  break;
192  case 4:
193  coerceValue(value, myMaskattrib);
194  break;
195  case 5:
196  coerceValue(value, myUsecustomattrib);
197  break;
198  case 6:
199  coerceValue(value, myCustomattrib);
200  break;
201  case 7:
202  coerceValue(value, myNormalizeattrib);
203  break;
204  case 8:
205  coerceValue(value, myDist);
206  break;
207  case 9:
208  coerceValue(value, myUpdatenmls);
209  break;
210 
211  }
212  }
213 
214  bool isParmColorRamp(exint idx) const override
215  {
216  switch (idx)
217  {
218 
219  }
220  return false;
221  }
222 
223  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
224  { doGetParmValue(idx, instance, value); }
225  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
226  { doGetParmValue(idx, instance, value); }
227  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
228  { doGetParmValue(idx, instance, value); }
229  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
230  { doGetParmValue(idx, instance, value); }
231  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
232  { doGetParmValue(idx, instance, value); }
233  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
234  { doGetParmValue(idx, instance, value); }
235  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
236  { doGetParmValue(idx, instance, value); }
237  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
238  { doGetParmValue(idx, instance, value); }
239  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
240  { doGetParmValue(idx, instance, value); }
241  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
242  { doGetParmValue(idx, instance, value); }
243  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
244  { doGetParmValue(idx, instance, value); }
245 
246  template <typename T>
247  void
248  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
249  {
250  if (idx.size() < 1)
251  return;
252  UT_ASSERT(idx.size() == instance.size()+1);
253  if (idx.size() != instance.size()+1)
254  return;
255  switch (idx[0])
256  {
257  case 0:
258  coerceValue(myGroup, ( ( value ) ));
259  break;
260  case 1:
261  coerceValue(myGrouptype, clampMinValue(0, clampMaxValue(4, value ) ));
262  break;
263  case 2:
264  coerceValue(myMask, ( ( value ) ));
265  break;
266  case 3:
267  coerceValue(myEnablemaskattrib, clampMinValue(0, clampMaxValue(1, value ) ));
268  break;
269  case 4:
270  coerceValue(myMaskattrib, ( ( value ) ));
271  break;
272  case 5:
273  coerceValue(myUsecustomattrib, ( ( value ) ));
274  break;
275  case 6:
276  coerceValue(myCustomattrib, ( ( value ) ));
277  break;
278  case 7:
279  coerceValue(myNormalizeattrib, ( ( value ) ));
280  break;
281  case 8:
282  coerceValue(myDist, ( ( value ) ));
283  break;
284  case 9:
285  coerceValue(myUpdatenmls, ( ( value ) ));
286  break;
287 
288  }
289  }
290 
291  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
292  { doSetParmValue(idx, instance, value); }
293  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
294  { doSetParmValue(idx, instance, value); }
295  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
296  { doSetParmValue(idx, instance, value); }
297  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
298  { doSetParmValue(idx, instance, value); }
299  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
300  { doSetParmValue(idx, instance, value); }
301  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
302  { doSetParmValue(idx, instance, value); }
303  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
304  { doSetParmValue(idx, instance, value); }
305  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
306  { doSetParmValue(idx, instance, value); }
307  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
308  { doSetParmValue(idx, instance, value); }
309  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
310  { doSetParmValue(idx, instance, value); }
311  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
312  { doSetParmValue(idx, instance, value); }
313 
314  exint getNestNumParms(TempIndex idx) const override
315  {
316  if (idx.size() == 0)
317  return 10;
318  switch (idx[0])
319  {
320 
321  }
322  // Invalid
323  return 0;
324  }
325 
326  const char *getNestParmName(TempIndex fieldnum) const override
327  {
328  if (fieldnum.size() < 1)
329  return 0;
330  switch (fieldnum[0])
331  {
332  case 0:
333  return "group";
334  case 1:
335  return "grouptype";
336  case 2:
337  return "mask";
338  case 3:
339  return "enablemaskattrib";
340  case 4:
341  return "maskattrib";
342  case 5:
343  return "usecustomattrib";
344  case 6:
345  return "customattrib";
346  case 7:
347  return "normalizeattrib";
348  case 8:
349  return "dist";
350  case 9:
351  return "updatenmls";
352 
353  }
354  return 0;
355  }
356 
357  ParmType getNestParmType(TempIndex fieldnum) const override
358  {
359  if (fieldnum.size() < 1)
360  return PARM_UNSUPPORTED;
361  switch (fieldnum[0])
362  {
363  case 0:
364  return PARM_STRING;
365  case 1:
366  return PARM_INTEGER;
367  case 2:
368  return PARM_FLOAT;
369  case 3:
370  return PARM_INTEGER;
371  case 4:
372  return PARM_STRING;
373  case 5:
374  return PARM_INTEGER;
375  case 6:
376  return PARM_STRING;
377  case 7:
378  return PARM_INTEGER;
379  case 8:
380  return PARM_FLOAT;
381  case 9:
382  return PARM_INTEGER;
383 
384  }
385  return PARM_UNSUPPORTED;
386  }
387 
388  // Boiler plate to load individual types.
389  static void loadData(UT_IStream &is, int64 &v)
390  { is.bread(&v, 1); }
391  static void loadData(UT_IStream &is, bool &v)
392  { int64 iv; is.bread(&iv, 1); v = iv; }
393  static void loadData(UT_IStream &is, fpreal64 &v)
394  { is.bread<fpreal64>(&v, 1); }
395  static void loadData(UT_IStream &is, UT_Vector2D &v)
396  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
397  static void loadData(UT_IStream &is, UT_Vector3D &v)
398  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
399  is.bread<fpreal64>(&v.z(), 1); }
400  static void loadData(UT_IStream &is, UT_Vector4D &v)
401  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
402  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
403  static void loadData(UT_IStream &is, UT_Matrix2D &v)
404  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
405  static void loadData(UT_IStream &is, UT_Matrix3D &v)
406  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
407  static void loadData(UT_IStream &is, UT_Matrix4D &v)
408  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
409  static void loadData(UT_IStream &is, UT_Vector2I &v)
410  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
411  static void loadData(UT_IStream &is, UT_Vector3I &v)
412  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
413  is.bread<int64>(&v.z(), 1); }
414  static void loadData(UT_IStream &is, UT_Vector4I &v)
415  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
416  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
418  { is.bread(v); }
420  { UT_StringHolder rampdata;
421  loadData(is, rampdata);
422  if (rampdata.isstring())
423  {
424  v.reset(new UT_Ramp());
425  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
426  v->load(istr);
427  }
428  else v.reset();
429  }
432  loadData(is, data);
433  if (data.isstring())
434  {
435  // Find the data type.
436  const char *colon = UT_StringWrap(data).findChar(':');
437  if (colon)
438  {
439  int typelen = colon - data.buffer();
441  type.strncpy(data.buffer(), typelen);
442  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
443 
444  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
445  }
446  }
447  else v.reset();
448  }
449 
450  static void saveData(std::ostream &os, int64 v)
451  { UTwrite(os, &v); }
452  static void saveData(std::ostream &os, bool v)
453  { int64 iv = v; UTwrite(os, &iv); }
454  static void saveData(std::ostream &os, fpreal64 v)
455  { UTwrite<fpreal64>(os, &v); }
456  static void saveData(std::ostream &os, UT_Vector2D v)
457  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
458  static void saveData(std::ostream &os, UT_Vector3D v)
459  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
460  UTwrite<fpreal64>(os, &v.z()); }
461  static void saveData(std::ostream &os, UT_Vector4D v)
462  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
463  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
464  static void saveData(std::ostream &os, UT_Matrix2D v)
466  static void saveData(std::ostream &os, UT_Matrix3D v)
468  static void saveData(std::ostream &os, UT_Matrix4D v)
470  static void saveData(std::ostream &os, UT_StringHolder s)
471  { UT_StringWrap(s).saveBinary(os); }
472  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
474  UT_OStringStream ostr;
475  if (s) s->save(ostr);
476  result = ostr.str();
477  saveData(os, result);
478  }
479  static void saveData(std::ostream &os, PRM_DataItemHandle s)
481  UT_OStringStream ostr;
482  if (s)
483  {
484  ostr << s->getDataTypeToken();
485  ostr << ":";
486  s->saveBinary(ostr);
487  }
488  result = ostr.str();
489  saveData(os, result);
490  }
491 
492 
493  void save(std::ostream &os) const
494  {
495  int32 v = version();
496  UTwrite(os, &v);
497  saveData(os, myGroup);
498  saveData(os, myGrouptype);
499  saveData(os, myMask);
500  saveData(os, myEnablemaskattrib);
501  saveData(os, myMaskattrib);
502  saveData(os, myUsecustomattrib);
503  saveData(os, myCustomattrib);
504  saveData(os, myNormalizeattrib);
505  saveData(os, myDist);
506  saveData(os, myUpdatenmls);
507 
508  }
509 
510  bool load(UT_IStream &is)
511  {
512  int32 v;
513  is.bread(&v, 1);
514  if (version() != v)
515  {
516  // Fail incompatible versions
517  return false;
518  }
519  loadData(is, myGroup);
520  loadData(is, myGrouptype);
521  loadData(is, myMask);
522  loadData(is, myEnablemaskattrib);
523  loadData(is, myMaskattrib);
524  loadData(is, myUsecustomattrib);
525  loadData(is, myCustomattrib);
526  loadData(is, myNormalizeattrib);
527  loadData(is, myDist);
528  loadData(is, myUpdatenmls);
529 
530  return true;
531  }
532 
533  const UT_StringHolder & getGroup() const { return myGroup; }
534  void setGroup(const UT_StringHolder & val) { myGroup = val; }
536  {
537  SOP_Node *thissop = cookparms.getNode();
538  if (!thissop) return getGroup();
540  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
541  return result;
542  }
543  Grouptype getGrouptype() const { return Grouptype(myGrouptype); }
544  void setGrouptype(Grouptype val) { myGrouptype = int64(val); }
546  {
547  SOP_Node *thissop = cookparms.getNode();
548  if (!thissop) return getGrouptype();
549  int64 result;
550  OP_Utils::evalOpParm(result, thissop, "grouptype", cookparms.getCookTime(), 0);
551  return Grouptype(result);
552  }
553  fpreal64 getMask() const { return myMask; }
554  void setMask(fpreal64 val) { myMask = val; }
555  fpreal64 opMask(const SOP_NodeVerb::CookParms &cookparms) const
556  {
557  SOP_Node *thissop = cookparms.getNode();
558  if (!thissop) return getMask();
560  OP_Utils::evalOpParm(result, thissop, "mask", cookparms.getCookTime(), 0);
561  return result;
562  }
563  Enablemaskattrib getEnablemaskattrib() const { return Enablemaskattrib(myEnablemaskattrib); }
564  void setEnablemaskattrib(Enablemaskattrib val) { myEnablemaskattrib = int64(val); }
566  {
567  SOP_Node *thissop = cookparms.getNode();
568  if (!thissop) return getEnablemaskattrib();
569  int64 result;
570  OP_Utils::evalOpParm(result, thissop, "enablemaskattrib", cookparms.getCookTime(), 0);
571  return Enablemaskattrib(result);
572  }
573  const UT_StringHolder & getMaskattrib() const { return myMaskattrib; }
574  void setMaskattrib(const UT_StringHolder & val) { myMaskattrib = val; }
576  {
577  SOP_Node *thissop = cookparms.getNode();
578  if (!thissop) return getMaskattrib();
580  OP_Utils::evalOpParm(result, thissop, "maskattrib", cookparms.getCookTime(), 0);
581  return result;
582  }
583  bool getUsecustomattrib() const { return myUsecustomattrib; }
584  void setUsecustomattrib(bool val) { myUsecustomattrib = val; }
585  bool opUsecustomattrib(const SOP_NodeVerb::CookParms &cookparms) const
586  {
587  SOP_Node *thissop = cookparms.getNode();
588  if (!thissop) return getUsecustomattrib();
589  bool result;
590  OP_Utils::evalOpParm(result, thissop, "usecustomattrib", cookparms.getCookTime(), 0);
591  return result;
592  }
593  const UT_StringHolder & getCustomattrib() const { return myCustomattrib; }
594  void setCustomattrib(const UT_StringHolder & val) { myCustomattrib = val; }
596  {
597  SOP_Node *thissop = cookparms.getNode();
598  if (!thissop) return getCustomattrib();
600  OP_Utils::evalOpParm(result, thissop, "customattrib", cookparms.getCookTime(), 0);
601  return result;
602  }
603  bool getNormalizeattrib() const { return myNormalizeattrib; }
604  void setNormalizeattrib(bool val) { myNormalizeattrib = val; }
605  bool opNormalizeattrib(const SOP_NodeVerb::CookParms &cookparms) const
606  {
607  SOP_Node *thissop = cookparms.getNode();
608  if (!thissop) return getNormalizeattrib();
609  bool result;
610  OP_Utils::evalOpParm(result, thissop, "normalizeattrib", cookparms.getCookTime(), 0);
611  return result;
612  }
613  fpreal64 getDist() const { return myDist; }
614  void setDist(fpreal64 val) { myDist = val; }
615  fpreal64 opDist(const SOP_NodeVerb::CookParms &cookparms) const
616  {
617  SOP_Node *thissop = cookparms.getNode();
618  if (!thissop) return getDist();
620  OP_Utils::evalOpParm(result, thissop, "dist", cookparms.getCookTime(), 0);
621  return result;
622  }
623  bool getUpdatenmls() const { return myUpdatenmls; }
624  void setUpdatenmls(bool val) { myUpdatenmls = val; }
625  bool opUpdatenmls(const SOP_NodeVerb::CookParms &cookparms) const
626  {
627  SOP_Node *thissop = cookparms.getNode();
628  if (!thissop) return getUpdatenmls();
629  bool result;
630  OP_Utils::evalOpParm(result, thissop, "updatenmls", cookparms.getCookTime(), 0);
631  return result;
632  }
633 
634 private:
635  UT_StringHolder myGroup;
636  int64 myGrouptype;
637  fpreal64 myMask;
638  int64 myEnablemaskattrib;
639  UT_StringHolder myMaskattrib;
640  bool myUsecustomattrib;
641  UT_StringHolder myCustomattrib;
642  bool myNormalizeattrib;
643  fpreal64 myDist;
644  bool myUpdatenmls;
645 
646 };
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
type
Definition: core.h:556
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
bool opNormalizeattrib(const SOP_NodeVerb::CookParms &cookparms) const
static int version()
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void loadData(UT_IStream &is, fpreal64 &v)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
bool isParmColorRamp(exint idx) const override
SYS_FORCE_INLINE UT_StringHolder getToken(Grouptype enum_value)
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:63
static void loadData(UT_IStream &is, UT_Vector4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
GLsizei const GLfloat * value
Definition: glcorearb.h:824
bool getNormalizeattrib() const
static void saveData(std::ostream &os, int64 v)
const OP_Context & context() const
Definition: OP_NodeParms.h:97
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
SYS_FORCE_INLINE const char * buffer() const
static void saveData(std::ostream &os, UT_Vector4D v)
GLdouble s
Definition: glad.h:3009
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
An output stream object that owns its own string buffer storage.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
**But if you need a result
Definition: thread.h:622
static void loadData(UT_IStream &is, bool &v)
UT_StringHolder opMaskattrib(const SOP_NodeVerb::CookParms &cookparms) const
void setMask(fpreal64 val)
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
fpreal64 getMask() const
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setMaskattrib(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
fpreal64 opDist(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
bool opUpdatenmls(const SOP_NodeVerb::CookParms &cookparms) const
double fpreal64
Definition: SYS_Types.h:201
void setUsecustomattrib(bool val)
static void saveData(std::ostream &os, UT_Matrix2D v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void loadData(UT_IStream &is, UT_Vector3I &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void saveData(std::ostream &os, UT_Matrix3D v)
Grouptype opGrouptype(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, fpreal64 v)
bool getUsecustomattrib() const
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setGrouptype(Grouptype val)
void setGroup(const UT_StringHolder &val)
exint length() const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
void setDist(fpreal64 val)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
fpreal64 getDist() const
const UT_StringHolder & getGroup() const
long long int64
Definition: SYS_Types.h:116
bool load(UT_IStream &is)
const char * getNestParmName(TempIndex fieldnum) const override
ParmType getNestParmType(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Matrix4D v)
static void saveData(std::ostream &os, UT_Vector3D v)
void loadFromOpSubclass(const LoadParms &loadparms) override
bool operator==(const SOP_PeakParms &src) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void save(std::ostream &os) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
Grouptype getGrouptype() const
exint getNestNumParms(TempIndex idx) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:303
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
GT_API const UT_StringHolder version
bool operator!=(const SOP_PeakParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setNormalizeattrib(bool val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
fpreal64 fpreal
Definition: SYS_Types.h:278
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void saveData(std::ostream &os, UT_StringHolder s)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
void setEnablemaskattrib(Enablemaskattrib val)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
const UT_StringHolder & getCustomattrib() const
GLuint GLfloat * val
Definition: glcorearb.h:1608
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
#define SOP_API
Definition: SOP_API.h:10
Enablemaskattrib getEnablemaskattrib() const
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:372
const UT_StringHolder & getMaskattrib() const
void setUpdatenmls(bool val)
UT_StringHolder opCustomattrib(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opMask(const SOP_NodeVerb::CookParms &cookparms) const
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
GLboolean r
Definition: glcorearb.h:1222
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setCustomattrib(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void saveData(std::ostream &os, bool v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
static void loadData(UT_IStream &is, int64 &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
void copyFrom(const OP_NodeParms *src) override
Enablemaskattrib opEnablemaskattrib(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void saveData(std::ostream &os, UT_Vector2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
bool getUpdatenmls() const
bool opUsecustomattrib(const SOP_NodeVerb::CookParms &cookparms) const