HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SOP_UVFlatten-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_UVFlatten_2_0Enums
22 {
23  enum class Method
24  {
25  SCP = 0,
26  ABF
27  };
28  enum class Align_axis
29  {
30  UAXIS = 0,
31  VAXIS
32  };
33  enum class Lalign_axis
34  {
35  UAXIS = 0,
36  VAXIS
37  };
38 }
39 
40 
42 {
43 public:
44  static int version() { return 1; }
45  struct Pins
46  {
47  bool usepin;
51 
52 
53  Pins()
54  {
55  usepin = false;
56  primvert = UT_Vector2D(0,0);
57  pinuv = UT_Vector2D(0,0);
58  pinrefuv = UT_Vector2D(0,0);
59 
60  }
61 
62  bool operator==(const Pins &src) const
63  {
64  if (usepin != src.usepin) return false;
65  if (primvert != src.primvert) return false;
66  if (pinuv != src.pinuv) return false;
67  if (pinrefuv != src.pinrefuv) return false;
68 
69  return true;
70  }
71 
72  };
73 
75  {
77 
78  buf.strcat("[ ");
79  for (int i = 0; i < list.entries(); i++)
80  {
81  if (i)
82  buf.strcat(", ");
83  buf.strcat("( ");
84  buf.append("");
85  buf.appendSprintf("%s", (list(i).usepin) ? "true" : "false");
86  buf.append(", ");
87  buf.appendSprintf("(%f, %f)", list(i).primvert.x(), list(i).primvert.y());
88  buf.append(", ");
89  buf.appendSprintf("(%f, %f)", list(i).pinuv.x(), list(i).pinuv.y());
90  buf.append(", ");
91  buf.appendSprintf("(%f, %f)", list(i).pinrefuv.x(), list(i).pinrefuv.y());
92 
93  buf.strcat(" )");
94  }
95  buf.strcat(" ]");
96 
97  UT_StringHolder result = buf;
98  return result;
99  }
100  struct Alignments
101  {
105 
106 
108  {
109  align_enabled = false;
110  align_group = ""_sh;
111  align_axis = 0;
112 
113  }
114 
115  bool operator==(const Alignments &src) const
116  {
117  if (align_enabled != src.align_enabled) return false;
118  if (align_group != src.align_group) return false;
119  if (align_axis != src.align_axis) return false;
120 
121  return true;
122  }
123 
124  };
125 
127  {
129 
130  buf.strcat("[ ");
131  for (int i = 0; i < list.entries(); i++)
132  {
133  if (i)
134  buf.strcat(", ");
135  buf.strcat("( ");
136  buf.append("");
137  buf.appendSprintf("%s", (list(i).align_enabled) ? "true" : "false");
138  buf.append(", ");
139  { UT_String tmp; tmp = UT_StringWrap(list(i).align_group).makeQuotedString('"'); buf.strcat(tmp); }
140  buf.append(", ");
141  buf.appendSprintf("%d", (int) list(i).align_axis);
142 
143  buf.strcat(" )");
144  }
145  buf.strcat(" ]");
146 
147  UT_StringHolder result = buf;
148  return result;
149  }
151  {
154 
155 
157  {
158  straight_enabled = false;
159  straight_group = ""_sh;
160 
161  }
162 
163  bool operator==(const Straightenings &src) const
164  {
165  if (straight_enabled != src.straight_enabled) return false;
166  if (straight_group != src.straight_group) return false;
167 
168  return true;
169  }
170 
171  };
172 
174  {
176 
177  buf.strcat("[ ");
178  for (int i = 0; i < list.entries(); i++)
179  {
180  if (i)
181  buf.strcat(", ");
182  buf.strcat("( ");
183  buf.append("");
184  buf.appendSprintf("%s", (list(i).straight_enabled) ? "true" : "false");
185  buf.append(", ");
186  { UT_String tmp; tmp = UT_StringWrap(list(i).straight_group).makeQuotedString('"'); buf.strcat(tmp); }
187 
188  buf.strcat(" )");
189  }
190  buf.strcat(" ]");
191 
192  UT_StringHolder result = buf;
193  return result;
194  }
195  struct Lpins
196  {
200 
201 
203  {
204  lprimvert = UT_Vector2D(0,0);
205  lpinuv = UT_Vector2D(0,0);
206  lpinrefuv = UT_Vector2D(0,0);
207 
208  }
209 
210  bool operator==(const Lpins &src) const
211  {
212  if (lprimvert != src.lprimvert) return false;
213  if (lpinuv != src.lpinuv) return false;
214  if (lpinrefuv != src.lpinrefuv) return false;
215 
216  return true;
217  }
218 
219  };
220 
222  {
224 
225  buf.strcat("[ ");
226  for (int i = 0; i < list.entries(); i++)
227  {
228  if (i)
229  buf.strcat(", ");
230  buf.strcat("( ");
231  buf.append("");
232  buf.appendSprintf("(%f, %f)", list(i).lprimvert.x(), list(i).lprimvert.y());
233  buf.append(", ");
234  buf.appendSprintf("(%f, %f)", list(i).lpinuv.x(), list(i).lpinuv.y());
235  buf.append(", ");
236  buf.appendSprintf("(%f, %f)", list(i).lpinrefuv.x(), list(i).lpinrefuv.y());
237 
238  buf.strcat(" )");
239  }
240  buf.strcat(" ]");
241 
242  UT_StringHolder result = buf;
243  return result;
244  }
245  struct Lalignments
246  {
249 
250 
252  {
253  lalign_group = ""_sh;
254  lalign_axis = 0;
255 
256  }
257 
258  bool operator==(const Lalignments &src) const
259  {
260  if (lalign_group != src.lalign_group) return false;
261  if (lalign_axis != src.lalign_axis) return false;
262 
263  return true;
264  }
265 
266  };
267 
269  {
271 
272  buf.strcat("[ ");
273  for (int i = 0; i < list.entries(); i++)
274  {
275  if (i)
276  buf.strcat(", ");
277  buf.strcat("( ");
278  buf.append("");
279  { UT_String tmp; tmp = UT_StringWrap(list(i).lalign_group).makeQuotedString('"'); buf.strcat(tmp); }
280  buf.append(", ");
281  buf.appendSprintf("%d", (int) list(i).lalign_axis);
282 
283  buf.strcat(" )");
284  }
285  buf.strcat(" ]");
286 
287  UT_StringHolder result = buf;
288  return result;
289  }
291  {
293 
294 
296  {
297  lstraight_group = ""_sh;
298 
299  }
300 
301  bool operator==(const Lstraightenings &src) const
302  {
303  if (lstraight_group != src.lstraight_group) return false;
304 
305  return true;
306  }
307 
308  };
309 
311  {
313 
314  buf.strcat("[ ");
315  for (int i = 0; i < list.entries(); i++)
316  {
317  if (i)
318  buf.strcat(", ");
319  buf.strcat("( ");
320  buf.append("");
321  { UT_String tmp; tmp = UT_StringWrap(list(i).lstraight_group).makeQuotedString('"'); buf.strcat(tmp); }
322 
323  buf.strcat(" )");
324  }
325  buf.strcat(" ]");
326 
327  UT_StringHolder result = buf;
328  return result;
329  }
330 
332  {
333  myGroup = ""_sh;
334  myUVAttrib = "uv"_sh;
335  myMethod = 0;
336  myKeepExistingSeams = false;
337  myKeepExistingLayout = false;
338  myPinBoundaries = false;
339  mySeams = ""_sh;
340  myUsePins = false;
341  myUseAlignments = false;
342  myUseStraightenings = false;
343  myManualLayout = false;
344  myLayoutSeams = ""_sh;
345  myUseOutputSeams = false;
346  myOutputSeams = "outputseams"_sh;
347  myUseOutputConstrIslands = false;
348  myOutputConstrIslands = "constrainedprims"_sh;
349  myBboxCenter = UT_Vector2D(0.5,0.5);
350  myBboxSize = UT_Vector2D(1,1);
351 
352  }
353 
354  explicit SOP_UVFlatten_2_0Parms(const SOP_UVFlatten_2_0Parms &) = default;
355 
357 
359  {
360  if (myGroup != src.myGroup) return false;
361  if (myUVAttrib != src.myUVAttrib) return false;
362  if (myMethod != src.myMethod) return false;
363  if (myKeepExistingSeams != src.myKeepExistingSeams) return false;
364  if (myKeepExistingLayout != src.myKeepExistingLayout) return false;
365  if (myPinBoundaries != src.myPinBoundaries) return false;
366  if (mySeams != src.mySeams) return false;
367  if (myUsePins != src.myUsePins) return false;
368  if (myPins != src.myPins) return false;
369  if (myUseAlignments != src.myUseAlignments) return false;
370  if (myAlignments != src.myAlignments) return false;
371  if (myUseStraightenings != src.myUseStraightenings) return false;
372  if (myStraightenings != src.myStraightenings) return false;
373  if (myManualLayout != src.myManualLayout) return false;
374  if (myLayoutSeams != src.myLayoutSeams) return false;
375  if (myLpins != src.myLpins) return false;
376  if (myLalignments != src.myLalignments) return false;
377  if (myLstraightenings != src.myLstraightenings) return false;
378  if (myUseOutputSeams != src.myUseOutputSeams) return false;
379  if (myOutputSeams != src.myOutputSeams) return false;
380  if (myUseOutputConstrIslands != src.myUseOutputConstrIslands) return false;
381  if (myOutputConstrIslands != src.myOutputConstrIslands) return false;
382  if (myBboxCenter != src.myBboxCenter) return false;
383  if (myBboxSize != src.myBboxSize) return false;
384 
385  return true;
386  }
390 
391 
392 
393  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
394  {
395  if (true)
396  OP_Utils::evalOpParm(myGroup, node, "group", time, 0);
397  else myGroup = ""_sh;
398  if (true)
399  OP_Utils::evalOpParm(myUVAttrib, node, "uvattrib", time, 0);
400  else myUVAttrib = "uv"_sh;
401  if (true)
402  OP_Utils::evalOpParm(myMethod, node, "method", time, 0);
403  else myMethod = 0;
404  if (true)
405  OP_Utils::evalOpParm(myKeepExistingSeams, node, "keepexistingseams", time, 0);
406  else myKeepExistingSeams = false;
407  if (true && ( (!(((getKeepExistingSeams()==0)))) ) )
408  OP_Utils::evalOpParm(myKeepExistingLayout, node, "keepexistinglayout", time, 0);
409  else myKeepExistingLayout = false;
410  if (true && ( (!(((getKeepExistingSeams()==0))||((int64(getMethod())!=0)))) ) )
411  OP_Utils::evalOpParm(myPinBoundaries, node, "pinboundaries", time, 0);
412  else myPinBoundaries = false;
413  if (true)
414  OP_Utils::evalOpParm(mySeams, node, "seamgroup", time, 0);
415  else mySeams = ""_sh;
416  if (true)
417  OP_Utils::evalOpParm(myUsePins, node, "usepins", time, 0);
418  else myUsePins = false;
419  if (true && ( (!(((getUsePins()==0)))) ) )
420  {
421  int64 length;
422  OP_Utils::evalOpParm(length, node, "pins", time, 0);
423  myPins.entries(length);
424  for (exint i = 0; i < length; i++)
425  {
426  int parmidx = i+0;
427  auto && _curentry = myPins(i);
428  (void) _curentry;
429  if (true && ( (!(((getUsePins()==0)))) ) )
430  OP_Utils::evalOpParmInst(myPins(i).usepin, node, "usepin#", &parmidx, time, 0);
431  else myPins(i).usepin = false;
432  if (true && ( (!(((getUsePins()==0)))) ) )
433  OP_Utils::evalOpParmInst(myPins(i).primvert, node, "primvert#", &parmidx, time, 0);
434  else myPins(i).primvert = UT_Vector2D(0,0);
435  if (true && ( (!(((getUsePins()==0)))) ) )
436  OP_Utils::evalOpParmInst(myPins(i).pinuv, node, "pinuv#", &parmidx, time, 0);
437  else myPins(i).pinuv = UT_Vector2D(0,0);
438  if (true && ( (!(((getUsePins()==0)))) ) )
439  OP_Utils::evalOpParmInst(myPins(i).pinrefuv, node, "pinrefuv#", &parmidx, time, 0);
440  else myPins(i).pinrefuv = UT_Vector2D(0,0);
441 
442  }
443  }
444  else
445  myPins.clear();
446  if (true)
447  OP_Utils::evalOpParm(myUseAlignments, node, "usealignments", time, 0);
448  else myUseAlignments = false;
449  if (true && ( (!(((getUseAlignments()==0)))) ) )
450  {
451  int64 length;
452  OP_Utils::evalOpParm(length, node, "alignments", time, 0);
453  myAlignments.entries(length);
454  for (exint i = 0; i < length; i++)
455  {
456  int parmidx = i+0;
457  auto && _curentry = myAlignments(i);
458  (void) _curentry;
459  if (true && ( (!(((getUseAlignments()==0)))) ) )
460  OP_Utils::evalOpParmInst(myAlignments(i).align_enabled, node, "align_enabled#", &parmidx, time, 0);
461  else myAlignments(i).align_enabled = false;
462  if (true && ( (!(((getUseAlignments()==0)))) ) )
463  OP_Utils::evalOpParmInst(myAlignments(i).align_group, node, "align_group#", &parmidx, time, 0);
464  else myAlignments(i).align_group = ""_sh;
465  if (true && ( (!(((getUseAlignments()==0)))) ) )
466  OP_Utils::evalOpParmInst(myAlignments(i).align_axis, node, "align_axis#", &parmidx, time, 0);
467  else myAlignments(i).align_axis = 0;
468 
469  }
470  }
471  else
472  myAlignments.clear();
473  if (true)
474  OP_Utils::evalOpParm(myUseStraightenings, node, "usestraightenings", time, 0);
475  else myUseStraightenings = false;
476  if (true && ( (!(((getUseStraightenings()==0)))) ) )
477  {
478  int64 length;
479  OP_Utils::evalOpParm(length, node, "straightenings", time, 0);
480  myStraightenings.entries(length);
481  for (exint i = 0; i < length; i++)
482  {
483  int parmidx = i+0;
484  auto && _curentry = myStraightenings(i);
485  (void) _curentry;
486  if (true && ( (!(((getUseStraightenings()==0)))) ) )
487  OP_Utils::evalOpParmInst(myStraightenings(i).straight_enabled, node, "straight_enabled#", &parmidx, time, 0);
488  else myStraightenings(i).straight_enabled = false;
489  if (true && ( (!(((getUseStraightenings()==0)))) ) )
490  OP_Utils::evalOpParmInst(myStraightenings(i).straight_group, node, "straight_group#", &parmidx, time, 0);
491  else myStraightenings(i).straight_group = ""_sh;
492 
493  }
494  }
495  else
496  myStraightenings.clear();
497  if (true)
498  OP_Utils::evalOpParm(myManualLayout, node, "manuallayout", time, 0);
499  else myManualLayout = false;
500  if (true && ( (!(((getManualLayout()==0)))) ) )
501  OP_Utils::evalOpParm(myLayoutSeams, node, "layoutseamgroup", time, 0);
502  else myLayoutSeams = ""_sh;
503  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) )
504  {
505  int64 length;
506  OP_Utils::evalOpParm(length, node, "lpins", time, 0);
507  myLpins.entries(length);
508  for (exint i = 0; i < length; i++)
509  {
510  int parmidx = i+0;
511  auto && _curentry = myLpins(i);
512  (void) _curentry;
513  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) && ( (!(((getManualLayout()==0)))) ) )
514  OP_Utils::evalOpParmInst(myLpins(i).lprimvert, node, "lprimvert#", &parmidx, time, 0);
515  else myLpins(i).lprimvert = UT_Vector2D(0,0);
516  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) && ( (!(((getManualLayout()==0)))) ) )
517  OP_Utils::evalOpParmInst(myLpins(i).lpinuv, node, "lpinuv#", &parmidx, time, 0);
518  else myLpins(i).lpinuv = UT_Vector2D(0,0);
519  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) && ( (!(((getManualLayout()==0)))) ) )
520  OP_Utils::evalOpParmInst(myLpins(i).lpinrefuv, node, "lpinrefuv#", &parmidx, time, 0);
521  else myLpins(i).lpinrefuv = UT_Vector2D(0,0);
522 
523  }
524  }
525  else
526  myLpins.clear();
527  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) )
528  {
529  int64 length;
530  OP_Utils::evalOpParm(length, node, "lalignments", time, 0);
531  myLalignments.entries(length);
532  for (exint i = 0; i < length; i++)
533  {
534  int parmidx = i+0;
535  auto && _curentry = myLalignments(i);
536  (void) _curentry;
537  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) && ( (!(((getManualLayout()==0)))) ) )
538  OP_Utils::evalOpParmInst(myLalignments(i).lalign_group, node, "lalign_group#", &parmidx, time, 0);
539  else myLalignments(i).lalign_group = ""_sh;
540  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) && ( (!(((getManualLayout()==0)))) ) )
541  OP_Utils::evalOpParmInst(myLalignments(i).lalign_axis, node, "lalign_axis#", &parmidx, time, 0);
542  else myLalignments(i).lalign_axis = 0;
543 
544  }
545  }
546  else
547  myLalignments.clear();
548  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) )
549  {
550  int64 length;
551  OP_Utils::evalOpParm(length, node, "lstraightenings", time, 0);
552  myLstraightenings.entries(length);
553  for (exint i = 0; i < length; i++)
554  {
555  int parmidx = i+0;
556  auto && _curentry = myLstraightenings(i);
557  (void) _curentry;
558  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) && ( (!(((getManualLayout()==0)))) ) )
559  OP_Utils::evalOpParmInst(myLstraightenings(i).lstraight_group, node, "lstraight_group#", &parmidx, time, 0);
560  else myLstraightenings(i).lstraight_group = ""_sh;
561 
562  }
563  }
564  else
565  myLstraightenings.clear();
566  if (true)
567  OP_Utils::evalOpParm(myUseOutputSeams, node, "useoutputseams", time, 0);
568  else myUseOutputSeams = false;
569  if (true && ( (!(((getUseOutputSeams()==0)))) ) )
570  OP_Utils::evalOpParm(myOutputSeams, node, "outputseams", time, 0);
571  else myOutputSeams = "outputseams"_sh;
572  if (true)
573  OP_Utils::evalOpParm(myUseOutputConstrIslands, node, "useoutputconstrislands", time, 0);
574  else myUseOutputConstrIslands = false;
575  if (true && ( (!(((getUseOutputConstrIslands()==0)))) ) )
576  OP_Utils::evalOpParm(myOutputConstrIslands, node, "outputconstrislands", time, 0);
577  else myOutputConstrIslands = "constrainedprims"_sh;
578  if (true)
579  OP_Utils::evalOpParm(myBboxCenter, node, "bboxcenter", time, 0);
580  else myBboxCenter = UT_Vector2D(0.5,0.5);
581  if (true)
582  OP_Utils::evalOpParm(myBboxSize, node, "bboxsize", time, 0);
583  else myBboxSize = UT_Vector2D(1,1);
584 
585  }
586 
587 
588  virtual void loadFromOpSubclass(const LoadParms &loadparms)
589  {
590  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
591  }
592 
593 
594  virtual void copyFrom(const SOP_NodeParms *src)
595  {
596  *this = *((const SOP_UVFlatten_2_0Parms *)src);
597  }
598 
599  template <typename T>
600  void
601  doGetParmValue(exint idx, T &value) const
602  {
603  switch (idx)
604  {
605  case 0:
606  coerceValue(value, myGroup);
607  break;
608  case 1:
609  coerceValue(value, myUVAttrib);
610  break;
611  case 2:
612  coerceValue(value, myMethod);
613  break;
614  case 3:
615  coerceValue(value, myKeepExistingSeams);
616  break;
617  case 4:
618  coerceValue(value, myKeepExistingLayout);
619  break;
620  case 5:
621  coerceValue(value, myPinBoundaries);
622  break;
623  case 6:
624  coerceValue(value, mySeams);
625  break;
626  case 7:
627  coerceValue(value, myUsePins);
628  break;
629  case 9:
630  coerceValue(value, myUseAlignments);
631  break;
632  case 11:
633  coerceValue(value, myUseStraightenings);
634  break;
635  case 13:
636  coerceValue(value, myManualLayout);
637  break;
638  case 14:
639  coerceValue(value, myLayoutSeams);
640  break;
641  case 18:
642  coerceValue(value, myUseOutputSeams);
643  break;
644  case 19:
645  coerceValue(value, myOutputSeams);
646  break;
647  case 20:
648  coerceValue(value, myUseOutputConstrIslands);
649  break;
650  case 21:
651  coerceValue(value, myOutputConstrIslands);
652  break;
653  case 22:
654  coerceValue(value, myBboxCenter);
655  break;
656  case 23:
657  coerceValue(value, myBboxSize);
658  break;
659 
660  }
661  }
662 
663  void getParmValue(exint idx, exint &value) const
664  { doGetParmValue(idx, value); }
665  void getParmValue(exint idx, fpreal &value) const
666  { doGetParmValue(idx, value); }
668  { doGetParmValue(idx, value); }
670  { doGetParmValue(idx, value); }
672  { doGetParmValue(idx, value); }
674  { doGetParmValue(idx, value); }
676  { doGetParmValue(idx, value); }
678  { doGetParmValue(idx, value); }
680  { doGetParmValue(idx, value); }
682  { doGetParmValue(idx, value); }
684  { doGetParmValue(idx, value); }
685 
686  template <typename T>
687  void
688  doSetParmValue(exint idx, const T &value)
689  {
690  switch (idx)
691  {
692  case 0:
693  coerceValue(myGroup, value);
694  break;
695  case 1:
696  coerceValue(myUVAttrib, value);
697  break;
698  case 2:
699  coerceValue(myMethod, value);
700  break;
701  case 3:
702  coerceValue(myKeepExistingSeams, value);
703  break;
704  case 4:
705  coerceValue(myKeepExistingLayout, value);
706  break;
707  case 5:
708  coerceValue(myPinBoundaries, value);
709  break;
710  case 6:
711  coerceValue(mySeams, value);
712  break;
713  case 7:
714  coerceValue(myUsePins, value);
715  break;
716  case 9:
717  coerceValue(myUseAlignments, value);
718  break;
719  case 11:
720  coerceValue(myUseStraightenings, value);
721  break;
722  case 13:
723  coerceValue(myManualLayout, value);
724  break;
725  case 14:
726  coerceValue(myLayoutSeams, value);
727  break;
728  case 18:
729  coerceValue(myUseOutputSeams, value);
730  break;
731  case 19:
732  coerceValue(myOutputSeams, value);
733  break;
734  case 20:
735  coerceValue(myUseOutputConstrIslands, value);
736  break;
737  case 21:
738  coerceValue(myOutputConstrIslands, value);
739  break;
740  case 22:
741  coerceValue(myBboxCenter, value);
742  break;
743  case 23:
744  coerceValue(myBboxSize, value);
745  break;
746 
747  }
748  }
749 
750  void setParmValue(exint idx, const exint &value)
751  { doSetParmValue(idx, value); }
752  void setParmValue(exint idx, const fpreal &value)
753  { doSetParmValue(idx, value); }
754  void setParmValue(exint idx, const UT_Vector2D &value)
755  { doSetParmValue(idx, value); }
756  void setParmValue(exint idx, const UT_Vector3D &value)
757  { doSetParmValue(idx, value); }
758  void setParmValue(exint idx, const UT_Vector4D &value)
759  { doSetParmValue(idx, value); }
760  void setParmValue(exint idx, const UT_Matrix2D &value)
761  { doSetParmValue(idx, value); }
762  void setParmValue(exint idx, const UT_Matrix3D &value)
763  { doSetParmValue(idx, value); }
764  void setParmValue(exint idx, const UT_Matrix4D &value)
765  { doSetParmValue(idx, value); }
767  { doSetParmValue(idx, value); }
769  { doSetParmValue(idx, value); }
771  { doSetParmValue(idx, value); }
772 
773  virtual exint getNumParms() const
774  {
775  return 24;
776  }
777 
778  virtual const char *getParmName(exint fieldnum) const
779  {
780  switch (fieldnum)
781  {
782  case 0:
783  return "group";
784  case 1:
785  return "uvattrib";
786  case 2:
787  return "method";
788  case 3:
789  return "keepexistingseams";
790  case 4:
791  return "keepexistinglayout";
792  case 5:
793  return "pinboundaries";
794  case 6:
795  return "seamgroup";
796  case 7:
797  return "usepins";
798  case 8:
799  return "pins";
800  case 9:
801  return "usealignments";
802  case 10:
803  return "alignments";
804  case 11:
805  return "usestraightenings";
806  case 12:
807  return "straightenings";
808  case 13:
809  return "manuallayout";
810  case 14:
811  return "layoutseamgroup";
812  case 15:
813  return "lpins";
814  case 16:
815  return "lalignments";
816  case 17:
817  return "lstraightenings";
818  case 18:
819  return "useoutputseams";
820  case 19:
821  return "outputseams";
822  case 20:
823  return "useoutputconstrislands";
824  case 21:
825  return "outputconstrislands";
826  case 22:
827  return "bboxcenter";
828  case 23:
829  return "bboxsize";
830 
831  }
832  return 0;
833  }
834 
835  virtual ParmType getParmType(exint fieldnum) const
836  {
837  switch (fieldnum)
838  {
839  case 0:
840  return PARM_STRING;
841  case 1:
842  return PARM_STRING;
843  case 2:
844  return PARM_INTEGER;
845  case 3:
846  return PARM_INTEGER;
847  case 4:
848  return PARM_INTEGER;
849  case 5:
850  return PARM_INTEGER;
851  case 6:
852  return PARM_STRING;
853  case 7:
854  return PARM_INTEGER;
855  case 9:
856  return PARM_INTEGER;
857  case 11:
858  return PARM_INTEGER;
859  case 13:
860  return PARM_INTEGER;
861  case 14:
862  return PARM_STRING;
863  case 18:
864  return PARM_INTEGER;
865  case 19:
866  return PARM_STRING;
867  case 20:
868  return PARM_INTEGER;
869  case 21:
870  return PARM_STRING;
871  case 22:
872  return PARM_VECTOR2;
873  case 23:
874  return PARM_VECTOR2;
875 
876  }
877  return PARM_UNSUPPORTED;
878  }
879 
880  // Boiler plate to load individual types.
881  static void loadData(UT_IStream &is, int64 &v)
882  { is.bread(&v, 1); }
883  static void loadData(UT_IStream &is, bool &v)
884  { int64 iv; is.bread(&iv, 1); v = iv; }
885  static void loadData(UT_IStream &is, fpreal64 &v)
886  { is.bread<fpreal64>(&v, 1); }
887  static void loadData(UT_IStream &is, UT_Vector2D &v)
888  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
889  static void loadData(UT_IStream &is, UT_Vector3D &v)
890  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
891  is.bread<fpreal64>(&v.z(), 1); }
892  static void loadData(UT_IStream &is, UT_Vector4D &v)
893  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
894  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
895  static void loadData(UT_IStream &is, UT_Matrix2D &v)
896  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
897  static void loadData(UT_IStream &is, UT_Matrix3D &v)
898  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
899  static void loadData(UT_IStream &is, UT_Matrix4D &v)
900  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
901  static void loadData(UT_IStream &is, UT_Vector2I &v)
902  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
903  static void loadData(UT_IStream &is, UT_Vector3I &v)
904  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
905  is.bread<int64>(&v.z(), 1); }
906  static void loadData(UT_IStream &is, UT_Vector4I &v)
907  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
908  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
910  { is.bread(v); }
912  { UT_StringHolder rampdata;
913  loadData(is, rampdata);
914  if (rampdata.isstring())
915  {
916  v.reset(new UT_Ramp());
917  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
918  v->load(istr);
919  }
920  else v.reset();
921  }
924  loadData(is, data);
925  if (data.isstring())
926  {
927  // Find the data type.
928  char *colon = UT_StringWrap(data).findChar(':');
929  if (colon)
930  {
931  int typelen = colon - data.buffer();
933  type.strncpy(data.buffer(), typelen);
934  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
935 
936  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
937  }
938  }
939  else v.reset();
940  }
941 
942  static void saveData(std::ostream &os, int64 v)
943  { UTwrite(os, &v); }
944  static void saveData(std::ostream &os, bool v)
945  { int64 iv = v; UTwrite(os, &iv); }
946  static void saveData(std::ostream &os, fpreal64 v)
947  { UTwrite<fpreal64>(os, &v); }
948  static void saveData(std::ostream &os, UT_Vector2D v)
949  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
950  static void saveData(std::ostream &os, UT_Vector3D v)
951  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
952  UTwrite<fpreal64>(os, &v.z()); }
953  static void saveData(std::ostream &os, UT_Vector4D v)
954  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
955  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
956  static void saveData(std::ostream &os, UT_Matrix2D v)
958  static void saveData(std::ostream &os, UT_Matrix3D v)
960  static void saveData(std::ostream &os, UT_Matrix4D v)
962  static void saveData(std::ostream &os, UT_StringHolder s)
963  { UT_StringWrap(s).saveBinary(os); }
964  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
965  { UT_StringHolder result;
966  UT_OStringStream ostr;
967  if (s) s->save(ostr);
968  result = ostr.str();
969  saveData(os, result);
970  }
971  static void saveData(std::ostream &os, PRM_DataItemHandle s)
972  { UT_StringHolder result;
973  UT_OStringStream ostr;
974  if (s)
975  {
976  ostr << s->getDataTypeToken();
977  ostr << ":";
978  s->saveBinary(ostr);
979  }
980  result = ostr.str();
981  saveData(os, result);
982  }
983 
984 
985  void save(std::ostream &os) const
986  {
987  int32 v = version();
988  UTwrite(os, &v);
989  saveData(os, myGroup);
990  saveData(os, myUVAttrib);
991  saveData(os, myMethod);
992  saveData(os, myKeepExistingSeams);
993  saveData(os, myKeepExistingLayout);
994  saveData(os, myPinBoundaries);
995  saveData(os, mySeams);
996  saveData(os, myUsePins);
997  {
998  int64 length = myPins.entries();
999  UTwrite(os, &length);
1000  for (exint i = 0; i < length; i++)
1001  {
1002  saveData(os, myPins(i).usepin);
1003  saveData(os, myPins(i).primvert);
1004  saveData(os, myPins(i).pinuv);
1005  saveData(os, myPins(i).pinrefuv);
1006 
1007  }
1008  }
1009  saveData(os, myUseAlignments);
1010  {
1011  int64 length = myAlignments.entries();
1012  UTwrite(os, &length);
1013  for (exint i = 0; i < length; i++)
1014  {
1015  saveData(os, myAlignments(i).align_enabled);
1016  saveData(os, myAlignments(i).align_group);
1017  saveData(os, myAlignments(i).align_axis);
1018 
1019  }
1020  }
1021  saveData(os, myUseStraightenings);
1022  {
1023  int64 length = myStraightenings.entries();
1024  UTwrite(os, &length);
1025  for (exint i = 0; i < length; i++)
1026  {
1027  saveData(os, myStraightenings(i).straight_enabled);
1028  saveData(os, myStraightenings(i).straight_group);
1029 
1030  }
1031  }
1032  saveData(os, myManualLayout);
1033  saveData(os, myLayoutSeams);
1034  {
1035  int64 length = myLpins.entries();
1036  UTwrite(os, &length);
1037  for (exint i = 0; i < length; i++)
1038  {
1039  saveData(os, myLpins(i).lprimvert);
1040  saveData(os, myLpins(i).lpinuv);
1041  saveData(os, myLpins(i).lpinrefuv);
1042 
1043  }
1044  }
1045  {
1046  int64 length = myLalignments.entries();
1047  UTwrite(os, &length);
1048  for (exint i = 0; i < length; i++)
1049  {
1050  saveData(os, myLalignments(i).lalign_group);
1051  saveData(os, myLalignments(i).lalign_axis);
1052 
1053  }
1054  }
1055  {
1056  int64 length = myLstraightenings.entries();
1057  UTwrite(os, &length);
1058  for (exint i = 0; i < length; i++)
1059  {
1060  saveData(os, myLstraightenings(i).lstraight_group);
1061 
1062  }
1063  }
1064  saveData(os, myUseOutputSeams);
1065  saveData(os, myOutputSeams);
1066  saveData(os, myUseOutputConstrIslands);
1067  saveData(os, myOutputConstrIslands);
1068  saveData(os, myBboxCenter);
1069  saveData(os, myBboxSize);
1070 
1071  }
1072 
1073  bool load(UT_IStream &is)
1074  {
1075  int32 v;
1076  is.bread(&v, 1);
1077  if (version() != v)
1078  {
1079  // Fail incompatible versions
1080  return false;
1081  }
1082  loadData(is, myGroup);
1083  loadData(is, myUVAttrib);
1084  loadData(is, myMethod);
1085  loadData(is, myKeepExistingSeams);
1086  loadData(is, myKeepExistingLayout);
1087  loadData(is, myPinBoundaries);
1088  loadData(is, mySeams);
1089  loadData(is, myUsePins);
1090  {
1091  int64 length;
1092  is.read(&length, 1);
1093  myPins.entries(length);
1094  for (exint i = 0; i < length; i++)
1095  {
1096  loadData(is, myPins(i).usepin);
1097  loadData(is, myPins(i).primvert);
1098  loadData(is, myPins(i).pinuv);
1099  loadData(is, myPins(i).pinrefuv);
1100 
1101  }
1102  }
1103  loadData(is, myUseAlignments);
1104  {
1105  int64 length;
1106  is.read(&length, 1);
1107  myAlignments.entries(length);
1108  for (exint i = 0; i < length; i++)
1109  {
1110  loadData(is, myAlignments(i).align_enabled);
1111  loadData(is, myAlignments(i).align_group);
1112  loadData(is, myAlignments(i).align_axis);
1113 
1114  }
1115  }
1116  loadData(is, myUseStraightenings);
1117  {
1118  int64 length;
1119  is.read(&length, 1);
1120  myStraightenings.entries(length);
1121  for (exint i = 0; i < length; i++)
1122  {
1123  loadData(is, myStraightenings(i).straight_enabled);
1124  loadData(is, myStraightenings(i).straight_group);
1125 
1126  }
1127  }
1128  loadData(is, myManualLayout);
1129  loadData(is, myLayoutSeams);
1130  {
1131  int64 length;
1132  is.read(&length, 1);
1133  myLpins.entries(length);
1134  for (exint i = 0; i < length; i++)
1135  {
1136  loadData(is, myLpins(i).lprimvert);
1137  loadData(is, myLpins(i).lpinuv);
1138  loadData(is, myLpins(i).lpinrefuv);
1139 
1140  }
1141  }
1142  {
1143  int64 length;
1144  is.read(&length, 1);
1145  myLalignments.entries(length);
1146  for (exint i = 0; i < length; i++)
1147  {
1148  loadData(is, myLalignments(i).lalign_group);
1149  loadData(is, myLalignments(i).lalign_axis);
1150 
1151  }
1152  }
1153  {
1154  int64 length;
1155  is.read(&length, 1);
1156  myLstraightenings.entries(length);
1157  for (exint i = 0; i < length; i++)
1158  {
1159  loadData(is, myLstraightenings(i).lstraight_group);
1160 
1161  }
1162  }
1163  loadData(is, myUseOutputSeams);
1164  loadData(is, myOutputSeams);
1165  loadData(is, myUseOutputConstrIslands);
1166  loadData(is, myOutputConstrIslands);
1167  loadData(is, myBboxCenter);
1168  loadData(is, myBboxSize);
1169 
1170  return true;
1171  }
1172 
1173  const UT_StringHolder & getGroup() const { return myGroup; }
1174  void setGroup(const UT_StringHolder & val) { myGroup = val; }
1176  {
1177  SOP_Node *thissop = cookparms.getNode();
1178  if (!thissop) return getGroup();
1179  UT_StringHolder result;
1180  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
1181  return result;
1182  }
1183  const UT_StringHolder & getUVAttrib() const { return myUVAttrib; }
1184  void setUVAttrib(const UT_StringHolder & val) { myUVAttrib = val; }
1186  {
1187  SOP_Node *thissop = cookparms.getNode();
1188  if (!thissop) return getUVAttrib();
1189  UT_StringHolder result;
1190  OP_Utils::evalOpParm(result, thissop, "uvattrib", cookparms.getCookTime(), 0);
1191  return result;
1192  }
1193  Method getMethod() const { return Method(myMethod); }
1194  void setMethod(Method val) { myMethod = int64(val); }
1195  Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
1196  {
1197  SOP_Node *thissop = cookparms.getNode();
1198  if (!thissop) return getMethod();
1199  int64 result;
1200  OP_Utils::evalOpParm(result, thissop, "method", cookparms.getCookTime(), 0);
1201  return Method(result);
1202  }
1203  bool getKeepExistingSeams() const { return myKeepExistingSeams; }
1204  void setKeepExistingSeams(bool val) { myKeepExistingSeams = val; }
1205  bool opKeepExistingSeams(const SOP_NodeVerb::CookParms &cookparms) const
1206  {
1207  SOP_Node *thissop = cookparms.getNode();
1208  if (!thissop) return getKeepExistingSeams();
1209  bool result;
1210  OP_Utils::evalOpParm(result, thissop, "keepexistingseams", cookparms.getCookTime(), 0);
1211  return result;
1212  }
1213  bool getKeepExistingLayout() const { return myKeepExistingLayout; }
1214  void setKeepExistingLayout(bool val) { myKeepExistingLayout = val; }
1215  bool opKeepExistingLayout(const SOP_NodeVerb::CookParms &cookparms) const
1216  {
1217  SOP_Node *thissop = cookparms.getNode();
1218  if (!thissop) return getKeepExistingLayout();
1219  bool result;
1220  OP_Utils::evalOpParm(result, thissop, "keepexistinglayout", cookparms.getCookTime(), 0);
1221  return result;
1222  }
1223  bool getPinBoundaries() const { return myPinBoundaries; }
1224  void setPinBoundaries(bool val) { myPinBoundaries = val; }
1225  bool opPinBoundaries(const SOP_NodeVerb::CookParms &cookparms) const
1226  {
1227  SOP_Node *thissop = cookparms.getNode();
1228  if (!thissop) return getPinBoundaries();
1229  bool result;
1230  OP_Utils::evalOpParm(result, thissop, "pinboundaries", cookparms.getCookTime(), 0);
1231  return result;
1232  }
1233  const UT_StringHolder & getSeams() const { return mySeams; }
1234  void setSeams(const UT_StringHolder & val) { mySeams = val; }
1236  {
1237  SOP_Node *thissop = cookparms.getNode();
1238  if (!thissop) return getSeams();
1239  UT_StringHolder result;
1240  OP_Utils::evalOpParm(result, thissop, "seamgroup", cookparms.getCookTime(), 0);
1241  return result;
1242  }
1243  bool getUsePins() const { return myUsePins; }
1244  void setUsePins(bool val) { myUsePins = val; }
1245  bool opUsePins(const SOP_NodeVerb::CookParms &cookparms) const
1246  {
1247  SOP_Node *thissop = cookparms.getNode();
1248  if (!thissop) return getUsePins();
1249  bool result;
1250  OP_Utils::evalOpParm(result, thissop, "usepins", cookparms.getCookTime(), 0);
1251  return result;
1252  }
1253  const UT_Array<Pins> &getPins() const { return myPins; }
1254  void setPins(const UT_Array<Pins> &val) { myPins = val; }
1255  exint opPins(const SOP_NodeVerb::CookParms &cookparms) const
1256  {
1257  SOP_Node *thissop = cookparms.getNode();
1258  if (!thissop) return getPins().entries();
1259  exint result;
1260  OP_Utils::evalOpParm(result, thissop, "pins", cookparms.getCookTime(), 0);
1261  return result;
1262  }
1263  bool opPins_usepin(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
1264  {
1265  SOP_Node *thissop = cookparms.getNode();
1266  if (!thissop) return (myPins(_idx).usepin);
1267  int _parmidx = _idx + 0;
1268  bool result;
1269  OP_Utils::evalOpParmInst(result, thissop, "usepin#", &_parmidx, cookparms.getCookTime(), 0);
1270  return (result);
1271  }
1273  {
1274  SOP_Node *thissop = cookparms.getNode();
1275  if (!thissop) return (myPins(_idx).primvert);
1276  int _parmidx = _idx + 0;
1277  UT_Vector2D result;
1278  OP_Utils::evalOpParmInst(result, thissop, "primvert#", &_parmidx, cookparms.getCookTime(), 0);
1279  return (result);
1280  }
1282  {
1283  SOP_Node *thissop = cookparms.getNode();
1284  if (!thissop) return (myPins(_idx).pinuv);
1285  int _parmidx = _idx + 0;
1286  UT_Vector2D result;
1287  OP_Utils::evalOpParmInst(result, thissop, "pinuv#", &_parmidx, cookparms.getCookTime(), 0);
1288  return (result);
1289  }
1291  {
1292  SOP_Node *thissop = cookparms.getNode();
1293  if (!thissop) return (myPins(_idx).pinrefuv);
1294  int _parmidx = _idx + 0;
1295  UT_Vector2D result;
1296  OP_Utils::evalOpParmInst(result, thissop, "pinrefuv#", &_parmidx, cookparms.getCookTime(), 0);
1297  return (result);
1298  }
1299 
1300  bool getUseAlignments() const { return myUseAlignments; }
1301  void setUseAlignments(bool val) { myUseAlignments = val; }
1302  bool opUseAlignments(const SOP_NodeVerb::CookParms &cookparms) const
1303  {
1304  SOP_Node *thissop = cookparms.getNode();
1305  if (!thissop) return getUseAlignments();
1306  bool result;
1307  OP_Utils::evalOpParm(result, thissop, "usealignments", cookparms.getCookTime(), 0);
1308  return result;
1309  }
1310  const UT_Array<Alignments> &getAlignments() const { return myAlignments; }
1311  void setAlignments(const UT_Array<Alignments> &val) { myAlignments = val; }
1313  {
1314  SOP_Node *thissop = cookparms.getNode();
1315  if (!thissop) return getAlignments().entries();
1316  exint result;
1317  OP_Utils::evalOpParm(result, thissop, "alignments", cookparms.getCookTime(), 0);
1318  return result;
1319  }
1320  bool opAlignments_align_enabled(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
1321  {
1322  SOP_Node *thissop = cookparms.getNode();
1323  if (!thissop) return (myAlignments(_idx).align_enabled);
1324  int _parmidx = _idx + 0;
1325  bool result;
1326  OP_Utils::evalOpParmInst(result, thissop, "align_enabled#", &_parmidx, cookparms.getCookTime(), 0);
1327  return (result);
1328  }
1330  {
1331  SOP_Node *thissop = cookparms.getNode();
1332  if (!thissop) return (myAlignments(_idx).align_group);
1333  int _parmidx = _idx + 0;
1334  UT_StringHolder result;
1335  OP_Utils::evalOpParmInst(result, thissop, "align_group#", &_parmidx, cookparms.getCookTime(), 0);
1336  return (result);
1337  }
1339  {
1340  SOP_Node *thissop = cookparms.getNode();
1341  if (!thissop) return (myAlignments(_idx).align_axis);
1342  int _parmidx = _idx + 0;
1343  int64 result;
1344  OP_Utils::evalOpParmInst(result, thissop, "align_axis#", &_parmidx, cookparms.getCookTime(), 0);
1345  return (result);
1346  }
1347 
1348  bool getUseStraightenings() const { return myUseStraightenings; }
1349  void setUseStraightenings(bool val) { myUseStraightenings = val; }
1350  bool opUseStraightenings(const SOP_NodeVerb::CookParms &cookparms) const
1351  {
1352  SOP_Node *thissop = cookparms.getNode();
1353  if (!thissop) return getUseStraightenings();
1354  bool result;
1355  OP_Utils::evalOpParm(result, thissop, "usestraightenings", cookparms.getCookTime(), 0);
1356  return result;
1357  }
1358  const UT_Array<Straightenings> &getStraightenings() const { return myStraightenings; }
1359  void setStraightenings(const UT_Array<Straightenings> &val) { myStraightenings = val; }
1361  {
1362  SOP_Node *thissop = cookparms.getNode();
1363  if (!thissop) return getStraightenings().entries();
1364  exint result;
1365  OP_Utils::evalOpParm(result, thissop, "straightenings", cookparms.getCookTime(), 0);
1366  return result;
1367  }
1369  {
1370  SOP_Node *thissop = cookparms.getNode();
1371  if (!thissop) return (myStraightenings(_idx).straight_enabled);
1372  int _parmidx = _idx + 0;
1373  bool result;
1374  OP_Utils::evalOpParmInst(result, thissop, "straight_enabled#", &_parmidx, cookparms.getCookTime(), 0);
1375  return (result);
1376  }
1378  {
1379  SOP_Node *thissop = cookparms.getNode();
1380  if (!thissop) return (myStraightenings(_idx).straight_group);
1381  int _parmidx = _idx + 0;
1382  UT_StringHolder result;
1383  OP_Utils::evalOpParmInst(result, thissop, "straight_group#", &_parmidx, cookparms.getCookTime(), 0);
1384  return (result);
1385  }
1386 
1387  bool getManualLayout() const { return myManualLayout; }
1388  void setManualLayout(bool val) { myManualLayout = val; }
1389  bool opManualLayout(const SOP_NodeVerb::CookParms &cookparms) const
1390  {
1391  SOP_Node *thissop = cookparms.getNode();
1392  if (!thissop) return getManualLayout();
1393  bool result;
1394  OP_Utils::evalOpParm(result, thissop, "manuallayout", cookparms.getCookTime(), 0);
1395  return result;
1396  }
1397  const UT_StringHolder & getLayoutSeams() const { return myLayoutSeams; }
1398  void setLayoutSeams(const UT_StringHolder & val) { myLayoutSeams = val; }
1400  {
1401  SOP_Node *thissop = cookparms.getNode();
1402  if (!thissop) return getLayoutSeams();
1403  UT_StringHolder result;
1404  OP_Utils::evalOpParm(result, thissop, "layoutseamgroup", cookparms.getCookTime(), 0);
1405  return result;
1406  }
1407  const UT_Array<Lpins> &getLpins() const { return myLpins; }
1408  void setLpins(const UT_Array<Lpins> &val) { myLpins = val; }
1409  exint opLpins(const SOP_NodeVerb::CookParms &cookparms) const
1410  {
1411  SOP_Node *thissop = cookparms.getNode();
1412  if (!thissop) return getLpins().entries();
1413  exint result;
1414  OP_Utils::evalOpParm(result, thissop, "lpins", cookparms.getCookTime(), 0);
1415  return result;
1416  }
1418  {
1419  SOP_Node *thissop = cookparms.getNode();
1420  if (!thissop) return (myLpins(_idx).lprimvert);
1421  int _parmidx = _idx + 0;
1422  UT_Vector2D result;
1423  OP_Utils::evalOpParmInst(result, thissop, "lprimvert#", &_parmidx, cookparms.getCookTime(), 0);
1424  return (result);
1425  }
1427  {
1428  SOP_Node *thissop = cookparms.getNode();
1429  if (!thissop) return (myLpins(_idx).lpinuv);
1430  int _parmidx = _idx + 0;
1431  UT_Vector2D result;
1432  OP_Utils::evalOpParmInst(result, thissop, "lpinuv#", &_parmidx, cookparms.getCookTime(), 0);
1433  return (result);
1434  }
1436  {
1437  SOP_Node *thissop = cookparms.getNode();
1438  if (!thissop) return (myLpins(_idx).lpinrefuv);
1439  int _parmidx = _idx + 0;
1440  UT_Vector2D result;
1441  OP_Utils::evalOpParmInst(result, thissop, "lpinrefuv#", &_parmidx, cookparms.getCookTime(), 0);
1442  return (result);
1443  }
1444 
1445  const UT_Array<Lalignments> &getLalignments() const { return myLalignments; }
1446  void setLalignments(const UT_Array<Lalignments> &val) { myLalignments = val; }
1448  {
1449  SOP_Node *thissop = cookparms.getNode();
1450  if (!thissop) return getLalignments().entries();
1451  exint result;
1452  OP_Utils::evalOpParm(result, thissop, "lalignments", cookparms.getCookTime(), 0);
1453  return result;
1454  }
1456  {
1457  SOP_Node *thissop = cookparms.getNode();
1458  if (!thissop) return (myLalignments(_idx).lalign_group);
1459  int _parmidx = _idx + 0;
1460  UT_StringHolder result;
1461  OP_Utils::evalOpParmInst(result, thissop, "lalign_group#", &_parmidx, cookparms.getCookTime(), 0);
1462  return (result);
1463  }
1465  {
1466  SOP_Node *thissop = cookparms.getNode();
1467  if (!thissop) return (myLalignments(_idx).lalign_axis);
1468  int _parmidx = _idx + 0;
1469  int64 result;
1470  OP_Utils::evalOpParmInst(result, thissop, "lalign_axis#", &_parmidx, cookparms.getCookTime(), 0);
1471  return (result);
1472  }
1473 
1474  const UT_Array<Lstraightenings> &getLstraightenings() const { return myLstraightenings; }
1475  void setLstraightenings(const UT_Array<Lstraightenings> &val) { myLstraightenings = val; }
1477  {
1478  SOP_Node *thissop = cookparms.getNode();
1479  if (!thissop) return getLstraightenings().entries();
1480  exint result;
1481  OP_Utils::evalOpParm(result, thissop, "lstraightenings", cookparms.getCookTime(), 0);
1482  return result;
1483  }
1485  {
1486  SOP_Node *thissop = cookparms.getNode();
1487  if (!thissop) return (myLstraightenings(_idx).lstraight_group);
1488  int _parmidx = _idx + 0;
1489  UT_StringHolder result;
1490  OP_Utils::evalOpParmInst(result, thissop, "lstraight_group#", &_parmidx, cookparms.getCookTime(), 0);
1491  return (result);
1492  }
1493 
1494  bool getUseOutputSeams() const { return myUseOutputSeams; }
1495  void setUseOutputSeams(bool val) { myUseOutputSeams = val; }
1496  bool opUseOutputSeams(const SOP_NodeVerb::CookParms &cookparms) const
1497  {
1498  SOP_Node *thissop = cookparms.getNode();
1499  if (!thissop) return getUseOutputSeams();
1500  bool result;
1501  OP_Utils::evalOpParm(result, thissop, "useoutputseams", cookparms.getCookTime(), 0);
1502  return result;
1503  }
1504  const UT_StringHolder & getOutputSeams() const { return myOutputSeams; }
1505  void setOutputSeams(const UT_StringHolder & val) { myOutputSeams = val; }
1507  {
1508  SOP_Node *thissop = cookparms.getNode();
1509  if (!thissop) return getOutputSeams();
1510  UT_StringHolder result;
1511  OP_Utils::evalOpParm(result, thissop, "outputseams", cookparms.getCookTime(), 0);
1512  return result;
1513  }
1514  bool getUseOutputConstrIslands() const { return myUseOutputConstrIslands; }
1515  void setUseOutputConstrIslands(bool val) { myUseOutputConstrIslands = val; }
1517  {
1518  SOP_Node *thissop = cookparms.getNode();
1519  if (!thissop) return getUseOutputConstrIslands();
1520  bool result;
1521  OP_Utils::evalOpParm(result, thissop, "useoutputconstrislands", cookparms.getCookTime(), 0);
1522  return result;
1523  }
1524  const UT_StringHolder & getOutputConstrIslands() const { return myOutputConstrIslands; }
1525  void setOutputConstrIslands(const UT_StringHolder & val) { myOutputConstrIslands = val; }
1527  {
1528  SOP_Node *thissop = cookparms.getNode();
1529  if (!thissop) return getOutputConstrIslands();
1530  UT_StringHolder result;
1531  OP_Utils::evalOpParm(result, thissop, "outputconstrislands", cookparms.getCookTime(), 0);
1532  return result;
1533  }
1534  UT_Vector2D getBboxCenter() const { return myBboxCenter; }
1535  void setBboxCenter(UT_Vector2D val) { myBboxCenter = val; }
1537  {
1538  SOP_Node *thissop = cookparms.getNode();
1539  if (!thissop) return getBboxCenter();
1540  UT_Vector2D result;
1541  OP_Utils::evalOpParm(result, thissop, "bboxcenter", cookparms.getCookTime(), 0);
1542  return result;
1543  }
1544  UT_Vector2D getBboxSize() const { return myBboxSize; }
1545  void setBboxSize(UT_Vector2D val) { myBboxSize = val; }
1547  {
1548  SOP_Node *thissop = cookparms.getNode();
1549  if (!thissop) return getBboxSize();
1550  UT_Vector2D result;
1551  OP_Utils::evalOpParm(result, thissop, "bboxsize", cookparms.getCookTime(), 0);
1552  return result;
1553  }
1554 
1555 private:
1556  UT_StringHolder myGroup;
1557  UT_StringHolder myUVAttrib;
1558  int64 myMethod;
1559  bool myKeepExistingSeams;
1560  bool myKeepExistingLayout;
1561  bool myPinBoundaries;
1562  UT_StringHolder mySeams;
1563  bool myUsePins;
1564  UT_Array<Pins> myPins;
1565  bool myUseAlignments;
1566  UT_Array<Alignments> myAlignments;
1567  bool myUseStraightenings;
1568  UT_Array<Straightenings> myStraightenings;
1569  bool myManualLayout;
1570  UT_StringHolder myLayoutSeams;
1571  UT_Array<Lpins> myLpins;
1572  UT_Array<Lalignments> myLalignments;
1573  UT_Array<Lstraightenings> myLstraightenings;
1574  bool myUseOutputSeams;
1575  UT_StringHolder myOutputSeams;
1576  bool myUseOutputConstrIslands;
1577  UT_StringHolder myOutputConstrIslands;
1578  UT_Vector2D myBboxCenter;
1579  UT_Vector2D myBboxSize;
1580 
1581 };
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, int64 v)
UT_Vector2D opLpins_lpinuv(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
bool operator==(const SOP_UVFlatten_2_0Parms &src) const
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:492
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void getParmValue(exint idx, UT_StringHolder &value) const
const UT_Array< Lstraightenings > & getLstraightenings() const
T & z(void)
Definition: UT_Vector4.h:372
static void saveData(std::ostream &os, bool v)
UT_Vector2D opBboxSize(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder createString(const UT_Array< Pins > &list) const
void setLstraightenings(const UT_Array< Lstraightenings > &val)
void getParmValue(exint idx, UT_Vector2D &value) const
bool opPins_usepin(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
UT_StringHolder opOutputSeams(const SOP_NodeVerb::CookParms &cookparms) const
exint bread(int32 *buffer, exint asize=1)
bool opUsePins(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_Matrix2D &value) const
fpreal getTime() const
Definition: OP_Context.h:34
void setParmValue(exint idx, const exint &value)
const GLdouble * v
Definition: glcorearb.h:836
static void loadData(UT_IStream &is, int64 &v)
UT_Vector2T< fpreal64 > UT_Vector2D
int64 opAlignments_align_axis(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
bool operator==(const Lpins &src) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
virtual void loadFromOpSubclass(const LoadParms &loadparms)
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
UT_StringHolder opStraightenings_straight_group(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
UT_StringHolder opAlignments_align_group(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
void setParmValue(exint idx, const UT_Vector2D &value)
static void loadData(UT_IStream &is, UT_Vector4D &v)
UT_StringHolder createString(const UT_Array< Alignments > &list) const
static void saveData(std::ostream &os, UT_StringHolder s)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setBboxSize(UT_Vector2D val)
T & x(void)
Definition: UT_Vector2.h:284
bool operator==(const Pins &src) const
UT_Vector2D opPins_pinrefuv(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
bool opKeepExistingSeams(const SOP_NodeVerb::CookParms &cookparms) const
bool opPinBoundaries(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
bool operator==(const Alignments &src) const
static void saveData(std::ostream &os, UT_Matrix2D v)
static void saveData(std::ostream &os, UT_Matrix3D v)
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
const UT_Array< Lpins > & getLpins() const
const UT_StringHolder & getGroup() const
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:581
exint opPins(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void doSetParmValue(exint idx, const T &value)
UT_Vector2D opBboxCenter(const SOP_NodeVerb::CookParms &cookparms) const
png_uint_32 i
Definition: png.h:2877
const UT_Array< Lalignments > & getLalignments() const
void setParmValue(exint idx, const UT_Vector3D &value)
UT_StringHolder opLayoutSeams(const SOP_NodeVerb::CookParms &cookparms) const
void setOutputConstrIslands(const UT_StringHolder &val)
UT_StringHolder createString(const UT_Array< Lstraightenings > &list) const
void setLpins(const UT_Array< Lpins > &val)
exint opLstraightenings(const SOP_NodeVerb::CookParms &cookparms) const
void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setParmValue(exint idx, const UT_Matrix2D &value)
bool opAlignments_align_enabled(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
exint opAlignments(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
static void saveData(std::ostream &os, UT_Matrix4D v)
void getParmValue(exint idx, fpreal &value) const
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:585
long long int64
Definition: SYS_Types.h:106
virtual exint getNumParms() const
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
void getParmValue(exint idx, exint &value) const
exint opLalignments(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opOutputConstrIslands(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setBboxCenter(UT_Vector2D val)
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
int64 exint
Definition: SYS_Types.h:115
const OP_Node * node() const
Definition: SOP_NodeVerb.h:104
const UT_Array< Alignments > & getAlignments() const
double fpreal64
Definition: SYS_Types.h:191
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:280
const UT_StringHolder & getUVAttrib() const
UT_Vector2D opPins_pinuv(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
static void saveData(std::ostream &os, UT_Vector2D v)
UT_StringHolder createString(const UT_Array< Lalignments > &list) const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
const UT_Array< Pins > & getPins() const
void setAlignments(const UT_Array< Alignments > &val)
bool opUseAlignments(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const fpreal &value)
bool opKeepExistingLayout(const SOP_NodeVerb::CookParms &cookparms) const
bool opUseStraightenings(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getOutputConstrIslands() const
GLboolean * data
Definition: glcorearb.h:130
virtual ParmType getParmType(exint fieldnum) const
int int32
Definition: SYS_Types.h:34
T & y(void)
Definition: UT_Vector4.h:370
UT_Vector2D opLpins_lprimvert(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
UT_StringHolder createString(const UT_Array< Straightenings > &list) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
bool opUseOutputConstrIslands(const SOP_NodeVerb::CookParms &cookparms) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
static void saveData(std::ostream &os, fpreal64 v)
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:111
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2539
void setPins(const UT_Array< Pins > &val)
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:446
exint opLpins(const SOP_NodeVerb::CookParms &cookparms) const
void setParmValue(exint idx, const UT_Matrix3D &value)
virtual const char * getParmName(exint fieldnum) const
const UT_StringHolder & getSeams() const
SYS_FORCE_INLINE T & y(void)
Definition: UT_Vector3.h:583
GLsizei const GLfloat * value
Definition: glcorearb.h:823
double fpreal
Definition: SYS_Types.h:269
void strncpy(const char *src, exint maxlen)
const UT_StringHolder & getLayoutSeams() const
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
void setStraightenings(const UT_Array< Straightenings > &val)
UT_Vector2D opLpins_lpinrefuv(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
UT_StringHolder createString(const UT_Array< Lpins > &list) const
void setGroup(const UT_StringHolder &val)
bool opManualLayout(const SOP_NodeVerb::CookParms &cookparms) const
Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
void setOutputSeams(const UT_StringHolder &val)
UT_StringHolder opLalignments_lalign_group(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
const UT_Array< Straightenings > & getStraightenings() const
void setUVAttrib(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setLayoutSeams(const UT_StringHolder &val)
UT_Vector2D getBboxSize() const
GLuint GLfloat * val
Definition: glcorearb.h:1607
UT_StringHolder opUVAttrib(const SOP_NodeVerb::CookParms &cookparms) const
bool opUseOutputSeams(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getOutputSeams() const
void setParmValue(exint idx, const PRM_DataItemHandle &value)
exint opStraightenings(const SOP_NodeVerb::CookParms &cookparms) const
#define SOP_API
Definition: SOP_API.h:10
UT_Vector2D opPins_primvert(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
bool operator==(const Lalignments &src) const
UT_StringHolder opSeams(const SOP_NodeVerb::CookParms &cookparms) const
const char * buffer() const
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
static void loadData(UT_IStream &is, UT_Vector3I &v)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:499
void setParmValue(exint idx, const UT_Matrix4D &value)
T & x(void)
Definition: UT_Vector4.h:368
virtual void copyFrom(const SOP_NodeParms *src)
bool opStraightenings_straight_enabled(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
T & y(void)
Definition: UT_Vector2.h:286
static void saveData(std::ostream &os, UT_Vector4D v)
void setLalignments(const UT_Array< Lalignments > &val)
GLboolean r
Definition: glcorearb.h:1221
void doGetParmValue(exint idx, T &value) const
static void saveData(std::ostream &os, UT_Vector3D v)
void getParmValue(exint idx, UT_Vector4D &value) const
void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
void getParmValue(exint idx, PRM_DataItemHandle &value) const
bool operator==(const Lstraightenings &src) const
void strcat(const char *src)
T & w(void)
Definition: UT_Vector4.h:374
void setSeams(const UT_StringHolder &val)
void getParmValue(exint idx, UT_Matrix4D &value) const
UT_StringHolder opLstraightenings_lstraight_group(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
int64 opLalignments_lalign_axis(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
const OP_Context & context() const
Definition: SOP_NodeVerb.h:109
bool operator==(const Straightenings &src) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
void getParmValue(exint idx, UT_Matrix3D &value) const
void save(std::ostream &os) const
SYS_FORCE_INLINE bool isstring() const
UT_Vector2D getBboxCenter() const
void getParmValue(exint idx, UT_Vector3D &value) const
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:794
void setParmValue(exint idx, const UT_StringHolder &value)
void setParmValue(exint idx, const UT_Vector4D &value)
GLenum src
Definition: glcorearb.h:1792