HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_CurveNetwork.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_CurveNetworkEnums
24 {
25  enum class Surftype
26  {
27  ROWS = 0,
28  COLS,
29  ROWCOL,
30  TRIANGLES,
31  QUADS,
34  };
35 
37  getToken(Surftype enum_value)
38  {
39  using namespace UT::Literal;
40  switch (enum_value) {
41  case Surftype::ROWS: return "rows"_sh;
42  case Surftype::COLS: return "cols"_sh;
43  case Surftype::ROWCOL: return "rowcol"_sh;
44  case Surftype::TRIANGLES: return "triangles"_sh;
45  case Surftype::QUADS: return "quads"_sh;
46  case Surftype::ALTTRIANGLES: return "alttriangles"_sh;
47  case Surftype::REVTRIANGLES: return "revtriangles"_sh;
48  default: UT_ASSERT(false); return ""_sh;
49  }
50  }
51 
52  enum class Closev
53  {
54  NONEWV = 0,
55  WV,
56  IFPRIMWV
57  };
58 
60  getToken(Closev enum_value)
61  {
62  using namespace UT::Literal;
63  switch (enum_value) {
64  case Closev::NONEWV: return "nonewv"_sh;
65  case Closev::WV: return "wv"_sh;
66  case Closev::IFPRIMWV: return "ifprimwv"_sh;
67  default: UT_ASSERT(false); return ""_sh;
68  }
69  }
70 
71  enum class Skinops
72  {
73  ALL = 0,
74  GROUP,
75  SKIP
76  };
77 
79  getToken(Skinops enum_value)
80  {
81  using namespace UT::Literal;
82  switch (enum_value) {
83  case Skinops::ALL: return "all"_sh;
84  case Skinops::GROUP: return "group"_sh;
85  case Skinops::SKIP: return "skip"_sh;
86  default: UT_ASSERT(false); return ""_sh;
87  }
88  }
89 
90 }
91 
92 
94 {
95 public:
96  static int version() { return 1; }
97 
99  {
100  myUprims = ""_UTsh;
101  myVprims = ""_UTsh;
102  mySurftype = 4;
103  myKeepshape = false;
104  myClosev = 0;
105  myForce = false;
106  myOrderv = 4;
107  mySkinops = 0;
108  myInc = 2;
109  myPrim = false;
110  myPolys = true;
111 
112  }
113 
114  explicit SOP_CurveNetworkParms(const SOP_CurveNetworkParms &) = default;
116  SOP_CurveNetworkParms(SOP_CurveNetworkParms &&) noexcept = default;
117  SOP_CurveNetworkParms &operator=(SOP_CurveNetworkParms &&) noexcept = default;
118 
119  ~SOP_CurveNetworkParms() override {}
120 
122  {
123  if (myUprims != src.myUprims) return false;
124  if (myVprims != src.myVprims) return false;
125  if (mySurftype != src.mySurftype) return false;
126  if (myKeepshape != src.myKeepshape) return false;
127  if (myClosev != src.myClosev) return false;
128  if (myForce != src.myForce) return false;
129  if (myOrderv != src.myOrderv) return false;
130  if (mySkinops != src.mySkinops) return false;
131  if (myInc != src.myInc) return false;
132  if (myPrim != src.myPrim) return false;
133  if (myPolys != src.myPolys) return false;
134 
135  return true;
136  }
138  {
139  return !operator==(src);
140  }
144 
145 
146 
147  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
148  {
149  myUprims = ""_UTsh;
150  if (true)
151  graph->evalOpParm(myUprims, nodeidx, "uprims", time, 0);
152  myVprims = ""_UTsh;
153  if (true)
154  graph->evalOpParm(myVprims, nodeidx, "vprims", time, 0);
155  mySurftype = 4;
156  if (true)
157  graph->evalOpParm(mySurftype, nodeidx, "surftype", time, 0);
158  myKeepshape = false;
159  if (true)
160  graph->evalOpParm(myKeepshape, nodeidx, "keepshape", time, 0);
161  myClosev = 0;
162  if (true && ( (true&&!((((graph->getInput(nodeidx,1)>=0)==1))||((getVprims()!="")))) ) )
163  graph->evalOpParm(myClosev, nodeidx, "closev", time, 0);
164  myForce = false;
165  if (true && ( (true&&!((((graph->getInput(nodeidx,1)>=0)==1))||((getVprims()!="")))) ) )
166  graph->evalOpParm(myForce, nodeidx, "force", time, 0);
167  myOrderv = 4;
168  if (true && ( (true&&!((((graph->getInput(nodeidx,1)>=0)==1))||((getVprims()!=""))||((getForce()==0)))) ) )
169  graph->evalOpParm(myOrderv, nodeidx, "orderv", time, 0);
170  mySkinops = 0;
171  if (true && ( (true&&!((((graph->getInput(nodeidx,1)>=0)==1))||((getVprims()!="")))) ) )
172  graph->evalOpParm(mySkinops, nodeidx, "skinops", time, 0);
173  myInc = 2;
174  if (true && ( (true&&!((((graph->getInput(nodeidx,1)>=0)==1))||((getVprims()!=""))||((int64(getSkinops())==0)))) ) )
175  graph->evalOpParm(myInc, nodeidx, "inc", time, 0);
176  myPrim = false;
177  if (true)
178  graph->evalOpParm(myPrim, nodeidx, "prim", time, 0);
179  myPolys = true;
180  if (true)
181  graph->evalOpParm(myPolys, nodeidx, "polys", time, 0);
182 
183  }
184 
185 
186  void loadFromOpSubclass(const LoadParms &loadparms) override
187  {
188  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
189  }
190 
191 
192  void copyFrom(const OP_NodeParms *src) override
193  {
194  *this = *((const SOP_CurveNetworkParms *)src);
195  }
196 
197  template <typename T>
198  void
199  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
200  {
201  if (idx.size() < 1)
202  return;
203  UT_ASSERT(idx.size() == instance.size()+1);
204  if (idx.size() != instance.size()+1)
205  return;
206  switch (idx[0])
207  {
208  case 0:
209  coerceValue(value, myUprims);
210  break;
211  case 1:
212  coerceValue(value, myVprims);
213  break;
214  case 2:
215  coerceValue(value, mySurftype);
216  break;
217  case 3:
218  coerceValue(value, myKeepshape);
219  break;
220  case 4:
221  coerceValue(value, myClosev);
222  break;
223  case 5:
224  coerceValue(value, myForce);
225  break;
226  case 6:
227  coerceValue(value, myOrderv);
228  break;
229  case 7:
230  coerceValue(value, mySkinops);
231  break;
232  case 8:
233  coerceValue(value, myInc);
234  break;
235  case 9:
236  coerceValue(value, myPrim);
237  break;
238  case 10:
239  coerceValue(value, myPolys);
240  break;
241 
242  }
243  }
244 
245  bool isParmColorRamp(exint idx) const override
246  {
247  switch (idx)
248  {
249 
250  }
251  return false;
252  }
253 
254  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
255  { doGetParmValue(idx, instance, value); }
256  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
257  { doGetParmValue(idx, instance, value); }
258  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
259  { doGetParmValue(idx, instance, value); }
260  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
261  { doGetParmValue(idx, instance, value); }
262  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
263  { doGetParmValue(idx, instance, value); }
264  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
265  { doGetParmValue(idx, instance, value); }
266  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
267  { doGetParmValue(idx, instance, value); }
268  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
269  { doGetParmValue(idx, instance, value); }
270  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
271  { doGetParmValue(idx, instance, value); }
272  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
273  { doGetParmValue(idx, instance, value); }
274  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
275  { doGetParmValue(idx, instance, value); }
276 
277  template <typename T>
278  void
279  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
280  {
281  if (idx.size() < 1)
282  return;
283  UT_ASSERT(idx.size() == instance.size()+1);
284  if (idx.size() != instance.size()+1)
285  return;
286  switch (idx[0])
287  {
288  case 0:
289  coerceValue(myUprims, ( ( value ) ));
290  break;
291  case 1:
292  coerceValue(myVprims, ( ( value ) ));
293  break;
294  case 2:
295  coerceValue(mySurftype, clampMinValue(0, clampMaxValue(6, value ) ));
296  break;
297  case 3:
298  coerceValue(myKeepshape, ( ( value ) ));
299  break;
300  case 4:
301  coerceValue(myClosev, clampMinValue(0, clampMaxValue(2, value ) ));
302  break;
303  case 5:
304  coerceValue(myForce, ( ( value ) ));
305  break;
306  case 6:
307  coerceValue(myOrderv, clampMinValue(2, clampMaxValue(11, value ) ));
308  break;
309  case 7:
310  coerceValue(mySkinops, clampMinValue(0, clampMaxValue(2, value ) ));
311  break;
312  case 8:
313  coerceValue(myInc, clampMinValue(1, ( value ) ));
314  break;
315  case 9:
316  coerceValue(myPrim, ( ( value ) ));
317  break;
318  case 10:
319  coerceValue(myPolys, ( ( value ) ));
320  break;
321 
322  }
323  }
324 
325  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
326  { doSetParmValue(idx, instance, value); }
327  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
328  { doSetParmValue(idx, instance, value); }
329  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
330  { doSetParmValue(idx, instance, value); }
331  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
332  { doSetParmValue(idx, instance, value); }
333  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
334  { doSetParmValue(idx, instance, value); }
335  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
336  { doSetParmValue(idx, instance, value); }
337  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
338  { doSetParmValue(idx, instance, value); }
339  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
340  { doSetParmValue(idx, instance, value); }
341  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
342  { doSetParmValue(idx, instance, value); }
343  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
344  { doSetParmValue(idx, instance, value); }
345  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
346  { doSetParmValue(idx, instance, value); }
347 
348  exint getNestNumParms(TempIndex idx) const override
349  {
350  if (idx.size() == 0)
351  return 11;
352  switch (idx[0])
353  {
354 
355  }
356  // Invalid
357  return 0;
358  }
359 
360  const char *getNestParmName(TempIndex fieldnum) const override
361  {
362  if (fieldnum.size() < 1)
363  return 0;
364  switch (fieldnum[0])
365  {
366  case 0:
367  return "uprims";
368  case 1:
369  return "vprims";
370  case 2:
371  return "surftype";
372  case 3:
373  return "keepshape";
374  case 4:
375  return "closev";
376  case 5:
377  return "force";
378  case 6:
379  return "orderv";
380  case 7:
381  return "skinops";
382  case 8:
383  return "inc";
384  case 9:
385  return "prim";
386  case 10:
387  return "polys";
388 
389  }
390  return 0;
391  }
392 
393  ParmType getNestParmType(TempIndex fieldnum) const override
394  {
395  if (fieldnum.size() < 1)
396  return PARM_UNSUPPORTED;
397  switch (fieldnum[0])
398  {
399  case 0:
400  return PARM_STRING;
401  case 1:
402  return PARM_STRING;
403  case 2:
404  return PARM_INTEGER;
405  case 3:
406  return PARM_INTEGER;
407  case 4:
408  return PARM_INTEGER;
409  case 5:
410  return PARM_INTEGER;
411  case 6:
412  return PARM_INTEGER;
413  case 7:
414  return PARM_INTEGER;
415  case 8:
416  return PARM_INTEGER;
417  case 9:
418  return PARM_INTEGER;
419  case 10:
420  return PARM_INTEGER;
421 
422  }
423  return PARM_UNSUPPORTED;
424  }
425 
426  // Boiler plate to load individual types.
427  static void loadData(UT_IStream &is, int64 &v)
428  { is.bread(&v, 1); }
429  static void loadData(UT_IStream &is, bool &v)
430  { int64 iv; is.bread(&iv, 1); v = iv; }
431  static void loadData(UT_IStream &is, fpreal64 &v)
432  { is.bread<fpreal64>(&v, 1); }
433  static void loadData(UT_IStream &is, UT_Vector2D &v)
434  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
435  static void loadData(UT_IStream &is, UT_Vector3D &v)
436  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
437  is.bread<fpreal64>(&v.z(), 1); }
438  static void loadData(UT_IStream &is, UT_Vector4D &v)
439  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
440  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
441  static void loadData(UT_IStream &is, UT_Matrix2D &v)
442  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
443  static void loadData(UT_IStream &is, UT_Matrix3D &v)
444  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
445  static void loadData(UT_IStream &is, UT_Matrix4D &v)
446  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
447  static void loadData(UT_IStream &is, UT_Vector2I &v)
448  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
449  static void loadData(UT_IStream &is, UT_Vector3I &v)
450  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
451  is.bread<int64>(&v.z(), 1); }
452  static void loadData(UT_IStream &is, UT_Vector4I &v)
453  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
454  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
456  { is.bread(v); }
458  { UT_StringHolder rampdata;
459  loadData(is, rampdata);
460  if (rampdata.isstring())
461  {
462  v.reset(new UT_Ramp());
463  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
464  v->load(istr);
465  }
466  else v.reset();
467  }
470  loadData(is, data);
471  if (data.isstring())
472  {
473  // Find the data type.
474  const char *colon = UT_StringWrap(data).findChar(':');
475  if (colon)
476  {
477  int typelen = colon - data.buffer();
479  type.strncpy(data.buffer(), typelen);
480  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
481 
482  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
483  }
484  }
485  else v.reset();
486  }
487 
488  static void saveData(std::ostream &os, int64 v)
489  { UTwrite(os, &v); }
490  static void saveData(std::ostream &os, bool v)
491  { int64 iv = v; UTwrite(os, &iv); }
492  static void saveData(std::ostream &os, fpreal64 v)
493  { UTwrite<fpreal64>(os, &v); }
494  static void saveData(std::ostream &os, UT_Vector2D v)
495  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
496  static void saveData(std::ostream &os, UT_Vector3D v)
497  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
498  UTwrite<fpreal64>(os, &v.z()); }
499  static void saveData(std::ostream &os, UT_Vector4D v)
500  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
501  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
502  static void saveData(std::ostream &os, UT_Matrix2D v)
504  static void saveData(std::ostream &os, UT_Matrix3D v)
506  static void saveData(std::ostream &os, UT_Matrix4D v)
508  static void saveData(std::ostream &os, UT_StringHolder s)
509  { UT_StringWrap(s).saveBinary(os); }
510  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
512  UT_OStringStream ostr;
513  if (s) s->save(ostr);
514  result = ostr.str();
515  saveData(os, result);
516  }
517  static void saveData(std::ostream &os, PRM_DataItemHandle s)
519  UT_OStringStream ostr;
520  if (s)
521  {
522  ostr << s->getDataTypeToken();
523  ostr << ":";
524  s->saveBinary(ostr);
525  }
526  result = ostr.str();
527  saveData(os, result);
528  }
529 
530 
531  void save(std::ostream &os) const
532  {
533  int32 v = version();
534  UTwrite(os, &v);
535  saveData(os, myUprims);
536  saveData(os, myVprims);
537  saveData(os, mySurftype);
538  saveData(os, myKeepshape);
539  saveData(os, myClosev);
540  saveData(os, myForce);
541  saveData(os, myOrderv);
542  saveData(os, mySkinops);
543  saveData(os, myInc);
544  saveData(os, myPrim);
545  saveData(os, myPolys);
546 
547  }
548 
549  bool load(UT_IStream &is)
550  {
551  int32 v;
552  is.bread(&v, 1);
553  if (version() != v)
554  {
555  // Fail incompatible versions
556  return false;
557  }
558  loadData(is, myUprims);
559  loadData(is, myVprims);
560  loadData(is, mySurftype);
561  loadData(is, myKeepshape);
562  loadData(is, myClosev);
563  loadData(is, myForce);
564  loadData(is, myOrderv);
565  loadData(is, mySkinops);
566  loadData(is, myInc);
567  loadData(is, myPrim);
568  loadData(is, myPolys);
569 
570  return true;
571  }
572 
573  const UT_StringHolder & getUprims() const { return myUprims; }
574  void setUprims(const UT_StringHolder & val) { myUprims = val; }
576  {
577  SOP_Node *thissop = cookparms.getNode();
578  if (!thissop) return getUprims();
580  OP_Utils::evalOpParm(result, thissop, "uprims", cookparms.getCookTime(), 0);
581  return result;
582  }
583  const UT_StringHolder & getVprims() const { return myVprims; }
584  void setVprims(const UT_StringHolder & val) { myVprims = val; }
586  {
587  SOP_Node *thissop = cookparms.getNode();
588  if (!thissop) return getVprims();
590  OP_Utils::evalOpParm(result, thissop, "vprims", cookparms.getCookTime(), 0);
591  return result;
592  }
593  Surftype getSurftype() const { return Surftype(mySurftype); }
594  void setSurftype(Surftype val) { mySurftype = int64(val); }
596  {
597  SOP_Node *thissop = cookparms.getNode();
598  if (!thissop) return getSurftype();
599  int64 result;
600  OP_Utils::evalOpParm(result, thissop, "surftype", cookparms.getCookTime(), 0);
601  return Surftype(result);
602  }
603  bool getKeepshape() const { return myKeepshape; }
604  void setKeepshape(bool val) { myKeepshape = val; }
605  bool opKeepshape(const SOP_NodeVerb::CookParms &cookparms) const
606  {
607  SOP_Node *thissop = cookparms.getNode();
608  if (!thissop) return getKeepshape();
609  bool result;
610  OP_Utils::evalOpParm(result, thissop, "keepshape", cookparms.getCookTime(), 0);
611  return result;
612  }
613  Closev getClosev() const { return Closev(myClosev); }
614  void setClosev(Closev val) { myClosev = int64(val); }
615  Closev opClosev(const SOP_NodeVerb::CookParms &cookparms) const
616  {
617  SOP_Node *thissop = cookparms.getNode();
618  if (!thissop) return getClosev();
619  int64 result;
620  OP_Utils::evalOpParm(result, thissop, "closev", cookparms.getCookTime(), 0);
621  return Closev(result);
622  }
623  bool getForce() const { return myForce; }
624  void setForce(bool val) { myForce = val; }
625  bool opForce(const SOP_NodeVerb::CookParms &cookparms) const
626  {
627  SOP_Node *thissop = cookparms.getNode();
628  if (!thissop) return getForce();
629  bool result;
630  OP_Utils::evalOpParm(result, thissop, "force", cookparms.getCookTime(), 0);
631  return result;
632  }
633  int64 getOrderv() const { return myOrderv; }
634  void setOrderv(int64 val) { myOrderv = val; }
635  int64 opOrderv(const SOP_NodeVerb::CookParms &cookparms) const
636  {
637  SOP_Node *thissop = cookparms.getNode();
638  if (!thissop) return getOrderv();
639  int64 result;
640  OP_Utils::evalOpParm(result, thissop, "orderv", cookparms.getCookTime(), 0);
641  return result;
642  }
643  Skinops getSkinops() const { return Skinops(mySkinops); }
644  void setSkinops(Skinops val) { mySkinops = int64(val); }
645  Skinops opSkinops(const SOP_NodeVerb::CookParms &cookparms) const
646  {
647  SOP_Node *thissop = cookparms.getNode();
648  if (!thissop) return getSkinops();
649  int64 result;
650  OP_Utils::evalOpParm(result, thissop, "skinops", cookparms.getCookTime(), 0);
651  return Skinops(result);
652  }
653  int64 getInc() const { return myInc; }
654  void setInc(int64 val) { myInc = val; }
655  int64 opInc(const SOP_NodeVerb::CookParms &cookparms) const
656  {
657  SOP_Node *thissop = cookparms.getNode();
658  if (!thissop) return getInc();
659  int64 result;
660  OP_Utils::evalOpParm(result, thissop, "inc", cookparms.getCookTime(), 0);
661  return result;
662  }
663  bool getPrim() const { return myPrim; }
664  void setPrim(bool val) { myPrim = val; }
665  bool opPrim(const SOP_NodeVerb::CookParms &cookparms) const
666  {
667  SOP_Node *thissop = cookparms.getNode();
668  if (!thissop) return getPrim();
669  bool result;
670  OP_Utils::evalOpParm(result, thissop, "prim", cookparms.getCookTime(), 0);
671  return result;
672  }
673  bool getPolys() const { return myPolys; }
674  void setPolys(bool val) { myPolys = val; }
675  bool opPolys(const SOP_NodeVerb::CookParms &cookparms) const
676  {
677  SOP_Node *thissop = cookparms.getNode();
678  if (!thissop) return getPolys();
679  bool result;
680  OP_Utils::evalOpParm(result, thissop, "polys", cookparms.getCookTime(), 0);
681  return result;
682  }
683 
684 private:
685  UT_StringHolder myUprims;
686  UT_StringHolder myVprims;
687  int64 mySurftype;
688  bool myKeepshape;
689  int64 myClosev;
690  bool myForce;
691  int64 myOrderv;
692  int64 mySkinops;
693  int64 myInc;
694  bool myPrim;
695  bool myPolys;
696 
697 };
static void saveData(std::ostream &os, UT_Vector4D v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
Skinops opSkinops(const SOP_NodeVerb::CookParms &cookparms) const
bool operator!=(const SOP_CurveNetworkParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void loadData(UT_IStream &is, fpreal64 &v)
void loadFromOpSubclass(const LoadParms &loadparms) override
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:62
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
const OP_Context & context() const
Definition: OP_NodeParms.h:97
exint getNestNumParms(TempIndex idx) const override
static void loadData(UT_IStream &is, UT_StringHolder &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
static void loadData(UT_IStream &is, bool &v)
SYS_FORCE_INLINE const char * buffer() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
GLdouble s
Definition: glad.h:3009
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
const char * getNestParmName(TempIndex fieldnum) const override
**But if you need a result
Definition: thread.h:613
void setUprims(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector2D &v)
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
SYS_FORCE_INLINE UT_StringHolder getToken(Surftype enum_value)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
Closev opClosev(const SOP_NodeVerb::CookParms &cookparms) const
virtual NodeIdx getInput(NodeIdx idx, int input, bool markused=false) const =0
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
bool opPrim(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void saveData(std::ostream &os, UT_Vector3D v)
static void saveData(std::ostream &os, fpreal64 v)
static void saveData(std::ostream &os, int64 v)
bool isParmColorRamp(exint idx) const override
exint length() const
bool opPolys(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool operator==(const SOP_CurveNetworkParms &src) const
Surftype opSurftype(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
UT_StringHolder opUprims(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector2D v)
void copyFrom(const OP_NodeParms *src) override
const UT_StringHolder & getVprims() const
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
bool load(UT_IStream &is)
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
static void saveData(std::ostream &os, UT_Matrix3D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
static void saveData(std::ostream &os, UT_Matrix4D v)
long long int64
Definition: SYS_Types.h:116
UT_StringHolder opVprims(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
int64 opOrderv(const SOP_NodeVerb::CookParms &cookparms) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
const UT_StringHolder & getUprims() const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
GT_API const UT_StringHolder version
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
int64 opInc(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, int64 &v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void loadData(UT_IStream &is, UT_Vector4I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
GLuint GLfloat * val
Definition: glcorearb.h:1608
void setVprims(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Matrix2D v)
#define SOP_API
Definition: SOP_API.h:10
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
static void saveData(std::ostream &os, UT_StringHolder s)
static void saveData(std::ostream &os, bool v)
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
GLboolean r
Definition: glcorearb.h:1222
bool opForce(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
bool opKeepshape(const SOP_NodeVerb::CookParms &cookparms) const
type
Definition: core.h:1059
void setSurftype(Surftype val)
static void loadData(UT_IStream &is, UT_Vector2I &v)
ParmType getNestParmType(TempIndex fieldnum) const override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
void save(std::ostream &os) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663