HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Cap.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_CapEnums
24 {
25  enum class FirstU
26  {
27  NONE = 0,
28  FACET,
29  SHARE,
30  ROUND,
31  TANGENT
32  };
33 
35  getToken(FirstU enum_value)
36  {
37  using namespace UT::Literal;
38  switch (enum_value) {
39  case FirstU::NONE: return "none"_sh;
40  case FirstU::FACET: return "facet"_sh;
41  case FirstU::SHARE: return "share"_sh;
42  case FirstU::ROUND: return "round"_sh;
43  case FirstU::TANGENT: return "tangent"_sh;
44  default: UT_ASSERT(false); return ""_sh;
45  }
46  }
47 
48  enum class LastU
49  {
50  NONE = 0,
51  FACET,
52  SHARE,
53  ROUND,
54  TANGENT
55  };
56 
58  getToken(LastU enum_value)
59  {
60  using namespace UT::Literal;
61  switch (enum_value) {
62  case LastU::NONE: return "none"_sh;
63  case LastU::FACET: return "facet"_sh;
64  case LastU::SHARE: return "share"_sh;
65  case LastU::ROUND: return "round"_sh;
66  case LastU::TANGENT: return "tangent"_sh;
67  default: UT_ASSERT(false); return ""_sh;
68  }
69  }
70 
71  enum class FirstV
72  {
73  NONE = 0,
74  FACET,
75  SHARE,
76  ROUND,
77  TANGENT
78  };
79 
81  getToken(FirstV enum_value)
82  {
83  using namespace UT::Literal;
84  switch (enum_value) {
85  case FirstV::NONE: return "none"_sh;
86  case FirstV::FACET: return "facet"_sh;
87  case FirstV::SHARE: return "share"_sh;
88  case FirstV::ROUND: return "round"_sh;
89  case FirstV::TANGENT: return "tangent"_sh;
90  default: UT_ASSERT(false); return ""_sh;
91  }
92  }
93 
94  enum class LastV
95  {
96  NONE = 0,
97  FACET,
98  SHARE,
99  ROUND,
100  TANGENT
101  };
102 
104  getToken(LastV enum_value)
105  {
106  using namespace UT::Literal;
107  switch (enum_value) {
108  case LastV::NONE: return "none"_sh;
109  case LastV::FACET: return "facet"_sh;
110  case LastV::SHARE: return "share"_sh;
111  case LastV::ROUND: return "round"_sh;
112  case LastV::TANGENT: return "tangent"_sh;
113  default: UT_ASSERT(false); return ""_sh;
114  }
115  }
116 
117 }
118 
119 
121 {
122 public:
123  static int version() { return 1; }
124 
126  {
127  myGroup = ""_UTsh;
128  myFirstU = 1;
129  myDivsU1 = 4;
130  myScaleU1 = 1;
131  myLastU = 1;
132  myDivsU2 = 4;
133  myScaleU2 = 1;
134  myFirstV = 0;
135  myDivsV1 = 4;
136  myScaleV1 = 1;
137  myLastV = 0;
138  myDivsV2 = 4;
139  myScaleV2 = 1;
140  myPShapeU = true;
141  myPShapeV = true;
142 
143  }
144 
145  explicit SOP_CapParms(const SOP_CapParms &) = default;
146  SOP_CapParms &operator=(const SOP_CapParms &) = default;
147  SOP_CapParms(SOP_CapParms &&) noexcept = default;
148  SOP_CapParms &operator=(SOP_CapParms &&) noexcept = default;
149 
150  ~SOP_CapParms() override {}
151 
152  bool operator==(const SOP_CapParms &src) const
153  {
154  if (myGroup != src.myGroup) return false;
155  if (myFirstU != src.myFirstU) return false;
156  if (myDivsU1 != src.myDivsU1) return false;
157  if (myScaleU1 != src.myScaleU1) return false;
158  if (myLastU != src.myLastU) return false;
159  if (myDivsU2 != src.myDivsU2) return false;
160  if (myScaleU2 != src.myScaleU2) return false;
161  if (myFirstV != src.myFirstV) return false;
162  if (myDivsV1 != src.myDivsV1) return false;
163  if (myScaleV1 != src.myScaleV1) return false;
164  if (myLastV != src.myLastV) return false;
165  if (myDivsV2 != src.myDivsV2) return false;
166  if (myScaleV2 != src.myScaleV2) return false;
167  if (myPShapeU != src.myPShapeU) return false;
168  if (myPShapeV != src.myPShapeV) return false;
169 
170  return true;
171  }
172  bool operator!=(const SOP_CapParms &src) const
173  {
174  return !operator==(src);
175  }
180 
181 
182 
183  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
184  {
185  myGroup = ""_UTsh;
186  if (true)
187  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
188  myFirstU = 1;
189  if (true)
190  graph->evalOpParm(myFirstU, nodeidx, "firstu", time, 0);
191  myDivsU1 = 4;
192  if (true && ( (true&&!(((int64(getFirstU())<3)))) ) )
193  graph->evalOpParm(myDivsU1, nodeidx, "divsu1", time, 0);
194  myScaleU1 = 1;
195  if (true && ( (true&&!(((int64(getFirstU())<3)))) ) )
196  graph->evalOpParm(myScaleU1, nodeidx, "scaleu1", time, 0);
197  myLastU = 1;
198  if (true)
199  graph->evalOpParm(myLastU, nodeidx, "lastu", time, 0);
200  myDivsU2 = 4;
201  if (true && ( (true&&!(((int64(getLastU())<3)))) ) )
202  graph->evalOpParm(myDivsU2, nodeidx, "divsu2", time, 0);
203  myScaleU2 = 1;
204  if (true && ( (true&&!(((int64(getLastU())<3)))) ) )
205  graph->evalOpParm(myScaleU2, nodeidx, "scaleu2", time, 0);
206  myFirstV = 0;
207  if (true)
208  graph->evalOpParm(myFirstV, nodeidx, "firstv", time, 0);
209  myDivsV1 = 4;
210  if (true && ( (true&&!(((int64(getFirstV())<3)))) ) )
211  graph->evalOpParm(myDivsV1, nodeidx, "divsv1", time, 0);
212  myScaleV1 = 1;
213  if (true && ( (true&&!(((int64(getFirstV())<3)))) ) )
214  graph->evalOpParm(myScaleV1, nodeidx, "scalev1", time, 0);
215  myLastV = 0;
216  if (true)
217  graph->evalOpParm(myLastV, nodeidx, "lastv", time, 0);
218  myDivsV2 = 4;
219  if (true && ( (true&&!(((int64(getLastV())<3)))) ) )
220  graph->evalOpParm(myDivsV2, nodeidx, "divsv2", time, 0);
221  myScaleV2 = 1;
222  if (true && ( (true&&!(((int64(getLastV())<3)))) ) )
223  graph->evalOpParm(myScaleV2, nodeidx, "scalev2", time, 0);
224  myPShapeU = true;
225  if (true && ( (true&&!(((int64(getFirstU())<3)&&(int64(getLastU())<3)))) ) )
226  graph->evalOpParm(myPShapeU, nodeidx, "pshapeu", time, 0);
227  myPShapeV = true;
228  if (true && ( (true&&!(((int64(getFirstV())<3)&&(int64(getLastV())<3)))) ) )
229  graph->evalOpParm(myPShapeV, nodeidx, "pshapev", time, 0);
230 
231  }
232 
233 
234  void loadFromOpSubclass(const LoadParms &loadparms) override
235  {
236  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
237  }
238 
239 
240  void copyFrom(const OP_NodeParms *src) override
241  {
242  *this = *((const SOP_CapParms *)src);
243  }
244 
245  template <typename T>
246  void
247  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
248  {
249  if (idx.size() < 1)
250  return;
251  UT_ASSERT(idx.size() == instance.size()+1);
252  if (idx.size() != instance.size()+1)
253  return;
254  switch (idx[0])
255  {
256  case 0:
257  coerceValue(value, myGroup);
258  break;
259  case 1:
260  coerceValue(value, myFirstU);
261  break;
262  case 2:
263  coerceValue(value, myDivsU1);
264  break;
265  case 3:
266  coerceValue(value, myScaleU1);
267  break;
268  case 4:
269  coerceValue(value, myLastU);
270  break;
271  case 5:
272  coerceValue(value, myDivsU2);
273  break;
274  case 6:
275  coerceValue(value, myScaleU2);
276  break;
277  case 7:
278  coerceValue(value, myFirstV);
279  break;
280  case 8:
281  coerceValue(value, myDivsV1);
282  break;
283  case 9:
284  coerceValue(value, myScaleV1);
285  break;
286  case 10:
287  coerceValue(value, myLastV);
288  break;
289  case 11:
290  coerceValue(value, myDivsV2);
291  break;
292  case 12:
293  coerceValue(value, myScaleV2);
294  break;
295  case 13:
296  coerceValue(value, myPShapeU);
297  break;
298  case 14:
299  coerceValue(value, myPShapeV);
300  break;
301 
302  }
303  }
304 
305  bool isParmColorRamp(exint idx) const override
306  {
307  switch (idx)
308  {
309 
310  }
311  return false;
312  }
313 
314  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
315  { doGetParmValue(idx, instance, value); }
316  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
317  { doGetParmValue(idx, instance, value); }
318  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
319  { doGetParmValue(idx, instance, value); }
320  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
321  { doGetParmValue(idx, instance, value); }
322  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
323  { doGetParmValue(idx, instance, value); }
324  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
325  { doGetParmValue(idx, instance, value); }
326  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
327  { doGetParmValue(idx, instance, value); }
328  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
329  { doGetParmValue(idx, instance, value); }
330  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
331  { doGetParmValue(idx, instance, value); }
332  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
333  { doGetParmValue(idx, instance, value); }
334  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
335  { doGetParmValue(idx, instance, value); }
336 
337  template <typename T>
338  void
339  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
340  {
341  if (idx.size() < 1)
342  return;
343  UT_ASSERT(idx.size() == instance.size()+1);
344  if (idx.size() != instance.size()+1)
345  return;
346  switch (idx[0])
347  {
348  case 0:
349  coerceValue(myGroup, ( ( value ) ));
350  break;
351  case 1:
352  coerceValue(myFirstU, clampMinValue(0, clampMaxValue(4, value ) ));
353  break;
354  case 2:
355  coerceValue(myDivsU1, clampMinValue(1, ( value ) ));
356  break;
357  case 3:
358  coerceValue(myScaleU1, ( ( value ) ));
359  break;
360  case 4:
361  coerceValue(myLastU, clampMinValue(0, clampMaxValue(4, value ) ));
362  break;
363  case 5:
364  coerceValue(myDivsU2, clampMinValue(1, ( value ) ));
365  break;
366  case 6:
367  coerceValue(myScaleU2, ( ( value ) ));
368  break;
369  case 7:
370  coerceValue(myFirstV, clampMinValue(0, clampMaxValue(4, value ) ));
371  break;
372  case 8:
373  coerceValue(myDivsV1, clampMinValue(1, ( value ) ));
374  break;
375  case 9:
376  coerceValue(myScaleV1, ( ( value ) ));
377  break;
378  case 10:
379  coerceValue(myLastV, clampMinValue(0, clampMaxValue(4, value ) ));
380  break;
381  case 11:
382  coerceValue(myDivsV2, clampMinValue(1, ( value ) ));
383  break;
384  case 12:
385  coerceValue(myScaleV2, ( ( value ) ));
386  break;
387  case 13:
388  coerceValue(myPShapeU, ( ( value ) ));
389  break;
390  case 14:
391  coerceValue(myPShapeV, ( ( value ) ));
392  break;
393 
394  }
395  }
396 
397  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
398  { doSetParmValue(idx, instance, value); }
399  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
400  { doSetParmValue(idx, instance, value); }
401  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
402  { doSetParmValue(idx, instance, value); }
403  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
404  { doSetParmValue(idx, instance, value); }
405  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
406  { doSetParmValue(idx, instance, value); }
407  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
408  { doSetParmValue(idx, instance, value); }
409  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
410  { doSetParmValue(idx, instance, value); }
411  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
412  { doSetParmValue(idx, instance, value); }
413  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
414  { doSetParmValue(idx, instance, value); }
415  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
416  { doSetParmValue(idx, instance, value); }
417  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
418  { doSetParmValue(idx, instance, value); }
419 
420  exint getNestNumParms(TempIndex idx) const override
421  {
422  if (idx.size() == 0)
423  return 15;
424  switch (idx[0])
425  {
426 
427  }
428  // Invalid
429  return 0;
430  }
431 
432  const char *getNestParmName(TempIndex fieldnum) const override
433  {
434  if (fieldnum.size() < 1)
435  return 0;
436  switch (fieldnum[0])
437  {
438  case 0:
439  return "group";
440  case 1:
441  return "firstu";
442  case 2:
443  return "divsu1";
444  case 3:
445  return "scaleu1";
446  case 4:
447  return "lastu";
448  case 5:
449  return "divsu2";
450  case 6:
451  return "scaleu2";
452  case 7:
453  return "firstv";
454  case 8:
455  return "divsv1";
456  case 9:
457  return "scalev1";
458  case 10:
459  return "lastv";
460  case 11:
461  return "divsv2";
462  case 12:
463  return "scalev2";
464  case 13:
465  return "pshapeu";
466  case 14:
467  return "pshapev";
468 
469  }
470  return 0;
471  }
472 
473  ParmType getNestParmType(TempIndex fieldnum) const override
474  {
475  if (fieldnum.size() < 1)
476  return PARM_UNSUPPORTED;
477  switch (fieldnum[0])
478  {
479  case 0:
480  return PARM_STRING;
481  case 1:
482  return PARM_INTEGER;
483  case 2:
484  return PARM_INTEGER;
485  case 3:
486  return PARM_FLOAT;
487  case 4:
488  return PARM_INTEGER;
489  case 5:
490  return PARM_INTEGER;
491  case 6:
492  return PARM_FLOAT;
493  case 7:
494  return PARM_INTEGER;
495  case 8:
496  return PARM_INTEGER;
497  case 9:
498  return PARM_FLOAT;
499  case 10:
500  return PARM_INTEGER;
501  case 11:
502  return PARM_INTEGER;
503  case 12:
504  return PARM_FLOAT;
505  case 13:
506  return PARM_INTEGER;
507  case 14:
508  return PARM_INTEGER;
509 
510  }
511  return PARM_UNSUPPORTED;
512  }
513 
514  // Boiler plate to load individual types.
515  static void loadData(UT_IStream &is, int64 &v)
516  { is.bread(&v, 1); }
517  static void loadData(UT_IStream &is, bool &v)
518  { int64 iv; is.bread(&iv, 1); v = iv; }
519  static void loadData(UT_IStream &is, fpreal64 &v)
520  { is.bread<fpreal64>(&v, 1); }
521  static void loadData(UT_IStream &is, UT_Vector2D &v)
522  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
523  static void loadData(UT_IStream &is, UT_Vector3D &v)
524  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
525  is.bread<fpreal64>(&v.z(), 1); }
526  static void loadData(UT_IStream &is, UT_Vector4D &v)
527  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
528  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
529  static void loadData(UT_IStream &is, UT_Matrix2D &v)
530  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
531  static void loadData(UT_IStream &is, UT_Matrix3D &v)
532  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
533  static void loadData(UT_IStream &is, UT_Matrix4D &v)
534  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
535  static void loadData(UT_IStream &is, UT_Vector2I &v)
536  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
537  static void loadData(UT_IStream &is, UT_Vector3I &v)
538  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
539  is.bread<int64>(&v.z(), 1); }
540  static void loadData(UT_IStream &is, UT_Vector4I &v)
541  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
542  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
544  { is.bread(v); }
546  { UT_StringHolder rampdata;
547  loadData(is, rampdata);
548  if (rampdata.isstring())
549  {
550  v.reset(new UT_Ramp());
551  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
552  v->load(istr);
553  }
554  else v.reset();
555  }
558  loadData(is, data);
559  if (data.isstring())
560  {
561  // Find the data type.
562  const char *colon = UT_StringWrap(data).findChar(':');
563  if (colon)
564  {
565  int typelen = colon - data.buffer();
567  type.strncpy(data.buffer(), typelen);
568  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
569 
570  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
571  }
572  }
573  else v.reset();
574  }
575 
576  static void saveData(std::ostream &os, int64 v)
577  { UTwrite(os, &v); }
578  static void saveData(std::ostream &os, bool v)
579  { int64 iv = v; UTwrite(os, &iv); }
580  static void saveData(std::ostream &os, fpreal64 v)
581  { UTwrite<fpreal64>(os, &v); }
582  static void saveData(std::ostream &os, UT_Vector2D v)
583  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
584  static void saveData(std::ostream &os, UT_Vector3D v)
585  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
586  UTwrite<fpreal64>(os, &v.z()); }
587  static void saveData(std::ostream &os, UT_Vector4D v)
588  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
589  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
590  static void saveData(std::ostream &os, UT_Matrix2D v)
592  static void saveData(std::ostream &os, UT_Matrix3D v)
594  static void saveData(std::ostream &os, UT_Matrix4D v)
596  static void saveData(std::ostream &os, UT_StringHolder s)
597  { UT_StringWrap(s).saveBinary(os); }
598  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
600  UT_OStringStream ostr;
601  if (s) s->save(ostr);
602  result = ostr.str();
603  saveData(os, result);
604  }
605  static void saveData(std::ostream &os, PRM_DataItemHandle s)
607  UT_OStringStream ostr;
608  if (s)
609  {
610  ostr << s->getDataTypeToken();
611  ostr << ":";
612  s->saveBinary(ostr);
613  }
614  result = ostr.str();
615  saveData(os, result);
616  }
617 
618 
619  void save(std::ostream &os) const
620  {
621  int32 v = version();
622  UTwrite(os, &v);
623  saveData(os, myGroup);
624  saveData(os, myFirstU);
625  saveData(os, myDivsU1);
626  saveData(os, myScaleU1);
627  saveData(os, myLastU);
628  saveData(os, myDivsU2);
629  saveData(os, myScaleU2);
630  saveData(os, myFirstV);
631  saveData(os, myDivsV1);
632  saveData(os, myScaleV1);
633  saveData(os, myLastV);
634  saveData(os, myDivsV2);
635  saveData(os, myScaleV2);
636  saveData(os, myPShapeU);
637  saveData(os, myPShapeV);
638 
639  }
640 
641  bool load(UT_IStream &is)
642  {
643  int32 v;
644  is.bread(&v, 1);
645  if (version() != v)
646  {
647  // Fail incompatible versions
648  return false;
649  }
650  loadData(is, myGroup);
651  loadData(is, myFirstU);
652  loadData(is, myDivsU1);
653  loadData(is, myScaleU1);
654  loadData(is, myLastU);
655  loadData(is, myDivsU2);
656  loadData(is, myScaleU2);
657  loadData(is, myFirstV);
658  loadData(is, myDivsV1);
659  loadData(is, myScaleV1);
660  loadData(is, myLastV);
661  loadData(is, myDivsV2);
662  loadData(is, myScaleV2);
663  loadData(is, myPShapeU);
664  loadData(is, myPShapeV);
665 
666  return true;
667  }
668 
669  const UT_StringHolder & getGroup() const { return myGroup; }
670  void setGroup(const UT_StringHolder & val) { myGroup = val; }
672  {
673  SOP_Node *thissop = cookparms.getNode();
674  if (!thissop) return getGroup();
676  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
677  return result;
678  }
679  FirstU getFirstU() const { return FirstU(myFirstU); }
680  void setFirstU(FirstU val) { myFirstU = int64(val); }
681  FirstU opFirstU(const SOP_NodeVerb::CookParms &cookparms) const
682  {
683  SOP_Node *thissop = cookparms.getNode();
684  if (!thissop) return getFirstU();
685  int64 result;
686  OP_Utils::evalOpParm(result, thissop, "firstu", cookparms.getCookTime(), 0);
687  return FirstU(result);
688  }
689  int64 getDivsU1() const { return myDivsU1; }
690  void setDivsU1(int64 val) { myDivsU1 = val; }
691  int64 opDivsU1(const SOP_NodeVerb::CookParms &cookparms) const
692  {
693  SOP_Node *thissop = cookparms.getNode();
694  if (!thissop) return getDivsU1();
695  int64 result;
696  OP_Utils::evalOpParm(result, thissop, "divsu1", cookparms.getCookTime(), 0);
697  return result;
698  }
699  fpreal64 getScaleU1() const { return myScaleU1; }
700  void setScaleU1(fpreal64 val) { myScaleU1 = val; }
702  {
703  SOP_Node *thissop = cookparms.getNode();
704  if (!thissop) return getScaleU1();
706  OP_Utils::evalOpParm(result, thissop, "scaleu1", cookparms.getCookTime(), 0);
707  return result;
708  }
709  LastU getLastU() const { return LastU(myLastU); }
710  void setLastU(LastU val) { myLastU = int64(val); }
711  LastU opLastU(const SOP_NodeVerb::CookParms &cookparms) const
712  {
713  SOP_Node *thissop = cookparms.getNode();
714  if (!thissop) return getLastU();
715  int64 result;
716  OP_Utils::evalOpParm(result, thissop, "lastu", cookparms.getCookTime(), 0);
717  return LastU(result);
718  }
719  int64 getDivsU2() const { return myDivsU2; }
720  void setDivsU2(int64 val) { myDivsU2 = val; }
721  int64 opDivsU2(const SOP_NodeVerb::CookParms &cookparms) const
722  {
723  SOP_Node *thissop = cookparms.getNode();
724  if (!thissop) return getDivsU2();
725  int64 result;
726  OP_Utils::evalOpParm(result, thissop, "divsu2", cookparms.getCookTime(), 0);
727  return result;
728  }
729  fpreal64 getScaleU2() const { return myScaleU2; }
730  void setScaleU2(fpreal64 val) { myScaleU2 = val; }
732  {
733  SOP_Node *thissop = cookparms.getNode();
734  if (!thissop) return getScaleU2();
736  OP_Utils::evalOpParm(result, thissop, "scaleu2", cookparms.getCookTime(), 0);
737  return result;
738  }
739  FirstV getFirstV() const { return FirstV(myFirstV); }
740  void setFirstV(FirstV val) { myFirstV = int64(val); }
741  FirstV opFirstV(const SOP_NodeVerb::CookParms &cookparms) const
742  {
743  SOP_Node *thissop = cookparms.getNode();
744  if (!thissop) return getFirstV();
745  int64 result;
746  OP_Utils::evalOpParm(result, thissop, "firstv", cookparms.getCookTime(), 0);
747  return FirstV(result);
748  }
749  int64 getDivsV1() const { return myDivsV1; }
750  void setDivsV1(int64 val) { myDivsV1 = val; }
751  int64 opDivsV1(const SOP_NodeVerb::CookParms &cookparms) const
752  {
753  SOP_Node *thissop = cookparms.getNode();
754  if (!thissop) return getDivsV1();
755  int64 result;
756  OP_Utils::evalOpParm(result, thissop, "divsv1", cookparms.getCookTime(), 0);
757  return result;
758  }
759  fpreal64 getScaleV1() const { return myScaleV1; }
760  void setScaleV1(fpreal64 val) { myScaleV1 = val; }
762  {
763  SOP_Node *thissop = cookparms.getNode();
764  if (!thissop) return getScaleV1();
766  OP_Utils::evalOpParm(result, thissop, "scalev1", cookparms.getCookTime(), 0);
767  return result;
768  }
769  LastV getLastV() const { return LastV(myLastV); }
770  void setLastV(LastV val) { myLastV = int64(val); }
771  LastV opLastV(const SOP_NodeVerb::CookParms &cookparms) const
772  {
773  SOP_Node *thissop = cookparms.getNode();
774  if (!thissop) return getLastV();
775  int64 result;
776  OP_Utils::evalOpParm(result, thissop, "lastv", cookparms.getCookTime(), 0);
777  return LastV(result);
778  }
779  int64 getDivsV2() const { return myDivsV2; }
780  void setDivsV2(int64 val) { myDivsV2 = val; }
781  int64 opDivsV2(const SOP_NodeVerb::CookParms &cookparms) const
782  {
783  SOP_Node *thissop = cookparms.getNode();
784  if (!thissop) return getDivsV2();
785  int64 result;
786  OP_Utils::evalOpParm(result, thissop, "divsv2", cookparms.getCookTime(), 0);
787  return result;
788  }
789  fpreal64 getScaleV2() const { return myScaleV2; }
790  void setScaleV2(fpreal64 val) { myScaleV2 = val; }
792  {
793  SOP_Node *thissop = cookparms.getNode();
794  if (!thissop) return getScaleV2();
796  OP_Utils::evalOpParm(result, thissop, "scalev2", cookparms.getCookTime(), 0);
797  return result;
798  }
799  bool getPShapeU() const { return myPShapeU; }
800  void setPShapeU(bool val) { myPShapeU = val; }
801  bool opPShapeU(const SOP_NodeVerb::CookParms &cookparms) const
802  {
803  SOP_Node *thissop = cookparms.getNode();
804  if (!thissop) return getPShapeU();
805  bool result;
806  OP_Utils::evalOpParm(result, thissop, "pshapeu", cookparms.getCookTime(), 0);
807  return result;
808  }
809  bool getPShapeV() const { return myPShapeV; }
810  void setPShapeV(bool val) { myPShapeV = val; }
811  bool opPShapeV(const SOP_NodeVerb::CookParms &cookparms) const
812  {
813  SOP_Node *thissop = cookparms.getNode();
814  if (!thissop) return getPShapeV();
815  bool result;
816  OP_Utils::evalOpParm(result, thissop, "pshapev", cookparms.getCookTime(), 0);
817  return result;
818  }
819 
820 private:
821  UT_StringHolder myGroup;
822  int64 myFirstU;
823  int64 myDivsU1;
824  fpreal64 myScaleU1;
825  int64 myLastU;
826  int64 myDivsU2;
827  fpreal64 myScaleU2;
828  int64 myFirstV;
829  int64 myDivsV1;
830  fpreal64 myScaleV1;
831  int64 myLastV;
832  int64 myDivsV2;
833  fpreal64 myScaleV2;
834  bool myPShapeU;
835  bool myPShapeV;
836 
837 };
const char * getNestParmName(TempIndex fieldnum) const override
void loadFromOpSubclass(const LoadParms &loadparms) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void saveData(std::ostream &os, UT_Vector2D v)
int64 opDivsU1(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
FirstV getFirstV() const
static void loadData(UT_IStream &is, UT_Vector4I &v)
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
bool getPShapeV() const
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, fpreal64 v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
fpreal64 getScaleU1() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static int version()
const OP_Context & context() const
Definition: OP_NodeParms.h:97
void setGroup(const UT_StringHolder &val)
bool operator!=(const SOP_CapParms &src) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
void setFirstU(FirstU val)
SYS_FORCE_INLINE UT_StringHolder getToken(FirstU enum_value)
Definition: SOP_Cap.proto.h:35
SYS_FORCE_INLINE const char * buffer() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
ParmType getNestParmType(TempIndex fieldnum) const override
GLdouble s
Definition: glad.h:3009
static void loadData(UT_IStream &is, UT_Matrix3D &v)
An output stream object that owns its own string buffer storage.
int64 getDivsV2() const
static void loadData(UT_IStream &is, int64 &v)
void setFirstV(FirstV val)
**But if you need a result
Definition: thread.h:613
FirstV opFirstV(const SOP_NodeVerb::CookParms &cookparms) const
void setPShapeU(bool val)
fpreal64 opScaleV2(const SOP_NodeVerb::CookParms &cookparms) const
int64 getDivsV1() const
void copyFrom(const OP_NodeParms *src) override
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, fpreal &value) const override
int64 opDivsU2(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setScaleU1(fpreal64 val)
fpreal64 opScaleU1(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
const UT_StringHolder & getGroup() const
exint getNestNumParms(TempIndex idx) const override
void setLastU(LastU val)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
fpreal64 getScaleU2() const
static void saveData(std::ostream &os, UT_Vector3D v)
exint length() const
void setScaleV1(fpreal64 val)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
FirstU opFirstU(const SOP_NodeVerb::CookParms &cookparms) const
bool load(UT_IStream &is)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
void setScaleU2(fpreal64 val)
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
void setDivsV1(int64 val)
fpreal64 getScaleV2() const
long long int64
Definition: SYS_Types.h:116
LastU getLastU() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setDivsU2(int64 val)
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, fpreal64 &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
bool isParmColorRamp(exint idx) const override
LastV getLastV() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
GT_API const UT_StringHolder version
bool getPShapeU() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
LastV opLastV(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, UT_StringHolder s)
FirstU getFirstU() const
fpreal64 opScaleV1(const SOP_NodeVerb::CookParms &cookparms) const
void setDivsU1(int64 val)
void setScaleV2(fpreal64 val)
bool opPShapeU(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opScaleU2(const SOP_NodeVerb::CookParms &cookparms) const
int64 opDivsV2(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
static void saveData(std::ostream &os, UT_Matrix2D v)
LeafData & operator=(const LeafData &)=delete
void setLastV(LastV val)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
void save(std::ostream &os) const
static void saveData(std::ostream &os, UT_Matrix3D v)
LastU opLastU(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
int64 getDivsU1() const
GLuint GLfloat * val
Definition: glcorearb.h:1608
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
#define SOP_API
Definition: SOP_API.h:10
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setPShapeV(bool val)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
int64 getDivsU2() const
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
static void saveData(std::ostream &os, int64 v)
Definition: core.h:1131
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setDivsV2(int64 val)
GLboolean r
Definition: glcorearb.h:1222
bool operator==(const SOP_CapParms &src) const
static void saveData(std::ostream &os, UT_Matrix4D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
type
Definition: core.h:1059
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void saveData(std::ostream &os, bool v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
bool opPShapeV(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
int64 opDivsV1(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void loadData(UT_IStream &is, UT_Vector3I &v)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
static void loadData(UT_IStream &is, UT_Vector3D &v)
fpreal64 getScaleV1() const