HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_AttribInterpolate.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 <SOP/SOP_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_AttribInterpolateEnums
24 {
25  enum class Totype
26  {
27  POINTS = 0,
28  VERTICES,
29  PRIMS,
30  DETAIL
31  };
32  enum class Interpby
33  {
34  PRIMUVW = 0,
38  };
39  enum class Computenumberstype
40  {
41  NUMBERTYPEPOINT = 0,
43  };
44 }
45 
46 
48 {
49 public:
50  static int version() { return 1; }
51 
53  {
54  myTotype = 0;
55  myInterpby = 0;
56  myNumberattrib = "sourceprim"_UTsh;
57  myWeightsattrib = "sourceprimuv"_UTsh;
58  myPointattribs = "*"_UTsh;
59  myVertattribs = ""_UTsh;
60  myPrimattribs = ""_UTsh;
61  myDetailattribs = ""_UTsh;
62  myMatchgroups = true;
63  myComputeweights = false;
64  myComputenumberstype = 1;
65  myComputednumbersattrib = "sourcevtxnums"_UTsh;
66  myComputedweightsattrib = "sourcevtxweights"_UTsh;
67  myPrescale = 1;
68  myNormalize = false;
69  myThreshold = 0;
70  myBlend = 0;
71  myGroup = ""_UTsh;
72 
73  }
74 
75  explicit SOP_AttribInterpolateParms(const SOP_AttribInterpolateParms &) = default;
78  SOP_AttribInterpolateParms &operator=(SOP_AttribInterpolateParms &&) noexcept = default;
79 
81 
83  {
84  if (myTotype != src.myTotype) return false;
85  if (myInterpby != src.myInterpby) return false;
86  if (myNumberattrib != src.myNumberattrib) return false;
87  if (myWeightsattrib != src.myWeightsattrib) return false;
88  if (myPointattribs != src.myPointattribs) return false;
89  if (myVertattribs != src.myVertattribs) return false;
90  if (myPrimattribs != src.myPrimattribs) return false;
91  if (myDetailattribs != src.myDetailattribs) return false;
92  if (myMatchgroups != src.myMatchgroups) return false;
93  if (myComputeweights != src.myComputeweights) return false;
94  if (myComputenumberstype != src.myComputenumberstype) return false;
95  if (myComputednumbersattrib != src.myComputednumbersattrib) return false;
96  if (myComputedweightsattrib != src.myComputedweightsattrib) return false;
97  if (myPrescale != src.myPrescale) return false;
98  if (myNormalize != src.myNormalize) return false;
99  if (myThreshold != src.myThreshold) return false;
100  if (myBlend != src.myBlend) return false;
101  if (myGroup != src.myGroup) return false;
102 
103  return true;
104  }
106  {
107  return !operator==(src);
108  }
112 
113 
114 
115  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
116  {
117  myTotype = 0;
118  if (true)
119  graph->evalOpParm(myTotype, nodeidx, "totype", time, 0);
120  myInterpby = 0;
121  if (true)
122  graph->evalOpParm(myInterpby, nodeidx, "interpby", time, 0);
123  myNumberattrib = "sourceprim"_UTsh;
124  if (true)
125  graph->evalOpParm(myNumberattrib, nodeidx, "numberattrib", time, 0);
126  myWeightsattrib = "sourceprimuv"_UTsh;
127  if (true)
128  graph->evalOpParm(myWeightsattrib, nodeidx, "weightsattrib", time, 0);
129  myPointattribs = "*"_UTsh;
130  if (true && ( (true&&!(((int64(getInterpby())==3)))) ) )
131  graph->evalOpParm(myPointattribs, nodeidx, "pointattribs", time, 0);
132  myVertattribs = ""_UTsh;
133  if (true && ( (true&&!(((int64(getInterpby())==3))||((int64(getInterpby())==1)))) ) )
134  graph->evalOpParm(myVertattribs, nodeidx, "vertattribs", time, 0);
135  myPrimattribs = ""_UTsh;
136  if (true && ( (true&&!(((int64(getInterpby())==1)))) ) )
137  graph->evalOpParm(myPrimattribs, nodeidx, "primattribs", time, 0);
138  myDetailattribs = ""_UTsh;
139  if (true)
140  graph->evalOpParm(myDetailattribs, nodeidx, "detailattribs", time, 0);
141  myMatchgroups = true;
142  if (true)
143  graph->evalOpParm(myMatchgroups, nodeidx, "matchgroups", time, 0);
144  myComputeweights = false;
145  if (true && ( (true&&!(((int64(getInterpby())!=0)))) ) )
146  graph->evalOpParm(myComputeweights, nodeidx, "computeweights", time, 0);
147  myComputenumberstype = 1;
148  if (true && ( (true&&!(((int64(getInterpby())!=0))||((getComputeweights()==0)))) ) )
149  graph->evalOpParm(myComputenumberstype, nodeidx, "computenumberstype", time, 0);
150  myComputednumbersattrib = "sourcevtxnums"_UTsh;
151  if (true && ( (true&&!(((int64(getInterpby())!=0))||((getComputeweights()==0)))) ) )
152  graph->evalOpParm(myComputednumbersattrib, nodeidx, "computednumbersattrib", time, 0);
153  myComputedweightsattrib = "sourcevtxweights"_UTsh;
154  if (true && ( (true&&!(((int64(getInterpby())!=0))||((getComputeweights()==0)))) ) )
155  graph->evalOpParm(myComputedweightsattrib, nodeidx, "computedweightsattrib", time, 0);
156  myPrescale = 1;
157  if (true)
158  graph->evalOpParm(myPrescale, nodeidx, "prescale", time, 0);
159  myNormalize = false;
160  if (true)
161  graph->evalOpParm(myNormalize, nodeidx, "normalize", time, 0);
162  myThreshold = 0;
163  if (true && ( (true&&!(((getNormalize()==0)))) ) )
164  graph->evalOpParm(myThreshold, nodeidx, "threshold", time, 0);
165  myBlend = 0;
166  if (true && ( (true&&!(((getNormalize()==0)))) ) )
167  graph->evalOpParm(myBlend, nodeidx, "blend", time, 0);
168  myGroup = ""_UTsh;
169  if (true && ( (true&&!(((int64(getTotype())==3)))) ) )
170  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
171 
172  }
173 
174 
175  void loadFromOpSubclass(const LoadParms &loadparms) override
176  {
177  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
178  }
179 
180 
181  void copyFrom(const OP_NodeParms *src) override
182  {
183  *this = *((const SOP_AttribInterpolateParms *)src);
184  }
185 
186  template <typename T>
187  void
188  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
189  {
190  if (idx.size() < 1)
191  return;
192  UT_ASSERT(idx.size() == instance.size()+1);
193  if (idx.size() != instance.size()+1)
194  return;
195  switch (idx[0])
196  {
197  case 0:
198  coerceValue(value, myTotype);
199  break;
200  case 1:
201  coerceValue(value, myInterpby);
202  break;
203  case 2:
204  coerceValue(value, myNumberattrib);
205  break;
206  case 3:
207  coerceValue(value, myWeightsattrib);
208  break;
209  case 4:
210  coerceValue(value, myPointattribs);
211  break;
212  case 5:
213  coerceValue(value, myVertattribs);
214  break;
215  case 6:
216  coerceValue(value, myPrimattribs);
217  break;
218  case 7:
219  coerceValue(value, myDetailattribs);
220  break;
221  case 8:
222  coerceValue(value, myMatchgroups);
223  break;
224  case 9:
225  coerceValue(value, myComputeweights);
226  break;
227  case 10:
228  coerceValue(value, myComputenumberstype);
229  break;
230  case 11:
231  coerceValue(value, myComputednumbersattrib);
232  break;
233  case 12:
234  coerceValue(value, myComputedweightsattrib);
235  break;
236  case 13:
237  coerceValue(value, myPrescale);
238  break;
239  case 14:
240  coerceValue(value, myNormalize);
241  break;
242  case 15:
243  coerceValue(value, myThreshold);
244  break;
245  case 16:
246  coerceValue(value, myBlend);
247  break;
248  case 17:
249  coerceValue(value, myGroup);
250  break;
251 
252  }
253  }
254 
255  bool isParmColorRamp(exint idx) const override
256  {
257  switch (idx)
258  {
259 
260  }
261  return false;
262  }
263 
264  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
265  { doGetParmValue(idx, instance, value); }
266  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
267  { doGetParmValue(idx, instance, value); }
268  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
269  { doGetParmValue(idx, instance, value); }
270  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
271  { doGetParmValue(idx, instance, value); }
272  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
273  { doGetParmValue(idx, instance, value); }
274  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
275  { doGetParmValue(idx, instance, value); }
276  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
277  { doGetParmValue(idx, instance, value); }
278  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
279  { doGetParmValue(idx, instance, value); }
280  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
281  { doGetParmValue(idx, instance, value); }
282  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
283  { doGetParmValue(idx, instance, value); }
284  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
285  { doGetParmValue(idx, instance, value); }
286 
287  template <typename T>
288  void
289  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
290  {
291  if (idx.size() < 1)
292  return;
293  UT_ASSERT(idx.size() == instance.size()+1);
294  if (idx.size() != instance.size()+1)
295  return;
296  switch (idx[0])
297  {
298  case 0:
299  coerceValue(myTotype, clampMinValue(0, clampMaxValue(3, value ) ));
300  break;
301  case 1:
302  coerceValue(myInterpby, clampMinValue(0, clampMaxValue(3, value ) ));
303  break;
304  case 2:
305  coerceValue(myNumberattrib, ( ( value ) ));
306  break;
307  case 3:
308  coerceValue(myWeightsattrib, ( ( value ) ));
309  break;
310  case 4:
311  coerceValue(myPointattribs, ( ( value ) ));
312  break;
313  case 5:
314  coerceValue(myVertattribs, ( ( value ) ));
315  break;
316  case 6:
317  coerceValue(myPrimattribs, ( ( value ) ));
318  break;
319  case 7:
320  coerceValue(myDetailattribs, ( ( value ) ));
321  break;
322  case 8:
323  coerceValue(myMatchgroups, ( ( value ) ));
324  break;
325  case 9:
326  coerceValue(myComputeweights, ( ( value ) ));
327  break;
328  case 10:
329  coerceValue(myComputenumberstype, clampMinValue(0, clampMaxValue(1, value ) ));
330  break;
331  case 11:
332  coerceValue(myComputednumbersattrib, ( ( value ) ));
333  break;
334  case 12:
335  coerceValue(myComputedweightsattrib, ( ( value ) ));
336  break;
337  case 13:
338  coerceValue(myPrescale, clampMinValue(0, ( value ) ));
339  break;
340  case 14:
341  coerceValue(myNormalize, ( ( value ) ));
342  break;
343  case 15:
344  coerceValue(myThreshold, clampMinValue(0, clampMaxValue(1, value ) ));
345  break;
346  case 16:
347  coerceValue(myBlend, clampMinValue(0, clampMaxValue(1, value ) ));
348  break;
349  case 17:
350  coerceValue(myGroup, ( ( value ) ));
351  break;
352 
353  }
354  }
355 
356  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
357  { doSetParmValue(idx, instance, value); }
358  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
359  { doSetParmValue(idx, instance, value); }
360  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
361  { doSetParmValue(idx, instance, value); }
362  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
363  { doSetParmValue(idx, instance, value); }
364  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
365  { doSetParmValue(idx, instance, value); }
366  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
367  { doSetParmValue(idx, instance, value); }
368  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
369  { doSetParmValue(idx, instance, value); }
370  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
371  { doSetParmValue(idx, instance, value); }
372  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
373  { doSetParmValue(idx, instance, value); }
374  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
375  { doSetParmValue(idx, instance, value); }
376  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
377  { doSetParmValue(idx, instance, value); }
378 
379  exint getNestNumParms(TempIndex idx) const override
380  {
381  if (idx.size() == 0)
382  return 18;
383  switch (idx[0])
384  {
385 
386  }
387  // Invalid
388  return 0;
389  }
390 
391  const char *getNestParmName(TempIndex fieldnum) const override
392  {
393  if (fieldnum.size() < 1)
394  return 0;
395  switch (fieldnum[0])
396  {
397  case 0:
398  return "totype";
399  case 1:
400  return "interpby";
401  case 2:
402  return "numberattrib";
403  case 3:
404  return "weightsattrib";
405  case 4:
406  return "pointattribs";
407  case 5:
408  return "vertattribs";
409  case 6:
410  return "primattribs";
411  case 7:
412  return "detailattribs";
413  case 8:
414  return "matchgroups";
415  case 9:
416  return "computeweights";
417  case 10:
418  return "computenumberstype";
419  case 11:
420  return "computednumbersattrib";
421  case 12:
422  return "computedweightsattrib";
423  case 13:
424  return "prescale";
425  case 14:
426  return "normalize";
427  case 15:
428  return "threshold";
429  case 16:
430  return "blend";
431  case 17:
432  return "group";
433 
434  }
435  return 0;
436  }
437 
438  ParmType getNestParmType(TempIndex fieldnum) const override
439  {
440  if (fieldnum.size() < 1)
441  return PARM_UNSUPPORTED;
442  switch (fieldnum[0])
443  {
444  case 0:
445  return PARM_INTEGER;
446  case 1:
447  return PARM_INTEGER;
448  case 2:
449  return PARM_STRING;
450  case 3:
451  return PARM_STRING;
452  case 4:
453  return PARM_STRING;
454  case 5:
455  return PARM_STRING;
456  case 6:
457  return PARM_STRING;
458  case 7:
459  return PARM_STRING;
460  case 8:
461  return PARM_INTEGER;
462  case 9:
463  return PARM_INTEGER;
464  case 10:
465  return PARM_INTEGER;
466  case 11:
467  return PARM_STRING;
468  case 12:
469  return PARM_STRING;
470  case 13:
471  return PARM_FLOAT;
472  case 14:
473  return PARM_INTEGER;
474  case 15:
475  return PARM_FLOAT;
476  case 16:
477  return PARM_FLOAT;
478  case 17:
479  return PARM_STRING;
480 
481  }
482  return PARM_UNSUPPORTED;
483  }
484 
485  // Boiler plate to load individual types.
486  static void loadData(UT_IStream &is, int64 &v)
487  { is.bread(&v, 1); }
488  static void loadData(UT_IStream &is, bool &v)
489  { int64 iv; is.bread(&iv, 1); v = iv; }
490  static void loadData(UT_IStream &is, fpreal64 &v)
491  { is.bread<fpreal64>(&v, 1); }
492  static void loadData(UT_IStream &is, UT_Vector2D &v)
493  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
494  static void loadData(UT_IStream &is, UT_Vector3D &v)
495  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
496  is.bread<fpreal64>(&v.z(), 1); }
497  static void loadData(UT_IStream &is, UT_Vector4D &v)
498  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
499  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
500  static void loadData(UT_IStream &is, UT_Matrix2D &v)
501  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
502  static void loadData(UT_IStream &is, UT_Matrix3D &v)
503  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
504  static void loadData(UT_IStream &is, UT_Matrix4D &v)
505  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
506  static void loadData(UT_IStream &is, UT_Vector2I &v)
507  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
508  static void loadData(UT_IStream &is, UT_Vector3I &v)
509  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
510  is.bread<int64>(&v.z(), 1); }
511  static void loadData(UT_IStream &is, UT_Vector4I &v)
512  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
513  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
515  { is.bread(v); }
517  { UT_StringHolder rampdata;
518  loadData(is, rampdata);
519  if (rampdata.isstring())
520  {
521  v.reset(new UT_Ramp());
522  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
523  v->load(istr);
524  }
525  else v.reset();
526  }
529  loadData(is, data);
530  if (data.isstring())
531  {
532  // Find the data type.
533  const char *colon = UT_StringWrap(data).findChar(':');
534  if (colon)
535  {
536  int typelen = colon - data.buffer();
538  type.strncpy(data.buffer(), typelen);
539  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
540 
541  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
542  }
543  }
544  else v.reset();
545  }
546 
547  static void saveData(std::ostream &os, int64 v)
548  { UTwrite(os, &v); }
549  static void saveData(std::ostream &os, bool v)
550  { int64 iv = v; UTwrite(os, &iv); }
551  static void saveData(std::ostream &os, fpreal64 v)
552  { UTwrite<fpreal64>(os, &v); }
553  static void saveData(std::ostream &os, UT_Vector2D v)
554  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
555  static void saveData(std::ostream &os, UT_Vector3D v)
556  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
557  UTwrite<fpreal64>(os, &v.z()); }
558  static void saveData(std::ostream &os, UT_Vector4D v)
559  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
560  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
561  static void saveData(std::ostream &os, UT_Matrix2D v)
563  static void saveData(std::ostream &os, UT_Matrix3D v)
565  static void saveData(std::ostream &os, UT_Matrix4D v)
567  static void saveData(std::ostream &os, UT_StringHolder s)
568  { UT_StringWrap(s).saveBinary(os); }
569  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
571  UT_OStringStream ostr;
572  if (s) s->save(ostr);
573  result = ostr.str();
574  saveData(os, result);
575  }
576  static void saveData(std::ostream &os, PRM_DataItemHandle s)
578  UT_OStringStream ostr;
579  if (s)
580  {
581  ostr << s->getDataTypeToken();
582  ostr << ":";
583  s->saveBinary(ostr);
584  }
585  result = ostr.str();
586  saveData(os, result);
587  }
588 
589 
590  void save(std::ostream &os) const
591  {
592  int32 v = version();
593  UTwrite(os, &v);
594  saveData(os, myTotype);
595  saveData(os, myInterpby);
596  saveData(os, myNumberattrib);
597  saveData(os, myWeightsattrib);
598  saveData(os, myPointattribs);
599  saveData(os, myVertattribs);
600  saveData(os, myPrimattribs);
601  saveData(os, myDetailattribs);
602  saveData(os, myMatchgroups);
603  saveData(os, myComputeweights);
604  saveData(os, myComputenumberstype);
605  saveData(os, myComputednumbersattrib);
606  saveData(os, myComputedweightsattrib);
607  saveData(os, myPrescale);
608  saveData(os, myNormalize);
609  saveData(os, myThreshold);
610  saveData(os, myBlend);
611  saveData(os, myGroup);
612 
613  }
614 
615  bool load(UT_IStream &is)
616  {
617  int32 v;
618  is.bread(&v, 1);
619  if (version() != v)
620  {
621  // Fail incompatible versions
622  return false;
623  }
624  loadData(is, myTotype);
625  loadData(is, myInterpby);
626  loadData(is, myNumberattrib);
627  loadData(is, myWeightsattrib);
628  loadData(is, myPointattribs);
629  loadData(is, myVertattribs);
630  loadData(is, myPrimattribs);
631  loadData(is, myDetailattribs);
632  loadData(is, myMatchgroups);
633  loadData(is, myComputeweights);
634  loadData(is, myComputenumberstype);
635  loadData(is, myComputednumbersattrib);
636  loadData(is, myComputedweightsattrib);
637  loadData(is, myPrescale);
638  loadData(is, myNormalize);
639  loadData(is, myThreshold);
640  loadData(is, myBlend);
641  loadData(is, myGroup);
642 
643  return true;
644  }
645 
646  Totype getTotype() const { return Totype(myTotype); }
647  void setTotype(Totype val) { myTotype = int64(val); }
648  Totype opTotype(const SOP_NodeVerb::CookParms &cookparms) const
649  {
650  SOP_Node *thissop = cookparms.getNode();
651  if (!thissop) return getTotype();
652  int64 result;
653  OP_Utils::evalOpParm(result, thissop, "totype", cookparms.getCookTime(), 0);
654  return Totype(result);
655  }
656  Interpby getInterpby() const { return Interpby(myInterpby); }
657  void setInterpby(Interpby val) { myInterpby = int64(val); }
659  {
660  SOP_Node *thissop = cookparms.getNode();
661  if (!thissop) return getInterpby();
662  int64 result;
663  OP_Utils::evalOpParm(result, thissop, "interpby", cookparms.getCookTime(), 0);
664  return Interpby(result);
665  }
666  const UT_StringHolder & getNumberattrib() const { return myNumberattrib; }
667  void setNumberattrib(const UT_StringHolder & val) { myNumberattrib = val; }
669  {
670  SOP_Node *thissop = cookparms.getNode();
671  if (!thissop) return getNumberattrib();
673  OP_Utils::evalOpParm(result, thissop, "numberattrib", cookparms.getCookTime(), 0);
674  return result;
675  }
676  const UT_StringHolder & getWeightsattrib() const { return myWeightsattrib; }
677  void setWeightsattrib(const UT_StringHolder & val) { myWeightsattrib = val; }
679  {
680  SOP_Node *thissop = cookparms.getNode();
681  if (!thissop) return getWeightsattrib();
683  OP_Utils::evalOpParm(result, thissop, "weightsattrib", cookparms.getCookTime(), 0);
684  return result;
685  }
686  const UT_StringHolder & getPointattribs() const { return myPointattribs; }
687  void setPointattribs(const UT_StringHolder & val) { myPointattribs = val; }
689  {
690  SOP_Node *thissop = cookparms.getNode();
691  if (!thissop) return getPointattribs();
693  OP_Utils::evalOpParm(result, thissop, "pointattribs", cookparms.getCookTime(), 0);
694  return result;
695  }
696  const UT_StringHolder & getVertattribs() const { return myVertattribs; }
697  void setVertattribs(const UT_StringHolder & val) { myVertattribs = val; }
699  {
700  SOP_Node *thissop = cookparms.getNode();
701  if (!thissop) return getVertattribs();
703  OP_Utils::evalOpParm(result, thissop, "vertattribs", cookparms.getCookTime(), 0);
704  return result;
705  }
706  const UT_StringHolder & getPrimattribs() const { return myPrimattribs; }
707  void setPrimattribs(const UT_StringHolder & val) { myPrimattribs = val; }
709  {
710  SOP_Node *thissop = cookparms.getNode();
711  if (!thissop) return getPrimattribs();
713  OP_Utils::evalOpParm(result, thissop, "primattribs", cookparms.getCookTime(), 0);
714  return result;
715  }
716  const UT_StringHolder & getDetailattribs() const { return myDetailattribs; }
717  void setDetailattribs(const UT_StringHolder & val) { myDetailattribs = val; }
719  {
720  SOP_Node *thissop = cookparms.getNode();
721  if (!thissop) return getDetailattribs();
723  OP_Utils::evalOpParm(result, thissop, "detailattribs", cookparms.getCookTime(), 0);
724  return result;
725  }
726  bool getMatchgroups() const { return myMatchgroups; }
727  void setMatchgroups(bool val) { myMatchgroups = val; }
728  bool opMatchgroups(const SOP_NodeVerb::CookParms &cookparms) const
729  {
730  SOP_Node *thissop = cookparms.getNode();
731  if (!thissop) return getMatchgroups();
732  bool result;
733  OP_Utils::evalOpParm(result, thissop, "matchgroups", cookparms.getCookTime(), 0);
734  return result;
735  }
736  bool getComputeweights() const { return myComputeweights; }
737  void setComputeweights(bool val) { myComputeweights = val; }
738  bool opComputeweights(const SOP_NodeVerb::CookParms &cookparms) const
739  {
740  SOP_Node *thissop = cookparms.getNode();
741  if (!thissop) return getComputeweights();
742  bool result;
743  OP_Utils::evalOpParm(result, thissop, "computeweights", cookparms.getCookTime(), 0);
744  return result;
745  }
746  Computenumberstype getComputenumberstype() const { return Computenumberstype(myComputenumberstype); }
747  void setComputenumberstype(Computenumberstype val) { myComputenumberstype = int64(val); }
749  {
750  SOP_Node *thissop = cookparms.getNode();
751  if (!thissop) return getComputenumberstype();
752  int64 result;
753  OP_Utils::evalOpParm(result, thissop, "computenumberstype", cookparms.getCookTime(), 0);
754  return Computenumberstype(result);
755  }
756  const UT_StringHolder & getComputednumbersattrib() const { return myComputednumbersattrib; }
757  void setComputednumbersattrib(const UT_StringHolder & val) { myComputednumbersattrib = val; }
759  {
760  SOP_Node *thissop = cookparms.getNode();
761  if (!thissop) return getComputednumbersattrib();
763  OP_Utils::evalOpParm(result, thissop, "computednumbersattrib", cookparms.getCookTime(), 0);
764  return result;
765  }
766  const UT_StringHolder & getComputedweightsattrib() const { return myComputedweightsattrib; }
767  void setComputedweightsattrib(const UT_StringHolder & val) { myComputedweightsattrib = val; }
769  {
770  SOP_Node *thissop = cookparms.getNode();
771  if (!thissop) return getComputedweightsattrib();
773  OP_Utils::evalOpParm(result, thissop, "computedweightsattrib", cookparms.getCookTime(), 0);
774  return result;
775  }
776  fpreal64 getPrescale() const { return myPrescale; }
777  void setPrescale(fpreal64 val) { myPrescale = val; }
779  {
780  SOP_Node *thissop = cookparms.getNode();
781  if (!thissop) return getPrescale();
783  OP_Utils::evalOpParm(result, thissop, "prescale", cookparms.getCookTime(), 0);
784  return result;
785  }
786  bool getNormalize() const { return myNormalize; }
787  void setNormalize(bool val) { myNormalize = val; }
788  bool opNormalize(const SOP_NodeVerb::CookParms &cookparms) const
789  {
790  SOP_Node *thissop = cookparms.getNode();
791  if (!thissop) return getNormalize();
792  bool result;
793  OP_Utils::evalOpParm(result, thissop, "normalize", cookparms.getCookTime(), 0);
794  return result;
795  }
796  fpreal64 getThreshold() const { return myThreshold; }
797  void setThreshold(fpreal64 val) { myThreshold = val; }
799  {
800  SOP_Node *thissop = cookparms.getNode();
801  if (!thissop) return getThreshold();
803  OP_Utils::evalOpParm(result, thissop, "threshold", cookparms.getCookTime(), 0);
804  return result;
805  }
806  fpreal64 getBlend() const { return myBlend; }
807  void setBlend(fpreal64 val) { myBlend = val; }
808  fpreal64 opBlend(const SOP_NodeVerb::CookParms &cookparms) const
809  {
810  SOP_Node *thissop = cookparms.getNode();
811  if (!thissop) return getBlend();
813  OP_Utils::evalOpParm(result, thissop, "blend", cookparms.getCookTime(), 0);
814  return result;
815  }
816  const UT_StringHolder & getGroup() const { return myGroup; }
817  void setGroup(const UT_StringHolder & val) { myGroup = val; }
819  {
820  SOP_Node *thissop = cookparms.getNode();
821  if (!thissop) return getGroup();
823  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
824  return result;
825  }
826 
827 private:
828  int64 myTotype;
829  int64 myInterpby;
830  UT_StringHolder myNumberattrib;
831  UT_StringHolder myWeightsattrib;
832  UT_StringHolder myPointattribs;
833  UT_StringHolder myVertattribs;
834  UT_StringHolder myPrimattribs;
835  UT_StringHolder myDetailattribs;
836  bool myMatchgroups;
837  bool myComputeweights;
838  int64 myComputenumberstype;
839  UT_StringHolder myComputednumbersattrib;
840  UT_StringHolder myComputedweightsattrib;
841  fpreal64 myPrescale;
842  bool myNormalize;
843  fpreal64 myThreshold;
844  fpreal64 myBlend;
845  UT_StringHolder myGroup;
846 
847 };
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setComputedweightsattrib(const UT_StringHolder &val)
void setPrimattribs(const UT_StringHolder &val)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, UT_StringHolder s)
UT_StringHolder opComputednumbersattrib(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
T clampMaxValue(fpreal maxvalue, const T &src) const
Definition: OP_NodeParms.h:315
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setWeightsattrib(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:62
static void saveData(std::ostream &os, UT_Vector4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
UT_StringHolder opPrimattribs(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
const UT_StringHolder & getNumberattrib() const
fpreal64 opThreshold(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
bool opMatchgroups(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
bool operator!=(const SOP_AttribInterpolateParms &src) const
static void saveData(std::ostream &os, fpreal64 v)
SYS_FORCE_INLINE const char * buffer() const
GLdouble s
Definition: glad.h:3009
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
const UT_StringHolder & getGroup() const
bool opComputeweights(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opNumberattrib(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, int64 v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
**But if you need a result
Definition: thread.h:613
T clampMinValue(fpreal minvalue, const T &src) const
Definition: OP_NodeParms.h:308
const char * getNestParmName(TempIndex fieldnum) const override
Totype opTotype(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setComputednumbersattrib(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void save(std::ostream &os) const
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void saveData(std::ostream &os, UT_Matrix3D v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
fpreal64 opBlend(const SOP_NodeVerb::CookParms &cookparms) const
exint length() const
UT_StringHolder opPointattribs(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
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
const UT_StringHolder & getPrimattribs() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void saveData(std::ostream &os, UT_Matrix2D v)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void saveData(std::ostream &os, UT_Matrix4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
UT_StringHolder opWeightsattrib(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setPointattribs(const UT_StringHolder &val)
const UT_StringHolder & getComputednumbersattrib() const
const UT_StringHolder & getWeightsattrib() const
bool isParmColorRamp(exint idx) const override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
long long int64
Definition: SYS_Types.h:116
fpreal64 opPrescale(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void saveData(std::ostream &os, UT_Vector3D v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
const UT_StringHolder & getComputedweightsattrib() const
static void loadData(UT_IStream &is, int64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
const UT_StringHolder & getVertattribs() const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setVertattribs(const UT_StringHolder &val)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
GT_API const UT_StringHolder version
Computenumberstype getComputenumberstype() const
static void saveData(std::ostream &os, UT_Vector2D v)
UT_StringHolder opComputedweightsattrib(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getDetailattribs() const
bool opNormalize(const SOP_NodeVerb::CookParms &cookparms) const
exint getNestNumParms(TempIndex idx) const override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
Computenumberstype opComputenumberstype(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, bool &v)
void coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:301
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
Utility class for containing a color ramp.
Definition: UT_Ramp.h:88
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
Interpby opInterpby(const SOP_NodeVerb::CookParms &cookparms) const
GLuint GLfloat * val
Definition: glcorearb.h:1608
#define SOP_API
Definition: SOP_API.h:10
UT_StringHolder opDetailattribs(const SOP_NodeVerb::CookParms &cookparms) const
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
const UT_StringHolder & getPointattribs() const
void copyFrom(const OP_NodeParms *src) override
UT_StringHolder opVertattribs(const SOP_NodeVerb::CookParms &cookparms) const
const char * findChar(int c) const
Definition: UT_String.h:1385
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
GLboolean r
Definition: glcorearb.h:1222
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
void setDetailattribs(const UT_StringHolder &val)
type
Definition: core.h:1059
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
void setNumberattrib(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void loadFromOpSubclass(const LoadParms &loadparms) override
static void saveData(std::ostream &os, bool v)
SYS_FORCE_INLINE bool isstring() const
void setGroup(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool operator==(const SOP_AttribInterpolateParms &src) const
void setComputenumberstype(Computenumberstype val)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
ParmType getNestParmType(TempIndex fieldnum) const override