HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Fuse-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_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <SOP/SOP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 using namespace UT::Literal;
23 
24 class DEP_MicroNode;
25 namespace SOP_Fuse_2_0Enums
26 {
27  enum class Snaptype
28  {
29  DISTANCESNAP = 0,
30  GRIDSNAP,
31  SPECIFIED
32  };
33  enum class Algorithm
34  {
35  LOWEST = 0,
36  CLOSEST
37  };
38  enum class TargetClass
39  {
40  POINT = 0,
41  VERTEX,
42  PRIM,
43  DETAIL
44  };
45  enum class PositionSnapMethod
46  {
47  AVERAGE = 0,
48  LOWEST,
49  HIGHEST,
50  MAX,
51  MIN,
52  MODE,
53  MEDIAN,
54  SUM,
55  SUMSQUARE,
56  RMS
57  };
58  enum class Matchtype
59  {
60  MATCH = 0,
61  MISMATCH
62  };
63  enum class Gridtype
64  {
65  SPACING = 0,
66  LINES,
67  POW2
68  };
69  enum class Gridround
70  {
71  NEAREST = 0,
72  DOWN,
73  UP
74  };
75  enum class Attribsnapmethod
76  {
77  MAX = 0,
78  MIN,
79  MEAN,
80  MODE,
81  MEDIAN,
82  SUM,
83  SUMSQUARE,
84  RMS,
85  FIRST,
86  LAST
87  };
88  enum class Grouppropagation
89  {
90  LEASTPOINTNUMBER = 0,
92  UNION,
93  INTERSECT,
94  MODE
95  };
96 }
97 
98 
100 {
101 public:
102  static int version() { return 1; }
104  {
107 
108 
110  {
111  attribsnapmethod = 8;
112  pointattribnames = ""_sh;
113 
114  }
115 
116  bool operator==(const Numpointattribs &src) const
117  {
118  if (attribsnapmethod != src.attribsnapmethod) return false;
119  if (pointattribnames != src.pointattribnames) return false;
120 
121  return true;
122  }
123  bool operator!=(const Numpointattribs &src) const
124  {
125  return !operator==(src);
126  }
127 
128  };
129 
131  {
133 
134  buf.strcat("[ ");
135  for (int i = 0; i < list.entries(); i++)
136  {
137  if (i)
138  buf.strcat(", ");
139  buf.strcat("( ");
140  buf.append("");
141  buf.appendSprintf("%d", (int) list(i).attribsnapmethod);
142  buf.append(", ");
143  { UT_String tmp; tmp = UT_StringWrap(list(i).pointattribnames).makeQuotedString('"'); buf.strcat(tmp); }
144 
145  buf.strcat(" )");
146  }
147  buf.strcat(" ]");
148 
150  return result;
151  }
152  struct Numgroups
153  {
156 
157 
159  {
160  grouppropagation = 0;
161  pointgroupnames = ""_sh;
162 
163  }
164 
165  bool operator==(const Numgroups &src) const
166  {
167  if (grouppropagation != src.grouppropagation) return false;
168  if (pointgroupnames != src.pointgroupnames) return false;
169 
170  return true;
171  }
172  bool operator!=(const Numgroups &src) const
173  {
174  return !operator==(src);
175  }
176 
177  };
178 
180  {
182 
183  buf.strcat("[ ");
184  for (int i = 0; i < list.entries(); i++)
185  {
186  if (i)
187  buf.strcat(", ");
188  buf.strcat("( ");
189  buf.append("");
190  buf.appendSprintf("%d", (int) list(i).grouppropagation);
191  buf.append(", ");
192  { UT_String tmp; tmp = UT_StringWrap(list(i).pointgroupnames).makeQuotedString('"'); buf.strcat(tmp); }
193 
194  buf.strcat(" )");
195  }
196  buf.strcat(" ]");
197 
199  return result;
200  }
201 
203  {
204  myQuerygroup = ""_sh;
205  myPosAttrib = "P"_sh;
206  mySnaptype = 0;
207  myAlgorithm = 0;
208  myUseTol3D = true;
209  myTol3d = 0.001;
210  myTargetPtAttrib = "snap_to"_sh;
211  myTargetClass = 0;
212  myUsePositionSnapMethod = true;
213  myPositionSnapMethod = 0;
214  myUseradiusattrib = false;
215  myRadiusattrib = "pscale"_sh;
216  myUsematchattrib = false;
217  myMatchattrib = "name"_sh;
218  myMatchtype = 0;
219  myMatchTol = 0;
220  myGridtype = 0;
221  myGridspacing = UT_Vector3D(0.1,0.1,0.1);
222  myGridlines = UT_Vector3D(10,10,10);
223  myGridpow2 = UT_Vector3I(3,3,3);
224  myGridoffset = UT_Vector3D(0,0,0);
225  myGridround = 0;
226  myUseGridTol = true;
227  myGridtol = 10;
228  myConsolidateSnappedPoints = true;
229  myKeepConsolidatedPoints = false;
230  myDelDegen = true;
231  myDelDegenPoints = true;
232  myDelUnusedPoints = false;
233  myRecomputenml = true;
234  myCreatesnappedgroup = false;
235  mySnappedgroupname = "snapped_points"_sh;
236  myCreatesnappedattrib = false;
237  mySnappedattribname = "snapped_to"_sh;
238  myNumpointattribs.setSize(0);
239  myNumgroups.setSize(0);
240  myUsetargetgroup = false;
241  myTargetgroup = ""_sh;
242  myModifyboth = false;
243 
244  }
245 
246  explicit SOP_Fuse_2_0Parms(const SOP_Fuse_2_0Parms &) = default;
247 
248  ~SOP_Fuse_2_0Parms() override {}
249 
250  bool operator==(const SOP_Fuse_2_0Parms &src) const
251  {
252  if (myQuerygroup != src.myQuerygroup) return false;
253  if (myPosAttrib != src.myPosAttrib) return false;
254  if (mySnaptype != src.mySnaptype) return false;
255  if (myAlgorithm != src.myAlgorithm) return false;
256  if (myUseTol3D != src.myUseTol3D) return false;
257  if (myTol3d != src.myTol3d) return false;
258  if (myTargetPtAttrib != src.myTargetPtAttrib) return false;
259  if (myTargetClass != src.myTargetClass) return false;
260  if (myUsePositionSnapMethod != src.myUsePositionSnapMethod) return false;
261  if (myPositionSnapMethod != src.myPositionSnapMethod) return false;
262  if (myUseradiusattrib != src.myUseradiusattrib) return false;
263  if (myRadiusattrib != src.myRadiusattrib) return false;
264  if (myUsematchattrib != src.myUsematchattrib) return false;
265  if (myMatchattrib != src.myMatchattrib) return false;
266  if (myMatchtype != src.myMatchtype) return false;
267  if (myMatchTol != src.myMatchTol) return false;
268  if (myGridtype != src.myGridtype) return false;
269  if (myGridspacing != src.myGridspacing) return false;
270  if (myGridlines != src.myGridlines) return false;
271  if (myGridpow2 != src.myGridpow2) return false;
272  if (myGridoffset != src.myGridoffset) return false;
273  if (myGridround != src.myGridround) return false;
274  if (myUseGridTol != src.myUseGridTol) return false;
275  if (myGridtol != src.myGridtol) return false;
276  if (myConsolidateSnappedPoints != src.myConsolidateSnappedPoints) return false;
277  if (myKeepConsolidatedPoints != src.myKeepConsolidatedPoints) return false;
278  if (myDelDegen != src.myDelDegen) return false;
279  if (myDelDegenPoints != src.myDelDegenPoints) return false;
280  if (myDelUnusedPoints != src.myDelUnusedPoints) return false;
281  if (myRecomputenml != src.myRecomputenml) return false;
282  if (myCreatesnappedgroup != src.myCreatesnappedgroup) return false;
283  if (mySnappedgroupname != src.mySnappedgroupname) return false;
284  if (myCreatesnappedattrib != src.myCreatesnappedattrib) return false;
285  if (mySnappedattribname != src.mySnappedattribname) return false;
286  if (myNumpointattribs != src.myNumpointattribs) return false;
287  if (myNumgroups != src.myNumgroups) return false;
288  if (myUsetargetgroup != src.myUsetargetgroup) return false;
289  if (myTargetgroup != src.myTargetgroup) return false;
290  if (myModifyboth != src.myModifyboth) return false;
291 
292  return true;
293  }
294  bool operator!=(const SOP_Fuse_2_0Parms &src) const
295  {
296  return !operator==(src);
297  }
307 
308 
309 
310  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
311  {
312  myQuerygroup = ""_sh;
313  if (true)
314  graph->evalOpParm(myQuerygroup, nodeidx, "querygroup", time, 0);
315  myPosAttrib = "P"_sh;
316  if (true)
317  graph->evalOpParm(myPosAttrib, nodeidx, "posattrib", time, 0);
318  mySnaptype = 0;
319  if (true)
320  graph->evalOpParm(mySnaptype, nodeidx, "snaptype", time, 0);
321  myAlgorithm = 0;
322  if (true && ( (true&&!(((int64(getSnaptype())!=0)))) ) )
323  graph->evalOpParm(myAlgorithm, nodeidx, "algorithm", time, 0);
324  myUseTol3D = true;
325  if (true && ( (true&&!(((int64(getSnaptype())!=0)))) ) )
326  graph->evalOpParm(myUseTol3D, nodeidx, "usetol3d", time, 0);
327  myTol3d = 0.001;
328  if (true && ( (true&&!(((int64(getSnaptype())!=0))||((getUseTol3D()==0))||((int64(getSnaptype())!=0)))) ) )
329  graph->evalOpParm(myTol3d, nodeidx, "tol3d", time, 0);
330  myTargetPtAttrib = "snap_to"_sh;
331  if (true && ( (true&&!(((int64(getSnaptype())!=2)))) ) )
332  graph->evalOpParm(myTargetPtAttrib, nodeidx, "targetptattrib", time, 0);
333  myTargetClass = 0;
334  if (true && ( (true&&!(((int64(getSnaptype())!=2)))) ) )
335  graph->evalOpParm(myTargetClass, nodeidx, "targetclass", time, 0);
336  myUsePositionSnapMethod = true;
337  if (true && ( (true&&!(((int64(getSnaptype())==1)))) ) )
338  graph->evalOpParm(myUsePositionSnapMethod, nodeidx, "usepositionsnapmethod", time, 0);
339  myPositionSnapMethod = 0;
340  if (true && ( (true&&!(((int64(getSnaptype())==1))||((getUsePositionSnapMethod()==0))||((int64(getSnaptype())==1)))) ) )
341  graph->evalOpParm(myPositionSnapMethod, nodeidx, "positionsnapmethod", time, 0);
342  myUseradiusattrib = false;
343  if (true && ( (true&&!(((int64(getSnaptype())!=0)))) ) )
344  graph->evalOpParm(myUseradiusattrib, nodeidx, "useradiusattrib", time, 0);
345  myRadiusattrib = "pscale"_sh;
346  if (true && ( (true&&!(((getUseradiusattrib()==0))||((int64(getSnaptype())!=0)))) ) )
347  graph->evalOpParm(myRadiusattrib, nodeidx, "radiusattrib", time, 0);
348  myUsematchattrib = false;
349  if (true && ( (true&&!(((int64(getSnaptype())!=0)))) ) )
350  graph->evalOpParm(myUsematchattrib, nodeidx, "usematchattrib", time, 0);
351  myMatchattrib = "name"_sh;
352  if (true && ( (true&&!(((getUsematchattrib()==0))||((int64(getSnaptype())!=0)))) ) )
353  graph->evalOpParm(myMatchattrib, nodeidx, "matchattrib", time, 0);
354  myMatchtype = 0;
355  if (true && ( (true&&!(((getUsematchattrib()==0))||((int64(getSnaptype())!=0)))) ) )
356  graph->evalOpParm(myMatchtype, nodeidx, "matchtype", time, 0);
357  myMatchTol = 0;
358  if (true && ( (true&&!(((getUsematchattrib()==0))||((int64(getSnaptype())!=0)))) ) )
359  graph->evalOpParm(myMatchTol, nodeidx, "matchtol", time, 0);
360  myGridtype = 0;
361  if (true && ( (true&&!(((int64(getSnaptype())!=1)))) ) )
362  graph->evalOpParm(myGridtype, nodeidx, "gridtype", time, 0);
363  myGridspacing = UT_Vector3D(0.1,0.1,0.1);
364  if (true && ( (true&&!(((int64(getSnaptype())!=1))||((int64(getGridtype())!=0)))) ) )
365  graph->evalOpParm(myGridspacing, nodeidx, "gridspacing", time, 0);
366  myGridlines = UT_Vector3D(10,10,10);
367  if (true && ( (true&&!(((int64(getSnaptype())!=1))||((int64(getGridtype())!=1)))) ) )
368  graph->evalOpParm(myGridlines, nodeidx, "gridlines", time, 0);
369  myGridpow2 = UT_Vector3I(3,3,3);
370  if (true && ( (true&&!(((int64(getSnaptype())!=1))||((int64(getGridtype())!=2)))) ) )
371  graph->evalOpParm(myGridpow2, nodeidx, "gridpow2", time, 0);
372  myGridoffset = UT_Vector3D(0,0,0);
373  if (true && ( (true&&!(((int64(getSnaptype())!=1)))) ) )
374  graph->evalOpParm(myGridoffset, nodeidx, "gridoffset", time, 0);
375  myGridround = 0;
376  if (true && ( (true&&!(((int64(getSnaptype())!=1)))) ) )
377  graph->evalOpParm(myGridround, nodeidx, "gridround", time, 0);
378  myUseGridTol = true;
379  if (true && ( (true&&!(((int64(getSnaptype())!=1)))) ) )
380  graph->evalOpParm(myUseGridTol, nodeidx, "usegridtol", time, 0);
381  myGridtol = 10;
382  if (true && ( (true&&!(((int64(getSnaptype())!=1))||((getUseGridTol()==0))||((int64(getSnaptype())!=1)))) ) )
383  graph->evalOpParm(myGridtol, nodeidx, "gridtol", time, 0);
384  myConsolidateSnappedPoints = true;
385  if (true)
386  graph->evalOpParm(myConsolidateSnappedPoints, nodeidx, "consolidatesnappedpoints", time, 0);
387  myKeepConsolidatedPoints = false;
388  if (true && ( (true&&!(((getConsolidateSnappedPoints()==0)))) ) )
389  graph->evalOpParm(myKeepConsolidatedPoints, nodeidx, "keepconsolidatedpoints", time, 0);
390  myDelDegen = true;
391  if (true && ( (true&&!(((getConsolidateSnappedPoints()==0)))) ) )
392  graph->evalOpParm(myDelDegen, nodeidx, "deldegen", time, 0);
393  myDelDegenPoints = true;
394  if (true && ( (true&&!(((getConsolidateSnappedPoints()==0))||((getDelDegen()==0)))) ) )
395  graph->evalOpParm(myDelDegenPoints, nodeidx, "deldegenpoints", time, 0);
396  myDelUnusedPoints = false;
397  if (true && ( (true&&!(((getConsolidateSnappedPoints()==0)))) ) )
398  graph->evalOpParm(myDelUnusedPoints, nodeidx, "delunusedpoints", time, 0);
399  myRecomputenml = true;
400  if (true)
401  graph->evalOpParm(myRecomputenml, nodeidx, "recomputenml", time, 0);
402  myCreatesnappedgroup = false;
403  if (true)
404  graph->evalOpParm(myCreatesnappedgroup, nodeidx, "createsnappedgroup", time, 0);
405  mySnappedgroupname = "snapped_points"_sh;
406  if (true && ( (true&&!(((getCreatesnappedgroup()==0)))) ) )
407  graph->evalOpParm(mySnappedgroupname, nodeidx, "snappedgroupname", time, 0);
408  myCreatesnappedattrib = false;
409  if (true && ( (true&&!(((int64(getSnaptype())==1)))) ) )
410  graph->evalOpParm(myCreatesnappedattrib, nodeidx, "createsnappedattrib", time, 0);
411  mySnappedattribname = "snapped_to"_sh;
412  if (true && ( (true&&!(((getCreatesnappedattrib()==0))||((int64(getSnaptype())==1)))) ) )
413  graph->evalOpParm(mySnappedattribname, nodeidx, "snappedattribname", time, 0);
414  if (true)
415  {
416  int64 length = 0;
417  graph->evalOpParm(length, nodeidx, "numpointattribs", time, 0);
418  if (length < 0) length = 0;
419  myNumpointattribs.setSize(length);
420  for (exint i = 0; i < length; i++)
421  {
422  int parmidx[1];
423  int offsets[1];
424  parmidx[0] = i+1;
425  offsets[0] = 1;
426  auto && _curentry = myNumpointattribs(i);
427  (void) _curentry;
428  _curentry.attribsnapmethod = 8;
429  if (true)
430  graph->evalOpParmInst(_curentry.attribsnapmethod, nodeidx, "attribsnapmethod#", parmidx, offsets, time, 0, 2-1);
431  _curentry.pointattribnames = ""_sh;
432  if (true)
433  graph->evalOpParmInst(_curentry.pointattribnames, nodeidx, "pointattribnames#", parmidx, offsets, time, 0, 2-1);
434 
435  }
436  }
437  else
438  myNumpointattribs.clear();
439  if (true)
440  {
441  int64 length = 0;
442  graph->evalOpParm(length, nodeidx, "numgroups", time, 0);
443  if (length < 0) length = 0;
444  myNumgroups.setSize(length);
445  for (exint i = 0; i < length; i++)
446  {
447  int parmidx[1];
448  int offsets[1];
449  parmidx[0] = i+1;
450  offsets[0] = 1;
451  auto && _curentry = myNumgroups(i);
452  (void) _curentry;
453  _curentry.grouppropagation = 0;
454  if (true)
455  graph->evalOpParmInst(_curentry.grouppropagation, nodeidx, "grouppropagation#", parmidx, offsets, time, 0, 2-1);
456  _curentry.pointgroupnames = ""_sh;
457  if (true)
458  graph->evalOpParmInst(_curentry.pointgroupnames, nodeidx, "pointgroupnames#", parmidx, offsets, time, 0, 2-1);
459 
460  }
461  }
462  else
463  myNumgroups.clear();
464  myUsetargetgroup = false;
465  if (true && ( (true&&!(((int64(getSnaptype())==1))||(((graph->getInput(nodeidx,1)>=0)==1)))) ) )
466  graph->evalOpParm(myUsetargetgroup, nodeidx, "usetargetgroup", time, 0);
467  myTargetgroup = ""_sh;
468  if (true && ( (true&&!(((int64(getSnaptype())==1))||((getUsetargetgroup()==0)&&((graph->getInput(nodeidx,1)>=0)==0)))) ) )
469  graph->evalOpParm(myTargetgroup, nodeidx, "targetgroup", time, 0);
470  myModifyboth = false;
471  if (true && ( (true&&!(((int64(getSnaptype())==1))||(((graph->getInput(nodeidx,1)>=0)==1))||((getUsetargetgroup()==0)&&(int64(getSnaptype())!=2)))) ) )
472  graph->evalOpParm(myModifyboth, nodeidx, "modifyboth", time, 0);
473 
474  }
475 
476 
477  void loadFromOpSubclass(const LoadParms &loadparms) override
478  {
479  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
480  }
481 
482 
483  void copyFrom(const SOP_NodeParms *src) override
484  {
485  *this = *((const SOP_Fuse_2_0Parms *)src);
486  }
487 
488  template <typename T>
489  void
490  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
491  {
492  if (idx.size() < 1)
493  return;
494  UT_ASSERT(idx.size() == instance.size()+1);
495  if (idx.size() != instance.size()+1)
496  return;
497  switch (idx[0])
498  {
499  case 0:
500  coerceValue(value, myQuerygroup);
501  break;
502  case 1:
503  coerceValue(value, myPosAttrib);
504  break;
505  case 2:
506  coerceValue(value, mySnaptype);
507  break;
508  case 3:
509  coerceValue(value, myAlgorithm);
510  break;
511  case 4:
512  coerceValue(value, myUseTol3D);
513  break;
514  case 5:
515  coerceValue(value, myTol3d);
516  break;
517  case 6:
518  coerceValue(value, myTargetPtAttrib);
519  break;
520  case 7:
521  coerceValue(value, myTargetClass);
522  break;
523  case 8:
524  coerceValue(value, myUsePositionSnapMethod);
525  break;
526  case 9:
527  coerceValue(value, myPositionSnapMethod);
528  break;
529  case 10:
530  coerceValue(value, myUseradiusattrib);
531  break;
532  case 11:
533  coerceValue(value, myRadiusattrib);
534  break;
535  case 12:
536  coerceValue(value, myUsematchattrib);
537  break;
538  case 13:
539  coerceValue(value, myMatchattrib);
540  break;
541  case 14:
542  coerceValue(value, myMatchtype);
543  break;
544  case 15:
545  coerceValue(value, myMatchTol);
546  break;
547  case 16:
548  coerceValue(value, myGridtype);
549  break;
550  case 17:
551  coerceValue(value, myGridspacing);
552  break;
553  case 18:
554  coerceValue(value, myGridlines);
555  break;
556  case 19:
557  coerceValue(value, myGridpow2);
558  break;
559  case 20:
560  coerceValue(value, myGridoffset);
561  break;
562  case 21:
563  coerceValue(value, myGridround);
564  break;
565  case 22:
566  coerceValue(value, myUseGridTol);
567  break;
568  case 23:
569  coerceValue(value, myGridtol);
570  break;
571  case 24:
572  coerceValue(value, myConsolidateSnappedPoints);
573  break;
574  case 25:
575  coerceValue(value, myKeepConsolidatedPoints);
576  break;
577  case 26:
578  coerceValue(value, myDelDegen);
579  break;
580  case 27:
581  coerceValue(value, myDelDegenPoints);
582  break;
583  case 28:
584  coerceValue(value, myDelUnusedPoints);
585  break;
586  case 29:
587  coerceValue(value, myRecomputenml);
588  break;
589  case 30:
590  coerceValue(value, myCreatesnappedgroup);
591  break;
592  case 31:
593  coerceValue(value, mySnappedgroupname);
594  break;
595  case 32:
596  coerceValue(value, myCreatesnappedattrib);
597  break;
598  case 33:
599  coerceValue(value, mySnappedattribname);
600  break;
601  case 34:
602  if (idx.size() == 1)
603  coerceValue(value, myNumpointattribs.entries());
604  else if (instance[0] < myNumpointattribs.entries())
605  {
606  auto && _data = myNumpointattribs(instance[0]);
607  switch (idx[1])
608  {
609  case 0:
610  coerceValue(value, _data.attribsnapmethod);
611  break;
612  case 1:
613  coerceValue(value, _data.pointattribnames);
614  break;
615 
616  }
617  }
618  break;
619  case 35:
620  if (idx.size() == 1)
621  coerceValue(value, myNumgroups.entries());
622  else if (instance[0] < myNumgroups.entries())
623  {
624  auto && _data = myNumgroups(instance[0]);
625  switch (idx[1])
626  {
627  case 0:
628  coerceValue(value, _data.grouppropagation);
629  break;
630  case 1:
631  coerceValue(value, _data.pointgroupnames);
632  break;
633 
634  }
635  }
636  break;
637  case 36:
638  coerceValue(value, myUsetargetgroup);
639  break;
640  case 37:
641  coerceValue(value, myTargetgroup);
642  break;
643  case 38:
644  coerceValue(value, myModifyboth);
645  break;
646 
647  }
648  }
649 
650  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
651  { doGetParmValue(idx, instance, value); }
652  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
653  { doGetParmValue(idx, instance, value); }
654  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
655  { doGetParmValue(idx, instance, value); }
656  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
657  { doGetParmValue(idx, instance, value); }
658  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
659  { doGetParmValue(idx, instance, value); }
660  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
661  { doGetParmValue(idx, instance, value); }
662  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
663  { doGetParmValue(idx, instance, value); }
664  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
665  { doGetParmValue(idx, instance, value); }
666  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
667  { doGetParmValue(idx, instance, value); }
668  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
669  { doGetParmValue(idx, instance, value); }
670  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
671  { doGetParmValue(idx, instance, value); }
672 
673  template <typename T>
674  void
675  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
676  {
677  if (idx.size() < 1)
678  return;
679  UT_ASSERT(idx.size() == instance.size()+1);
680  if (idx.size() != instance.size()+1)
681  return;
682  switch (idx[0])
683  {
684  case 0:
685  coerceValue(myQuerygroup, ( ( value ) ));
686  break;
687  case 1:
688  coerceValue(myPosAttrib, ( ( value ) ));
689  break;
690  case 2:
691  coerceValue(mySnaptype, clampMinValue(0, clampMaxValue(2, value ) ));
692  break;
693  case 3:
694  coerceValue(myAlgorithm, clampMinValue(0, clampMaxValue(1, value ) ));
695  break;
696  case 4:
697  coerceValue(myUseTol3D, ( ( value ) ));
698  break;
699  case 5:
700  coerceValue(myTol3d, ( ( value ) ));
701  break;
702  case 6:
703  coerceValue(myTargetPtAttrib, ( ( value ) ));
704  break;
705  case 7:
706  coerceValue(myTargetClass, clampMinValue(0, clampMaxValue(3, value ) ));
707  break;
708  case 8:
709  coerceValue(myUsePositionSnapMethod, ( ( value ) ));
710  break;
711  case 9:
712  coerceValue(myPositionSnapMethod, clampMinValue(0, clampMaxValue(9, value ) ));
713  break;
714  case 10:
715  coerceValue(myUseradiusattrib, ( ( value ) ));
716  break;
717  case 11:
718  coerceValue(myRadiusattrib, ( ( value ) ));
719  break;
720  case 12:
721  coerceValue(myUsematchattrib, ( ( value ) ));
722  break;
723  case 13:
724  coerceValue(myMatchattrib, ( ( value ) ));
725  break;
726  case 14:
727  coerceValue(myMatchtype, clampMinValue(0, clampMaxValue(1, value ) ));
728  break;
729  case 15:
730  coerceValue(myMatchTol, ( ( value ) ));
731  break;
732  case 16:
733  coerceValue(myGridtype, clampMinValue(0, clampMaxValue(2, value ) ));
734  break;
735  case 17:
736  coerceValue(myGridspacing, ( ( value ) ));
737  break;
738  case 18:
739  coerceValue(myGridlines, ( ( value ) ));
740  break;
741  case 19:
742  coerceValue(myGridpow2, ( ( value ) ));
743  break;
744  case 20:
745  coerceValue(myGridoffset, ( ( value ) ));
746  break;
747  case 21:
748  coerceValue(myGridround, clampMinValue(0, clampMaxValue(2, value ) ));
749  break;
750  case 22:
751  coerceValue(myUseGridTol, ( ( value ) ));
752  break;
753  case 23:
754  coerceValue(myGridtol, ( ( value ) ));
755  break;
756  case 24:
757  coerceValue(myConsolidateSnappedPoints, ( ( value ) ));
758  break;
759  case 25:
760  coerceValue(myKeepConsolidatedPoints, ( ( value ) ));
761  break;
762  case 26:
763  coerceValue(myDelDegen, ( ( value ) ));
764  break;
765  case 27:
766  coerceValue(myDelDegenPoints, ( ( value ) ));
767  break;
768  case 28:
769  coerceValue(myDelUnusedPoints, ( ( value ) ));
770  break;
771  case 29:
772  coerceValue(myRecomputenml, ( ( value ) ));
773  break;
774  case 30:
775  coerceValue(myCreatesnappedgroup, ( ( value ) ));
776  break;
777  case 31:
778  coerceValue(mySnappedgroupname, ( ( value ) ));
779  break;
780  case 32:
781  coerceValue(myCreatesnappedattrib, ( ( value ) ));
782  break;
783  case 33:
784  coerceValue(mySnappedattribname, ( ( value ) ));
785  break;
786  case 34:
787  if (idx.size() == 1)
788  {
789  exint newsize;
790  coerceValue(newsize, value);
791  if (newsize < 0) newsize = 0;
792  myNumpointattribs.setSize(newsize);
793  }
794  else
795  {
796  if (instance[0] < 0)
797  return;
798  myNumpointattribs.setSizeIfNeeded(instance[0]+1);
799  auto && _data = myNumpointattribs(instance[0]);
800  switch (idx[1])
801  {
802  case 0:
803  coerceValue(_data.attribsnapmethod, value);
804  break;
805  case 1:
806  coerceValue(_data.pointattribnames, value);
807  break;
808 
809  }
810  }
811  break;
812  case 35:
813  if (idx.size() == 1)
814  {
815  exint newsize;
816  coerceValue(newsize, value);
817  if (newsize < 0) newsize = 0;
818  myNumgroups.setSize(newsize);
819  }
820  else
821  {
822  if (instance[0] < 0)
823  return;
824  myNumgroups.setSizeIfNeeded(instance[0]+1);
825  auto && _data = myNumgroups(instance[0]);
826  switch (idx[1])
827  {
828  case 0:
829  coerceValue(_data.grouppropagation, value);
830  break;
831  case 1:
832  coerceValue(_data.pointgroupnames, value);
833  break;
834 
835  }
836  }
837  break;
838  case 36:
839  coerceValue(myUsetargetgroup, ( ( value ) ));
840  break;
841  case 37:
842  coerceValue(myTargetgroup, ( ( value ) ));
843  break;
844  case 38:
845  coerceValue(myModifyboth, ( ( value ) ));
846  break;
847 
848  }
849  }
850 
851  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
852  { doSetParmValue(idx, instance, value); }
853  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
854  { doSetParmValue(idx, instance, value); }
855  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
856  { doSetParmValue(idx, instance, value); }
857  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
858  { doSetParmValue(idx, instance, value); }
859  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
860  { doSetParmValue(idx, instance, value); }
861  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
862  { doSetParmValue(idx, instance, value); }
863  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
864  { doSetParmValue(idx, instance, value); }
865  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
866  { doSetParmValue(idx, instance, value); }
867  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
868  { doSetParmValue(idx, instance, value); }
869  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
870  { doSetParmValue(idx, instance, value); }
871  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
872  { doSetParmValue(idx, instance, value); }
873 
874  exint getNestNumParms(TempIndex idx) const override
875  {
876  if (idx.size() == 0)
877  return 39;
878  switch (idx[0])
879  {
880  case 34:
881  return 2;
882  case 35:
883  return 2;
884 
885  }
886  // Invalid
887  return 0;
888  }
889 
890  const char *getNestParmName(TempIndex fieldnum) const override
891  {
892  if (fieldnum.size() < 1)
893  return 0;
894  switch (fieldnum[0])
895  {
896  case 0:
897  return "querygroup";
898  case 1:
899  return "posattrib";
900  case 2:
901  return "snaptype";
902  case 3:
903  return "algorithm";
904  case 4:
905  return "usetol3d";
906  case 5:
907  return "tol3d";
908  case 6:
909  return "targetptattrib";
910  case 7:
911  return "targetclass";
912  case 8:
913  return "usepositionsnapmethod";
914  case 9:
915  return "positionsnapmethod";
916  case 10:
917  return "useradiusattrib";
918  case 11:
919  return "radiusattrib";
920  case 12:
921  return "usematchattrib";
922  case 13:
923  return "matchattrib";
924  case 14:
925  return "matchtype";
926  case 15:
927  return "matchtol";
928  case 16:
929  return "gridtype";
930  case 17:
931  return "gridspacing";
932  case 18:
933  return "gridlines";
934  case 19:
935  return "gridpow2";
936  case 20:
937  return "gridoffset";
938  case 21:
939  return "gridround";
940  case 22:
941  return "usegridtol";
942  case 23:
943  return "gridtol";
944  case 24:
945  return "consolidatesnappedpoints";
946  case 25:
947  return "keepconsolidatedpoints";
948  case 26:
949  return "deldegen";
950  case 27:
951  return "deldegenpoints";
952  case 28:
953  return "delunusedpoints";
954  case 29:
955  return "recomputenml";
956  case 30:
957  return "createsnappedgroup";
958  case 31:
959  return "snappedgroupname";
960  case 32:
961  return "createsnappedattrib";
962  case 33:
963  return "snappedattribname";
964  case 34:
965  if (fieldnum.size() == 1)
966  return "numpointattribs";
967  switch (fieldnum[1])
968  {
969  case 0:
970  return "attribsnapmethod#";
971  case 1:
972  return "pointattribnames#";
973 
974  }
975  return 0;
976  case 35:
977  if (fieldnum.size() == 1)
978  return "numgroups";
979  switch (fieldnum[1])
980  {
981  case 0:
982  return "grouppropagation#";
983  case 1:
984  return "pointgroupnames#";
985 
986  }
987  return 0;
988  case 36:
989  return "usetargetgroup";
990  case 37:
991  return "targetgroup";
992  case 38:
993  return "modifyboth";
994 
995  }
996  return 0;
997  }
998 
999  ParmType getNestParmType(TempIndex fieldnum) const override
1000  {
1001  if (fieldnum.size() < 1)
1002  return PARM_UNSUPPORTED;
1003  switch (fieldnum[0])
1004  {
1005  case 0:
1006  return PARM_STRING;
1007  case 1:
1008  return PARM_STRING;
1009  case 2:
1010  return PARM_INTEGER;
1011  case 3:
1012  return PARM_INTEGER;
1013  case 4:
1014  return PARM_INTEGER;
1015  case 5:
1016  return PARM_FLOAT;
1017  case 6:
1018  return PARM_STRING;
1019  case 7:
1020  return PARM_INTEGER;
1021  case 8:
1022  return PARM_INTEGER;
1023  case 9:
1024  return PARM_INTEGER;
1025  case 10:
1026  return PARM_INTEGER;
1027  case 11:
1028  return PARM_STRING;
1029  case 12:
1030  return PARM_INTEGER;
1031  case 13:
1032  return PARM_STRING;
1033  case 14:
1034  return PARM_INTEGER;
1035  case 15:
1036  return PARM_FLOAT;
1037  case 16:
1038  return PARM_INTEGER;
1039  case 17:
1040  return PARM_VECTOR3;
1041  case 18:
1042  return PARM_VECTOR3;
1043  case 19:
1044  return PARM_VECTOR3;
1045  case 20:
1046  return PARM_VECTOR3;
1047  case 21:
1048  return PARM_INTEGER;
1049  case 22:
1050  return PARM_INTEGER;
1051  case 23:
1052  return PARM_FLOAT;
1053  case 24:
1054  return PARM_INTEGER;
1055  case 25:
1056  return PARM_INTEGER;
1057  case 26:
1058  return PARM_INTEGER;
1059  case 27:
1060  return PARM_INTEGER;
1061  case 28:
1062  return PARM_INTEGER;
1063  case 29:
1064  return PARM_INTEGER;
1065  case 30:
1066  return PARM_INTEGER;
1067  case 31:
1068  return PARM_STRING;
1069  case 32:
1070  return PARM_INTEGER;
1071  case 33:
1072  return PARM_STRING;
1073  case 34:
1074  if (fieldnum.size() == 1)
1075  return PARM_MULTIPARM;
1076  switch (fieldnum[1])
1077  {
1078  case 0:
1079  return PARM_INTEGER;
1080  case 1:
1081  return PARM_STRING;
1082 
1083  }
1084  return PARM_UNSUPPORTED;
1085  case 35:
1086  if (fieldnum.size() == 1)
1087  return PARM_MULTIPARM;
1088  switch (fieldnum[1])
1089  {
1090  case 0:
1091  return PARM_INTEGER;
1092  case 1:
1093  return PARM_STRING;
1094 
1095  }
1096  return PARM_UNSUPPORTED;
1097  case 36:
1098  return PARM_INTEGER;
1099  case 37:
1100  return PARM_STRING;
1101  case 38:
1102  return PARM_INTEGER;
1103 
1104  }
1105  return PARM_UNSUPPORTED;
1106  }
1107 
1108  // Boiler plate to load individual types.
1109  static void loadData(UT_IStream &is, int64 &v)
1110  { is.bread(&v, 1); }
1111  static void loadData(UT_IStream &is, bool &v)
1112  { int64 iv; is.bread(&iv, 1); v = iv; }
1113  static void loadData(UT_IStream &is, fpreal64 &v)
1114  { is.bread<fpreal64>(&v, 1); }
1115  static void loadData(UT_IStream &is, UT_Vector2D &v)
1116  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
1117  static void loadData(UT_IStream &is, UT_Vector3D &v)
1118  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
1119  is.bread<fpreal64>(&v.z(), 1); }
1120  static void loadData(UT_IStream &is, UT_Vector4D &v)
1121  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
1122  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
1123  static void loadData(UT_IStream &is, UT_Matrix2D &v)
1124  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
1125  static void loadData(UT_IStream &is, UT_Matrix3D &v)
1126  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
1127  static void loadData(UT_IStream &is, UT_Matrix4D &v)
1128  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
1129  static void loadData(UT_IStream &is, UT_Vector2I &v)
1130  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
1131  static void loadData(UT_IStream &is, UT_Vector3I &v)
1132  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
1133  is.bread<int64>(&v.z(), 1); }
1134  static void loadData(UT_IStream &is, UT_Vector4I &v)
1135  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
1136  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
1138  { is.bread(v); }
1140  { UT_StringHolder rampdata;
1141  loadData(is, rampdata);
1142  if (rampdata.isstring())
1143  {
1144  v.reset(new UT_Ramp());
1145  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
1146  v->load(istr);
1147  }
1148  else v.reset();
1149  }
1152  loadData(is, data);
1153  if (data.isstring())
1154  {
1155  // Find the data type.
1156  const char *colon = UT_StringWrap(data).findChar(':');
1157  if (colon)
1158  {
1159  int typelen = colon - data.buffer();
1161  type.strncpy(data.buffer(), typelen);
1162  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
1163 
1164  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
1165  }
1166  }
1167  else v.reset();
1168  }
1169 
1170  static void saveData(std::ostream &os, int64 v)
1171  { UTwrite(os, &v); }
1172  static void saveData(std::ostream &os, bool v)
1173  { int64 iv = v; UTwrite(os, &iv); }
1174  static void saveData(std::ostream &os, fpreal64 v)
1175  { UTwrite<fpreal64>(os, &v); }
1176  static void saveData(std::ostream &os, UT_Vector2D v)
1177  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
1178  static void saveData(std::ostream &os, UT_Vector3D v)
1179  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
1180  UTwrite<fpreal64>(os, &v.z()); }
1181  static void saveData(std::ostream &os, UT_Vector4D v)
1182  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
1183  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
1184  static void saveData(std::ostream &os, UT_Matrix2D v)
1186  static void saveData(std::ostream &os, UT_Matrix3D v)
1188  static void saveData(std::ostream &os, UT_Matrix4D v)
1190  static void saveData(std::ostream &os, UT_StringHolder s)
1191  { UT_StringWrap(s).saveBinary(os); }
1192  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
1194  UT_OStringStream ostr;
1195  if (s) s->save(ostr);
1196  result = ostr.str();
1197  saveData(os, result);
1198  }
1199  static void saveData(std::ostream &os, PRM_DataItemHandle s)
1201  UT_OStringStream ostr;
1202  if (s)
1203  {
1204  ostr << s->getDataTypeToken();
1205  ostr << ":";
1206  s->saveBinary(ostr);
1207  }
1208  result = ostr.str();
1209  saveData(os, result);
1210  }
1211 
1212 
1213  void save(std::ostream &os) const
1214  {
1215  int32 v = version();
1216  UTwrite(os, &v);
1217  saveData(os, myQuerygroup);
1218  saveData(os, myPosAttrib);
1219  saveData(os, mySnaptype);
1220  saveData(os, myAlgorithm);
1221  saveData(os, myUseTol3D);
1222  saveData(os, myTol3d);
1223  saveData(os, myTargetPtAttrib);
1224  saveData(os, myTargetClass);
1225  saveData(os, myUsePositionSnapMethod);
1226  saveData(os, myPositionSnapMethod);
1227  saveData(os, myUseradiusattrib);
1228  saveData(os, myRadiusattrib);
1229  saveData(os, myUsematchattrib);
1230  saveData(os, myMatchattrib);
1231  saveData(os, myMatchtype);
1232  saveData(os, myMatchTol);
1233  saveData(os, myGridtype);
1234  saveData(os, myGridspacing);
1235  saveData(os, myGridlines);
1236  saveData(os, myGridpow2);
1237  saveData(os, myGridoffset);
1238  saveData(os, myGridround);
1239  saveData(os, myUseGridTol);
1240  saveData(os, myGridtol);
1241  saveData(os, myConsolidateSnappedPoints);
1242  saveData(os, myKeepConsolidatedPoints);
1243  saveData(os, myDelDegen);
1244  saveData(os, myDelDegenPoints);
1245  saveData(os, myDelUnusedPoints);
1246  saveData(os, myRecomputenml);
1247  saveData(os, myCreatesnappedgroup);
1248  saveData(os, mySnappedgroupname);
1249  saveData(os, myCreatesnappedattrib);
1250  saveData(os, mySnappedattribname);
1251  {
1252  int64 length = myNumpointattribs.entries();
1253  UTwrite(os, &length);
1254  for (exint i = 0; i < length; i++)
1255  {
1256  auto && _curentry = myNumpointattribs(i);
1257  (void) _curentry;
1258  saveData(os, _curentry.attribsnapmethod);
1259  saveData(os, _curentry.pointattribnames);
1260 
1261  }
1262  }
1263  {
1264  int64 length = myNumgroups.entries();
1265  UTwrite(os, &length);
1266  for (exint i = 0; i < length; i++)
1267  {
1268  auto && _curentry = myNumgroups(i);
1269  (void) _curentry;
1270  saveData(os, _curentry.grouppropagation);
1271  saveData(os, _curentry.pointgroupnames);
1272 
1273  }
1274  }
1275  saveData(os, myUsetargetgroup);
1276  saveData(os, myTargetgroup);
1277  saveData(os, myModifyboth);
1278 
1279  }
1280 
1281  bool load(UT_IStream &is)
1282  {
1283  int32 v;
1284  is.bread(&v, 1);
1285  if (version() != v)
1286  {
1287  // Fail incompatible versions
1288  return false;
1289  }
1290  loadData(is, myQuerygroup);
1291  loadData(is, myPosAttrib);
1292  loadData(is, mySnaptype);
1293  loadData(is, myAlgorithm);
1294  loadData(is, myUseTol3D);
1295  loadData(is, myTol3d);
1296  loadData(is, myTargetPtAttrib);
1297  loadData(is, myTargetClass);
1298  loadData(is, myUsePositionSnapMethod);
1299  loadData(is, myPositionSnapMethod);
1300  loadData(is, myUseradiusattrib);
1301  loadData(is, myRadiusattrib);
1302  loadData(is, myUsematchattrib);
1303  loadData(is, myMatchattrib);
1304  loadData(is, myMatchtype);
1305  loadData(is, myMatchTol);
1306  loadData(is, myGridtype);
1307  loadData(is, myGridspacing);
1308  loadData(is, myGridlines);
1309  loadData(is, myGridpow2);
1310  loadData(is, myGridoffset);
1311  loadData(is, myGridround);
1312  loadData(is, myUseGridTol);
1313  loadData(is, myGridtol);
1314  loadData(is, myConsolidateSnappedPoints);
1315  loadData(is, myKeepConsolidatedPoints);
1316  loadData(is, myDelDegen);
1317  loadData(is, myDelDegenPoints);
1318  loadData(is, myDelUnusedPoints);
1319  loadData(is, myRecomputenml);
1320  loadData(is, myCreatesnappedgroup);
1321  loadData(is, mySnappedgroupname);
1322  loadData(is, myCreatesnappedattrib);
1323  loadData(is, mySnappedattribname);
1324  {
1325  int64 length;
1326  is.read(&length, 1);
1327  myNumpointattribs.setSize(length);
1328  for (exint i = 0; i < length; i++)
1329  {
1330  auto && _curentry = myNumpointattribs(i);
1331  (void) _curentry;
1332  loadData(is, _curentry.attribsnapmethod);
1333  loadData(is, _curentry.pointattribnames);
1334 
1335  }
1336  }
1337  {
1338  int64 length;
1339  is.read(&length, 1);
1340  myNumgroups.setSize(length);
1341  for (exint i = 0; i < length; i++)
1342  {
1343  auto && _curentry = myNumgroups(i);
1344  (void) _curentry;
1345  loadData(is, _curentry.grouppropagation);
1346  loadData(is, _curentry.pointgroupnames);
1347 
1348  }
1349  }
1350  loadData(is, myUsetargetgroup);
1351  loadData(is, myTargetgroup);
1352  loadData(is, myModifyboth);
1353 
1354  return true;
1355  }
1356 
1357  const UT_StringHolder & getQuerygroup() const { return myQuerygroup; }
1358  void setQuerygroup(const UT_StringHolder & val) { myQuerygroup = val; }
1360  {
1361  SOP_Node *thissop = cookparms.getNode();
1362  if (!thissop) return getQuerygroup();
1364  OP_Utils::evalOpParm(result, thissop, "querygroup", cookparms.getCookTime(), 0);
1365  return result;
1366  }
1367  const UT_StringHolder & getPosAttrib() const { return myPosAttrib; }
1368  void setPosAttrib(const UT_StringHolder & val) { myPosAttrib = val; }
1370  {
1371  SOP_Node *thissop = cookparms.getNode();
1372  if (!thissop) return getPosAttrib();
1374  OP_Utils::evalOpParm(result, thissop, "posattrib", cookparms.getCookTime(), 0);
1375  return result;
1376  }
1377  Snaptype getSnaptype() const { return Snaptype(mySnaptype); }
1378  void setSnaptype(Snaptype val) { mySnaptype = int64(val); }
1380  {
1381  SOP_Node *thissop = cookparms.getNode();
1382  if (!thissop) return getSnaptype();
1383  int64 result;
1384  OP_Utils::evalOpParm(result, thissop, "snaptype", cookparms.getCookTime(), 0);
1385  return Snaptype(result);
1386  }
1387  Algorithm getAlgorithm() const { return Algorithm(myAlgorithm); }
1388  void setAlgorithm(Algorithm val) { myAlgorithm = int64(val); }
1390  {
1391  SOP_Node *thissop = cookparms.getNode();
1392  if (!thissop) return getAlgorithm();
1393  int64 result;
1394  OP_Utils::evalOpParm(result, thissop, "algorithm", cookparms.getCookTime(), 0);
1395  return Algorithm(result);
1396  }
1397  bool getUseTol3D() const { return myUseTol3D; }
1398  void setUseTol3D(bool val) { myUseTol3D = val; }
1399  bool opUseTol3D(const SOP_NodeVerb::CookParms &cookparms) const
1400  {
1401  SOP_Node *thissop = cookparms.getNode();
1402  if (!thissop) return getUseTol3D();
1403  bool result;
1404  OP_Utils::evalOpParm(result, thissop, "usetol3d", cookparms.getCookTime(), 0);
1405  return result;
1406  }
1407  fpreal64 getTol3d() const { return myTol3d; }
1408  void setTol3d(fpreal64 val) { myTol3d = val; }
1409  fpreal64 opTol3d(const SOP_NodeVerb::CookParms &cookparms) const
1410  {
1411  SOP_Node *thissop = cookparms.getNode();
1412  if (!thissop) return getTol3d();
1413  fpreal64 result;
1414  OP_Utils::evalOpParm(result, thissop, "tol3d", cookparms.getCookTime(), 0);
1415  return result;
1416  }
1417  const UT_StringHolder & getTargetPtAttrib() const { return myTargetPtAttrib; }
1418  void setTargetPtAttrib(const UT_StringHolder & val) { myTargetPtAttrib = val; }
1420  {
1421  SOP_Node *thissop = cookparms.getNode();
1422  if (!thissop) return getTargetPtAttrib();
1424  OP_Utils::evalOpParm(result, thissop, "targetptattrib", cookparms.getCookTime(), 0);
1425  return result;
1426  }
1427  TargetClass getTargetClass() const { return TargetClass(myTargetClass); }
1428  void setTargetClass(TargetClass val) { myTargetClass = int64(val); }
1430  {
1431  SOP_Node *thissop = cookparms.getNode();
1432  if (!thissop) return getTargetClass();
1433  int64 result;
1434  OP_Utils::evalOpParm(result, thissop, "targetclass", cookparms.getCookTime(), 0);
1435  return TargetClass(result);
1436  }
1437  bool getUsePositionSnapMethod() const { return myUsePositionSnapMethod; }
1438  void setUsePositionSnapMethod(bool val) { myUsePositionSnapMethod = val; }
1440  {
1441  SOP_Node *thissop = cookparms.getNode();
1442  if (!thissop) return getUsePositionSnapMethod();
1443  bool result;
1444  OP_Utils::evalOpParm(result, thissop, "usepositionsnapmethod", cookparms.getCookTime(), 0);
1445  return result;
1446  }
1447  PositionSnapMethod getPositionSnapMethod() const { return PositionSnapMethod(myPositionSnapMethod); }
1448  void setPositionSnapMethod(PositionSnapMethod val) { myPositionSnapMethod = int64(val); }
1450  {
1451  SOP_Node *thissop = cookparms.getNode();
1452  if (!thissop) return getPositionSnapMethod();
1453  int64 result;
1454  OP_Utils::evalOpParm(result, thissop, "positionsnapmethod", cookparms.getCookTime(), 0);
1455  return PositionSnapMethod(result);
1456  }
1457  bool getUseradiusattrib() const { return myUseradiusattrib; }
1458  void setUseradiusattrib(bool val) { myUseradiusattrib = val; }
1459  bool opUseradiusattrib(const SOP_NodeVerb::CookParms &cookparms) const
1460  {
1461  SOP_Node *thissop = cookparms.getNode();
1462  if (!thissop) return getUseradiusattrib();
1463  bool result;
1464  OP_Utils::evalOpParm(result, thissop, "useradiusattrib", cookparms.getCookTime(), 0);
1465  return result;
1466  }
1467  const UT_StringHolder & getRadiusattrib() const { return myRadiusattrib; }
1468  void setRadiusattrib(const UT_StringHolder & val) { myRadiusattrib = val; }
1470  {
1471  SOP_Node *thissop = cookparms.getNode();
1472  if (!thissop) return getRadiusattrib();
1474  OP_Utils::evalOpParm(result, thissop, "radiusattrib", cookparms.getCookTime(), 0);
1475  return result;
1476  }
1477  bool getUsematchattrib() const { return myUsematchattrib; }
1478  void setUsematchattrib(bool val) { myUsematchattrib = val; }
1479  bool opUsematchattrib(const SOP_NodeVerb::CookParms &cookparms) const
1480  {
1481  SOP_Node *thissop = cookparms.getNode();
1482  if (!thissop) return getUsematchattrib();
1483  bool result;
1484  OP_Utils::evalOpParm(result, thissop, "usematchattrib", cookparms.getCookTime(), 0);
1485  return result;
1486  }
1487  const UT_StringHolder & getMatchattrib() const { return myMatchattrib; }
1488  void setMatchattrib(const UT_StringHolder & val) { myMatchattrib = val; }
1490  {
1491  SOP_Node *thissop = cookparms.getNode();
1492  if (!thissop) return getMatchattrib();
1494  OP_Utils::evalOpParm(result, thissop, "matchattrib", cookparms.getCookTime(), 0);
1495  return result;
1496  }
1497  Matchtype getMatchtype() const { return Matchtype(myMatchtype); }
1498  void setMatchtype(Matchtype val) { myMatchtype = int64(val); }
1500  {
1501  SOP_Node *thissop = cookparms.getNode();
1502  if (!thissop) return getMatchtype();
1503  int64 result;
1504  OP_Utils::evalOpParm(result, thissop, "matchtype", cookparms.getCookTime(), 0);
1505  return Matchtype(result);
1506  }
1507  fpreal64 getMatchTol() const { return myMatchTol; }
1508  void setMatchTol(fpreal64 val) { myMatchTol = val; }
1510  {
1511  SOP_Node *thissop = cookparms.getNode();
1512  if (!thissop) return getMatchTol();
1513  fpreal64 result;
1514  OP_Utils::evalOpParm(result, thissop, "matchtol", cookparms.getCookTime(), 0);
1515  return result;
1516  }
1517  Gridtype getGridtype() const { return Gridtype(myGridtype); }
1518  void setGridtype(Gridtype val) { myGridtype = int64(val); }
1520  {
1521  SOP_Node *thissop = cookparms.getNode();
1522  if (!thissop) return getGridtype();
1523  int64 result;
1524  OP_Utils::evalOpParm(result, thissop, "gridtype", cookparms.getCookTime(), 0);
1525  return Gridtype(result);
1526  }
1527  UT_Vector3D getGridspacing() const { return myGridspacing; }
1528  void setGridspacing(UT_Vector3D val) { myGridspacing = val; }
1530  {
1531  SOP_Node *thissop = cookparms.getNode();
1532  if (!thissop) return getGridspacing();
1534  OP_Utils::evalOpParm(result, thissop, "gridspacing", cookparms.getCookTime(), 0);
1535  return result;
1536  }
1537  UT_Vector3D getGridlines() const { return myGridlines; }
1538  void setGridlines(UT_Vector3D val) { myGridlines = val; }
1540  {
1541  SOP_Node *thissop = cookparms.getNode();
1542  if (!thissop) return getGridlines();
1544  OP_Utils::evalOpParm(result, thissop, "gridlines", cookparms.getCookTime(), 0);
1545  return result;
1546  }
1547  UT_Vector3I getGridpow2() const { return myGridpow2; }
1548  void setGridpow2(UT_Vector3I val) { myGridpow2 = val; }
1550  {
1551  SOP_Node *thissop = cookparms.getNode();
1552  if (!thissop) return getGridpow2();
1554  OP_Utils::evalOpParm(result, thissop, "gridpow2", cookparms.getCookTime(), 0);
1555  return result;
1556  }
1557  UT_Vector3D getGridoffset() const { return myGridoffset; }
1558  void setGridoffset(UT_Vector3D val) { myGridoffset = val; }
1560  {
1561  SOP_Node *thissop = cookparms.getNode();
1562  if (!thissop) return getGridoffset();
1564  OP_Utils::evalOpParm(result, thissop, "gridoffset", cookparms.getCookTime(), 0);
1565  return result;
1566  }
1567  Gridround getGridround() const { return Gridround(myGridround); }
1568  void setGridround(Gridround val) { myGridround = int64(val); }
1570  {
1571  SOP_Node *thissop = cookparms.getNode();
1572  if (!thissop) return getGridround();
1573  int64 result;
1574  OP_Utils::evalOpParm(result, thissop, "gridround", cookparms.getCookTime(), 0);
1575  return Gridround(result);
1576  }
1577  bool getUseGridTol() const { return myUseGridTol; }
1578  void setUseGridTol(bool val) { myUseGridTol = val; }
1579  bool opUseGridTol(const SOP_NodeVerb::CookParms &cookparms) const
1580  {
1581  SOP_Node *thissop = cookparms.getNode();
1582  if (!thissop) return getUseGridTol();
1583  bool result;
1584  OP_Utils::evalOpParm(result, thissop, "usegridtol", cookparms.getCookTime(), 0);
1585  return result;
1586  }
1587  fpreal64 getGridtol() const { return myGridtol; }
1588  void setGridtol(fpreal64 val) { myGridtol = val; }
1590  {
1591  SOP_Node *thissop = cookparms.getNode();
1592  if (!thissop) return getGridtol();
1593  fpreal64 result;
1594  OP_Utils::evalOpParm(result, thissop, "gridtol", cookparms.getCookTime(), 0);
1595  return result;
1596  }
1597  bool getConsolidateSnappedPoints() const { return myConsolidateSnappedPoints; }
1598  void setConsolidateSnappedPoints(bool val) { myConsolidateSnappedPoints = val; }
1600  {
1601  SOP_Node *thissop = cookparms.getNode();
1602  if (!thissop) return getConsolidateSnappedPoints();
1603  bool result;
1604  OP_Utils::evalOpParm(result, thissop, "consolidatesnappedpoints", cookparms.getCookTime(), 0);
1605  return result;
1606  }
1607  bool getKeepConsolidatedPoints() const { return myKeepConsolidatedPoints; }
1608  void setKeepConsolidatedPoints(bool val) { myKeepConsolidatedPoints = val; }
1610  {
1611  SOP_Node *thissop = cookparms.getNode();
1612  if (!thissop) return getKeepConsolidatedPoints();
1613  bool result;
1614  OP_Utils::evalOpParm(result, thissop, "keepconsolidatedpoints", cookparms.getCookTime(), 0);
1615  return result;
1616  }
1617  bool getDelDegen() const { return myDelDegen; }
1618  void setDelDegen(bool val) { myDelDegen = val; }
1619  bool opDelDegen(const SOP_NodeVerb::CookParms &cookparms) const
1620  {
1621  SOP_Node *thissop = cookparms.getNode();
1622  if (!thissop) return getDelDegen();
1623  bool result;
1624  OP_Utils::evalOpParm(result, thissop, "deldegen", cookparms.getCookTime(), 0);
1625  return result;
1626  }
1627  bool getDelDegenPoints() const { return myDelDegenPoints; }
1628  void setDelDegenPoints(bool val) { myDelDegenPoints = val; }
1629  bool opDelDegenPoints(const SOP_NodeVerb::CookParms &cookparms) const
1630  {
1631  SOP_Node *thissop = cookparms.getNode();
1632  if (!thissop) return getDelDegenPoints();
1633  bool result;
1634  OP_Utils::evalOpParm(result, thissop, "deldegenpoints", cookparms.getCookTime(), 0);
1635  return result;
1636  }
1637  bool getDelUnusedPoints() const { return myDelUnusedPoints; }
1638  void setDelUnusedPoints(bool val) { myDelUnusedPoints = val; }
1639  bool opDelUnusedPoints(const SOP_NodeVerb::CookParms &cookparms) const
1640  {
1641  SOP_Node *thissop = cookparms.getNode();
1642  if (!thissop) return getDelUnusedPoints();
1643  bool result;
1644  OP_Utils::evalOpParm(result, thissop, "delunusedpoints", cookparms.getCookTime(), 0);
1645  return result;
1646  }
1647  bool getRecomputenml() const { return myRecomputenml; }
1648  void setRecomputenml(bool val) { myRecomputenml = val; }
1649  bool opRecomputenml(const SOP_NodeVerb::CookParms &cookparms) const
1650  {
1651  SOP_Node *thissop = cookparms.getNode();
1652  if (!thissop) return getRecomputenml();
1653  bool result;
1654  OP_Utils::evalOpParm(result, thissop, "recomputenml", cookparms.getCookTime(), 0);
1655  return result;
1656  }
1657  bool getCreatesnappedgroup() const { return myCreatesnappedgroup; }
1658  void setCreatesnappedgroup(bool val) { myCreatesnappedgroup = val; }
1659  bool opCreatesnappedgroup(const SOP_NodeVerb::CookParms &cookparms) const
1660  {
1661  SOP_Node *thissop = cookparms.getNode();
1662  if (!thissop) return getCreatesnappedgroup();
1663  bool result;
1664  OP_Utils::evalOpParm(result, thissop, "createsnappedgroup", cookparms.getCookTime(), 0);
1665  return result;
1666  }
1667  const UT_StringHolder & getSnappedgroupname() const { return mySnappedgroupname; }
1668  void setSnappedgroupname(const UT_StringHolder & val) { mySnappedgroupname = val; }
1670  {
1671  SOP_Node *thissop = cookparms.getNode();
1672  if (!thissop) return getSnappedgroupname();
1674  OP_Utils::evalOpParm(result, thissop, "snappedgroupname", cookparms.getCookTime(), 0);
1675  return result;
1676  }
1677  bool getCreatesnappedattrib() const { return myCreatesnappedattrib; }
1678  void setCreatesnappedattrib(bool val) { myCreatesnappedattrib = val; }
1679  bool opCreatesnappedattrib(const SOP_NodeVerb::CookParms &cookparms) const
1680  {
1681  SOP_Node *thissop = cookparms.getNode();
1682  if (!thissop) return getCreatesnappedattrib();
1683  bool result;
1684  OP_Utils::evalOpParm(result, thissop, "createsnappedattrib", cookparms.getCookTime(), 0);
1685  return result;
1686  }
1687  const UT_StringHolder & getSnappedattribname() const { return mySnappedattribname; }
1688  void setSnappedattribname(const UT_StringHolder & val) { mySnappedattribname = val; }
1690  {
1691  SOP_Node *thissop = cookparms.getNode();
1692  if (!thissop) return getSnappedattribname();
1694  OP_Utils::evalOpParm(result, thissop, "snappedattribname", cookparms.getCookTime(), 0);
1695  return result;
1696  }
1697  const UT_Array<Numpointattribs> &getNumpointattribs() const { return myNumpointattribs; }
1698 void setNumpointattribs(const UT_Array<Numpointattribs> &val) { myNumpointattribs = val; }
1700  {
1701  SOP_Node *thissop = cookparms.getNode();
1702  if (!thissop) return getNumpointattribs().entries();
1703  exint result;
1704  OP_Utils::evalOpParm(result, thissop, "numpointattribs", cookparms.getCookTime(), 0);
1705  return result;
1706  }
1708  { return opinstNumpointattribs_attribsnapmethod(cookparms, &_idx); }
1710  {
1711  SOP_Node *thissop = cookparms.getNode();
1712  if (!thissop) return (myNumpointattribs(_idx[0]).attribsnapmethod);
1713  int _parmidx[2-1];
1714  _parmidx[1-1] = _idx[1-1] + 1;
1715 
1716  int64 result;
1717  OP_Utils::evalOpParmInst(result, thissop, "attribsnapmethod#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1718  return (result);
1719  }
1721  { return opinstNumpointattribs_pointattribnames(cookparms, &_idx); }
1723  {
1724  SOP_Node *thissop = cookparms.getNode();
1725  if (!thissop) return (myNumpointattribs(_idx[0]).pointattribnames);
1726  int _parmidx[2-1];
1727  _parmidx[1-1] = _idx[1-1] + 1;
1728 
1730  OP_Utils::evalOpParmInst(result, thissop, "pointattribnames#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1731  return (result);
1732  }
1733 
1734  const UT_Array<Numgroups> &getNumgroups() const { return myNumgroups; }
1735 void setNumgroups(const UT_Array<Numgroups> &val) { myNumgroups = val; }
1737  {
1738  SOP_Node *thissop = cookparms.getNode();
1739  if (!thissop) return getNumgroups().entries();
1740  exint result;
1741  OP_Utils::evalOpParm(result, thissop, "numgroups", cookparms.getCookTime(), 0);
1742  return result;
1743  }
1745  { return opinstNumgroups_grouppropagation(cookparms, &_idx); }
1746  int64 opinstNumgroups_grouppropagation(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1747  {
1748  SOP_Node *thissop = cookparms.getNode();
1749  if (!thissop) return (myNumgroups(_idx[0]).grouppropagation);
1750  int _parmidx[2-1];
1751  _parmidx[1-1] = _idx[1-1] + 1;
1752 
1753  int64 result;
1754  OP_Utils::evalOpParmInst(result, thissop, "grouppropagation#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1755  return (result);
1756  }
1758  { return opinstNumgroups_pointgroupnames(cookparms, &_idx); }
1760  {
1761  SOP_Node *thissop = cookparms.getNode();
1762  if (!thissop) return (myNumgroups(_idx[0]).pointgroupnames);
1763  int _parmidx[2-1];
1764  _parmidx[1-1] = _idx[1-1] + 1;
1765 
1767  OP_Utils::evalOpParmInst(result, thissop, "pointgroupnames#", _parmidx, cookparms.getCookTime(), 0, 2-1);
1768  return (result);
1769  }
1770 
1771  bool getUsetargetgroup() const { return myUsetargetgroup; }
1772  void setUsetargetgroup(bool val) { myUsetargetgroup = val; }
1773  bool opUsetargetgroup(const SOP_NodeVerb::CookParms &cookparms) const
1774  {
1775  SOP_Node *thissop = cookparms.getNode();
1776  if (!thissop) return getUsetargetgroup();
1777  bool result;
1778  OP_Utils::evalOpParm(result, thissop, "usetargetgroup", cookparms.getCookTime(), 0);
1779  return result;
1780  }
1781  const UT_StringHolder & getTargetgroup() const { return myTargetgroup; }
1782  void setTargetgroup(const UT_StringHolder & val) { myTargetgroup = val; }
1784  {
1785  SOP_Node *thissop = cookparms.getNode();
1786  if (!thissop) return getTargetgroup();
1788  OP_Utils::evalOpParm(result, thissop, "targetgroup", cookparms.getCookTime(), 0);
1789  return result;
1790  }
1791  bool getModifyboth() const { return myModifyboth; }
1792  void setModifyboth(bool val) { myModifyboth = val; }
1793  bool opModifyboth(const SOP_NodeVerb::CookParms &cookparms) const
1794  {
1795  SOP_Node *thissop = cookparms.getNode();
1796  if (!thissop) return getModifyboth();
1797  bool result;
1798  OP_Utils::evalOpParm(result, thissop, "modifyboth", cookparms.getCookTime(), 0);
1799  return result;
1800  }
1801 
1802 private:
1803  UT_StringHolder myQuerygroup;
1804  UT_StringHolder myPosAttrib;
1805  int64 mySnaptype;
1806  int64 myAlgorithm;
1807  bool myUseTol3D;
1808  fpreal64 myTol3d;
1809  UT_StringHolder myTargetPtAttrib;
1810  int64 myTargetClass;
1811  bool myUsePositionSnapMethod;
1812  int64 myPositionSnapMethod;
1813  bool myUseradiusattrib;
1814  UT_StringHolder myRadiusattrib;
1815  bool myUsematchattrib;
1816  UT_StringHolder myMatchattrib;
1817  int64 myMatchtype;
1818  fpreal64 myMatchTol;
1819  int64 myGridtype;
1820  UT_Vector3D myGridspacing;
1821  UT_Vector3D myGridlines;
1822  UT_Vector3I myGridpow2;
1823  UT_Vector3D myGridoffset;
1824  int64 myGridround;
1825  bool myUseGridTol;
1826  fpreal64 myGridtol;
1827  bool myConsolidateSnappedPoints;
1828  bool myKeepConsolidatedPoints;
1829  bool myDelDegen;
1830  bool myDelDegenPoints;
1831  bool myDelUnusedPoints;
1832  bool myRecomputenml;
1833  bool myCreatesnappedgroup;
1834  UT_StringHolder mySnappedgroupname;
1835  bool myCreatesnappedattrib;
1836  UT_StringHolder mySnappedattribname;
1837  UT_Array<Numpointattribs> myNumpointattribs;
1838  UT_Array<Numgroups> myNumgroups;
1839  bool myUsetargetgroup;
1840  UT_StringHolder myTargetgroup;
1841  bool myModifyboth;
1842 
1843 };
UT_StringHolder opNumpointattribs_pointattribnames(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
bool getUseTol3D() const
void setCreatesnappedattrib(bool val)
type
Definition: core.h:977
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
bool opRecomputenml(const SOP_NodeVerb::CookParms &cookparms) const
bool getDelDegenPoints() const
int64 opinstNumgroups_grouppropagation(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setTol3d(fpreal64 val)
const UT_Array< Numpointattribs > & getNumpointattribs() const
bool opDelDegen(const SOP_NodeVerb::CookParms &cookparms) const
void setUsetargetgroup(bool val)
Algorithm opAlgorithm(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
exint nodeIdx() const
Definition: SOP_NodeVerb.h:102
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
UT_Vector3I opGridpow2(const SOP_NodeVerb::CookParms &cookparms) const
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:734
const UT_StringHolder & getQuerygroup() const
exint getNestNumParms(TempIndex idx) const override
UT_Vector3D opGridlines(const SOP_NodeVerb::CookParms &cookparms) const
bool opDelDegenPoints(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector3D v)
bool operator==(const Numgroups &src) const
void setPosAttrib(const UT_StringHolder &val)
void setMatchtype(Matchtype val)
exint opNumpointattribs(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getGridtol() const
virtual NodeIdx getInput(NodeIdx idx, int input, bool markused=false) const =0
UT_StringHolder opSnappedattribname(const SOP_NodeVerb::CookParms &cookparms) const
void save(std::ostream &os) const
void
Definition: png.h:1083
static void loadData(UT_IStream &is, UT_StringHolder &v)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
PositionSnapMethod opPositionSnapMethod(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getMatchattrib() const
fpreal getTime() const
Definition: OP_Context.h:60
void copyFrom(const SOP_NodeParms *src) override
void setModifyboth(bool val)
Snaptype getSnaptype() const
void setGridtype(Gridtype val)
GLuint GLsizei const GLuint const GLintptr * offsets
Definition: glcorearb.h:2620
Gridtype opGridtype(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getTargetgroup() const
const GLfloat * c
Definition: glew.h:16631
void setTargetPtAttrib(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
bool getConsolidateSnappedPoints() const
Matchtype opMatchtype(const SOP_NodeVerb::CookParms &cookparms) const
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
UT_StringHolder opPosAttrib(const SOP_NodeVerb::CookParms &cookparms) const
bool getUseradiusattrib() const
int64 exint
Definition: SYS_Types.h:125
UT_StringHolder createString(const UT_Array< Numgroups > &list) const
bool operator!=(const Numpointattribs &src) const
void setGridspacing(UT_Vector3D val)
UT_StringHolder opTargetPtAttrib(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:101
static void saveData(std::ostream &os, UT_Matrix4D v)
An output stream object that owns its own string buffer storage.
void setGridlines(UT_Vector3D val)
bool opCreatesnappedgroup(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
UT_Vector3D getGridoffset() const
void setDelDegenPoints(bool val)
static void loadData(UT_IStream &is, UT_Vector3D &v)
const UT_StringHolder & getTargetPtAttrib() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
Snaptype opSnaptype(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3T< int64 > UT_Vector3I
const UT_StringHolder & getSnappedgroupname() const
Algorithm getAlgorithm() const
void setUsematchattrib(bool val)
bool opUsePositionSnapMethod(const SOP_NodeVerb::CookParms &cookparms) const
GLenum src
Definition: glcorearb.h:1792
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
UT_Vector3D getGridlines() const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
fpreal64 opTol3d(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getSnappedattribname() const
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
bool load(UT_IStream &is)
UT_Vector3D opGridoffset(const SOP_NodeVerb::CookParms &cookparms) const
int64 opNumpointattribs_attribsnapmethod(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
bool getDelDegen() const
UT_StringHolder opNumgroups_pointgroupnames(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
fpreal64 opGridtol(const SOP_NodeVerb::CookParms &cookparms) const
double fpreal64
Definition: SYS_Types.h:201
int64 opinstNumpointattribs_attribsnapmethod(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
const UT_Array< Numgroups > & getNumgroups() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
Gridtype getGridtype() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setDelDegen(bool val)
bool opDelUnusedPoints(const SOP_NodeVerb::CookParms &cookparms) const
void setSnaptype(Snaptype val)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
GLuint64EXT * result
Definition: glew.h:14311
bool getKeepConsolidatedPoints() const
void setNumpointattribs(const UT_Array< Numpointattribs > &val)
void setNumgroups(const UT_Array< Numgroups > &val)
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:508
static void saveData(std::ostream &os, UT_StringHolder s)
UT_StringHolder opSnappedgroupname(const SOP_NodeVerb::CookParms &cookparms) const
exint length() const
Gridround opGridround(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void setSnappedgroupname(const UT_StringHolder &val)
SYS_FORCE_INLINE const char * buffer() const
void setUseradiusattrib(bool val)
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:30
static void saveData(std::ostream &os, UT_Matrix3D v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void setUseTol3D(bool val)
bool opModifyboth(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
const GLdouble * v
Definition: glcorearb.h:836
void setUsePositionSnapMethod(bool val)
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:288
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:510
const UT_StringHolder & getPosAttrib() const
exint opNumgroups(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D getGridspacing() const
UT_StringHolder opQuerygroup(const SOP_NodeVerb::CookParms &cookparms) const
void setGridoffset(UT_Vector3D val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void saveData(std::ostream &os, bool v)
UT_StringHolder opinstNumpointattribs_pointattribnames(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setKeepConsolidatedPoints(bool val)
long long int64
Definition: SYS_Types.h:116
UT_Vector3I getGridpow2() const
UT_Vector3D opGridspacing(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setUseGridTol(bool val)
static void loadData(UT_IStream &is, bool &v)
UT_Vector3T< fpreal64 > UT_Vector3D
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void saveData(std::ostream &os, int64 v)
bool operator!=(const Numgroups &src) const
void setGridpow2(UT_Vector3I val)
Gridround getGridround() const
int64 opNumgroups_grouppropagation(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
bool getUseGridTol() const
static void loadData(UT_IStream &is, UT_Vector2I &v)
bool getModifyboth() const
SYS_FORCE_INLINE void strcat(const char *src)
UT_StringHolder opRadiusattrib(const SOP_NodeVerb::CookParms &cookparms) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:287
static void saveData(std::ostream &os, UT_Vector4D v)
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:109
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2539
void setTargetgroup(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:481
fpreal64 getTol3d() const
GLboolean * data
Definition: glcorearb.h:130
bool getUsematchattrib() const
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:794
GLuint GLfloat * val
Definition: glcorearb.h:1607
bool opUseradiusattrib(const SOP_NodeVerb::CookParms &cookparms) const
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
bool operator!=(const SOP_Fuse_2_0Parms &src) const
void setSnappedattribname(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
TargetClass getTargetClass() const
static void saveData(std::ostream &os, UT_Matrix2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
bool getDelUnusedPoints() const
bool opKeepConsolidatedPoints(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getMatchTol() const
void setQuerygroup(const UT_StringHolder &val)
void setConsolidateSnappedPoints(bool val)
fpreal64 fpreal
Definition: SYS_Types.h:277
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
bool operator==(const SOP_Fuse_2_0Parms &src) const
bool getCreatesnappedgroup() const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
bool getCreatesnappedattrib() const
void setTargetClass(TargetClass val)
bool getUsePositionSnapMethod() const
UT_StringHolder opTargetgroup(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE void append(char character)
~SOP_Fuse_2_0Parms() override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void saveData(std::ostream &os, fpreal64 v)
#define SOP_API
Definition: SOP_API.h:10
bool opUsetargetgroup(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
GLsizei const GLfloat * value
Definition: glcorearb.h:823
bool getRecomputenml() const
bool opUseTol3D(const SOP_NodeVerb::CookParms &cookparms) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
const UT_StringHolder & getRadiusattrib() const
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:506
void setGridtol(fpreal64 val)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:748
static void loadData(UT_IStream &is, int64 &v)
void setCreatesnappedgroup(bool val)
bool opUseGridTol(const SOP_NodeVerb::CookParms &cookparms) const
const char * findChar(int c) const
Definition: UT_String.h:1371
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:171
void setDelUnusedPoints(bool val)
void setRadiusattrib(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, UT_Vector2D v)
bool opConsolidateSnappedPoints(const SOP_NodeVerb::CookParms &cookparms) const
void setGridround(Gridround val)
UT_StringHolder opinstNumgroups_pointgroupnames(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
GLboolean r
Definition: glcorearb.h:1221
void setRecomputenml(bool val)
void setMatchattrib(const UT_StringHolder &val)
bool opCreatesnappedattrib(const SOP_NodeVerb::CookParms &cookparms) const
Matchtype getMatchtype() const
GLdouble s
Definition: glew.h:1395
void loadFromOpSubclass(const LoadParms &loadparms) override
fpreal64 opMatchTol(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setAlgorithm(Algorithm val)
const OP_Context & context() const
Definition: SOP_NodeVerb.h:107
const char * getNestParmName(TempIndex fieldnum) const override
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
static void loadData(UT_IStream &is, UT_Vector4I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setMatchTol(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
SYS_FORCE_INLINE bool isstring() const
UT_StringHolder opMatchattrib(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
PositionSnapMethod getPositionSnapMethod() const
UT_StringHolder createString(const UT_Array< Numpointattribs > &list) const
bool opUsematchattrib(const SOP_NodeVerb::CookParms &cookparms) const
void setPositionSnapMethod(PositionSnapMethod val)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool getUsetargetgroup() 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
TargetClass opTargetClass(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const Numpointattribs &src) const
ParmType getNestParmType(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override