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