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