HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_CarveParms.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_NodeVerb.h>
7 #include <SOP/SOP_GraphProxy.h>
8 
9 #include <OP/OP_Utils.h>
10 #include <PRM/PRM_Parm.h>
11 #include <UT/UT_IStream.h>
12 #include <UT/UT_NTStreamUtil.h>
13 #include <UT/UT_Ramp.h>
14 #include <UT/UT_SharedPtr.h>
15 #include <UT/UT_StringHolder.h>
16 #include <UT/UT_StringStream.h>
17 #include <UT/UT_VectorTypes.h>
18 #include <SYS/SYS_Types.h>
19 
20 using namespace UT::Literal;
21 
22 class DEP_MicroNode;
23 
25 {
26 public:
27  static int version() { return 1; }
28 
30  {
31  myGroup = ""_sh;
32  myFirstU = true;
33  myDomainU1 = 0.25;
34  mySecondU = false;
35  myDomainU2 = 0.75;
36  myFirstV = false;
37  myDomainV1 = 0.25;
38  mySecondV = false;
39  myDomainV2 = 0.75;
40  myOnlyBreakpoints = 0;
41  myDivsU = 2;
42  myDivsV = 2;
43  myAllUBreakpoints = false;
44  myAllVBreakpoints = false;
45  myFunction = 0;
46  myKeepIn = true;
47  myKeepOut = false;
48  myExtractOp = 0;
49  myKeepOriginal = false;
50 
51  }
52 
53  explicit SOP_CarveParms(const SOP_CarveParms &) = default;
54 
55  ~SOP_CarveParms() override {}
56 
57  bool operator==(const SOP_CarveParms &src) const
58  {
59  if (myGroup != src.myGroup) return false;
60  if (myFirstU != src.myFirstU) return false;
61  if (myDomainU1 != src.myDomainU1) return false;
62  if (mySecondU != src.mySecondU) return false;
63  if (myDomainU2 != src.myDomainU2) return false;
64  if (myFirstV != src.myFirstV) return false;
65  if (myDomainV1 != src.myDomainV1) return false;
66  if (mySecondV != src.mySecondV) return false;
67  if (myDomainV2 != src.myDomainV2) return false;
68  if (myOnlyBreakpoints != src.myOnlyBreakpoints) return false;
69  if (myDivsU != src.myDivsU) return false;
70  if (myDivsV != src.myDivsV) return false;
71  if (myAllUBreakpoints != src.myAllUBreakpoints) return false;
72  if (myAllVBreakpoints != src.myAllVBreakpoints) return false;
73  if (myFunction != src.myFunction) return false;
74  if (myKeepIn != src.myKeepIn) return false;
75  if (myKeepOut != src.myKeepOut) return false;
76  if (myExtractOp != src.myExtractOp) return false;
77  if (myKeepOriginal != src.myKeepOriginal) return false;
78 
79  return true;
80  }
81  bool operator!=(const SOP_CarveParms &src) const
82  {
83  return !operator==(src);
84  }
85 
86 
87 
88  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
89  {
90  myGroup = ""_sh;
91  if (true)
92  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
93  myFirstU = true;
94  if (true)
95  graph->evalOpParm(myFirstU, nodeidx, "firstu", time, 0);
96  myDomainU1 = 0.25;
97  if (true)
98  graph->evalOpParm(myDomainU1, nodeidx, "domainu1", time, 0);
99  mySecondU = false;
100  if (true)
101  graph->evalOpParm(mySecondU, nodeidx, "secondu", time, 0);
102  myDomainU2 = 0.75;
103  if (true)
104  graph->evalOpParm(myDomainU2, nodeidx, "domainu2", time, 0);
105  myFirstV = false;
106  if (true)
107  graph->evalOpParm(myFirstV, nodeidx, "firstv", time, 0);
108  myDomainV1 = 0.25;
109  if (true)
110  graph->evalOpParm(myDomainV1, nodeidx, "domainv1", time, 0);
111  mySecondV = false;
112  if (true)
113  graph->evalOpParm(mySecondV, nodeidx, "secondv", time, 0);
114  myDomainV2 = 0.75;
115  if (true)
116  graph->evalOpParm(myDomainV2, nodeidx, "domainv2", time, 0);
117  myOnlyBreakpoints = 0;
118  if (true)
119  graph->evalOpParm(myOnlyBreakpoints, nodeidx, "onlybreakpoints", time, 0);
120  myDivsU = 2;
121  if (true && ( (getOnlyBreakpoints()==0) ) )
122  graph->evalOpParm(myDivsU, nodeidx, "divsu", time, 0);
123  myDivsV = 2;
124  if (true && ( (getOnlyBreakpoints()==0) ) )
125  graph->evalOpParm(myDivsV, nodeidx, "divsv", time, 0);
126  myAllUBreakpoints = false;
127  if (true && ( (getOnlyBreakpoints()==1) ) )
128  graph->evalOpParm(myAllUBreakpoints, nodeidx, "allubreakpoints", time, 0);
129  myAllVBreakpoints = false;
130  if (true && ( (getOnlyBreakpoints()==1) ) )
131  graph->evalOpParm(myAllVBreakpoints, nodeidx, "allvbreakpoints", time, 0);
132  myFunction = 0;
133  if (true)
134  graph->evalOpParm(myFunction, nodeidx, "stdswitcher", time, 0);
135  myKeepIn = true;
136  if (true && ( (getFunction()==0) ) )
137  graph->evalOpParm(myKeepIn, nodeidx, "keepin", time, 0);
138  myKeepOut = false;
139  if (true && ( (getFunction()==0) ) )
140  graph->evalOpParm(myKeepOut, nodeidx, "keepout", time, 0);
141  myExtractOp = 0;
142  if (true && ( (getFunction()==1) ) )
143  graph->evalOpParm(myExtractOp, nodeidx, "extractop", time, 0);
144  myKeepOriginal = false;
145  if (true && ( (getFunction()==1) ) )
146  graph->evalOpParm(myKeepOriginal, nodeidx, "keepOriginal", time, 0);
147 
148  }
149 
150 
151  void loadFromOpSubclass(const LoadParms &loadparms) override
152  {
153  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
154  }
155 
156 
157  void copyFrom(const SOP_NodeParms *src) override
158  {
159  *this = *((const SOP_CarveParms *)src);
160  }
161 
162  template <typename T>
163  void
164  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
165  {
166  if (idx.size() < 1)
167  return;
168  UT_ASSERT(idx.size() == instance.size()+1);
169  if (idx.size() != instance.size()+1)
170  return;
171  switch (idx[0])
172  {
173  case 0:
174  coerceValue(value, myGroup);
175  break;
176  case 1:
177  coerceValue(value, myFirstU);
178  break;
179  case 2:
180  coerceValue(value, myDomainU1);
181  break;
182  case 3:
183  coerceValue(value, mySecondU);
184  break;
185  case 4:
186  coerceValue(value, myDomainU2);
187  break;
188  case 5:
189  coerceValue(value, myFirstV);
190  break;
191  case 6:
192  coerceValue(value, myDomainV1);
193  break;
194  case 7:
195  coerceValue(value, mySecondV);
196  break;
197  case 8:
198  coerceValue(value, myDomainV2);
199  break;
200  case 9:
201  coerceValue(value, myOnlyBreakpoints);
202  break;
203  case 10:
204  coerceValue(value, myDivsU);
205  break;
206  case 11:
207  coerceValue(value, myDivsV);
208  break;
209  case 12:
210  coerceValue(value, myAllUBreakpoints);
211  break;
212  case 13:
213  coerceValue(value, myAllVBreakpoints);
214  break;
215  case 14:
216  coerceValue(value, myFunction);
217  break;
218  case 15:
219  coerceValue(value, myKeepIn);
220  break;
221  case 16:
222  coerceValue(value, myKeepOut);
223  break;
224  case 17:
225  coerceValue(value, myExtractOp);
226  break;
227  case 18:
228  coerceValue(value, myKeepOriginal);
229  break;
230 
231  }
232  }
233 
234  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
235  { doGetParmValue(idx, instance, value); }
236  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
237  { doGetParmValue(idx, instance, value); }
238  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
239  { doGetParmValue(idx, instance, value); }
240  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
241  { doGetParmValue(idx, instance, value); }
242  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
243  { doGetParmValue(idx, instance, value); }
244  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
245  { doGetParmValue(idx, instance, value); }
246  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
247  { doGetParmValue(idx, instance, value); }
248  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
249  { doGetParmValue(idx, instance, value); }
250  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
251  { doGetParmValue(idx, instance, value); }
252  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
253  { doGetParmValue(idx, instance, value); }
254  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
255  { doGetParmValue(idx, instance, value); }
256 
257  template <typename T>
258  void
259  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
260  {
261  if (idx.size() < 1)
262  return;
263  UT_ASSERT(idx.size() == instance.size()+1);
264  if (idx.size() != instance.size()+1)
265  return;
266  switch (idx[0])
267  {
268  case 0:
269  coerceValue(myGroup, value);
270  break;
271  case 1:
272  coerceValue(myFirstU, value);
273  break;
274  case 2:
275  coerceValue(myDomainU1, value);
276  break;
277  case 3:
278  coerceValue(mySecondU, value);
279  break;
280  case 4:
281  coerceValue(myDomainU2, value);
282  break;
283  case 5:
284  coerceValue(myFirstV, value);
285  break;
286  case 6:
287  coerceValue(myDomainV1, value);
288  break;
289  case 7:
290  coerceValue(mySecondV, value);
291  break;
292  case 8:
293  coerceValue(myDomainV2, value);
294  break;
295  case 9:
296  coerceValue(myOnlyBreakpoints, value);
297  break;
298  case 10:
299  coerceValue(myDivsU, value);
300  break;
301  case 11:
302  coerceValue(myDivsV, value);
303  break;
304  case 12:
305  coerceValue(myAllUBreakpoints, value);
306  break;
307  case 13:
308  coerceValue(myAllVBreakpoints, value);
309  break;
310  case 14:
311  coerceValue(myFunction, value);
312  break;
313  case 15:
314  coerceValue(myKeepIn, value);
315  break;
316  case 16:
317  coerceValue(myKeepOut, value);
318  break;
319  case 17:
320  coerceValue(myExtractOp, value);
321  break;
322  case 18:
323  coerceValue(myKeepOriginal, value);
324  break;
325 
326  }
327  }
328 
329  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
330  { doSetParmValue(idx, instance, value); }
331  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
332  { doSetParmValue(idx, instance, value); }
333  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
334  { doSetParmValue(idx, instance, value); }
335  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
336  { doSetParmValue(idx, instance, value); }
337  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
338  { doSetParmValue(idx, instance, value); }
339  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
340  { doSetParmValue(idx, instance, value); }
341  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
342  { doSetParmValue(idx, instance, value); }
343  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
344  { doSetParmValue(idx, instance, value); }
345  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
346  { doSetParmValue(idx, instance, value); }
347  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
348  { doSetParmValue(idx, instance, value); }
349  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
350  { doSetParmValue(idx, instance, value); }
351 
352  exint getNestNumParms(TempIndex idx) const override
353  {
354  if (idx.size() == 0)
355  return 19;
356  switch (idx[0])
357  {
358 
359  }
360  // Invalid
361  return 0;
362  }
363 
364  const char *getNestParmName(TempIndex fieldnum) const override
365  {
366  if (fieldnum.size() < 1)
367  return 0;
368  switch (fieldnum[0])
369  {
370  case 0:
371  return "group";
372  case 1:
373  return "firstu";
374  case 2:
375  return "domainu1";
376  case 3:
377  return "secondu";
378  case 4:
379  return "domainu2";
380  case 5:
381  return "firstv";
382  case 6:
383  return "domainv1";
384  case 7:
385  return "secondv";
386  case 8:
387  return "domainv2";
388  case 9:
389  return "onlybreakpoints";
390  case 10:
391  return "divsu";
392  case 11:
393  return "divsv";
394  case 12:
395  return "allubreakpoints";
396  case 13:
397  return "allvbreakpoints";
398  case 14:
399  return "stdswitcher";
400  case 15:
401  return "keepin";
402  case 16:
403  return "keepout";
404  case 17:
405  return "extractop";
406  case 18:
407  return "keepOriginal";
408 
409  }
410  return 0;
411  }
412 
413  ParmType getNestParmType(TempIndex fieldnum) const override
414  {
415  if (fieldnum.size() < 1)
416  return PARM_UNSUPPORTED;
417  switch (fieldnum[0])
418  {
419  case 0:
420  return PARM_STRING;
421  case 1:
422  return PARM_INTEGER;
423  case 2:
424  return PARM_FLOAT;
425  case 3:
426  return PARM_INTEGER;
427  case 4:
428  return PARM_FLOAT;
429  case 5:
430  return PARM_INTEGER;
431  case 6:
432  return PARM_FLOAT;
433  case 7:
434  return PARM_INTEGER;
435  case 8:
436  return PARM_FLOAT;
437  case 9:
438  return PARM_INTEGER;
439  case 10:
440  return PARM_INTEGER;
441  case 11:
442  return PARM_INTEGER;
443  case 12:
444  return PARM_INTEGER;
445  case 13:
446  return PARM_INTEGER;
447  case 14:
448  return PARM_INTEGER;
449  case 15:
450  return PARM_INTEGER;
451  case 16:
452  return PARM_INTEGER;
453  case 17:
454  return PARM_INTEGER;
455  case 18:
456  return PARM_INTEGER;
457 
458  }
459  return PARM_UNSUPPORTED;
460  }
461 
462  // Boiler plate to load individual types.
463  static void loadData(UT_IStream &is, int64 &v)
464  { is.bread(&v, 1); }
465  static void loadData(UT_IStream &is, bool &v)
466  { int64 iv; is.bread(&iv, 1); v = iv; }
467  static void loadData(UT_IStream &is, fpreal64 &v)
468  { is.bread<fpreal64>(&v, 1); }
469  static void loadData(UT_IStream &is, UT_Vector2D &v)
470  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
471  static void loadData(UT_IStream &is, UT_Vector3D &v)
472  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
473  is.bread<fpreal64>(&v.z(), 1); }
474  static void loadData(UT_IStream &is, UT_Vector4D &v)
475  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
476  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
477  static void loadData(UT_IStream &is, UT_Matrix2D &v)
478  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
479  static void loadData(UT_IStream &is, UT_Matrix3D &v)
480  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
481  static void loadData(UT_IStream &is, UT_Matrix4D &v)
482  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
483  static void loadData(UT_IStream &is, UT_Vector2I &v)
484  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
485  static void loadData(UT_IStream &is, UT_Vector3I &v)
486  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
487  is.bread<int64>(&v.z(), 1); }
488  static void loadData(UT_IStream &is, UT_Vector4I &v)
489  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
490  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
492  { is.bread(v); }
494  { UT_StringHolder rampdata;
495  loadData(is, rampdata);
496  if (rampdata.isstring())
497  {
498  v.reset(new UT_Ramp());
499  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
500  v->load(istr);
501  }
502  else v.reset();
503  }
506  loadData(is, data);
507  if (data.isstring())
508  {
509  // Find the data type.
510  const char *colon = UT_StringWrap(data).findChar(':');
511  if (colon)
512  {
513  int typelen = colon - data.buffer();
515  type.strncpy(data.buffer(), typelen);
516  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
517 
518  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
519  }
520  }
521  else v.reset();
522  }
523 
524  static void saveData(std::ostream &os, int64 v)
525  { UTwrite(os, &v); }
526  static void saveData(std::ostream &os, bool v)
527  { int64 iv = v; UTwrite(os, &iv); }
528  static void saveData(std::ostream &os, fpreal64 v)
529  { UTwrite<fpreal64>(os, &v); }
530  static void saveData(std::ostream &os, UT_Vector2D v)
531  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
532  static void saveData(std::ostream &os, UT_Vector3D v)
533  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
534  UTwrite<fpreal64>(os, &v.z()); }
535  static void saveData(std::ostream &os, UT_Vector4D v)
536  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
537  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
538  static void saveData(std::ostream &os, UT_Matrix2D v)
540  static void saveData(std::ostream &os, UT_Matrix3D v)
542  static void saveData(std::ostream &os, UT_Matrix4D v)
544  static void saveData(std::ostream &os, UT_StringHolder s)
545  { UT_StringWrap(s).saveBinary(os); }
546  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
548  UT_OStringStream ostr;
549  if (s) s->save(ostr);
550  result = ostr.str();
551  saveData(os, result);
552  }
553  static void saveData(std::ostream &os, PRM_DataItemHandle s)
555  UT_OStringStream ostr;
556  if (s)
557  {
558  ostr << s->getDataTypeToken();
559  ostr << ":";
560  s->saveBinary(ostr);
561  }
562  result = ostr.str();
563  saveData(os, result);
564  }
565 
566 
567  void save(std::ostream &os) const
568  {
569  int32 v = version();
570  UTwrite(os, &v);
571  saveData(os, myGroup);
572  saveData(os, myFirstU);
573  saveData(os, myDomainU1);
574  saveData(os, mySecondU);
575  saveData(os, myDomainU2);
576  saveData(os, myFirstV);
577  saveData(os, myDomainV1);
578  saveData(os, mySecondV);
579  saveData(os, myDomainV2);
580  saveData(os, myOnlyBreakpoints);
581  saveData(os, myDivsU);
582  saveData(os, myDivsV);
583  saveData(os, myAllUBreakpoints);
584  saveData(os, myAllVBreakpoints);
585  saveData(os, myFunction);
586  saveData(os, myKeepIn);
587  saveData(os, myKeepOut);
588  saveData(os, myExtractOp);
589  saveData(os, myKeepOriginal);
590 
591  }
592 
593  bool load(UT_IStream &is)
594  {
595  int32 v;
596  is.bread(&v, 1);
597  if (version() != v)
598  {
599  // Fail incompatible versions
600  return false;
601  }
602  loadData(is, myGroup);
603  loadData(is, myFirstU);
604  loadData(is, myDomainU1);
605  loadData(is, mySecondU);
606  loadData(is, myDomainU2);
607  loadData(is, myFirstV);
608  loadData(is, myDomainV1);
609  loadData(is, mySecondV);
610  loadData(is, myDomainV2);
611  loadData(is, myOnlyBreakpoints);
612  loadData(is, myDivsU);
613  loadData(is, myDivsV);
614  loadData(is, myAllUBreakpoints);
615  loadData(is, myAllVBreakpoints);
616  loadData(is, myFunction);
617  loadData(is, myKeepIn);
618  loadData(is, myKeepOut);
619  loadData(is, myExtractOp);
620  loadData(is, myKeepOriginal);
621 
622  return true;
623  }
624 
625  const UT_StringHolder & getGroup() const { return myGroup; }
626  void setGroup(const UT_StringHolder & val) { myGroup = val; }
628  {
629  SOP_Node *thissop = cookparms.getNode();
630  if (!thissop) return getGroup();
632  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
633  return result;
634  }
635  bool getFirstU() const { return myFirstU; }
636  void setFirstU(bool val) { myFirstU = val; }
637  bool opFirstU(const SOP_NodeVerb::CookParms &cookparms) const
638  {
639  SOP_Node *thissop = cookparms.getNode();
640  if (!thissop) return getFirstU();
641  bool result;
642  OP_Utils::evalOpParm(result, thissop, "firstu", cookparms.getCookTime(), 0);
643  return result;
644  }
645  fpreal64 getDomainU1() const { return myDomainU1; }
646  void setDomainU1(fpreal64 val) { myDomainU1 = val; }
648  {
649  SOP_Node *thissop = cookparms.getNode();
650  if (!thissop) return getDomainU1();
652  OP_Utils::evalOpParm(result, thissop, "domainu1", cookparms.getCookTime(), 0);
653  return result;
654  }
655  bool getSecondU() const { return mySecondU; }
656  void setSecondU(bool val) { mySecondU = val; }
657  bool opSecondU(const SOP_NodeVerb::CookParms &cookparms) const
658  {
659  SOP_Node *thissop = cookparms.getNode();
660  if (!thissop) return getSecondU();
661  bool result;
662  OP_Utils::evalOpParm(result, thissop, "secondu", cookparms.getCookTime(), 0);
663  return result;
664  }
665  fpreal64 getDomainU2() const { return myDomainU2; }
666  void setDomainU2(fpreal64 val) { myDomainU2 = val; }
668  {
669  SOP_Node *thissop = cookparms.getNode();
670  if (!thissop) return getDomainU2();
672  OP_Utils::evalOpParm(result, thissop, "domainu2", cookparms.getCookTime(), 0);
673  return result;
674  }
675  bool getFirstV() const { return myFirstV; }
676  void setFirstV(bool val) { myFirstV = val; }
677  bool opFirstV(const SOP_NodeVerb::CookParms &cookparms) const
678  {
679  SOP_Node *thissop = cookparms.getNode();
680  if (!thissop) return getFirstV();
681  bool result;
682  OP_Utils::evalOpParm(result, thissop, "firstv", cookparms.getCookTime(), 0);
683  return result;
684  }
685  fpreal64 getDomainV1() const { return myDomainV1; }
686  void setDomainV1(fpreal64 val) { myDomainV1 = val; }
688  {
689  SOP_Node *thissop = cookparms.getNode();
690  if (!thissop) return getDomainV1();
692  OP_Utils::evalOpParm(result, thissop, "domainv1", cookparms.getCookTime(), 0);
693  return result;
694  }
695  bool getSecondV() const { return mySecondV; }
696  void setSecondV(bool val) { mySecondV = val; }
697  bool opSecondV(const SOP_NodeVerb::CookParms &cookparms) const
698  {
699  SOP_Node *thissop = cookparms.getNode();
700  if (!thissop) return getSecondV();
701  bool result;
702  OP_Utils::evalOpParm(result, thissop, "secondv", cookparms.getCookTime(), 0);
703  return result;
704  }
705  fpreal64 getDomainV2() const { return myDomainV2; }
706  void setDomainV2(fpreal64 val) { myDomainV2 = val; }
708  {
709  SOP_Node *thissop = cookparms.getNode();
710  if (!thissop) return getDomainV2();
712  OP_Utils::evalOpParm(result, thissop, "domainv2", cookparms.getCookTime(), 0);
713  return result;
714  }
715  int64 getOnlyBreakpoints() const { return myOnlyBreakpoints; }
716  void setOnlyBreakpoints(int64 val) { myOnlyBreakpoints = val; }
718  {
719  SOP_Node *thissop = cookparms.getNode();
720  if (!thissop) return getOnlyBreakpoints();
721  int64 result;
722  OP_Utils::evalOpParm(result, thissop, "onlybreakpoints", cookparms.getCookTime(), 0);
723  return result;
724  }
725  int64 getDivsU() const { return myDivsU; }
726  void setDivsU(int64 val) { myDivsU = val; }
727  int64 opDivsU(const SOP_NodeVerb::CookParms &cookparms) const
728  {
729  SOP_Node *thissop = cookparms.getNode();
730  if (!thissop) return getDivsU();
731  int64 result;
732  OP_Utils::evalOpParm(result, thissop, "divsu", cookparms.getCookTime(), 0);
733  return result;
734  }
735  int64 getDivsV() const { return myDivsV; }
736  void setDivsV(int64 val) { myDivsV = val; }
737  int64 opDivsV(const SOP_NodeVerb::CookParms &cookparms) const
738  {
739  SOP_Node *thissop = cookparms.getNode();
740  if (!thissop) return getDivsV();
741  int64 result;
742  OP_Utils::evalOpParm(result, thissop, "divsv", cookparms.getCookTime(), 0);
743  return result;
744  }
745  bool getAllUBreakpoints() const { return myAllUBreakpoints; }
746  void setAllUBreakpoints(bool val) { myAllUBreakpoints = val; }
747  bool opAllUBreakpoints(const SOP_NodeVerb::CookParms &cookparms) const
748  {
749  SOP_Node *thissop = cookparms.getNode();
750  if (!thissop) return getAllUBreakpoints();
751  bool result;
752  OP_Utils::evalOpParm(result, thissop, "allubreakpoints", cookparms.getCookTime(), 0);
753  return result;
754  }
755  bool getAllVBreakpoints() const { return myAllVBreakpoints; }
756  void setAllVBreakpoints(bool val) { myAllVBreakpoints = val; }
757  bool opAllVBreakpoints(const SOP_NodeVerb::CookParms &cookparms) const
758  {
759  SOP_Node *thissop = cookparms.getNode();
760  if (!thissop) return getAllVBreakpoints();
761  bool result;
762  OP_Utils::evalOpParm(result, thissop, "allvbreakpoints", cookparms.getCookTime(), 0);
763  return result;
764  }
765  int64 getFunction() const { return myFunction; }
766  void setFunction(int64 val) { myFunction = val; }
767  int64 opFunction(const SOP_NodeVerb::CookParms &cookparms) const
768  {
769  SOP_Node *thissop = cookparms.getNode();
770  if (!thissop) return getFunction();
771  int64 result;
772  OP_Utils::evalOpParm(result, thissop, "stdswitcher", cookparms.getCookTime(), 0);
773  return result;
774  }
775  bool getKeepIn() const { return myKeepIn; }
776  void setKeepIn(bool val) { myKeepIn = val; }
777  bool opKeepIn(const SOP_NodeVerb::CookParms &cookparms) const
778  {
779  SOP_Node *thissop = cookparms.getNode();
780  if (!thissop) return getKeepIn();
781  bool result;
782  OP_Utils::evalOpParm(result, thissop, "keepin", cookparms.getCookTime(), 0);
783  return result;
784  }
785  bool getKeepOut() const { return myKeepOut; }
786  void setKeepOut(bool val) { myKeepOut = val; }
787  bool opKeepOut(const SOP_NodeVerb::CookParms &cookparms) const
788  {
789  SOP_Node *thissop = cookparms.getNode();
790  if (!thissop) return getKeepOut();
791  bool result;
792  OP_Utils::evalOpParm(result, thissop, "keepout", cookparms.getCookTime(), 0);
793  return result;
794  }
795  int64 getExtractOp() const { return myExtractOp; }
796  void setExtractOp(int64 val) { myExtractOp = val; }
797  int64 opExtractOp(const SOP_NodeVerb::CookParms &cookparms) const
798  {
799  SOP_Node *thissop = cookparms.getNode();
800  if (!thissop) return getExtractOp();
801  int64 result;
802  OP_Utils::evalOpParm(result, thissop, "extractop", cookparms.getCookTime(), 0);
803  return result;
804  }
805  bool getKeepOriginal() const { return myKeepOriginal; }
806  void setKeepOriginal(bool val) { myKeepOriginal = val; }
807  bool opKeepOriginal(const SOP_NodeVerb::CookParms &cookparms) const
808  {
809  SOP_Node *thissop = cookparms.getNode();
810  if (!thissop) return getKeepOriginal();
811  bool result;
812  OP_Utils::evalOpParm(result, thissop, "keepOriginal", cookparms.getCookTime(), 0);
813  return result;
814  }
815 
816 private:
817  UT_StringHolder myGroup;
818  bool myFirstU;
819  fpreal64 myDomainU1;
820  bool mySecondU;
821  fpreal64 myDomainU2;
822  bool myFirstV;
823  fpreal64 myDomainV1;
824  bool mySecondV;
825  fpreal64 myDomainV2;
826  int64 myOnlyBreakpoints;
827  int64 myDivsU;
828  int64 myDivsV;
829  bool myAllUBreakpoints;
830  bool myAllVBreakpoints;
831  int64 myFunction;
832  bool myKeepIn;
833  bool myKeepOut;
834  int64 myExtractOp;
835  bool myKeepOriginal;
836 
837 };
fpreal64 getDomainU1() const
GLdouble s
Definition: glew.h:1390
void setFirstV(bool val)
bool opKeepOriginal(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
int64 opDivsV(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void saveData(std::ostream &os, UT_Matrix2D v)
exint nodeIdx() const
Definition: SOP_NodeVerb.h:114
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setFunction(int64 val)
GLenum src
Definition: glew.h:2410
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:640
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
bool operator==(const SOP_CarveParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void setDivsU(int64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
bool operator!=(const SOP_CarveParms &src) const
bool getSecondU() const
exint bread(int32 *buffer, exint asize=1)
int64 getExtractOp() const
GT_API const UT_StringHolder time
fpreal getTime() const
Definition: OP_Context.h:60
static void loadData(UT_IStream &is, UT_StringHolder &v)
GLuint const GLfloat * val
Definition: glew.h:2794
bool opKeepOut(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void saveData(std::ostream &os, fpreal64 v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
int64 opFunction(const SOP_NodeVerb::CookParms &cookparms) const
int64 exint
Definition: SYS_Types.h:125
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void saveData(std::ostream &os, UT_Vector2D v)
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:113
void setExtractOp(int64 val)
void setKeepOriginal(bool val)
static int version()
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
An output stream object that owns its own string buffer storage.
int64 opExtractOp(const SOP_NodeVerb::CookParms &cookparms) const
const GLdouble * v
Definition: glew.h:1391
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
fpreal64 getDomainV1() const
bool getFirstU() const
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, exint &value) const override
int64 getDivsU() const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void saveData(std::ostream &os, UT_StringHolder s)
const UT_StringHolder & getGroup() const
static void loadData(UT_IStream &is, bool &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
bool opSecondV(const SOP_NodeVerb::CookParms &cookparms) const
bool getSecondV() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
bool load(UT_IStream &is)
double fpreal64
Definition: SYS_Types.h:201
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void setDomainU1(fpreal64 val)
void setGroup(const UT_StringHolder &val)
void setKeepIn(bool val)
void setOnlyBreakpoints(int64 val)
int64 getDivsV() const
bool getKeepOriginal() const
bool opFirstU(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:513
void setDivsV(int64 val)
static void saveData(std::ostream &os, UT_Matrix3D v)
exint length() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
fpreal64 getDomainU2() const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
void loadFromOpSubclass(const LoadParms &loadparms) override
exint getNestNumParms(TempIndex idx) const override
bool opSecondU(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:515
const GLfloat * c
Definition: glew.h:16296
void setSecondV(bool val)
int64 getFunction() const
void setAllUBreakpoints(bool val)
bool opAllVBreakpoints(const SOP_NodeVerb::CookParms &cookparms) const
long long int64
Definition: SYS_Types.h:116
const char * getNestParmName(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setSecondU(bool val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setDomainV2(fpreal64 val)
bool opAllUBreakpoints(const SOP_NodeVerb::CookParms &cookparms) const
int64 getOnlyBreakpoints() const
void setKeepOut(bool val)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
static void loadData(UT_IStream &is, UT_Vector3D &v)
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:121
void setDomainV1(fpreal64 val)
fpreal64 getDomainV2() const
bool getKeepIn() const
bool getFirstV() const
ParmType getNestParmType(TempIndex fieldnum) const override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setAllVBreakpoints(bool val)
static void saveData(std::ostream &os, bool v)
static void saveData(std::ostream &os, UT_Matrix4D v)
fpreal64 fpreal
Definition: SYS_Types.h:277
bool getKeepOut() const
int64 opDivsU(const SOP_NodeVerb::CookParms &cookparms) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
fpreal64 opDomainV2(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
~SOP_CarveParms() override
#define SOP_API
Definition: SOP_API.h:10
static void loadData(UT_IStream &is, int64 &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:511
bool getAllVBreakpoints() const
int64 opOnlyBreakpoints(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:654
fpreal64 opDomainV1(const SOP_NodeVerb::CookParms &cookparms) const
GLuint64EXT * result
Definition: glew.h:14007
bool getAllUBreakpoints() const
const char * findChar(int c) const
Definition: UT_String.h:1367
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
void setFirstU(bool val)
bool opFirstV(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
fpreal64 opDomainU2(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setDomainU2(fpreal64 val)
GLsizei const GLfloat * value
Definition: glew.h:1849
const OP_Context & context() const
Definition: SOP_NodeVerb.h:119
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
static void saveData(std::ostream &os, UT_Vector3D v)
fpreal64 opDomainU1(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
SYS_FORCE_INLINE bool isstring() const
bool opKeepIn(const SOP_NodeVerb::CookParms &cookparms) const
void copyFrom(const SOP_NodeParms *src) override
static void loadData(UT_IStream &is, UT_Vector2I &v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
type
Definition: core.h:528
static void saveData(std::ostream &os, UT_Vector4D v)
void save(std::ostream &os) const