HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_UnpackParms.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 
30  {
31  myGroup = ""_UTsh;
32  myLimitIterations = true;
33  myIterations = 1;
34  myDetailAttributes = "detail"_UTsh;
35  myTransferAttributes = ""_UTsh;
36  myTransferGroups = ""_UTsh;
37  myApplyStyleSheets = false;
38  mySceneStyleSheet = ""_UTsh;
39  myObjectStyleSheet = ""_UTsh;
40  myApplyTransform = true;
41  myConvertPolysoup = false;
42 
43  }
44 
45  explicit SOP_UnpackParms(const SOP_UnpackParms &) = default;
46  SOP_UnpackParms &operator=(const SOP_UnpackParms &) = default;
47  SOP_UnpackParms(SOP_UnpackParms &&) noexcept = default;
48  SOP_UnpackParms &operator=(SOP_UnpackParms &&) noexcept = default;
49 
50  ~SOP_UnpackParms() override {}
51 
52  bool operator==(const SOP_UnpackParms &src) const
53  {
54  if (myGroup != src.myGroup) return false;
55  if (myLimitIterations != src.myLimitIterations) return false;
56  if (myIterations != src.myIterations) return false;
57  if (myDetailAttributes != src.myDetailAttributes) return false;
58  if (myTransferAttributes != src.myTransferAttributes) return false;
59  if (myTransferGroups != src.myTransferGroups) return false;
60  if (myApplyStyleSheets != src.myApplyStyleSheets) return false;
61  if (mySceneStyleSheet != src.mySceneStyleSheet) return false;
62  if (myObjectStyleSheet != src.myObjectStyleSheet) return false;
63  if (myApplyTransform != src.myApplyTransform) return false;
64  if (myConvertPolysoup != src.myConvertPolysoup) return false;
65 
66 
67  if (baseGetSignature() != src.baseGetSignature()) return false;
68 
69  return true;
70  }
71  bool operator!=(const SOP_UnpackParms &src) const
72  {
73  return !operator==(src);
74  }
75 
76 
77 
78  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
79  {
80  myGroup = ""_UTsh;
81  if (true)
82  graph->evalOpParm(myGroup, nodeidx, "group", time, graph->isDirect()?nullptr:depnode);
83  myLimitIterations = true;
84  if (true)
85  graph->evalOpParm(myLimitIterations, nodeidx, "limit_iterations", time, graph->isDirect()?nullptr:depnode);
86  myIterations = 1;
87  if (true && ( (getLimitIterations()) ) )
88  graph->evalOpParm(myIterations, nodeidx, "iterations", time, graph->isDirect()?nullptr:depnode);
89  myDetailAttributes = "detail"_UTsh;
90  if (true)
91  graph->evalOpParm(myDetailAttributes, nodeidx, "detail_attributes", time, graph->isDirect()?nullptr:depnode);
92  myTransferAttributes = ""_UTsh;
93  if (true)
94  graph->evalOpParm(myTransferAttributes, nodeidx, "transfer_attributes", time, graph->isDirect()?nullptr:depnode);
95  myTransferGroups = ""_UTsh;
96  if (true)
97  graph->evalOpParm(myTransferGroups, nodeidx, "transfer_groups", time, graph->isDirect()?nullptr:depnode);
98  myApplyStyleSheets = false;
99  if (true)
100  graph->evalOpParm(myApplyStyleSheets, nodeidx, "apply_style_sheets", time, graph->isDirect()?nullptr:depnode);
101  mySceneStyleSheet = ""_UTsh;
102  if (true && ( (getApplyStyleSheets()) ) )
103  graph->evalOpParm(mySceneStyleSheet, nodeidx, "scene_style_sheet", time, graph->isDirect()?nullptr:depnode);
104  myObjectStyleSheet = ""_UTsh;
105  if (true && ( (getApplyStyleSheets()) ) )
106  graph->evalOpParm(myObjectStyleSheet, nodeidx, "obj_style_sheet", time, graph->isDirect()?nullptr:depnode);
107  myApplyTransform = true;
108  if (true)
109  graph->evalOpParm(myApplyTransform, nodeidx, "dotransform", time, graph->isDirect()?nullptr:depnode);
110  myConvertPolysoup = false;
111  if (true)
112  graph->evalOpParm(myConvertPolysoup, nodeidx, "convertpolysoup", time, graph->isDirect()?nullptr:depnode);
113 
114  }
115 
116 
117  void loadFromOpSubclass(const LoadParms &loadparms) override
118  {
119  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
120  }
121 
122 
123  void copyFrom(const OP_NodeParms *src) override
124  {
125  *this = *((const SOP_UnpackParms *)src);
126  }
127 
128  template <typename T>
129  void
130  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
131  {
132  if (idx.size() < 1)
133  return;
134  UT_ASSERT(idx.size() == instance.size()+1);
135  if (idx.size() != instance.size()+1)
136  return;
137  switch (idx[0])
138  {
139  case 0:
140  coerceValue(value, myGroup);
141  break;
142  case 1:
143  coerceValue(value, myLimitIterations);
144  break;
145  case 2:
146  coerceValue(value, myIterations);
147  break;
148  case 3:
149  coerceValue(value, myDetailAttributes);
150  break;
151  case 4:
152  coerceValue(value, myTransferAttributes);
153  break;
154  case 5:
155  coerceValue(value, myTransferGroups);
156  break;
157  case 6:
158  coerceValue(value, myApplyStyleSheets);
159  break;
160  case 7:
161  coerceValue(value, mySceneStyleSheet);
162  break;
163  case 8:
164  coerceValue(value, myObjectStyleSheet);
165  break;
166  case 9:
167  coerceValue(value, myApplyTransform);
168  break;
169  case 10:
170  coerceValue(value, myConvertPolysoup);
171  break;
172 
173  }
174  }
175 
176  bool isParmColorRamp(exint idx) const override
177  {
178  switch (idx)
179  {
180 
181  }
182  return false;
183  }
184 
185  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
186  { doGetParmValue(idx, instance, value); }
187  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
188  { doGetParmValue(idx, instance, value); }
189  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
190  { doGetParmValue(idx, instance, value); }
191  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
192  { doGetParmValue(idx, instance, value); }
193  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
194  { doGetParmValue(idx, instance, value); }
195  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
196  { doGetParmValue(idx, instance, value); }
197  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
198  { doGetParmValue(idx, instance, value); }
199  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
200  { doGetParmValue(idx, instance, value); }
201  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
202  { doGetParmValue(idx, instance, value); }
203  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
204  { doGetParmValue(idx, instance, value); }
205  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
206  { doGetParmValue(idx, instance, value); }
207 
208  template <typename T>
209  void
210  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
211  {
212  if (idx.size() < 1)
213  return;
214  UT_ASSERT(idx.size() == instance.size()+1);
215  if (idx.size() != instance.size()+1)
216  return;
217  switch (idx[0])
218  {
219  case 0:
220  coerceValue(myGroup, ( ( value ) ));
221  break;
222  case 1:
223  coerceValue(myLimitIterations, ( ( value ) ));
224  break;
225  case 2:
226  coerceValue(myIterations, ( ( value ) ));
227  break;
228  case 3:
229  coerceValue(myDetailAttributes, ( ( value ) ));
230  break;
231  case 4:
232  coerceValue(myTransferAttributes, ( ( value ) ));
233  break;
234  case 5:
235  coerceValue(myTransferGroups, ( ( value ) ));
236  break;
237  case 6:
238  coerceValue(myApplyStyleSheets, ( ( value ) ));
239  break;
240  case 7:
241  coerceValue(mySceneStyleSheet, ( ( value ) ));
242  break;
243  case 8:
244  coerceValue(myObjectStyleSheet, ( ( value ) ));
245  break;
246  case 9:
247  coerceValue(myApplyTransform, ( ( value ) ));
248  break;
249  case 10:
250  coerceValue(myConvertPolysoup, ( ( value ) ));
251  break;
252 
253  }
254  }
255 
256  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
257  { doSetParmValue(idx, instance, value); }
258  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
259  { doSetParmValue(idx, instance, value); }
260  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
261  { doSetParmValue(idx, instance, value); }
262  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
263  { doSetParmValue(idx, instance, value); }
264  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
265  { doSetParmValue(idx, instance, value); }
266  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
267  { doSetParmValue(idx, instance, value); }
268  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
269  { doSetParmValue(idx, instance, value); }
270  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
271  { doSetParmValue(idx, instance, value); }
272  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
273  { doSetParmValue(idx, instance, value); }
274  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
275  { doSetParmValue(idx, instance, value); }
276  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
277  { doSetParmValue(idx, instance, value); }
278 
279  exint getNestNumParms(TempIndex idx) const override
280  {
281  if (idx.size() == 0)
282  return 11;
283  switch (idx[0])
284  {
285 
286  }
287  // Invalid
288  return 0;
289  }
290 
291  const char *getNestParmName(TempIndex fieldnum) const override
292  {
293  if (fieldnum.size() < 1)
294  return 0;
295  switch (fieldnum[0])
296  {
297  case 0:
298  return "group";
299  case 1:
300  return "limit_iterations";
301  case 2:
302  return "iterations";
303  case 3:
304  return "detail_attributes";
305  case 4:
306  return "transfer_attributes";
307  case 5:
308  return "transfer_groups";
309  case 6:
310  return "apply_style_sheets";
311  case 7:
312  return "scene_style_sheet";
313  case 8:
314  return "obj_style_sheet";
315  case 9:
316  return "dotransform";
317  case 10:
318  return "convertpolysoup";
319 
320  }
321  return 0;
322  }
323 
324  ParmType getNestParmType(TempIndex fieldnum) const override
325  {
326  if (fieldnum.size() < 1)
327  return PARM_UNSUPPORTED;
328  switch (fieldnum[0])
329  {
330  case 0:
331  return PARM_STRING;
332  case 1:
333  return PARM_INTEGER;
334  case 2:
335  return PARM_INTEGER;
336  case 3:
337  return PARM_STRING;
338  case 4:
339  return PARM_STRING;
340  case 5:
341  return PARM_STRING;
342  case 6:
343  return PARM_INTEGER;
344  case 7:
345  return PARM_STRING;
346  case 8:
347  return PARM_STRING;
348  case 9:
349  return PARM_INTEGER;
350  case 10:
351  return PARM_INTEGER;
352 
353  }
354  return PARM_UNSUPPORTED;
355  }
356 
357  // Boiler plate to load individual types.
358  static void loadData(UT_IStream &is, int64 &v)
359  { is.bread(&v, 1); }
360  static void loadData(UT_IStream &is, bool &v)
361  { int64 iv; is.bread(&iv, 1); v = iv; }
362  static void loadData(UT_IStream &is, fpreal64 &v)
363  { is.bread<fpreal64>(&v, 1); }
364  static void loadData(UT_IStream &is, UT_Vector2D &v)
365  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
366  static void loadData(UT_IStream &is, UT_Vector3D &v)
367  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
368  is.bread<fpreal64>(&v.z(), 1); }
369  static void loadData(UT_IStream &is, UT_Vector4D &v)
370  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
371  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
372  static void loadData(UT_IStream &is, UT_Matrix2D &v)
373  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
374  static void loadData(UT_IStream &is, UT_Matrix3D &v)
375  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
376  static void loadData(UT_IStream &is, UT_Matrix4D &v)
377  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
378  static void loadData(UT_IStream &is, UT_Vector2I &v)
379  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
380  static void loadData(UT_IStream &is, UT_Vector3I &v)
381  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
382  is.bread<int64>(&v.z(), 1); }
383  static void loadData(UT_IStream &is, UT_Vector4I &v)
384  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
385  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
387  { is.bread(v); }
389  { UT_StringHolder rampdata;
390  loadData(is, rampdata);
391  if (rampdata.isstring())
392  {
393  v.reset(new UT_Ramp());
394  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
395  v->load(istr);
396  }
397  else v.reset();
398  }
401  loadData(is, data);
402  if (data.isstring())
403  {
404  // Find the data type.
405  const char *colon = UT_StringWrap(data).findChar(':');
406  if (colon)
407  {
408  int typelen = colon - data.buffer();
410  type.strncpy(data.buffer(), typelen);
411  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
412 
413  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
414  }
415  }
416  else v.reset();
417  }
418 
419  static void saveData(std::ostream &os, int64 v)
420  { UTwrite(os, &v); }
421  static void saveData(std::ostream &os, bool v)
422  { int64 iv = v; UTwrite(os, &iv); }
423  static void saveData(std::ostream &os, fpreal64 v)
424  { UTwrite<fpreal64>(os, &v); }
425  static void saveData(std::ostream &os, UT_Vector2D v)
426  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
427  static void saveData(std::ostream &os, UT_Vector3D v)
428  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
429  UTwrite<fpreal64>(os, &v.z()); }
430  static void saveData(std::ostream &os, UT_Vector4D v)
431  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
432  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
433  static void saveData(std::ostream &os, UT_Matrix2D v)
435  static void saveData(std::ostream &os, UT_Matrix3D v)
437  static void saveData(std::ostream &os, UT_Matrix4D v)
439  static void saveData(std::ostream &os, UT_StringHolder s)
440  { UT_StringWrap(s).saveBinary(os); }
441  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
443  UT_OStringStream ostr;
444  if (s) s->save(ostr);
445  result = ostr.str();
446  saveData(os, result);
447  }
448  static void saveData(std::ostream &os, PRM_DataItemHandle s)
450  UT_OStringStream ostr;
451  if (s)
452  {
453  ostr << s->getDataTypeToken();
454  ostr << ":";
455  s->saveBinary(ostr);
456  }
457  result = ostr.str();
458  saveData(os, result);
459  }
460 
461 
462  void save(std::ostream &os) const
463  {
464  int32 v = version();
465  UTwrite(os, &v);
466  saveData(os, myGroup);
467  saveData(os, myLimitIterations);
468  saveData(os, myIterations);
469  saveData(os, myDetailAttributes);
470  saveData(os, myTransferAttributes);
471  saveData(os, myTransferGroups);
472  saveData(os, myApplyStyleSheets);
473  saveData(os, mySceneStyleSheet);
474  saveData(os, myObjectStyleSheet);
475  saveData(os, myApplyTransform);
476  saveData(os, myConvertPolysoup);
477 
478  }
479 
480  bool load(UT_IStream &is)
481  {
482  int32 v;
483  is.bread(&v, 1);
484  if (version() != v)
485  {
486  // Fail incompatible versions
487  return false;
488  }
489  loadData(is, myGroup);
490  loadData(is, myLimitIterations);
491  loadData(is, myIterations);
492  loadData(is, myDetailAttributes);
493  loadData(is, myTransferAttributes);
494  loadData(is, myTransferGroups);
495  loadData(is, myApplyStyleSheets);
496  loadData(is, mySceneStyleSheet);
497  loadData(is, myObjectStyleSheet);
498  loadData(is, myApplyTransform);
499  loadData(is, myConvertPolysoup);
500 
501  return true;
502  }
503 
504  const UT_StringHolder & getGroup() const { return myGroup; }
505  void setGroup(const UT_StringHolder & val) { myGroup = val; }
507  {
508  SOP_Node *thissop = cookparms.getNode();
509  if (!thissop) return getGroup();
511  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
512  return result;
513  }
514  bool getLimitIterations() const { return myLimitIterations; }
515  void setLimitIterations(bool val) { myLimitIterations = val; }
516  bool opLimitIterations(const SOP_NodeVerb::CookParms &cookparms) const
517  {
518  SOP_Node *thissop = cookparms.getNode();
519  if (!thissop) return getLimitIterations();
520  bool result;
521  OP_Utils::evalOpParm(result, thissop, "limit_iterations", cookparms.getCookTime(), 0);
522  return result;
523  }
524  int64 getIterations() const { return myIterations; }
525  void setIterations(int64 val) { myIterations = val; }
527  {
528  SOP_Node *thissop = cookparms.getNode();
529  if (!thissop) return getIterations();
530  int64 result;
531  OP_Utils::evalOpParm(result, thissop, "iterations", cookparms.getCookTime(), 0);
532  return result;
533  }
534  const UT_StringHolder & getDetailAttributes() const { return myDetailAttributes; }
535  void setDetailAttributes(const UT_StringHolder & val) { myDetailAttributes = val; }
537  {
538  SOP_Node *thissop = cookparms.getNode();
539  if (!thissop) return getDetailAttributes();
541  OP_Utils::evalOpParm(result, thissop, "detail_attributes", cookparms.getCookTime(), 0);
542  return result;
543  }
544  const UT_StringHolder & getTransferAttributes() const { return myTransferAttributes; }
545  void setTransferAttributes(const UT_StringHolder & val) { myTransferAttributes = val; }
547  {
548  SOP_Node *thissop = cookparms.getNode();
549  if (!thissop) return getTransferAttributes();
551  OP_Utils::evalOpParm(result, thissop, "transfer_attributes", cookparms.getCookTime(), 0);
552  return result;
553  }
554  const UT_StringHolder & getTransferGroups() const { return myTransferGroups; }
555  void setTransferGroups(const UT_StringHolder & val) { myTransferGroups = val; }
557  {
558  SOP_Node *thissop = cookparms.getNode();
559  if (!thissop) return getTransferGroups();
561  OP_Utils::evalOpParm(result, thissop, "transfer_groups", cookparms.getCookTime(), 0);
562  return result;
563  }
564  bool getApplyStyleSheets() const { return myApplyStyleSheets; }
565  void setApplyStyleSheets(bool val) { myApplyStyleSheets = val; }
566  bool opApplyStyleSheets(const SOP_NodeVerb::CookParms &cookparms) const
567  {
568  SOP_Node *thissop = cookparms.getNode();
569  if (!thissop) return getApplyStyleSheets();
570  bool result;
571  OP_Utils::evalOpParm(result, thissop, "apply_style_sheets", cookparms.getCookTime(), 0);
572  return result;
573  }
574  const UT_StringHolder & getSceneStyleSheet() const { return mySceneStyleSheet; }
575  void setSceneStyleSheet(const UT_StringHolder & val) { mySceneStyleSheet = val; }
577  {
578  SOP_Node *thissop = cookparms.getNode();
579  if (!thissop) return getSceneStyleSheet();
581  OP_Utils::evalOpParm(result, thissop, "scene_style_sheet", cookparms.getCookTime(), 0);
582  return result;
583  }
584  const UT_StringHolder & getObjectStyleSheet() const { return myObjectStyleSheet; }
585  void setObjectStyleSheet(const UT_StringHolder & val) { myObjectStyleSheet = val; }
587  {
588  SOP_Node *thissop = cookparms.getNode();
589  if (!thissop) return getObjectStyleSheet();
591  OP_Utils::evalOpParm(result, thissop, "obj_style_sheet", cookparms.getCookTime(), 0);
592  return result;
593  }
594  bool getApplyTransform() const { return myApplyTransform; }
595  void setApplyTransform(bool val) { myApplyTransform = val; }
596  bool opApplyTransform(const SOP_NodeVerb::CookParms &cookparms) const
597  {
598  SOP_Node *thissop = cookparms.getNode();
599  if (!thissop) return getApplyTransform();
600  bool result;
601  OP_Utils::evalOpParm(result, thissop, "dotransform", cookparms.getCookTime(), 0);
602  return result;
603  }
604  bool getConvertPolysoup() const { return myConvertPolysoup; }
605  void setConvertPolysoup(bool val) { myConvertPolysoup = val; }
606  bool opConvertPolysoup(const SOP_NodeVerb::CookParms &cookparms) const
607  {
608  SOP_Node *thissop = cookparms.getNode();
609  if (!thissop) return getConvertPolysoup();
610  bool result;
611  OP_Utils::evalOpParm(result, thissop, "convertpolysoup", cookparms.getCookTime(), 0);
612  return result;
613  }
614 
615 private:
616  UT_StringHolder myGroup;
617  bool myLimitIterations;
618  int64 myIterations;
619  UT_StringHolder myDetailAttributes;
620  UT_StringHolder myTransferAttributes;
621  UT_StringHolder myTransferGroups;
622  bool myApplyStyleSheets;
623  UT_StringHolder mySceneStyleSheet;
624  UT_StringHolder myObjectStyleSheet;
625  bool myApplyTransform;
626  bool myConvertPolysoup;
627 
628 };
type
Definition: core.h:556
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setApplyTransform(bool val)
void setObjectStyleSheet(const UT_StringHolder &val)
bool load(UT_IStream &is)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
int64 getIterations() const
void save(std::ostream &os) const
static void saveData(std::ostream &os, UT_Matrix2D v)
const UT_StringHolder & getTransferAttributes() const
void loadFromOpSubclass(const LoadParms &loadparms) override
bool opApplyTransform(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void loadData(UT_IStream &is, UT_StringHolder &v)
void copyFrom(const OP_NodeParms *src) 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
const OP_Context & context() const
Definition: OP_NodeParms.h:97
static void saveData(std::ostream &os, UT_Vector4D v)
void setTransferGroups(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
GLdouble s
Definition: glad.h:3009
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
bool isParmColorRamp(exint idx) const override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
An output stream object that owns its own string buffer storage.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
bool opConvertPolysoup(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opSceneStyleSheet(const SOP_NodeVerb::CookParms &cookparms) const
**But if you need a result
Definition: thread.h:622
void setConvertPolysoup(bool val)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void saveData(std::ostream &os, bool 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.
const char * getNestParmName(TempIndex fieldnum) const override
int64 opIterations(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
UT_StringHolder opObjectStyleSheet(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
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 BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
const UT_StringHolder & getGroup() const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
exint length() const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
static void loadData(UT_IStream &is, UT_Vector3D &v)
ParmType getNestParmType(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, bool &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
bool operator==(const SOP_UnpackParms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool getApplyStyleSheets() const
UT_StringHolder opDetailAttributes(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, fpreal64 v)
long long int64
Definition: SYS_Types.h:116
void setGroup(const UT_StringHolder &val)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
const UT_StringHolder & getTransferGroups() const
exint getNestNumParms(TempIndex idx) const override
void setApplyStyleSheets(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
const UT_StringHolder & getDetailAttributes() const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
bool operator!=(const SOP_UnpackParms &src) const
static void loadData(UT_IStream &is, int64 &v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:303
const UT_StringHolder & getObjectStyleSheet() const
GT_API const UT_StringHolder version
bool opApplyStyleSheets(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, int64 v)
bool getApplyTransform() const
UT_StringHolder opTransferAttributes(const SOP_NodeVerb::CookParms &cookparms) const
void setTransferAttributes(const UT_StringHolder &val)
void coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:310
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setSceneStyleSheet(const UT_StringHolder &val)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 fpreal
Definition: SYS_Types.h:278
bool getConvertPolysoup() const
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
static void loadData(UT_IStream &is, UT_Matrix3D &v)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
static void loadData(UT_IStream &is, fpreal64 &v)
GLuint GLfloat * val
Definition: glcorearb.h:1608
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
#define SOP_API
Definition: SOP_API.h:10
const UT_StringHolder & getSceneStyleSheet() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setDetailAttributes(const UT_StringHolder &val)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:372
void setLimitIterations(bool val)
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
static void saveData(std::ostream &os, UT_Vector2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
GLboolean r
Definition: glcorearb.h:1222
static void saveData(std::ostream &os, UT_StringHolder s)
void setIterations(int64 val)
static void saveData(std::ostream &os, UT_Matrix3D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
UT_StringHolder opTransferGroups(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector3D v)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
static void saveData(std::ostream &os, UT_Matrix4D v)
bool opLimitIterations(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
OP_NodeParms & operator=(const OP_NodeParms &)=default
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool getLimitIterations() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override