HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_CopyToPoints-2.0.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_NodeVerb.h>
7 #include <SOP/SOP_GraphProxy.h>
8 
9 #include <OP/OP_Utils.h>
10 #include <PRM/PRM_Parm.h>
11 #include <UT/UT_IStream.h>
12 #include <UT/UT_NTStreamUtil.h>
13 #include <UT/UT_Ramp.h>
14 #include <UT/UT_SharedPtr.h>
15 #include <UT/UT_StringHolder.h>
16 #include <UT/UT_StringStream.h>
17 #include <UT/UT_VectorTypes.h>
18 #include <SYS/SYS_Types.h>
19 
20 using namespace UT::Literal;
21 
22 class DEP_MicroNode;
23 namespace SOP_CopyToPoints_2_0Enums
24 {
25  enum class SourceGroupType
26  {
27  GUESS = 0,
28  PRIMS,
29  POINTS
30  };
31  enum class Pivot
32  {
33  ORIGIN = 0,
34  CENTROID
35  };
36  enum class ViewportLOD
37  {
38  FULL = 0,
39  POINTS,
40  BOX,
41  CENTROID,
42  HIDDEN
43  };
44  enum class Applyto
45  {
46  POINTS = 0,
47  VERTS,
48  PRIMS
49  };
50  enum class Applymethod
51  {
52  COPY = 0,
53  NONE,
54  MULT,
55  ADD,
56  SUB
57  };
58 }
59 
60 
62 {
63 public:
64  static int version() { return 1; }
66  {
67  bool useapply;
71 
72 
74  {
75  useapply = true;
76  applyto = 0;
77  applymethod = 0;
78  applyattribs = ""_sh;
79 
80  }
81 
82  bool operator==(const TargetAttribs &src) const
83  {
84  if (useapply != src.useapply) return false;
85  if (applyto != src.applyto) return false;
86  if (applymethod != src.applymethod) return false;
87  if (applyattribs != src.applyattribs) return false;
88 
89  return true;
90  }
91  bool operator!=(const TargetAttribs &src) const
92  {
93  return !operator==(src);
94  }
95 
96  };
97 
99  {
101 
102  buf.strcat("[ ");
103  for (int i = 0; i < list.entries(); i++)
104  {
105  if (i)
106  buf.strcat(", ");
107  buf.strcat("( ");
108  buf.append("");
109  buf.appendSprintf("%s", (list(i).useapply) ? "true" : "false");
110  buf.append(", ");
111  buf.appendSprintf("%d", (int) list(i).applyto);
112  buf.append(", ");
113  buf.appendSprintf("%d", (int) list(i).applymethod);
114  buf.append(", ");
115  { UT_String tmp; tmp = UT_StringWrap(list(i).applyattribs).makeQuotedString('"'); buf.strcat(tmp); }
116 
117  buf.strcat(" )");
118  }
119  buf.strcat(" ]");
120 
122  return result;
123  }
124 
126  {
127  mySourceGroup = ""_sh;
128  mySourceGroupType = 0;
129  myTargetGroup = ""_sh;
130  myUseIDAttrib = false;
131  myIDAttrib = "variant"_sh;
132  myPack = false;
133  myPivot = 1;
134  myViewportLOD = 0;
135  myTransform = true;
136  myUseImplicitN = true;
137 
138  }
139 
140  explicit SOP_CopyToPoints_2_0Parms(const SOP_CopyToPoints_2_0Parms &) = default;
141 
143 
145  {
146  if (mySourceGroup != src.mySourceGroup) return false;
147  if (mySourceGroupType != src.mySourceGroupType) return false;
148  if (myTargetGroup != src.myTargetGroup) return false;
149  if (myUseIDAttrib != src.myUseIDAttrib) return false;
150  if (myIDAttrib != src.myIDAttrib) return false;
151  if (myPack != src.myPack) return false;
152  if (myPivot != src.myPivot) return false;
153  if (myViewportLOD != src.myViewportLOD) return false;
154  if (myTransform != src.myTransform) return false;
155  if (myUseImplicitN != src.myUseImplicitN) return false;
156  if (myTargetAttribs != src.myTargetAttribs) return false;
157 
158  return true;
159  }
161  {
162  return !operator==(src);
163  }
169 
170 
171 
172  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
173  {
174  mySourceGroup = ""_sh;
175  if (true)
176  graph->evalOpParm(mySourceGroup, nodeidx, "sourcegroup", time, 0);
177  mySourceGroupType = 0;
178  if (true)
179  graph->evalOpParm(mySourceGroupType, nodeidx, "sourcegrouptype", time, 0);
180  myTargetGroup = ""_sh;
181  if (true)
182  graph->evalOpParm(myTargetGroup, nodeidx, "targetgroup", time, 0);
183  myUseIDAttrib = false;
184  if (true)
185  graph->evalOpParm(myUseIDAttrib, nodeidx, "useidattrib", time, 0);
186  myIDAttrib = "variant"_sh;
187  if (true && ( (!(((getUseIDAttrib()==0)))) ) )
188  graph->evalOpParm(myIDAttrib, nodeidx, "idattrib", time, 0);
189  myPack = false;
190  if (true)
191  graph->evalOpParm(myPack, nodeidx, "pack", time, 0);
192  myPivot = 1;
193  if (true && ( (!(((getPack()==0)))) ) )
194  graph->evalOpParm(myPivot, nodeidx, "pivot", time, 0);
195  myViewportLOD = 0;
196  if (true && ( (!(((getPack()==0)))) ) )
197  graph->evalOpParm(myViewportLOD, nodeidx, "viewportlod", time, 0);
198  myTransform = true;
199  if (true)
200  graph->evalOpParm(myTransform, nodeidx, "transform", time, 0);
201  myUseImplicitN = true;
202  if (true && ( (!(((getTransform()==0)))) ) )
203  graph->evalOpParm(myUseImplicitN, nodeidx, "useimplicitn", time, 0);
204  if (true)
205  {
206  int64 length = 0;
207  graph->evalOpParm(length, nodeidx, "targetattribs", time, 0);
208  myTargetAttribs.entries(length);
209  for (exint i = 0; i < length; i++)
210  {
211  int parmidx = i+1;
212  auto && _curentry = myTargetAttribs(i);
213  (void) _curentry;
214  myTargetAttribs(i).useapply = true;
215  if (true)
216  graph->evalOpParmInst(myTargetAttribs(i).useapply, nodeidx, "useapply#", &parmidx, time, 0);
217  myTargetAttribs(i).applyto = 0;
218  if (true)
219  graph->evalOpParmInst(myTargetAttribs(i).applyto, nodeidx, "applyto#", &parmidx, time, 0);
220  myTargetAttribs(i).applymethod = 0;
221  if (true)
222  graph->evalOpParmInst(myTargetAttribs(i).applymethod, nodeidx, "applymethod#", &parmidx, time, 0);
223  myTargetAttribs(i).applyattribs = ""_sh;
224  if (true)
225  graph->evalOpParmInst(myTargetAttribs(i).applyattribs, nodeidx, "applyattribs#", &parmidx, time, 0);
226 
227  }
228  }
229  else
230  myTargetAttribs.clear();
231 
232  }
233 
234 
235  void loadFromOpSubclass(const LoadParms &loadparms) override
236  {
237  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
238  }
239 
240 
241  void copyFrom(const SOP_NodeParms *src) override
242  {
243  *this = *((const SOP_CopyToPoints_2_0Parms *)src);
244  }
245 
246  template <typename T>
247  void
248  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
249  {
250  if (idx.size() < 1)
251  return;
252  UT_ASSERT(idx.size() == instance.size()+1);
253  if (idx.size() != instance.size()+1)
254  return;
255  switch (idx[0])
256  {
257  case 0:
258  coerceValue(value, mySourceGroup);
259  break;
260  case 1:
261  coerceValue(value, mySourceGroupType);
262  break;
263  case 2:
264  coerceValue(value, myTargetGroup);
265  break;
266  case 3:
267  coerceValue(value, myUseIDAttrib);
268  break;
269  case 4:
270  coerceValue(value, myIDAttrib);
271  break;
272  case 5:
273  coerceValue(value, myPack);
274  break;
275  case 6:
276  coerceValue(value, myPivot);
277  break;
278  case 7:
279  coerceValue(value, myViewportLOD);
280  break;
281  case 8:
282  coerceValue(value, myTransform);
283  break;
284  case 9:
285  coerceValue(value, myUseImplicitN);
286  break;
287  case 10:
288  if (idx.size() == 1)
289  coerceValue(value, myTargetAttribs.entries());
290  else if (instance[0] < myTargetAttribs.entries())
291  {
292  auto && _data = myTargetAttribs(instance[0]);
293  switch (idx[1])
294  {
295  case 0:
296  coerceValue(value, _data.useapply);
297  break;
298  case 1:
299  coerceValue(value, _data.applyto);
300  break;
301  case 2:
302  coerceValue(value, _data.applymethod);
303  break;
304  case 3:
305  coerceValue(value, _data.applyattribs);
306  break;
307 
308  }
309  }
310  break;
311 
312  }
313  }
314 
315  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
316  { doGetParmValue(idx, instance, value); }
317  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
318  { doGetParmValue(idx, instance, value); }
319  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
320  { doGetParmValue(idx, instance, value); }
321  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
322  { doGetParmValue(idx, instance, value); }
323  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
324  { doGetParmValue(idx, instance, value); }
325  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
326  { doGetParmValue(idx, instance, value); }
327  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
328  { doGetParmValue(idx, instance, value); }
329  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
330  { doGetParmValue(idx, instance, value); }
331  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
332  { doGetParmValue(idx, instance, value); }
333  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
334  { doGetParmValue(idx, instance, value); }
335  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
336  { doGetParmValue(idx, instance, value); }
337 
338  template <typename T>
339  void
340  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
341  {
342  if (idx.size() < 1)
343  return;
344  UT_ASSERT(idx.size() == instance.size()+1);
345  if (idx.size() != instance.size()+1)
346  return;
347  switch (idx[0])
348  {
349  case 0:
350  coerceValue(mySourceGroup, value);
351  break;
352  case 1:
353  coerceValue(mySourceGroupType, value);
354  break;
355  case 2:
356  coerceValue(myTargetGroup, value);
357  break;
358  case 3:
359  coerceValue(myUseIDAttrib, value);
360  break;
361  case 4:
362  coerceValue(myIDAttrib, value);
363  break;
364  case 5:
365  coerceValue(myPack, value);
366  break;
367  case 6:
368  coerceValue(myPivot, value);
369  break;
370  case 7:
371  coerceValue(myViewportLOD, value);
372  break;
373  case 8:
374  coerceValue(myTransform, value);
375  break;
376  case 9:
377  coerceValue(myUseImplicitN, value);
378  break;
379  case 10:
380  if (idx.size() == 1)
381  {
382  exint newsize;
383  coerceValue(newsize, value);
384  myTargetAttribs.setSize(newsize);
385  }
386  else
387  {
388  myTargetAttribs.setSizeIfNeeded(instance[0]+1);
389  auto && _data = myTargetAttribs(instance[0]);
390  switch (idx[1])
391  {
392  case 0:
393  coerceValue(_data.useapply, value);
394  break;
395  case 1:
396  coerceValue(_data.applyto, value);
397  break;
398  case 2:
399  coerceValue(_data.applymethod, value);
400  break;
401  case 3:
402  coerceValue(_data.applyattribs, value);
403  break;
404 
405  }
406  }
407  break;
408 
409  }
410  }
411 
412  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
413  { doSetParmValue(idx, instance, value); }
414  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
415  { doSetParmValue(idx, instance, value); }
416  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
417  { doSetParmValue(idx, instance, value); }
418  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
419  { doSetParmValue(idx, instance, value); }
420  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
421  { doSetParmValue(idx, instance, value); }
422  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
423  { doSetParmValue(idx, instance, value); }
424  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
425  { doSetParmValue(idx, instance, value); }
426  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
427  { doSetParmValue(idx, instance, value); }
428  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
429  { doSetParmValue(idx, instance, value); }
430  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
431  { doSetParmValue(idx, instance, value); }
432  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
433  { doSetParmValue(idx, instance, value); }
434 
435  exint getNestNumParms(TempIndex idx) const override
436  {
437  if (idx.size() == 0)
438  return 11;
439  switch (idx[0])
440  {
441  case 10:
442  return 4;
443 
444  }
445  // Invalid
446  return 0;
447  }
448 
449  const char *getNestParmName(TempIndex fieldnum) const override
450  {
451  if (fieldnum.size() < 1)
452  return 0;
453  switch (fieldnum[0])
454  {
455  case 0:
456  return "sourcegroup";
457  case 1:
458  return "sourcegrouptype";
459  case 2:
460  return "targetgroup";
461  case 3:
462  return "useidattrib";
463  case 4:
464  return "idattrib";
465  case 5:
466  return "pack";
467  case 6:
468  return "pivot";
469  case 7:
470  return "viewportlod";
471  case 8:
472  return "transform";
473  case 9:
474  return "useimplicitn";
475  case 10:
476  if (fieldnum.size() == 1)
477  return "targetattribs";
478  switch (fieldnum[1])
479  {
480  case 0:
481  return "useapply#";
482  case 1:
483  return "applyto#";
484  case 2:
485  return "applymethod#";
486  case 3:
487  return "applyattribs#";
488 
489  }
490  return 0;
491 
492  }
493  return 0;
494  }
495 
496  ParmType getNestParmType(TempIndex fieldnum) const override
497  {
498  if (fieldnum.size() < 1)
499  return PARM_UNSUPPORTED;
500  switch (fieldnum[0])
501  {
502  case 0:
503  return PARM_STRING;
504  case 1:
505  return PARM_INTEGER;
506  case 2:
507  return PARM_STRING;
508  case 3:
509  return PARM_INTEGER;
510  case 4:
511  return PARM_STRING;
512  case 5:
513  return PARM_INTEGER;
514  case 6:
515  return PARM_INTEGER;
516  case 7:
517  return PARM_INTEGER;
518  case 8:
519  return PARM_INTEGER;
520  case 9:
521  return PARM_INTEGER;
522  case 10:
523  if (fieldnum.size() == 1)
524  return PARM_MULTIPARM;
525  switch (fieldnum[1])
526  {
527  case 0:
528  return PARM_INTEGER;
529  case 1:
530  return PARM_INTEGER;
531  case 2:
532  return PARM_INTEGER;
533  case 3:
534  return PARM_STRING;
535 
536  }
537  return PARM_UNSUPPORTED;
538 
539  }
540  return PARM_UNSUPPORTED;
541  }
542 
543  // Boiler plate to load individual types.
544  static void loadData(UT_IStream &is, int64 &v)
545  { is.bread(&v, 1); }
546  static void loadData(UT_IStream &is, bool &v)
547  { int64 iv; is.bread(&iv, 1); v = iv; }
548  static void loadData(UT_IStream &is, fpreal64 &v)
549  { is.bread<fpreal64>(&v, 1); }
550  static void loadData(UT_IStream &is, UT_Vector2D &v)
551  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
552  static void loadData(UT_IStream &is, UT_Vector3D &v)
553  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
554  is.bread<fpreal64>(&v.z(), 1); }
555  static void loadData(UT_IStream &is, UT_Vector4D &v)
556  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
557  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
558  static void loadData(UT_IStream &is, UT_Matrix2D &v)
559  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
560  static void loadData(UT_IStream &is, UT_Matrix3D &v)
561  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
562  static void loadData(UT_IStream &is, UT_Matrix4D &v)
563  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
564  static void loadData(UT_IStream &is, UT_Vector2I &v)
565  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
566  static void loadData(UT_IStream &is, UT_Vector3I &v)
567  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
568  is.bread<int64>(&v.z(), 1); }
569  static void loadData(UT_IStream &is, UT_Vector4I &v)
570  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
571  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
573  { is.bread(v); }
575  { UT_StringHolder rampdata;
576  loadData(is, rampdata);
577  if (rampdata.isstring())
578  {
579  v.reset(new UT_Ramp());
580  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
581  v->load(istr);
582  }
583  else v.reset();
584  }
587  loadData(is, data);
588  if (data.isstring())
589  {
590  // Find the data type.
591  const char *colon = UT_StringWrap(data).findChar(':');
592  if (colon)
593  {
594  int typelen = colon - data.buffer();
596  type.strncpy(data.buffer(), typelen);
597  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
598 
599  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
600  }
601  }
602  else v.reset();
603  }
604 
605  static void saveData(std::ostream &os, int64 v)
606  { UTwrite(os, &v); }
607  static void saveData(std::ostream &os, bool v)
608  { int64 iv = v; UTwrite(os, &iv); }
609  static void saveData(std::ostream &os, fpreal64 v)
610  { UTwrite<fpreal64>(os, &v); }
611  static void saveData(std::ostream &os, UT_Vector2D v)
612  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
613  static void saveData(std::ostream &os, UT_Vector3D v)
614  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
615  UTwrite<fpreal64>(os, &v.z()); }
616  static void saveData(std::ostream &os, UT_Vector4D v)
617  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
618  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
619  static void saveData(std::ostream &os, UT_Matrix2D v)
621  static void saveData(std::ostream &os, UT_Matrix3D v)
623  static void saveData(std::ostream &os, UT_Matrix4D v)
625  static void saveData(std::ostream &os, UT_StringHolder s)
626  { UT_StringWrap(s).saveBinary(os); }
627  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
629  UT_OStringStream ostr;
630  if (s) s->save(ostr);
631  result = ostr.str();
632  saveData(os, result);
633  }
634  static void saveData(std::ostream &os, PRM_DataItemHandle s)
636  UT_OStringStream ostr;
637  if (s)
638  {
639  ostr << s->getDataTypeToken();
640  ostr << ":";
641  s->saveBinary(ostr);
642  }
643  result = ostr.str();
644  saveData(os, result);
645  }
646 
647 
648  void save(std::ostream &os) const
649  {
650  int32 v = version();
651  UTwrite(os, &v);
652  saveData(os, mySourceGroup);
653  saveData(os, mySourceGroupType);
654  saveData(os, myTargetGroup);
655  saveData(os, myUseIDAttrib);
656  saveData(os, myIDAttrib);
657  saveData(os, myPack);
658  saveData(os, myPivot);
659  saveData(os, myViewportLOD);
660  saveData(os, myTransform);
661  saveData(os, myUseImplicitN);
662  {
663  int64 length = myTargetAttribs.entries();
664  UTwrite(os, &length);
665  for (exint i = 0; i < length; i++)
666  {
667  saveData(os, myTargetAttribs(i).useapply);
668  saveData(os, myTargetAttribs(i).applyto);
669  saveData(os, myTargetAttribs(i).applymethod);
670  saveData(os, myTargetAttribs(i).applyattribs);
671 
672  }
673  }
674 
675  }
676 
677  bool load(UT_IStream &is)
678  {
679  int32 v;
680  is.bread(&v, 1);
681  if (version() != v)
682  {
683  // Fail incompatible versions
684  return false;
685  }
686  loadData(is, mySourceGroup);
687  loadData(is, mySourceGroupType);
688  loadData(is, myTargetGroup);
689  loadData(is, myUseIDAttrib);
690  loadData(is, myIDAttrib);
691  loadData(is, myPack);
692  loadData(is, myPivot);
693  loadData(is, myViewportLOD);
694  loadData(is, myTransform);
695  loadData(is, myUseImplicitN);
696  {
697  int64 length;
698  is.read(&length, 1);
699  myTargetAttribs.entries(length);
700  for (exint i = 0; i < length; i++)
701  {
702  loadData(is, myTargetAttribs(i).useapply);
703  loadData(is, myTargetAttribs(i).applyto);
704  loadData(is, myTargetAttribs(i).applymethod);
705  loadData(is, myTargetAttribs(i).applyattribs);
706 
707  }
708  }
709 
710  return true;
711  }
712 
713  const UT_StringHolder & getSourceGroup() const { return mySourceGroup; }
714  void setSourceGroup(const UT_StringHolder & val) { mySourceGroup = val; }
716  {
717  SOP_Node *thissop = cookparms.getNode();
718  if (!thissop) return getSourceGroup();
720  OP_Utils::evalOpParm(result, thissop, "sourcegroup", cookparms.getCookTime(), 0);
721  return result;
722  }
723  SourceGroupType getSourceGroupType() const { return SourceGroupType(mySourceGroupType); }
724  void setSourceGroupType(SourceGroupType val) { mySourceGroupType = int64(val); }
726  {
727  SOP_Node *thissop = cookparms.getNode();
728  if (!thissop) return getSourceGroupType();
729  int64 result;
730  OP_Utils::evalOpParm(result, thissop, "sourcegrouptype", cookparms.getCookTime(), 0);
731  return SourceGroupType(result);
732  }
733  const UT_StringHolder & getTargetGroup() const { return myTargetGroup; }
734  void setTargetGroup(const UT_StringHolder & val) { myTargetGroup = val; }
736  {
737  SOP_Node *thissop = cookparms.getNode();
738  if (!thissop) return getTargetGroup();
740  OP_Utils::evalOpParm(result, thissop, "targetgroup", cookparms.getCookTime(), 0);
741  return result;
742  }
743  bool getUseIDAttrib() const { return myUseIDAttrib; }
744  void setUseIDAttrib(bool val) { myUseIDAttrib = val; }
745  bool opUseIDAttrib(const SOP_NodeVerb::CookParms &cookparms) const
746  {
747  SOP_Node *thissop = cookparms.getNode();
748  if (!thissop) return getUseIDAttrib();
749  bool result;
750  OP_Utils::evalOpParm(result, thissop, "useidattrib", cookparms.getCookTime(), 0);
751  return result;
752  }
753  const UT_StringHolder & getIDAttrib() const { return myIDAttrib; }
754  void setIDAttrib(const UT_StringHolder & val) { myIDAttrib = val; }
756  {
757  SOP_Node *thissop = cookparms.getNode();
758  if (!thissop) return getIDAttrib();
760  OP_Utils::evalOpParm(result, thissop, "idattrib", cookparms.getCookTime(), 0);
761  return result;
762  }
763  bool getPack() const { return myPack; }
764  void setPack(bool val) { myPack = val; }
765  bool opPack(const SOP_NodeVerb::CookParms &cookparms) const
766  {
767  SOP_Node *thissop = cookparms.getNode();
768  if (!thissop) return getPack();
769  bool result;
770  OP_Utils::evalOpParm(result, thissop, "pack", cookparms.getCookTime(), 0);
771  return result;
772  }
773  Pivot getPivot() const { return Pivot(myPivot); }
774  void setPivot(Pivot val) { myPivot = int64(val); }
775  Pivot opPivot(const SOP_NodeVerb::CookParms &cookparms) const
776  {
777  SOP_Node *thissop = cookparms.getNode();
778  if (!thissop) return getPivot();
779  int64 result;
780  OP_Utils::evalOpParm(result, thissop, "pivot", cookparms.getCookTime(), 0);
781  return Pivot(result);
782  }
783  ViewportLOD getViewportLOD() const { return ViewportLOD(myViewportLOD); }
784  void setViewportLOD(ViewportLOD val) { myViewportLOD = int64(val); }
786  {
787  SOP_Node *thissop = cookparms.getNode();
788  if (!thissop) return getViewportLOD();
789  int64 result;
790  OP_Utils::evalOpParm(result, thissop, "viewportlod", cookparms.getCookTime(), 0);
791  return ViewportLOD(result);
792  }
793  bool getTransform() const { return myTransform; }
794  void setTransform(bool val) { myTransform = val; }
795  bool opTransform(const SOP_NodeVerb::CookParms &cookparms) const
796  {
797  SOP_Node *thissop = cookparms.getNode();
798  if (!thissop) return getTransform();
799  bool result;
800  OP_Utils::evalOpParm(result, thissop, "transform", cookparms.getCookTime(), 0);
801  return result;
802  }
803  bool getUseImplicitN() const { return myUseImplicitN; }
804  void setUseImplicitN(bool val) { myUseImplicitN = val; }
805  bool opUseImplicitN(const SOP_NodeVerb::CookParms &cookparms) const
806  {
807  SOP_Node *thissop = cookparms.getNode();
808  if (!thissop) return getUseImplicitN();
809  bool result;
810  OP_Utils::evalOpParm(result, thissop, "useimplicitn", cookparms.getCookTime(), 0);
811  return result;
812  }
813  const UT_Array<TargetAttribs> &getTargetAttribs() const { return myTargetAttribs; }
814  void setTargetAttribs(const UT_Array<TargetAttribs> &val) { myTargetAttribs = val; }
816  {
817  SOP_Node *thissop = cookparms.getNode();
818  if (!thissop) return getTargetAttribs().entries();
819  exint result;
820  OP_Utils::evalOpParm(result, thissop, "targetattribs", cookparms.getCookTime(), 0);
821  return result;
822  }
823  bool opTargetAttribs_useapply(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
824  {
825  SOP_Node *thissop = cookparms.getNode();
826  if (!thissop) return (myTargetAttribs(_idx).useapply);
827  int _parmidx = _idx + 1;
828  bool result;
829  OP_Utils::evalOpParmInst(result, thissop, "useapply#", &_parmidx, cookparms.getCookTime(), 0);
830  return (result);
831  }
833  {
834  SOP_Node *thissop = cookparms.getNode();
835  if (!thissop) return (myTargetAttribs(_idx).applyto);
836  int _parmidx = _idx + 1;
837  int64 result;
838  OP_Utils::evalOpParmInst(result, thissop, "applyto#", &_parmidx, cookparms.getCookTime(), 0);
839  return (result);
840  }
842  {
843  SOP_Node *thissop = cookparms.getNode();
844  if (!thissop) return (myTargetAttribs(_idx).applymethod);
845  int _parmidx = _idx + 1;
846  int64 result;
847  OP_Utils::evalOpParmInst(result, thissop, "applymethod#", &_parmidx, cookparms.getCookTime(), 0);
848  return (result);
849  }
851  {
852  SOP_Node *thissop = cookparms.getNode();
853  if (!thissop) return (myTargetAttribs(_idx).applyattribs);
854  int _parmidx = _idx + 1;
856  OP_Utils::evalOpParmInst(result, thissop, "applyattribs#", &_parmidx, cookparms.getCookTime(), 0);
857  return (result);
858  }
859 
860 
861 private:
862  UT_StringHolder mySourceGroup;
863  int64 mySourceGroupType;
864  UT_StringHolder myTargetGroup;
865  bool myUseIDAttrib;
866  UT_StringHolder myIDAttrib;
867  bool myPack;
868  int64 myPivot;
869  int64 myViewportLOD;
870  bool myTransform;
871  bool myUseImplicitN;
872  UT_Array<TargetAttribs> myTargetAttribs;
873 
874 };
GLdouble s
Definition: glew.h:1390
int64 opTargetAttribs_applyto(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
SourceGroupType opSourceGroupType(const SOP_NodeVerb::CookParms &cookparms) const
exint nodeIdx() const
Definition: SOP_NodeVerb.h:114
void setTargetGroup(const UT_StringHolder &val)
GLenum src
Definition: glew.h:2410
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:640
static void loadData(UT_IStream &is, int64 &v)
static void saveData(std::ostream &os, UT_Vector2D v)
virtual void evalOpParmInst(int64 &v, NodeIdx node, const char *parmname, int *inst, fpreal time, DEP_MicroNode *depnode) const =0
UT_StringHolder createString(const UT_Array< TargetAttribs > &list) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
fpreal getTime() const
Definition: OP_Context.h:60
static void saveData(std::ostream &os, UT_Matrix3D v)
GLuint const GLfloat * val
Definition: glew.h:2794
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setTargetAttribs(const UT_Array< TargetAttribs > &val)
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:113
static void loadData(UT_IStream &is, UT_Matrix2D &v)
An output stream object that owns its own string buffer storage.
bool opUseImplicitN(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void loadData(UT_IStream &is, bool &v)
const GLdouble * v
Definition: glew.h:1391
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setSourceGroup(const UT_StringHolder &val)
void setSourceGroupType(SourceGroupType val)
UT_StringHolder opTargetGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void copyFrom(const SOP_NodeParms *src) override
void setIDAttrib(const UT_StringHolder &val)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
bool operator!=(const SOP_CopyToPoints_2_0Parms &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
UT_StringHolder opIDAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
ParmType getNestParmType(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
double fpreal64
Definition: SYS_Types.h:201
bool opUseIDAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void loadFromOpSubclass(const LoadParms &loadparms) override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
bool operator==(const TargetAttribs &src) const
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:513
Pivot opPivot(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void saveData(std::ostream &os, UT_StringHolder s)
static void loadData(UT_IStream &is, UT_Vector2D &v)
const UT_StringHolder & getTargetGroup() const
exint length() const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:284
bool opPack(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:515
UT_StringHolder opTargetAttribs_applyattribs(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
exint opTargetAttribs(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void
Definition: png.h:1083
static void loadData(UT_IStream &is, UT_Vector2I &v)
const GLfloat * c
Definition: glew.h:16296
GLuint GLsizei GLsizei * length
Definition: glew.h:1825
const UT_Array< TargetAttribs > & getTargetAttribs() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
long long int64
Definition: SYS_Types.h:116
ViewportLOD opViewportLOD(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, int64 v)
void save(std::ostream &os) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
const char * getNestParmName(TempIndex fieldnum) const override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
SYS_FORCE_INLINE void strcat(const char *src)
static void saveData(std::ostream &os, fpreal64 v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
static void loadData(UT_IStream &is, UT_StringHolder &v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:121
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:460
bool operator!=(const TargetAttribs &src) const
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
int64 opTargetAttribs_applymethod(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
fpreal64 fpreal
Definition: SYS_Types.h:277
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void saveData(std::ostream &os, UT_Vector4D v)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
SYS_FORCE_INLINE void append(char character)
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
#define SOP_API
Definition: SOP_API.h:10
static void loadData(UT_IStream &is, fpreal64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:511
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:654
bool opTransform(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
GLuint64EXT * result
Definition: glew.h:14007
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
const char * findChar(int c) const
Definition: UT_String.h:1367
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
static void saveData(std::ostream &os, bool v)
exint getNestNumParms(TempIndex idx) const override
UT_StringHolder opSourceGroup(const SOP_NodeVerb::CookParms &cookparms) const
GLenum GLuint GLsizei const GLchar * buf
Definition: glew.h:2580
GLsizei const GLfloat * value
Definition: glew.h:1849
static void loadData(UT_IStream &is, UT_Vector4I &v)
bool operator==(const SOP_CopyToPoints_2_0Parms &src) const
const OP_Context & context() const
Definition: SOP_NodeVerb.h:119
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
const UT_StringHolder & getSourceGroup() const
bool opTargetAttribs_useapply(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
static void saveData(std::ostream &os, UT_Matrix2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
SYS_FORCE_INLINE bool isstring() const
static void saveData(std::ostream &os, UT_Matrix4D v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
const UT_StringHolder & getIDAttrib() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
type
Definition: core.h:528
SourceGroupType getSourceGroupType() const
static void saveData(std::ostream &os, UT_Vector3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override