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