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