HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_PolyReduce-2.0.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_NodeVerb.h>
7 #include <OP/OP_Utils.h>
8 #include <PRM/PRM_Parm.h>
9 #include <UT/UT_IStream.h>
10 #include <UT/UT_NTStreamUtil.h>
11 #include <UT/UT_Ramp.h>
12 #include <UT/UT_SharedPtr.h>
13 #include <UT/UT_StringHolder.h>
14 #include <UT/UT_StringStream.h>
15 #include <UT/UT_VectorTypes.h>
16 #include <SYS/SYS_Types.h>
17 
18 using namespace UT::Literal;
19 
20 class DEP_MicroNode;
21 namespace SOP_PolyReduce_2_0Enums
22 {
23  enum class Target
24  {
25  POLY_PERCENT = 0,
26  PT_PERCENT,
27  POLY_COUNT,
28  PT_COUNT
29  };
30 }
31 
32 
34 {
35 public:
36  static int version() { return 1; }
38  {
42 
43 
45  {
46  attribenabled = false;
47  attribname = ""_sh;
48  attribweight = 1;
49 
50  }
51 
52  bool operator==(const Controlattribs &src) const
53  {
54  if (attribenabled != src.attribenabled) return false;
55  if (attribname != src.attribname) return false;
56  if (attribweight != src.attribweight) return false;
57 
58  return true;
59  }
60  bool operator!=(const Controlattribs &src) const
61  {
62  return !operator==(src);
63  }
64 
65  };
66 
68  {
70 
71  buf.strcat("[ ");
72  for (int i = 0; i < list.entries(); i++)
73  {
74  if (i)
75  buf.strcat(", ");
76  buf.strcat("( ");
77  buf.append("");
78  buf.appendSprintf("%s", (list(i).attribenabled) ? "true" : "false");
79  buf.append(", ");
80  { UT_String tmp; tmp = UT_StringWrap(list(i).attribname).makeQuotedString('"'); buf.strcat(tmp); }
81  buf.append(", ");
82  buf.appendSprintf("%f", (list(i).attribweight));
83 
84  buf.strcat(" )");
85  }
86  buf.strcat(" ]");
87 
88  UT_StringHolder result = buf;
89  return result;
90  }
91 
93  {
94  myGroup = ""_sh;
95  myTarget = 0;
96  myPercentage = 100;
97  myFinalCount = 1000;
98  myReducePassedTarget = false;
99  myQualityToleance = 1e-5;
100  myOriginalPoints = false;
101  myPreserveQuads = false;
102  myEqualizeLengths = 1e-10;
103  myBoundaryWeight = 1;
104  myVAttribSeamWeight = 1;
105  mySeamAttribs = "* ^N"_sh;
106  myHardFeaturePoints = ""_sh;
107  myHardFeatureEdges = ""_sh;
108  mySoftFeaturePoints = ""_sh;
109  mySoftFeaturePointWeight = 1;
110  mySoftFeatureEdges = ""_sh;
111  mySoftFeatureEdgeWeight = 1;
112  myUseRetainAttrib = false;
113  myRetainAttrib = "retention"_sh;
114  myRetainWeight = 1;
115  mySilhouetteWeight = 1;
116  myUseSilhouetteFalloff = false;
117  mySilhouetteFalloffDist = 1;
118  myFrontFacingWeight = 1;
119  myUseFrontFacingFalloff = false;
120  myFrontFacingFalloffDist = 1;
121 
122  }
123 
124  explicit SOP_PolyReduce_2_0Parms(const SOP_PolyReduce_2_0Parms &) = default;
125 
127 
129  {
130  if (myGroup != src.myGroup) return false;
131  if (myTarget != src.myTarget) return false;
132  if (myPercentage != src.myPercentage) return false;
133  if (myFinalCount != src.myFinalCount) return false;
134  if (myReducePassedTarget != src.myReducePassedTarget) return false;
135  if (myQualityToleance != src.myQualityToleance) return false;
136  if (myOriginalPoints != src.myOriginalPoints) return false;
137  if (myPreserveQuads != src.myPreserveQuads) return false;
138  if (myEqualizeLengths != src.myEqualizeLengths) return false;
139  if (myBoundaryWeight != src.myBoundaryWeight) return false;
140  if (myVAttribSeamWeight != src.myVAttribSeamWeight) return false;
141  if (mySeamAttribs != src.mySeamAttribs) return false;
142  if (myHardFeaturePoints != src.myHardFeaturePoints) return false;
143  if (myHardFeatureEdges != src.myHardFeatureEdges) return false;
144  if (mySoftFeaturePoints != src.mySoftFeaturePoints) return false;
145  if (mySoftFeaturePointWeight != src.mySoftFeaturePointWeight) return false;
146  if (mySoftFeatureEdges != src.mySoftFeatureEdges) return false;
147  if (mySoftFeatureEdgeWeight != src.mySoftFeatureEdgeWeight) return false;
148  if (myUseRetainAttrib != src.myUseRetainAttrib) return false;
149  if (myRetainAttrib != src.myRetainAttrib) return false;
150  if (myRetainWeight != src.myRetainWeight) return false;
151  if (mySilhouetteWeight != src.mySilhouetteWeight) return false;
152  if (myUseSilhouetteFalloff != src.myUseSilhouetteFalloff) return false;
153  if (mySilhouetteFalloffDist != src.mySilhouetteFalloffDist) return false;
154  if (myFrontFacingWeight != src.myFrontFacingWeight) return false;
155  if (myUseFrontFacingFalloff != src.myUseFrontFacingFalloff) return false;
156  if (myFrontFacingFalloffDist != src.myFrontFacingFalloffDist) return false;
157  if (myControlattribs != src.myControlattribs) return false;
158 
159  return true;
160  }
162  {
163  return !operator==(src);
164  }
166 
167 
168 
169  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
170  {
171  if (true)
172  OP_Utils::evalOpParm(myGroup, node, "group", time, 0);
173  else myGroup = ""_sh;
174  if (true)
175  OP_Utils::evalOpParm(myTarget, node, "target", time, 0);
176  else myTarget = 0;
177  if (true && ( (!(((int64(getTarget())==2))||((int64(getTarget())==3)))) ) )
178  OP_Utils::evalOpParm(myPercentage, node, "percentage", time, 0);
179  else myPercentage = 100;
180  if (true && ( (!(((int64(getTarget())==0))||((int64(getTarget())==1)))) ) )
181  OP_Utils::evalOpParm(myFinalCount, node, "finalcount", time, 0);
182  else myFinalCount = 1000;
183  if (true)
184  OP_Utils::evalOpParm(myReducePassedTarget, node, "reducepassedtarget", time, 0);
185  else myReducePassedTarget = false;
186  if (true && ( (!(((getReducePassedTarget()==0)))) ) )
187  OP_Utils::evalOpParm(myQualityToleance, node, "qualitytolerance", time, 0);
188  else myQualityToleance = 1e-5;
189  if (true)
190  OP_Utils::evalOpParm(myOriginalPoints, node, "originalpoints", time, 0);
191  else myOriginalPoints = false;
192  if (true)
193  OP_Utils::evalOpParm(myPreserveQuads, node, "preservequads", time, 0);
194  else myPreserveQuads = false;
195  if (true)
196  OP_Utils::evalOpParm(myEqualizeLengths, node, "equalizelengths", time, 0);
197  else myEqualizeLengths = 1e-10;
198  if (true)
199  OP_Utils::evalOpParm(myBoundaryWeight, node, "boundaryweight", time, 0);
200  else myBoundaryWeight = 1;
201  if (true)
202  OP_Utils::evalOpParm(myVAttribSeamWeight, node, "vattribseamweight", time, 0);
203  else myVAttribSeamWeight = 1;
204  if (true && ( (!(((getVAttribSeamWeight()==0)))) ) )
205  OP_Utils::evalOpParm(mySeamAttribs, node, "seamattribs", time, 0);
206  else mySeamAttribs = "* ^N"_sh;
207  if (true)
208  OP_Utils::evalOpParm(myHardFeaturePoints, node, "hardfeaturepoints", time, 0);
209  else myHardFeaturePoints = ""_sh;
210  if (true)
211  OP_Utils::evalOpParm(myHardFeatureEdges, node, "hardfeatureedges", time, 0);
212  else myHardFeatureEdges = ""_sh;
213  if (true)
214  OP_Utils::evalOpParm(mySoftFeaturePoints, node, "softfeaturepoints", time, 0);
215  else mySoftFeaturePoints = ""_sh;
216  if (true)
217  OP_Utils::evalOpParm(mySoftFeaturePointWeight, node, "softfeaturepointweight", time, 0);
218  else mySoftFeaturePointWeight = 1;
219  if (true)
220  OP_Utils::evalOpParm(mySoftFeatureEdges, node, "softfeatureedges", time, 0);
221  else mySoftFeatureEdges = ""_sh;
222  if (true)
223  OP_Utils::evalOpParm(mySoftFeatureEdgeWeight, node, "softfeatureedgeweight", time, 0);
224  else mySoftFeatureEdgeWeight = 1;
225  if (true)
226  OP_Utils::evalOpParm(myUseRetainAttrib, node, "useretainattrib", time, 0);
227  else myUseRetainAttrib = false;
228  if (true && ( (!(((getUseRetainAttrib()==0)))) ) )
229  OP_Utils::evalOpParm(myRetainAttrib, node, "retainattrib", time, 0);
230  else myRetainAttrib = "retention"_sh;
231  if (true && ( (!(((getUseRetainAttrib()==0)))) ) )
232  OP_Utils::evalOpParm(myRetainWeight, node, "retainattribweight", time, 0);
233  else myRetainWeight = 1;
234  if (true && ( (!((((node->getInput(2)!=0)==0)))) ) )
235  OP_Utils::evalOpParm(mySilhouetteWeight, node, "silhouetteweight", time, 0);
236  else mySilhouetteWeight = 1;
237  if (true && ( (!((((node->getInput(2)!=0)==0)))) ) )
238  OP_Utils::evalOpParm(myUseSilhouetteFalloff, node, "usesilhouettefalloff", time, 0);
239  else myUseSilhouetteFalloff = false;
240  if (true && ( (!((((node->getInput(2)!=0)==0))||((getUseSilhouetteFalloff()==0)))) ) )
241  OP_Utils::evalOpParm(mySilhouetteFalloffDist, node, "silhouettefalloffdist", time, 0);
242  else mySilhouetteFalloffDist = 1;
243  if (true && ( (!((((node->getInput(2)!=0)==0)))) ) )
244  OP_Utils::evalOpParm(myFrontFacingWeight, node, "frontfacingweight", time, 0);
245  else myFrontFacingWeight = 1;
246  if (true && ( (!((((node->getInput(2)!=0)==0)))) ) )
247  OP_Utils::evalOpParm(myUseFrontFacingFalloff, node, "usefrontfacingfalloff", time, 0);
248  else myUseFrontFacingFalloff = false;
249  if (true && ( (!((((node->getInput(2)!=0)==0))||((getUseFrontFacingFalloff()==0)))) ) )
250  OP_Utils::evalOpParm(myFrontFacingFalloffDist, node, "frontfacingfalloffdist", time, 0);
251  else myFrontFacingFalloffDist = 1;
252  if (true)
253  {
254  int64 length;
255  OP_Utils::evalOpParm(length, node, "controlattribs", time, 0);
256  myControlattribs.entries(length);
257  for (exint i = 0; i < length; i++)
258  {
259  int parmidx = i+1;
260  auto && _curentry = myControlattribs(i);
261  (void) _curentry;
262  if (true)
263  OP_Utils::evalOpParmInst(myControlattribs(i).attribenabled, node, "attribenabled#", &parmidx, time, 0);
264  else myControlattribs(i).attribenabled = false;
265  if (true && ( (!(((_curentry.attribenabled==0)))) ) )
266  OP_Utils::evalOpParmInst(myControlattribs(i).attribname, node, "attribname#", &parmidx, time, 0);
267  else myControlattribs(i).attribname = ""_sh;
268  if (true && ( (!(((_curentry.attribenabled==0)))) ) )
269  OP_Utils::evalOpParmInst(myControlattribs(i).attribweight, node, "attribweight#", &parmidx, time, 0);
270  else myControlattribs(i).attribweight = 1;
271 
272  }
273  }
274  else
275  myControlattribs.clear();
276 
277  }
278 
279 
280  virtual void loadFromOpSubclass(const LoadParms &loadparms)
281  {
282  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
283  }
284 
285 
286  virtual void copyFrom(const SOP_NodeParms *src)
287  {
288  *this = *((const SOP_PolyReduce_2_0Parms *)src);
289  }
290 
291  template <typename T>
292  void
293  doGetParmValue(exint idx, T &value) const
294  {
295  switch (idx)
296  {
297  case 0:
298  coerceValue(value, myGroup);
299  break;
300  case 1:
301  coerceValue(value, myTarget);
302  break;
303  case 2:
304  coerceValue(value, myPercentage);
305  break;
306  case 3:
307  coerceValue(value, myFinalCount);
308  break;
309  case 4:
310  coerceValue(value, myReducePassedTarget);
311  break;
312  case 5:
313  coerceValue(value, myQualityToleance);
314  break;
315  case 6:
316  coerceValue(value, myOriginalPoints);
317  break;
318  case 7:
319  coerceValue(value, myPreserveQuads);
320  break;
321  case 8:
322  coerceValue(value, myEqualizeLengths);
323  break;
324  case 9:
325  coerceValue(value, myBoundaryWeight);
326  break;
327  case 10:
328  coerceValue(value, myVAttribSeamWeight);
329  break;
330  case 11:
331  coerceValue(value, mySeamAttribs);
332  break;
333  case 12:
334  coerceValue(value, myHardFeaturePoints);
335  break;
336  case 13:
337  coerceValue(value, myHardFeatureEdges);
338  break;
339  case 14:
340  coerceValue(value, mySoftFeaturePoints);
341  break;
342  case 15:
343  coerceValue(value, mySoftFeaturePointWeight);
344  break;
345  case 16:
346  coerceValue(value, mySoftFeatureEdges);
347  break;
348  case 17:
349  coerceValue(value, mySoftFeatureEdgeWeight);
350  break;
351  case 18:
352  coerceValue(value, myUseRetainAttrib);
353  break;
354  case 19:
355  coerceValue(value, myRetainAttrib);
356  break;
357  case 20:
358  coerceValue(value, myRetainWeight);
359  break;
360  case 21:
361  coerceValue(value, mySilhouetteWeight);
362  break;
363  case 22:
364  coerceValue(value, myUseSilhouetteFalloff);
365  break;
366  case 23:
367  coerceValue(value, mySilhouetteFalloffDist);
368  break;
369  case 24:
370  coerceValue(value, myFrontFacingWeight);
371  break;
372  case 25:
373  coerceValue(value, myUseFrontFacingFalloff);
374  break;
375  case 26:
376  coerceValue(value, myFrontFacingFalloffDist);
377  break;
378 
379  }
380  }
381 
382  void getParmValue(exint idx, exint &value) const
383  { doGetParmValue(idx, value); }
384  void getParmValue(exint idx, fpreal &value) const
385  { doGetParmValue(idx, value); }
387  { doGetParmValue(idx, value); }
389  { doGetParmValue(idx, value); }
391  { doGetParmValue(idx, value); }
393  { doGetParmValue(idx, value); }
395  { doGetParmValue(idx, value); }
397  { doGetParmValue(idx, value); }
399  { doGetParmValue(idx, value); }
401  { doGetParmValue(idx, value); }
403  { doGetParmValue(idx, value); }
404 
405  template <typename T>
406  void
407  doSetParmValue(exint idx, const T &value)
408  {
409  switch (idx)
410  {
411  case 0:
412  coerceValue(myGroup, value);
413  break;
414  case 1:
415  coerceValue(myTarget, value);
416  break;
417  case 2:
418  coerceValue(myPercentage, value);
419  break;
420  case 3:
421  coerceValue(myFinalCount, value);
422  break;
423  case 4:
424  coerceValue(myReducePassedTarget, value);
425  break;
426  case 5:
427  coerceValue(myQualityToleance, value);
428  break;
429  case 6:
430  coerceValue(myOriginalPoints, value);
431  break;
432  case 7:
433  coerceValue(myPreserveQuads, value);
434  break;
435  case 8:
436  coerceValue(myEqualizeLengths, value);
437  break;
438  case 9:
439  coerceValue(myBoundaryWeight, value);
440  break;
441  case 10:
442  coerceValue(myVAttribSeamWeight, value);
443  break;
444  case 11:
445  coerceValue(mySeamAttribs, value);
446  break;
447  case 12:
448  coerceValue(myHardFeaturePoints, value);
449  break;
450  case 13:
451  coerceValue(myHardFeatureEdges, value);
452  break;
453  case 14:
454  coerceValue(mySoftFeaturePoints, value);
455  break;
456  case 15:
457  coerceValue(mySoftFeaturePointWeight, value);
458  break;
459  case 16:
460  coerceValue(mySoftFeatureEdges, value);
461  break;
462  case 17:
463  coerceValue(mySoftFeatureEdgeWeight, value);
464  break;
465  case 18:
466  coerceValue(myUseRetainAttrib, value);
467  break;
468  case 19:
469  coerceValue(myRetainAttrib, value);
470  break;
471  case 20:
472  coerceValue(myRetainWeight, value);
473  break;
474  case 21:
475  coerceValue(mySilhouetteWeight, value);
476  break;
477  case 22:
478  coerceValue(myUseSilhouetteFalloff, value);
479  break;
480  case 23:
481  coerceValue(mySilhouetteFalloffDist, value);
482  break;
483  case 24:
484  coerceValue(myFrontFacingWeight, value);
485  break;
486  case 25:
487  coerceValue(myUseFrontFacingFalloff, value);
488  break;
489  case 26:
490  coerceValue(myFrontFacingFalloffDist, value);
491  break;
492 
493  }
494  }
495 
496  void setParmValue(exint idx, const exint &value)
497  { doSetParmValue(idx, value); }
498  void setParmValue(exint idx, const fpreal &value)
499  { doSetParmValue(idx, value); }
500  void setParmValue(exint idx, const UT_Vector2D &value)
501  { doSetParmValue(idx, value); }
502  void setParmValue(exint idx, const UT_Vector3D &value)
503  { doSetParmValue(idx, value); }
504  void setParmValue(exint idx, const UT_Vector4D &value)
505  { doSetParmValue(idx, value); }
506  void setParmValue(exint idx, const UT_Matrix2D &value)
507  { doSetParmValue(idx, value); }
508  void setParmValue(exint idx, const UT_Matrix3D &value)
509  { doSetParmValue(idx, value); }
510  void setParmValue(exint idx, const UT_Matrix4D &value)
511  { doSetParmValue(idx, value); }
513  { doSetParmValue(idx, value); }
515  { doSetParmValue(idx, value); }
517  { doSetParmValue(idx, value); }
518 
519  virtual exint getNumParms() const
520  {
521  return 28;
522  }
523 
524  virtual const char *getParmName(exint fieldnum) const
525  {
526  switch (fieldnum)
527  {
528  case 0:
529  return "group";
530  case 1:
531  return "target";
532  case 2:
533  return "percentage";
534  case 3:
535  return "finalcount";
536  case 4:
537  return "reducepassedtarget";
538  case 5:
539  return "qualitytolerance";
540  case 6:
541  return "originalpoints";
542  case 7:
543  return "preservequads";
544  case 8:
545  return "equalizelengths";
546  case 9:
547  return "boundaryweight";
548  case 10:
549  return "vattribseamweight";
550  case 11:
551  return "seamattribs";
552  case 12:
553  return "hardfeaturepoints";
554  case 13:
555  return "hardfeatureedges";
556  case 14:
557  return "softfeaturepoints";
558  case 15:
559  return "softfeaturepointweight";
560  case 16:
561  return "softfeatureedges";
562  case 17:
563  return "softfeatureedgeweight";
564  case 18:
565  return "useretainattrib";
566  case 19:
567  return "retainattrib";
568  case 20:
569  return "retainattribweight";
570  case 21:
571  return "silhouetteweight";
572  case 22:
573  return "usesilhouettefalloff";
574  case 23:
575  return "silhouettefalloffdist";
576  case 24:
577  return "frontfacingweight";
578  case 25:
579  return "usefrontfacingfalloff";
580  case 26:
581  return "frontfacingfalloffdist";
582  case 27:
583  return "controlattribs";
584 
585  }
586  return 0;
587  }
588 
589  virtual ParmType getParmType(exint fieldnum) const
590  {
591  switch (fieldnum)
592  {
593  case 0:
594  return PARM_STRING;
595  case 1:
596  return PARM_INTEGER;
597  case 2:
598  return PARM_FLOAT;
599  case 3:
600  return PARM_INTEGER;
601  case 4:
602  return PARM_INTEGER;
603  case 5:
604  return PARM_FLOAT;
605  case 6:
606  return PARM_INTEGER;
607  case 7:
608  return PARM_INTEGER;
609  case 8:
610  return PARM_FLOAT;
611  case 9:
612  return PARM_FLOAT;
613  case 10:
614  return PARM_FLOAT;
615  case 11:
616  return PARM_STRING;
617  case 12:
618  return PARM_STRING;
619  case 13:
620  return PARM_STRING;
621  case 14:
622  return PARM_STRING;
623  case 15:
624  return PARM_FLOAT;
625  case 16:
626  return PARM_STRING;
627  case 17:
628  return PARM_FLOAT;
629  case 18:
630  return PARM_INTEGER;
631  case 19:
632  return PARM_STRING;
633  case 20:
634  return PARM_FLOAT;
635  case 21:
636  return PARM_FLOAT;
637  case 22:
638  return PARM_INTEGER;
639  case 23:
640  return PARM_FLOAT;
641  case 24:
642  return PARM_FLOAT;
643  case 25:
644  return PARM_INTEGER;
645  case 26:
646  return PARM_FLOAT;
647 
648  }
649  return PARM_UNSUPPORTED;
650  }
651 
652  // Boiler plate to load individual types.
653  static void loadData(UT_IStream &is, int64 &v)
654  { is.bread(&v, 1); }
655  static void loadData(UT_IStream &is, bool &v)
656  { int64 iv; is.bread(&iv, 1); v = iv; }
657  static void loadData(UT_IStream &is, fpreal64 &v)
658  { is.bread<fpreal64>(&v, 1); }
659  static void loadData(UT_IStream &is, UT_Vector2D &v)
660  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
661  static void loadData(UT_IStream &is, UT_Vector3D &v)
662  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
663  is.bread<fpreal64>(&v.z(), 1); }
664  static void loadData(UT_IStream &is, UT_Vector4D &v)
665  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
666  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
667  static void loadData(UT_IStream &is, UT_Matrix2D &v)
668  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
669  static void loadData(UT_IStream &is, UT_Matrix3D &v)
670  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
671  static void loadData(UT_IStream &is, UT_Matrix4D &v)
672  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
673  static void loadData(UT_IStream &is, UT_Vector2I &v)
674  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
675  static void loadData(UT_IStream &is, UT_Vector3I &v)
676  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
677  is.bread<int64>(&v.z(), 1); }
678  static void loadData(UT_IStream &is, UT_Vector4I &v)
679  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
680  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
682  { is.bread(v); }
684  { UT_StringHolder rampdata;
685  loadData(is, rampdata);
686  if (rampdata.isstring())
687  {
688  v.reset(new UT_Ramp());
689  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
690  v->load(istr);
691  }
692  else v.reset();
693  }
696  loadData(is, data);
697  if (data.isstring())
698  {
699  // Find the data type.
700  char *colon = UT_StringWrap(data).findChar(':');
701  if (colon)
702  {
703  int typelen = colon - data.buffer();
705  type.strncpy(data.buffer(), typelen);
706  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
707 
708  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
709  }
710  }
711  else v.reset();
712  }
713 
714  static void saveData(std::ostream &os, int64 v)
715  { UTwrite(os, &v); }
716  static void saveData(std::ostream &os, bool v)
717  { int64 iv = v; UTwrite(os, &iv); }
718  static void saveData(std::ostream &os, fpreal64 v)
719  { UTwrite<fpreal64>(os, &v); }
720  static void saveData(std::ostream &os, UT_Vector2D v)
721  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
722  static void saveData(std::ostream &os, UT_Vector3D v)
723  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
724  UTwrite<fpreal64>(os, &v.z()); }
725  static void saveData(std::ostream &os, UT_Vector4D v)
726  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
727  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
728  static void saveData(std::ostream &os, UT_Matrix2D v)
730  static void saveData(std::ostream &os, UT_Matrix3D v)
732  static void saveData(std::ostream &os, UT_Matrix4D v)
734  static void saveData(std::ostream &os, UT_StringHolder s)
735  { UT_StringWrap(s).saveBinary(os); }
736  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
737  { UT_StringHolder result;
738  UT_OStringStream ostr;
739  if (s) s->save(ostr);
740  result = ostr.str();
741  saveData(os, result);
742  }
743  static void saveData(std::ostream &os, PRM_DataItemHandle s)
744  { UT_StringHolder result;
745  UT_OStringStream ostr;
746  if (s)
747  {
748  ostr << s->getDataTypeToken();
749  ostr << ":";
750  s->saveBinary(ostr);
751  }
752  result = ostr.str();
753  saveData(os, result);
754  }
755 
756 
757  void save(std::ostream &os) const
758  {
759  int32 v = version();
760  UTwrite(os, &v);
761  saveData(os, myGroup);
762  saveData(os, myTarget);
763  saveData(os, myPercentage);
764  saveData(os, myFinalCount);
765  saveData(os, myReducePassedTarget);
766  saveData(os, myQualityToleance);
767  saveData(os, myOriginalPoints);
768  saveData(os, myPreserveQuads);
769  saveData(os, myEqualizeLengths);
770  saveData(os, myBoundaryWeight);
771  saveData(os, myVAttribSeamWeight);
772  saveData(os, mySeamAttribs);
773  saveData(os, myHardFeaturePoints);
774  saveData(os, myHardFeatureEdges);
775  saveData(os, mySoftFeaturePoints);
776  saveData(os, mySoftFeaturePointWeight);
777  saveData(os, mySoftFeatureEdges);
778  saveData(os, mySoftFeatureEdgeWeight);
779  saveData(os, myUseRetainAttrib);
780  saveData(os, myRetainAttrib);
781  saveData(os, myRetainWeight);
782  saveData(os, mySilhouetteWeight);
783  saveData(os, myUseSilhouetteFalloff);
784  saveData(os, mySilhouetteFalloffDist);
785  saveData(os, myFrontFacingWeight);
786  saveData(os, myUseFrontFacingFalloff);
787  saveData(os, myFrontFacingFalloffDist);
788  {
789  int64 length = myControlattribs.entries();
790  UTwrite(os, &length);
791  for (exint i = 0; i < length; i++)
792  {
793  saveData(os, myControlattribs(i).attribenabled);
794  saveData(os, myControlattribs(i).attribname);
795  saveData(os, myControlattribs(i).attribweight);
796 
797  }
798  }
799 
800  }
801 
802  bool load(UT_IStream &is)
803  {
804  int32 v;
805  is.bread(&v, 1);
806  if (version() != v)
807  {
808  // Fail incompatible versions
809  return false;
810  }
811  loadData(is, myGroup);
812  loadData(is, myTarget);
813  loadData(is, myPercentage);
814  loadData(is, myFinalCount);
815  loadData(is, myReducePassedTarget);
816  loadData(is, myQualityToleance);
817  loadData(is, myOriginalPoints);
818  loadData(is, myPreserveQuads);
819  loadData(is, myEqualizeLengths);
820  loadData(is, myBoundaryWeight);
821  loadData(is, myVAttribSeamWeight);
822  loadData(is, mySeamAttribs);
823  loadData(is, myHardFeaturePoints);
824  loadData(is, myHardFeatureEdges);
825  loadData(is, mySoftFeaturePoints);
826  loadData(is, mySoftFeaturePointWeight);
827  loadData(is, mySoftFeatureEdges);
828  loadData(is, mySoftFeatureEdgeWeight);
829  loadData(is, myUseRetainAttrib);
830  loadData(is, myRetainAttrib);
831  loadData(is, myRetainWeight);
832  loadData(is, mySilhouetteWeight);
833  loadData(is, myUseSilhouetteFalloff);
834  loadData(is, mySilhouetteFalloffDist);
835  loadData(is, myFrontFacingWeight);
836  loadData(is, myUseFrontFacingFalloff);
837  loadData(is, myFrontFacingFalloffDist);
838  {
839  int64 length;
840  is.read(&length, 1);
841  myControlattribs.entries(length);
842  for (exint i = 0; i < length; i++)
843  {
844  loadData(is, myControlattribs(i).attribenabled);
845  loadData(is, myControlattribs(i).attribname);
846  loadData(is, myControlattribs(i).attribweight);
847 
848  }
849  }
850 
851  return true;
852  }
853 
854  const UT_StringHolder & getGroup() const { return myGroup; }
855  void setGroup(const UT_StringHolder & val) { myGroup = val; }
857  {
858  SOP_Node *thissop = cookparms.getNode();
859  if (!thissop) return getGroup();
860  UT_StringHolder result;
861  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
862  return result;
863  }
864  Target getTarget() const { return Target(myTarget); }
865  void setTarget(Target val) { myTarget = int64(val); }
866  Target opTarget(const SOP_NodeVerb::CookParms &cookparms) const
867  {
868  SOP_Node *thissop = cookparms.getNode();
869  if (!thissop) return getTarget();
870  int64 result;
871  OP_Utils::evalOpParm(result, thissop, "target", cookparms.getCookTime(), 0);
872  return Target(result);
873  }
874  fpreal64 getPercentage() const { return myPercentage; }
875  void setPercentage(fpreal64 val) { myPercentage = val; }
877  {
878  SOP_Node *thissop = cookparms.getNode();
879  if (!thissop) return getPercentage();
880  fpreal64 result;
881  OP_Utils::evalOpParm(result, thissop, "percentage", cookparms.getCookTime(), 0);
882  return result;
883  }
884  int64 getFinalCount() const { return myFinalCount; }
885  void setFinalCount(int64 val) { myFinalCount = val; }
887  {
888  SOP_Node *thissop = cookparms.getNode();
889  if (!thissop) return getFinalCount();
890  int64 result;
891  OP_Utils::evalOpParm(result, thissop, "finalcount", cookparms.getCookTime(), 0);
892  return result;
893  }
894  bool getReducePassedTarget() const { return myReducePassedTarget; }
895  void setReducePassedTarget(bool val) { myReducePassedTarget = val; }
896  bool opReducePassedTarget(const SOP_NodeVerb::CookParms &cookparms) const
897  {
898  SOP_Node *thissop = cookparms.getNode();
899  if (!thissop) return getReducePassedTarget();
900  bool result;
901  OP_Utils::evalOpParm(result, thissop, "reducepassedtarget", cookparms.getCookTime(), 0);
902  return result;
903  }
904  fpreal64 getQualityToleance() const { return myQualityToleance; }
905  void setQualityToleance(fpreal64 val) { myQualityToleance = val; }
907  {
908  SOP_Node *thissop = cookparms.getNode();
909  if (!thissop) return getQualityToleance();
910  fpreal64 result;
911  OP_Utils::evalOpParm(result, thissop, "qualitytolerance", cookparms.getCookTime(), 0);
912  return result;
913  }
914  bool getOriginalPoints() const { return myOriginalPoints; }
915  void setOriginalPoints(bool val) { myOriginalPoints = val; }
916  bool opOriginalPoints(const SOP_NodeVerb::CookParms &cookparms) const
917  {
918  SOP_Node *thissop = cookparms.getNode();
919  if (!thissop) return getOriginalPoints();
920  bool result;
921  OP_Utils::evalOpParm(result, thissop, "originalpoints", cookparms.getCookTime(), 0);
922  return result;
923  }
924  bool getPreserveQuads() const { return myPreserveQuads; }
925  void setPreserveQuads(bool val) { myPreserveQuads = val; }
926  bool opPreserveQuads(const SOP_NodeVerb::CookParms &cookparms) const
927  {
928  SOP_Node *thissop = cookparms.getNode();
929  if (!thissop) return getPreserveQuads();
930  bool result;
931  OP_Utils::evalOpParm(result, thissop, "preservequads", cookparms.getCookTime(), 0);
932  return result;
933  }
934  fpreal64 getEqualizeLengths() const { return myEqualizeLengths; }
935  void setEqualizeLengths(fpreal64 val) { myEqualizeLengths = val; }
937  {
938  SOP_Node *thissop = cookparms.getNode();
939  if (!thissop) return getEqualizeLengths();
940  fpreal64 result;
941  OP_Utils::evalOpParm(result, thissop, "equalizelengths", cookparms.getCookTime(), 0);
942  return result;
943  }
944  fpreal64 getBoundaryWeight() const { return myBoundaryWeight; }
945  void setBoundaryWeight(fpreal64 val) { myBoundaryWeight = val; }
947  {
948  SOP_Node *thissop = cookparms.getNode();
949  if (!thissop) return getBoundaryWeight();
950  fpreal64 result;
951  OP_Utils::evalOpParm(result, thissop, "boundaryweight", cookparms.getCookTime(), 0);
952  return result;
953  }
954  fpreal64 getVAttribSeamWeight() const { return myVAttribSeamWeight; }
955  void setVAttribSeamWeight(fpreal64 val) { myVAttribSeamWeight = val; }
957  {
958  SOP_Node *thissop = cookparms.getNode();
959  if (!thissop) return getVAttribSeamWeight();
960  fpreal64 result;
961  OP_Utils::evalOpParm(result, thissop, "vattribseamweight", cookparms.getCookTime(), 0);
962  return result;
963  }
964  const UT_StringHolder & getSeamAttribs() const { return mySeamAttribs; }
965  void setSeamAttribs(const UT_StringHolder & val) { mySeamAttribs = val; }
967  {
968  SOP_Node *thissop = cookparms.getNode();
969  if (!thissop) return getSeamAttribs();
970  UT_StringHolder result;
971  OP_Utils::evalOpParm(result, thissop, "seamattribs", cookparms.getCookTime(), 0);
972  return result;
973  }
974  const UT_StringHolder & getHardFeaturePoints() const { return myHardFeaturePoints; }
975  void setHardFeaturePoints(const UT_StringHolder & val) { myHardFeaturePoints = val; }
977  {
978  SOP_Node *thissop = cookparms.getNode();
979  if (!thissop) return getHardFeaturePoints();
980  UT_StringHolder result;
981  OP_Utils::evalOpParm(result, thissop, "hardfeaturepoints", cookparms.getCookTime(), 0);
982  return result;
983  }
984  const UT_StringHolder & getHardFeatureEdges() const { return myHardFeatureEdges; }
985  void setHardFeatureEdges(const UT_StringHolder & val) { myHardFeatureEdges = val; }
987  {
988  SOP_Node *thissop = cookparms.getNode();
989  if (!thissop) return getHardFeatureEdges();
990  UT_StringHolder result;
991  OP_Utils::evalOpParm(result, thissop, "hardfeatureedges", cookparms.getCookTime(), 0);
992  return result;
993  }
994  const UT_StringHolder & getSoftFeaturePoints() const { return mySoftFeaturePoints; }
995  void setSoftFeaturePoints(const UT_StringHolder & val) { mySoftFeaturePoints = val; }
997  {
998  SOP_Node *thissop = cookparms.getNode();
999  if (!thissop) return getSoftFeaturePoints();
1000  UT_StringHolder result;
1001  OP_Utils::evalOpParm(result, thissop, "softfeaturepoints", cookparms.getCookTime(), 0);
1002  return result;
1003  }
1004  fpreal64 getSoftFeaturePointWeight() const { return mySoftFeaturePointWeight; }
1005  void setSoftFeaturePointWeight(fpreal64 val) { mySoftFeaturePointWeight = val; }
1007  {
1008  SOP_Node *thissop = cookparms.getNode();
1009  if (!thissop) return getSoftFeaturePointWeight();
1010  fpreal64 result;
1011  OP_Utils::evalOpParm(result, thissop, "softfeaturepointweight", cookparms.getCookTime(), 0);
1012  return result;
1013  }
1014  const UT_StringHolder & getSoftFeatureEdges() const { return mySoftFeatureEdges; }
1015  void setSoftFeatureEdges(const UT_StringHolder & val) { mySoftFeatureEdges = val; }
1017  {
1018  SOP_Node *thissop = cookparms.getNode();
1019  if (!thissop) return getSoftFeatureEdges();
1020  UT_StringHolder result;
1021  OP_Utils::evalOpParm(result, thissop, "softfeatureedges", cookparms.getCookTime(), 0);
1022  return result;
1023  }
1024  fpreal64 getSoftFeatureEdgeWeight() const { return mySoftFeatureEdgeWeight; }
1025  void setSoftFeatureEdgeWeight(fpreal64 val) { mySoftFeatureEdgeWeight = val; }
1027  {
1028  SOP_Node *thissop = cookparms.getNode();
1029  if (!thissop) return getSoftFeatureEdgeWeight();
1030  fpreal64 result;
1031  OP_Utils::evalOpParm(result, thissop, "softfeatureedgeweight", cookparms.getCookTime(), 0);
1032  return result;
1033  }
1034  bool getUseRetainAttrib() const { return myUseRetainAttrib; }
1035  void setUseRetainAttrib(bool val) { myUseRetainAttrib = val; }
1036  bool opUseRetainAttrib(const SOP_NodeVerb::CookParms &cookparms) const
1037  {
1038  SOP_Node *thissop = cookparms.getNode();
1039  if (!thissop) return getUseRetainAttrib();
1040  bool result;
1041  OP_Utils::evalOpParm(result, thissop, "useretainattrib", cookparms.getCookTime(), 0);
1042  return result;
1043  }
1044  const UT_StringHolder & getRetainAttrib() const { return myRetainAttrib; }
1045  void setRetainAttrib(const UT_StringHolder & val) { myRetainAttrib = val; }
1047  {
1048  SOP_Node *thissop = cookparms.getNode();
1049  if (!thissop) return getRetainAttrib();
1050  UT_StringHolder result;
1051  OP_Utils::evalOpParm(result, thissop, "retainattrib", cookparms.getCookTime(), 0);
1052  return result;
1053  }
1054  fpreal64 getRetainWeight() const { return myRetainWeight; }
1055  void setRetainWeight(fpreal64 val) { myRetainWeight = val; }
1057  {
1058  SOP_Node *thissop = cookparms.getNode();
1059  if (!thissop) return getRetainWeight();
1060  fpreal64 result;
1061  OP_Utils::evalOpParm(result, thissop, "retainattribweight", cookparms.getCookTime(), 0);
1062  return result;
1063  }
1064  fpreal64 getSilhouetteWeight() const { return mySilhouetteWeight; }
1065  void setSilhouetteWeight(fpreal64 val) { mySilhouetteWeight = val; }
1067  {
1068  SOP_Node *thissop = cookparms.getNode();
1069  if (!thissop) return getSilhouetteWeight();
1070  fpreal64 result;
1071  OP_Utils::evalOpParm(result, thissop, "silhouetteweight", cookparms.getCookTime(), 0);
1072  return result;
1073  }
1074  bool getUseSilhouetteFalloff() const { return myUseSilhouetteFalloff; }
1075  void setUseSilhouetteFalloff(bool val) { myUseSilhouetteFalloff = val; }
1077  {
1078  SOP_Node *thissop = cookparms.getNode();
1079  if (!thissop) return getUseSilhouetteFalloff();
1080  bool result;
1081  OP_Utils::evalOpParm(result, thissop, "usesilhouettefalloff", cookparms.getCookTime(), 0);
1082  return result;
1083  }
1084  fpreal64 getSilhouetteFalloffDist() const { return mySilhouetteFalloffDist; }
1085  void setSilhouetteFalloffDist(fpreal64 val) { mySilhouetteFalloffDist = val; }
1087  {
1088  SOP_Node *thissop = cookparms.getNode();
1089  if (!thissop) return getSilhouetteFalloffDist();
1090  fpreal64 result;
1091  OP_Utils::evalOpParm(result, thissop, "silhouettefalloffdist", cookparms.getCookTime(), 0);
1092  return result;
1093  }
1094  fpreal64 getFrontFacingWeight() const { return myFrontFacingWeight; }
1095  void setFrontFacingWeight(fpreal64 val) { myFrontFacingWeight = val; }
1097  {
1098  SOP_Node *thissop = cookparms.getNode();
1099  if (!thissop) return getFrontFacingWeight();
1100  fpreal64 result;
1101  OP_Utils::evalOpParm(result, thissop, "frontfacingweight", cookparms.getCookTime(), 0);
1102  return result;
1103  }
1104  bool getUseFrontFacingFalloff() const { return myUseFrontFacingFalloff; }
1105  void setUseFrontFacingFalloff(bool val) { myUseFrontFacingFalloff = val; }
1107  {
1108  SOP_Node *thissop = cookparms.getNode();
1109  if (!thissop) return getUseFrontFacingFalloff();
1110  bool result;
1111  OP_Utils::evalOpParm(result, thissop, "usefrontfacingfalloff", cookparms.getCookTime(), 0);
1112  return result;
1113  }
1114  fpreal64 getFrontFacingFalloffDist() const { return myFrontFacingFalloffDist; }
1115  void setFrontFacingFalloffDist(fpreal64 val) { myFrontFacingFalloffDist = val; }
1117  {
1118  SOP_Node *thissop = cookparms.getNode();
1119  if (!thissop) return getFrontFacingFalloffDist();
1120  fpreal64 result;
1121  OP_Utils::evalOpParm(result, thissop, "frontfacingfalloffdist", cookparms.getCookTime(), 0);
1122  return result;
1123  }
1124  const UT_Array<Controlattribs> &getControlattribs() const { return myControlattribs; }
1125  void setControlattribs(const UT_Array<Controlattribs> &val) { myControlattribs = val; }
1127  {
1128  SOP_Node *thissop = cookparms.getNode();
1129  if (!thissop) return getControlattribs().entries();
1130  exint result;
1131  OP_Utils::evalOpParm(result, thissop, "controlattribs", cookparms.getCookTime(), 0);
1132  return result;
1133  }
1135  {
1136  SOP_Node *thissop = cookparms.getNode();
1137  if (!thissop) return (myControlattribs(_idx).attribenabled);
1138  int _parmidx = _idx + 1;
1139  bool result;
1140  OP_Utils::evalOpParmInst(result, thissop, "attribenabled#", &_parmidx, cookparms.getCookTime(), 0);
1141  return (result);
1142  }
1144  {
1145  SOP_Node *thissop = cookparms.getNode();
1146  if (!thissop) return (myControlattribs(_idx).attribname);
1147  int _parmidx = _idx + 1;
1148  UT_StringHolder result;
1149  OP_Utils::evalOpParmInst(result, thissop, "attribname#", &_parmidx, cookparms.getCookTime(), 0);
1150  return (result);
1151  }
1153  {
1154  SOP_Node *thissop = cookparms.getNode();
1155  if (!thissop) return (myControlattribs(_idx).attribweight);
1156  int _parmidx = _idx + 1;
1157  fpreal64 result;
1158  OP_Utils::evalOpParmInst(result, thissop, "attribweight#", &_parmidx, cookparms.getCookTime(), 0);
1159  return (result);
1160  }
1161 
1162 
1163 private:
1164  UT_StringHolder myGroup;
1165  int64 myTarget;
1166  fpreal64 myPercentage;
1167  int64 myFinalCount;
1168  bool myReducePassedTarget;
1169  fpreal64 myQualityToleance;
1170  bool myOriginalPoints;
1171  bool myPreserveQuads;
1172  fpreal64 myEqualizeLengths;
1173  fpreal64 myBoundaryWeight;
1174  fpreal64 myVAttribSeamWeight;
1175  UT_StringHolder mySeamAttribs;
1176  UT_StringHolder myHardFeaturePoints;
1177  UT_StringHolder myHardFeatureEdges;
1178  UT_StringHolder mySoftFeaturePoints;
1179  fpreal64 mySoftFeaturePointWeight;
1180  UT_StringHolder mySoftFeatureEdges;
1181  fpreal64 mySoftFeatureEdgeWeight;
1182  bool myUseRetainAttrib;
1183  UT_StringHolder myRetainAttrib;
1184  fpreal64 myRetainWeight;
1185  fpreal64 mySilhouetteWeight;
1186  bool myUseSilhouetteFalloff;
1187  fpreal64 mySilhouetteFalloffDist;
1188  fpreal64 myFrontFacingWeight;
1189  bool myUseFrontFacingFalloff;
1190  fpreal64 myFrontFacingFalloffDist;
1191  UT_Array<Controlattribs> myControlattribs;
1192 
1193 };
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setParmValue(exint idx, const UT_Matrix4D &value)
void save(std::ostream &os) const
static void saveData(std::ostream &os, fpreal64 v)
void setBoundaryWeight(fpreal64 val)
void getParmValue(exint idx, UT_Matrix2D &value) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setFrontFacingWeight(fpreal64 val)
static void loadData(UT_IStream &is, UT_Vector4I &v)
fpreal64 getSoftFeaturePointWeight() const
virtual void loadFromOpSubclass(const LoadParms &loadparms)
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:494
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
fpreal64 getFrontFacingFalloffDist() const
T & z(void)
Definition: UT_Vector4.h:379
fpreal64 opQualityToleance(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getSoftFeaturePoints() const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
UT_StringHolder opControlattribs_attribname(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
fpreal getTime() const
Definition: OP_Context.h:60
void setControlattribs(const UT_Array< Controlattribs > &val)
const GLdouble * v
Definition: glcorearb.h:836
static void saveData(std::ostream &os, UT_Vector3D v)
static void saveData(std::ostream &os, UT_Vector4D v)
bool opControlattribs_attribenabled(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
virtual exint getNumParms() const
void getParmValue(exint idx, UT_Vector3D &value) const
bool opUseSilhouetteFalloff(const SOP_NodeVerb::CookParms &cookparms) const
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
static void saveData(std::ostream &os, UT_Matrix2D v)
const UT_StringHolder & getRetainAttrib() const
UT_StringHolder opSoftFeaturePoints(const SOP_NodeVerb::CookParms &cookparms) const
bool operator!=(const SOP_PolyReduce_2_0Parms &src) const
SYS_FORCE_INLINE const char * buffer() const
T & x(void)
Definition: UT_Vector2.h:285
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
UT_StringHolder opHardFeaturePoints(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const PRM_DataItemHandle &value)
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
virtual ParmType getParmType(exint fieldnum) const
virtual const char * getParmName(exint fieldnum) const
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void getParmValue(exint idx, UT_Vector2D &value) const
bool operator!=(const Controlattribs &src) const
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:498
void setSoftFeatureEdges(const UT_StringHolder &val)
void setFrontFacingFalloffDist(fpreal64 val)
void setEqualizeLengths(fpreal64 val)
static void loadData(UT_IStream &is, int64 &v)
UT_StringHolder opSoftFeatureEdges(const SOP_NodeVerb::CookParms &cookparms) const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
png_uint_32 i
Definition: png.h:2877
void setSilhouetteFalloffDist(fpreal64 val)
void setSoftFeaturePointWeight(fpreal64 val)
void setParmValue(exint idx, const fpreal &value)
void getParmValue(exint idx, UT_Matrix3D &value) const
Target opTarget(const SOP_NodeVerb::CookParms &cookparms) const
virtual void copyFrom(const SOP_NodeParms *src)
void setParmValue(exint idx, const UT_Matrix3D &value)
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:502
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
exint opControlattribs(const SOP_NodeVerb::CookParms &cookparms) const
long long int64
Definition: SYS_Types.h:107
fpreal64 opFrontFacingWeight(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, exint &value) const
void setRetainAttrib(const UT_StringHolder &val)
fpreal64 opSoftFeatureEdgeWeight(const SOP_NodeVerb::CookParms &cookparms) const
int64 opFinalCount(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
static void saveData(std::ostream &os, UT_Matrix4D v)
const UT_StringHolder & getGroup() const
fpreal64 getVAttribSeamWeight() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
exint length() const
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
Definition: UT_String.h:550
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
fpreal64 opSilhouetteFalloffDist(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, int64 v)
void getParmValue(exint idx, UT_Vector4D &value) const
int64 exint
Definition: SYS_Types.h:116
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
double fpreal64
Definition: SYS_Types.h:192
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:284
void setParmValue(exint idx, const UT_Matrix2D &value)
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
void setVAttribSeamWeight(fpreal64 val)
OP_Node * getInput(unsigned idx, bool mark_used=false) const
Returns the node connected to a particular input (may be null).
void setParmValue(exint idx, const UT_Vector3D &value)
void setParmValue(exint idx, const exint &value)
bool opOriginalPoints(const SOP_NodeVerb::CookParms &cookparms) const
bool opUseFrontFacingFalloff(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Vector4D &value)
void setParmValue(exint idx, const UT_StringHolder &value)
GLboolean * data
Definition: glcorearb.h:130
const UT_StringHolder & getHardFeatureEdges() const
void getParmValue(exint idx, UT_StringHolder &value) const
int int32
Definition: SYS_Types.h:35
static void loadData(UT_IStream &is, UT_Vector2D &v)
T & y(void)
Definition: UT_Vector4.h:377
bool opPreserveQuads(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opSoftFeaturePointWeight(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opSilhouetteWeight(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Vector2D &value)
SYS_FORCE_INLINE void strcat(const char *src)
fpreal64 opControlattribs_attribweight(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
fpreal64 opBoundaryWeight(const SOP_NodeVerb::CookParms &cookparms) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
void setSilhouetteWeight(fpreal64 val)
fpreal64 opEqualizeLengths(const SOP_NodeVerb::CookParms &cookparms) const
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
void getParmValue(exint idx, UT_Matrix4D &value) const
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2539
UT_StringHolder opRetainAttrib(const SOP_NodeVerb::CookParms &cookparms) const
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:453
bool operator==(const SOP_PolyReduce_2_0Parms &src) const
static void loadData(UT_IStream &is, fpreal64 &v)
SYS_FORCE_INLINE T & y(void)
Definition: UT_Vector3.h:500
GLsizei const GLfloat * value
Definition: glcorearb.h:823
void setHardFeatureEdges(const UT_StringHolder &val)
double fpreal
Definition: SYS_Types.h:270
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
fpreal64 opRetainWeight(const SOP_NodeVerb::CookParms &cookparms) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
void setGroup(const UT_StringHolder &val)
fpreal64 getSoftFeatureEdgeWeight() const
bool operator==(const Controlattribs &src) const
static void saveData(std::ostream &os, UT_Matrix3D v)
SYS_FORCE_INLINE void append(char character)
fpreal64 opPercentage(const SOP_NodeVerb::CookParms &cookparms) const
GLuint GLfloat * val
Definition: glcorearb.h:1607
fpreal64 opFrontFacingFalloffDist(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
UT_StringHolder opHardFeatureEdges(const SOP_NodeVerb::CookParms &cookparms) const
#define SOP_API
Definition: SOP_API.h:10
const UT_StringHolder & getSeamAttribs() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool opUseRetainAttrib(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder createString(const UT_Array< Controlattribs > &list) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:501
const UT_StringHolder & getHardFeaturePoints() const
T & x(void)
Definition: UT_Vector4.h:375
void doSetParmValue(exint idx, const T &value)
static void saveData(std::ostream &os, bool v)
void setSoftFeatureEdgeWeight(fpreal64 val)
T & y(void)
Definition: UT_Vector2.h:287
static void loadData(UT_IStream &is, UT_Vector3I &v)
GLboolean r
Definition: glcorearb.h:1221
UT_StringHolder opSeamAttribs(const SOP_NodeVerb::CookParms &cookparms) const
void setSeamAttribs(const UT_StringHolder &val)
const UT_Array< Controlattribs > & getControlattribs() const
const UT_StringHolder & getSoftFeatureEdges() const
T & w(void)
Definition: UT_Vector4.h:381
void setSoftFeaturePoints(const UT_StringHolder &val)
static void saveData(std::ostream &os, UT_Vector2D v)
void doGetParmValue(exint idx, T &value) const
static void saveData(std::ostream &os, UT_StringHolder s)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool opReducePassedTarget(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
fpreal64 getSilhouetteFalloffDist() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:88
SYS_FORCE_INLINE bool isstring() const
void setHardFeaturePoints(const UT_StringHolder &val)
void getParmValue(exint idx, fpreal &value) const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:794
GLenum src
Definition: glcorearb.h:1792
void setQualityToleance(fpreal64 val)
fpreal64 opVAttribSeamWeight(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, PRM_DataItemHandle &value) const