HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_AttribStringEdit.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  struct Filters
29  {
30  bool filter;
31  bool regex;
32  bool global;
35 
36 
38  {
39  filter = true;
40  regex = false;
41  global = false;
42  from = ""_sh;
43  to = ""_sh;
44 
45  }
46 
47  bool operator==(const Filters &src) const
48  {
49  if (filter != src.filter) return false;
50  if (regex != src.regex) return false;
51  if (global != src.global) return false;
52  if (from != src.from) return false;
53  if (to != src.to) return false;
54 
55  return true;
56  }
57  bool operator!=(const Filters &src) const
58  {
59  return !operator==(src);
60  }
61 
62  };
63 
65  {
67 
68  buf.strcat("[ ");
69  for (int i = 0; i < list.entries(); i++)
70  {
71  if (i)
72  buf.strcat(", ");
73  buf.strcat("( ");
74  buf.append("");
75  buf.appendSprintf("%s", (list(i).filter) ? "true" : "false");
76  buf.append(", ");
77  buf.appendSprintf("%s", (list(i).regex) ? "true" : "false");
78  buf.append(", ");
79  buf.appendSprintf("%s", (list(i).global) ? "true" : "false");
80  buf.append(", ");
81  { UT_String tmp; tmp = UT_StringWrap(list(i).from).makeQuotedString('"'); buf.strcat(tmp); }
82  buf.append(", ");
83  { UT_String tmp; tmp = UT_StringWrap(list(i).to).makeQuotedString('"'); buf.strcat(tmp); }
84 
85  buf.strcat(" )");
86  }
87  buf.strcat(" ]");
88 
90  return result;
91  }
92 
94  {
95  myEnableDetail = false;
96  myDetailAttribList = ""_sh;
97  myEnablePrimitives = true;
98  myPrimAttribList = ""_sh;
99  myEnablePoints = true;
100  myPointAttribList = ""_sh;
101  myEnableVertices = false;
102  myVertexAttribList = ""_sh;
103 
104  }
105 
106  explicit SOP_AttribStringEditParms(const SOP_AttribStringEditParms &) = default;
107 
109 
111  {
112  if (myEnableDetail != src.myEnableDetail) return false;
113  if (myDetailAttribList != src.myDetailAttribList) return false;
114  if (myEnablePrimitives != src.myEnablePrimitives) return false;
115  if (myPrimAttribList != src.myPrimAttribList) return false;
116  if (myEnablePoints != src.myEnablePoints) return false;
117  if (myPointAttribList != src.myPointAttribList) return false;
118  if (myEnableVertices != src.myEnableVertices) return false;
119  if (myVertexAttribList != src.myVertexAttribList) return false;
120  if (myFilters != src.myFilters) return false;
121 
122  return true;
123  }
125  {
126  return !operator==(src);
127  }
128 
129 
130 
131  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
132  {
133  myEnableDetail = false;
134  if (true)
135  graph->evalOpParm(myEnableDetail, nodeidx, "detailattribs", time, 0);
136  myDetailAttribList = ""_sh;
137  if (true && ( (!(((getEnableDetail()==0)))) ) )
138  graph->evalOpParm(myDetailAttribList, nodeidx, "detailattriblist", time, 0);
139  myEnablePrimitives = true;
140  if (true)
141  graph->evalOpParm(myEnablePrimitives, nodeidx, "primitiveattribs", time, 0);
142  myPrimAttribList = ""_sh;
143  if (true && ( (!(((getEnablePrimitives()==0)))) ) )
144  graph->evalOpParm(myPrimAttribList, nodeidx, "primattriblist", time, 0);
145  myEnablePoints = true;
146  if (true)
147  graph->evalOpParm(myEnablePoints, nodeidx, "pointattribs", time, 0);
148  myPointAttribList = ""_sh;
149  if (true && ( (!(((getEnablePoints()==0)))) ) )
150  graph->evalOpParm(myPointAttribList, nodeidx, "pointattriblist", time, 0);
151  myEnableVertices = false;
152  if (true)
153  graph->evalOpParm(myEnableVertices, nodeidx, "vertexattribs", time, 0);
154  myVertexAttribList = ""_sh;
155  if (true && ( (!(((getEnableVertices()==0)))) ) )
156  graph->evalOpParm(myVertexAttribList, nodeidx, "vertexattriblist", time, 0);
157  if (true)
158  {
159  int64 length = 0;
160  graph->evalOpParm(length, nodeidx, "filters", time, 0);
161  myFilters.entries(length);
162  for (exint i = 0; i < length; i++)
163  {
164  int parmidx = i+0;
165  auto && _curentry = myFilters(i);
166  (void) _curentry;
167  myFilters(i).filter = true;
168  if (true)
169  graph->evalOpParmInst(myFilters(i).filter, nodeidx, "filter#", &parmidx, time, 0);
170  myFilters(i).regex = false;
171  if (true && ( (!(((_curentry.filter==0)))) ) )
172  graph->evalOpParmInst(myFilters(i).regex, nodeidx, "regex#", &parmidx, time, 0);
173  myFilters(i).global = false;
174  if (true && ( (!(((_curentry.filter==0)))) ) )
175  graph->evalOpParmInst(myFilters(i).global, nodeidx, "global#", &parmidx, time, 0);
176  myFilters(i).from = ""_sh;
177  if (true && ( (!(((_curentry.filter==0)))) ) )
178  graph->evalOpParmInst(myFilters(i).from, nodeidx, "from#", &parmidx, time, 0);
179  myFilters(i).to = ""_sh;
180  if (true && ( (!(((_curentry.filter==0)))) ) )
181  graph->evalOpParmInst(myFilters(i).to, nodeidx, "to#", &parmidx, time, 0);
182 
183  }
184  }
185  else
186  myFilters.clear();
187 
188  }
189 
190 
191  void loadFromOpSubclass(const LoadParms &loadparms) override
192  {
193  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
194  }
195 
196 
197  void copyFrom(const SOP_NodeParms *src) override
198  {
199  *this = *((const SOP_AttribStringEditParms *)src);
200  }
201 
202  template <typename T>
203  void
204  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
205  {
206  if (idx.size() < 1)
207  return;
208  UT_ASSERT(idx.size() == instance.size()+1);
209  if (idx.size() != instance.size()+1)
210  return;
211  switch (idx[0])
212  {
213  case 0:
214  coerceValue(value, myEnableDetail);
215  break;
216  case 1:
217  coerceValue(value, myDetailAttribList);
218  break;
219  case 2:
220  coerceValue(value, myEnablePrimitives);
221  break;
222  case 3:
223  coerceValue(value, myPrimAttribList);
224  break;
225  case 4:
226  coerceValue(value, myEnablePoints);
227  break;
228  case 5:
229  coerceValue(value, myPointAttribList);
230  break;
231  case 6:
232  coerceValue(value, myEnableVertices);
233  break;
234  case 7:
235  coerceValue(value, myVertexAttribList);
236  break;
237  case 8:
238  if (idx.size() == 1)
239  coerceValue(value, myFilters.entries());
240  else if (instance[0] < myFilters.entries())
241  {
242  auto && _data = myFilters(instance[0]);
243  switch (idx[1])
244  {
245  case 0:
246  coerceValue(value, _data.filter);
247  break;
248  case 1:
249  coerceValue(value, _data.regex);
250  break;
251  case 2:
252  coerceValue(value, _data.global);
253  break;
254  case 3:
255  coerceValue(value, _data.from);
256  break;
257  case 4:
258  coerceValue(value, _data.to);
259  break;
260 
261  }
262  }
263  break;
264 
265  }
266  }
267 
268  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
269  { doGetParmValue(idx, instance, value); }
270  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
271  { doGetParmValue(idx, instance, value); }
272  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
273  { doGetParmValue(idx, instance, value); }
274  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
275  { doGetParmValue(idx, instance, value); }
276  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
277  { doGetParmValue(idx, instance, value); }
278  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
279  { doGetParmValue(idx, instance, value); }
280  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
281  { doGetParmValue(idx, instance, value); }
282  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
283  { doGetParmValue(idx, instance, value); }
284  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
285  { doGetParmValue(idx, instance, value); }
286  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
287  { doGetParmValue(idx, instance, value); }
288  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
289  { doGetParmValue(idx, instance, value); }
290 
291  template <typename T>
292  void
293  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
294  {
295  if (idx.size() < 1)
296  return;
297  UT_ASSERT(idx.size() == instance.size()+1);
298  if (idx.size() != instance.size()+1)
299  return;
300  switch (idx[0])
301  {
302  case 0:
303  coerceValue(myEnableDetail, value);
304  break;
305  case 1:
306  coerceValue(myDetailAttribList, value);
307  break;
308  case 2:
309  coerceValue(myEnablePrimitives, value);
310  break;
311  case 3:
312  coerceValue(myPrimAttribList, value);
313  break;
314  case 4:
315  coerceValue(myEnablePoints, value);
316  break;
317  case 5:
318  coerceValue(myPointAttribList, value);
319  break;
320  case 6:
321  coerceValue(myEnableVertices, value);
322  break;
323  case 7:
324  coerceValue(myVertexAttribList, value);
325  break;
326  case 8:
327  if (idx.size() == 1)
328  {
329  exint newsize;
330  coerceValue(newsize, value);
331  myFilters.setSize(newsize);
332  }
333  else
334  {
335  myFilters.setSizeIfNeeded(instance[0]+1);
336  auto && _data = myFilters(instance[0]);
337  switch (idx[1])
338  {
339  case 0:
340  coerceValue(_data.filter, value);
341  break;
342  case 1:
343  coerceValue(_data.regex, value);
344  break;
345  case 2:
346  coerceValue(_data.global, value);
347  break;
348  case 3:
349  coerceValue(_data.from, value);
350  break;
351  case 4:
352  coerceValue(_data.to, value);
353  break;
354 
355  }
356  }
357  break;
358 
359  }
360  }
361 
362  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
363  { doSetParmValue(idx, instance, value); }
364  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
365  { doSetParmValue(idx, instance, value); }
366  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
367  { doSetParmValue(idx, instance, value); }
368  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
369  { doSetParmValue(idx, instance, value); }
370  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
371  { doSetParmValue(idx, instance, value); }
372  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
373  { doSetParmValue(idx, instance, value); }
374  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
375  { doSetParmValue(idx, instance, value); }
376  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
377  { doSetParmValue(idx, instance, value); }
378  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
379  { doSetParmValue(idx, instance, value); }
380  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
381  { doSetParmValue(idx, instance, value); }
382  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
383  { doSetParmValue(idx, instance, value); }
384 
385  exint getNestNumParms(TempIndex idx) const override
386  {
387  if (idx.size() == 0)
388  return 9;
389  switch (idx[0])
390  {
391  case 8:
392  return 5;
393 
394  }
395  // Invalid
396  return 0;
397  }
398 
399  const char *getNestParmName(TempIndex fieldnum) const override
400  {
401  if (fieldnum.size() < 1)
402  return 0;
403  switch (fieldnum[0])
404  {
405  case 0:
406  return "detailattribs";
407  case 1:
408  return "detailattriblist";
409  case 2:
410  return "primitiveattribs";
411  case 3:
412  return "primattriblist";
413  case 4:
414  return "pointattribs";
415  case 5:
416  return "pointattriblist";
417  case 6:
418  return "vertexattribs";
419  case 7:
420  return "vertexattriblist";
421  case 8:
422  if (fieldnum.size() == 1)
423  return "filters";
424  switch (fieldnum[1])
425  {
426  case 0:
427  return "filter#";
428  case 1:
429  return "regex#";
430  case 2:
431  return "global#";
432  case 3:
433  return "from#";
434  case 4:
435  return "to#";
436 
437  }
438  return 0;
439 
440  }
441  return 0;
442  }
443 
444  ParmType getNestParmType(TempIndex fieldnum) const override
445  {
446  if (fieldnum.size() < 1)
447  return PARM_UNSUPPORTED;
448  switch (fieldnum[0])
449  {
450  case 0:
451  return PARM_INTEGER;
452  case 1:
453  return PARM_STRING;
454  case 2:
455  return PARM_INTEGER;
456  case 3:
457  return PARM_STRING;
458  case 4:
459  return PARM_INTEGER;
460  case 5:
461  return PARM_STRING;
462  case 6:
463  return PARM_INTEGER;
464  case 7:
465  return PARM_STRING;
466  case 8:
467  if (fieldnum.size() == 1)
468  return PARM_MULTIPARM;
469  switch (fieldnum[1])
470  {
471  case 0:
472  return PARM_INTEGER;
473  case 1:
474  return PARM_INTEGER;
475  case 2:
476  return PARM_INTEGER;
477  case 3:
478  return PARM_STRING;
479  case 4:
480  return PARM_STRING;
481 
482  }
483  return PARM_UNSUPPORTED;
484 
485  }
486  return PARM_UNSUPPORTED;
487  }
488 
489  // Boiler plate to load individual types.
490  static void loadData(UT_IStream &is, int64 &v)
491  { is.bread(&v, 1); }
492  static void loadData(UT_IStream &is, bool &v)
493  { int64 iv; is.bread(&iv, 1); v = iv; }
494  static void loadData(UT_IStream &is, fpreal64 &v)
495  { is.bread<fpreal64>(&v, 1); }
496  static void loadData(UT_IStream &is, UT_Vector2D &v)
497  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
498  static void loadData(UT_IStream &is, UT_Vector3D &v)
499  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
500  is.bread<fpreal64>(&v.z(), 1); }
501  static void loadData(UT_IStream &is, UT_Vector4D &v)
502  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
503  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
504  static void loadData(UT_IStream &is, UT_Matrix2D &v)
505  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
506  static void loadData(UT_IStream &is, UT_Matrix3D &v)
507  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
508  static void loadData(UT_IStream &is, UT_Matrix4D &v)
509  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
510  static void loadData(UT_IStream &is, UT_Vector2I &v)
511  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
512  static void loadData(UT_IStream &is, UT_Vector3I &v)
513  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
514  is.bread<int64>(&v.z(), 1); }
515  static void loadData(UT_IStream &is, UT_Vector4I &v)
516  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
517  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
519  { is.bread(v); }
521  { UT_StringHolder rampdata;
522  loadData(is, rampdata);
523  if (rampdata.isstring())
524  {
525  v.reset(new UT_Ramp());
526  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
527  v->load(istr);
528  }
529  else v.reset();
530  }
533  loadData(is, data);
534  if (data.isstring())
535  {
536  // Find the data type.
537  const char *colon = UT_StringWrap(data).findChar(':');
538  if (colon)
539  {
540  int typelen = colon - data.buffer();
542  type.strncpy(data.buffer(), typelen);
543  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
544 
545  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
546  }
547  }
548  else v.reset();
549  }
550 
551  static void saveData(std::ostream &os, int64 v)
552  { UTwrite(os, &v); }
553  static void saveData(std::ostream &os, bool v)
554  { int64 iv = v; UTwrite(os, &iv); }
555  static void saveData(std::ostream &os, fpreal64 v)
556  { UTwrite<fpreal64>(os, &v); }
557  static void saveData(std::ostream &os, UT_Vector2D v)
558  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
559  static void saveData(std::ostream &os, UT_Vector3D v)
560  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
561  UTwrite<fpreal64>(os, &v.z()); }
562  static void saveData(std::ostream &os, UT_Vector4D v)
563  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
564  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
565  static void saveData(std::ostream &os, UT_Matrix2D v)
567  static void saveData(std::ostream &os, UT_Matrix3D v)
569  static void saveData(std::ostream &os, UT_Matrix4D v)
571  static void saveData(std::ostream &os, UT_StringHolder s)
572  { UT_StringWrap(s).saveBinary(os); }
573  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
575  UT_OStringStream ostr;
576  if (s) s->save(ostr);
577  result = ostr.str();
578  saveData(os, result);
579  }
580  static void saveData(std::ostream &os, PRM_DataItemHandle s)
582  UT_OStringStream ostr;
583  if (s)
584  {
585  ostr << s->getDataTypeToken();
586  ostr << ":";
587  s->saveBinary(ostr);
588  }
589  result = ostr.str();
590  saveData(os, result);
591  }
592 
593 
594  void save(std::ostream &os) const
595  {
596  int32 v = version();
597  UTwrite(os, &v);
598  saveData(os, myEnableDetail);
599  saveData(os, myDetailAttribList);
600  saveData(os, myEnablePrimitives);
601  saveData(os, myPrimAttribList);
602  saveData(os, myEnablePoints);
603  saveData(os, myPointAttribList);
604  saveData(os, myEnableVertices);
605  saveData(os, myVertexAttribList);
606  {
607  int64 length = myFilters.entries();
608  UTwrite(os, &length);
609  for (exint i = 0; i < length; i++)
610  {
611  saveData(os, myFilters(i).filter);
612  saveData(os, myFilters(i).regex);
613  saveData(os, myFilters(i).global);
614  saveData(os, myFilters(i).from);
615  saveData(os, myFilters(i).to);
616 
617  }
618  }
619 
620  }
621 
622  bool load(UT_IStream &is)
623  {
624  int32 v;
625  is.bread(&v, 1);
626  if (version() != v)
627  {
628  // Fail incompatible versions
629  return false;
630  }
631  loadData(is, myEnableDetail);
632  loadData(is, myDetailAttribList);
633  loadData(is, myEnablePrimitives);
634  loadData(is, myPrimAttribList);
635  loadData(is, myEnablePoints);
636  loadData(is, myPointAttribList);
637  loadData(is, myEnableVertices);
638  loadData(is, myVertexAttribList);
639  {
640  int64 length;
641  is.read(&length, 1);
642  myFilters.entries(length);
643  for (exint i = 0; i < length; i++)
644  {
645  loadData(is, myFilters(i).filter);
646  loadData(is, myFilters(i).regex);
647  loadData(is, myFilters(i).global);
648  loadData(is, myFilters(i).from);
649  loadData(is, myFilters(i).to);
650 
651  }
652  }
653 
654  return true;
655  }
656 
657  bool getEnableDetail() const { return myEnableDetail; }
658  void setEnableDetail(bool val) { myEnableDetail = val; }
659  bool opEnableDetail(const SOP_NodeVerb::CookParms &cookparms) const
660  {
661  SOP_Node *thissop = cookparms.getNode();
662  if (!thissop) return getEnableDetail();
663  bool result;
664  OP_Utils::evalOpParm(result, thissop, "detailattribs", cookparms.getCookTime(), 0);
665  return result;
666  }
667  const UT_StringHolder & getDetailAttribList() const { return myDetailAttribList; }
668  void setDetailAttribList(const UT_StringHolder & val) { myDetailAttribList = val; }
670  {
671  SOP_Node *thissop = cookparms.getNode();
672  if (!thissop) return getDetailAttribList();
674  OP_Utils::evalOpParm(result, thissop, "detailattriblist", cookparms.getCookTime(), 0);
675  return result;
676  }
677  bool getEnablePrimitives() const { return myEnablePrimitives; }
678  void setEnablePrimitives(bool val) { myEnablePrimitives = val; }
679  bool opEnablePrimitives(const SOP_NodeVerb::CookParms &cookparms) const
680  {
681  SOP_Node *thissop = cookparms.getNode();
682  if (!thissop) return getEnablePrimitives();
683  bool result;
684  OP_Utils::evalOpParm(result, thissop, "primitiveattribs", cookparms.getCookTime(), 0);
685  return result;
686  }
687  const UT_StringHolder & getPrimAttribList() const { return myPrimAttribList; }
688  void setPrimAttribList(const UT_StringHolder & val) { myPrimAttribList = val; }
690  {
691  SOP_Node *thissop = cookparms.getNode();
692  if (!thissop) return getPrimAttribList();
694  OP_Utils::evalOpParm(result, thissop, "primattriblist", cookparms.getCookTime(), 0);
695  return result;
696  }
697  bool getEnablePoints() const { return myEnablePoints; }
698  void setEnablePoints(bool val) { myEnablePoints = val; }
699  bool opEnablePoints(const SOP_NodeVerb::CookParms &cookparms) const
700  {
701  SOP_Node *thissop = cookparms.getNode();
702  if (!thissop) return getEnablePoints();
703  bool result;
704  OP_Utils::evalOpParm(result, thissop, "pointattribs", cookparms.getCookTime(), 0);
705  return result;
706  }
707  const UT_StringHolder & getPointAttribList() const { return myPointAttribList; }
708  void setPointAttribList(const UT_StringHolder & val) { myPointAttribList = val; }
710  {
711  SOP_Node *thissop = cookparms.getNode();
712  if (!thissop) return getPointAttribList();
714  OP_Utils::evalOpParm(result, thissop, "pointattriblist", cookparms.getCookTime(), 0);
715  return result;
716  }
717  bool getEnableVertices() const { return myEnableVertices; }
718  void setEnableVertices(bool val) { myEnableVertices = val; }
719  bool opEnableVertices(const SOP_NodeVerb::CookParms &cookparms) const
720  {
721  SOP_Node *thissop = cookparms.getNode();
722  if (!thissop) return getEnableVertices();
723  bool result;
724  OP_Utils::evalOpParm(result, thissop, "vertexattribs", cookparms.getCookTime(), 0);
725  return result;
726  }
727  const UT_StringHolder & getVertexAttribList() const { return myVertexAttribList; }
728  void setVertexAttribList(const UT_StringHolder & val) { myVertexAttribList = val; }
730  {
731  SOP_Node *thissop = cookparms.getNode();
732  if (!thissop) return getVertexAttribList();
734  OP_Utils::evalOpParm(result, thissop, "vertexattriblist", cookparms.getCookTime(), 0);
735  return result;
736  }
737  const UT_Array<Filters> &getFilters() const { return myFilters; }
738  void setFilters(const UT_Array<Filters> &val) { myFilters = val; }
739  exint opFilters(const SOP_NodeVerb::CookParms &cookparms) const
740  {
741  SOP_Node *thissop = cookparms.getNode();
742  if (!thissop) return getFilters().entries();
743  exint result;
744  OP_Utils::evalOpParm(result, thissop, "filters", cookparms.getCookTime(), 0);
745  return result;
746  }
747  bool opFilters_filter(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
748  {
749  SOP_Node *thissop = cookparms.getNode();
750  if (!thissop) return (myFilters(_idx).filter);
751  int _parmidx = _idx + 0;
752  bool result;
753  OP_Utils::evalOpParmInst(result, thissop, "filter#", &_parmidx, cookparms.getCookTime(), 0);
754  return (result);
755  }
756  bool opFilters_regex(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
757  {
758  SOP_Node *thissop = cookparms.getNode();
759  if (!thissop) return (myFilters(_idx).regex);
760  int _parmidx = _idx + 0;
761  bool result;
762  OP_Utils::evalOpParmInst(result, thissop, "regex#", &_parmidx, cookparms.getCookTime(), 0);
763  return (result);
764  }
765  bool opFilters_global(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
766  {
767  SOP_Node *thissop = cookparms.getNode();
768  if (!thissop) return (myFilters(_idx).global);
769  int _parmidx = _idx + 0;
770  bool result;
771  OP_Utils::evalOpParmInst(result, thissop, "global#", &_parmidx, cookparms.getCookTime(), 0);
772  return (result);
773  }
775  {
776  SOP_Node *thissop = cookparms.getNode();
777  if (!thissop) return (myFilters(_idx).from);
778  int _parmidx = _idx + 0;
780  OP_Utils::evalOpParmInst(result, thissop, "from#", &_parmidx, cookparms.getCookTime(), 0);
781  return (result);
782  }
784  {
785  SOP_Node *thissop = cookparms.getNode();
786  if (!thissop) return (myFilters(_idx).to);
787  int _parmidx = _idx + 0;
789  OP_Utils::evalOpParmInst(result, thissop, "to#", &_parmidx, cookparms.getCookTime(), 0);
790  return (result);
791  }
792 
793 
794 private:
795  bool myEnableDetail;
796  UT_StringHolder myDetailAttribList;
797  bool myEnablePrimitives;
798  UT_StringHolder myPrimAttribList;
799  bool myEnablePoints;
800  UT_StringHolder myPointAttribList;
801  bool myEnableVertices;
802  UT_StringHolder myVertexAttribList;
803  UT_Array<Filters> myFilters;
804 
805 };
GLdouble s
Definition: glew.h:1390
UT_StringHolder createString(const UT_Array< Filters > &list) const
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
UT_StringHolder opPrimAttribList(const SOP_NodeVerb::CookParms &cookparms) const
exint nodeIdx() const
Definition: SOP_NodeVerb.h:114
GLenum src
Definition: glew.h:2410
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:640
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
const UT_StringHolder & getDetailAttribList() const
UT_StringHolder opFilters_to(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void saveData(std::ostream &os, UT_Vector2D v)
virtual void evalOpParmInst(int64 &v, NodeIdx node, const char *parmname, int *inst, fpreal time, DEP_MicroNode *depnode) const =0
bool opEnablePrimitives(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void loadFromOpSubclass(const LoadParms &loadparms) override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
fpreal getTime() const
Definition: OP_Context.h:60
GLuint const GLfloat * val
Definition: glew.h:2794
bool opFilters_filter(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
int64 exint
Definition: SYS_Types.h:125
static void loadData(UT_IStream &is, fpreal64 &v)
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:113
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, UT_Matrix2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
const GLdouble * v
Definition: glew.h:1391
bool opFilters_regex(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void loadData(UT_IStream &is, int64 &v)
void setFilters(const UT_Array< Filters > &val)
static void loadData(UT_IStream &is, UT_StringHolder &v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
double fpreal64
Definition: SYS_Types.h:201
bool operator!=(const SOP_AttribStringEditParms &src) const
const UT_StringHolder & getPrimAttribList() const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
exint opFilters(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glew.h:2981
void setPrimAttribList(const UT_StringHolder &val)
UT_StringHolder opVertexAttribList(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:513
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_Matrix4D v)
exint length() const
bool opEnableDetail(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:28
static void loadData(UT_IStream &is, UT_Vector3I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:284
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:515
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void saveData(std::ostream &os, UT_Matrix3D v)
void
Definition: png.h:1083
const GLfloat * c
Definition: glew.h:16296
GLuint GLsizei GLsizei * length
Definition: glew.h:1825
ParmType getNestParmType(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
const UT_StringHolder & getVertexAttribList() const
long long int64
Definition: SYS_Types.h:116
const char * getNestParmName(TempIndex fieldnum) const override
exint getNestNumParms(TempIndex idx) const override
SYS_FORCE_INLINE void strcat(const char *src)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
static void saveData(std::ostream &os, int64 v)
void copyFrom(const SOP_NodeParms *src) override
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 getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
bool opEnableVertices(const SOP_NodeVerb::CookParms &cookparms) const
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:460
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setPointAttribList(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
const UT_Array< Filters > & getFilters() const
fpreal64 fpreal
Definition: SYS_Types.h:277
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void save(std::ostream &os) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
UT_StringHolder opFilters_from(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
SYS_FORCE_INLINE void append(char character)
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
bool opFilters_global(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
#define SOP_API
Definition: SOP_API.h:10
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void saveData(std::ostream &os, UT_Vector3D v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
bool operator!=(const Filters &src) const
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:511
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:654
GLuint64EXT * result
Definition: glew.h:14007
const char * findChar(int c) const
Definition: UT_String.h:1367
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void setVertexAttribList(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
bool opEnablePoints(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_StringHolder s)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
UT_StringHolder opDetailAttribList(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
GLenum GLuint GLsizei const GLchar * buf
Definition: glew.h:2580
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void loadData(UT_IStream &is, bool &v)
GLsizei const GLfloat * value
Definition: glew.h:1849
bool operator==(const Filters &src) const
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, bool v)
SYS_FORCE_INLINE bool isstring() const
bool operator==(const SOP_AttribStringEditParms &src) const
const UT_StringHolder & getPointAttribList() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
type
Definition: core.h:528
static void saveData(std::ostream &os, fpreal64 v)
UT_StringHolder opPointAttribList(const SOP_NodeVerb::CookParms &cookparms) const
void setDetailAttribList(const UT_StringHolder &val)