HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 <SOP/SOP_GraphProxy.h>
8 
9 #include <OP/OP_Utils.h>
10 #include <PRM/PRM_Parm.h>
11 #include <UT/UT_IStream.h>
12 #include <UT/UT_NTStreamUtil.h>
13 #include <UT/UT_Ramp.h>
14 #include <UT/UT_SharedPtr.h>
15 #include <UT/UT_StringHolder.h>
16 #include <UT/UT_StringStream.h>
17 #include <UT/UT_VectorTypes.h>
18 #include <SYS/SYS_Types.h>
19 
20 using namespace UT::Literal;
21 
22 class DEP_MicroNode;
23 namespace SOP_UVFlatten_2_0Enums
24 {
25  enum class Method
26  {
27  SCP = 0,
28  ABF
29  };
30  enum class Align_axis
31  {
32  UAXIS = 0,
33  VAXIS
34  };
35  enum class Lalign_axis
36  {
37  UAXIS = 0,
38  VAXIS
39  };
40 }
41 
42 
44 {
45 public:
46  static int version() { return 1; }
47  struct Pins
48  {
49  bool usepin;
53 
54 
55  Pins()
56  {
57  usepin = true;
58  primvert = UT_Vector2D(0,0);
59  pinuv = UT_Vector2D(0,0);
60  pinrefuv = UT_Vector2D(0,0);
61 
62  }
63 
64  bool operator==(const Pins &src) const
65  {
66  if (usepin != src.usepin) return false;
67  if (primvert != src.primvert) return false;
68  if (pinuv != src.pinuv) return false;
69  if (pinrefuv != src.pinrefuv) return false;
70 
71  return true;
72  }
73  bool operator!=(const Pins &src) const
74  {
75  return !operator==(src);
76  }
77 
78  };
79 
81  {
83 
84  buf.strcat("[ ");
85  for (int i = 0; i < list.entries(); i++)
86  {
87  if (i)
88  buf.strcat(", ");
89  buf.strcat("( ");
90  buf.append("");
91  buf.appendSprintf("%s", (list(i).usepin) ? "true" : "false");
92  buf.append(", ");
93  buf.appendSprintf("(%f, %f)", list(i).primvert.x(), list(i).primvert.y());
94  buf.append(", ");
95  buf.appendSprintf("(%f, %f)", list(i).pinuv.x(), list(i).pinuv.y());
96  buf.append(", ");
97  buf.appendSprintf("(%f, %f)", list(i).pinrefuv.x(), list(i).pinrefuv.y());
98 
99  buf.strcat(" )");
100  }
101  buf.strcat(" ]");
102 
104  return result;
105  }
106  struct Alignments
107  {
111 
112 
114  {
115  align_enabled = true;
116  align_group = ""_sh;
117  align_axis = 0;
118 
119  }
120 
121  bool operator==(const Alignments &src) const
122  {
123  if (align_enabled != src.align_enabled) return false;
124  if (align_group != src.align_group) return false;
125  if (align_axis != src.align_axis) return false;
126 
127  return true;
128  }
129  bool operator!=(const Alignments &src) const
130  {
131  return !operator==(src);
132  }
133 
134  };
135 
137  {
139 
140  buf.strcat("[ ");
141  for (int i = 0; i < list.entries(); i++)
142  {
143  if (i)
144  buf.strcat(", ");
145  buf.strcat("( ");
146  buf.append("");
147  buf.appendSprintf("%s", (list(i).align_enabled) ? "true" : "false");
148  buf.append(", ");
149  { UT_String tmp; tmp = UT_StringWrap(list(i).align_group).makeQuotedString('"'); buf.strcat(tmp); }
150  buf.append(", ");
151  buf.appendSprintf("%d", (int) list(i).align_axis);
152 
153  buf.strcat(" )");
154  }
155  buf.strcat(" ]");
156 
158  return result;
159  }
161  {
164 
165 
167  {
168  straight_enabled = true;
169  straight_group = ""_sh;
170 
171  }
172 
173  bool operator==(const Straightenings &src) const
174  {
175  if (straight_enabled != src.straight_enabled) return false;
176  if (straight_group != src.straight_group) return false;
177 
178  return true;
179  }
180  bool operator!=(const Straightenings &src) const
181  {
182  return !operator==(src);
183  }
184 
185  };
186 
188  {
190 
191  buf.strcat("[ ");
192  for (int i = 0; i < list.entries(); i++)
193  {
194  if (i)
195  buf.strcat(", ");
196  buf.strcat("( ");
197  buf.append("");
198  buf.appendSprintf("%s", (list(i).straight_enabled) ? "true" : "false");
199  buf.append(", ");
200  { UT_String tmp; tmp = UT_StringWrap(list(i).straight_group).makeQuotedString('"'); buf.strcat(tmp); }
201 
202  buf.strcat(" )");
203  }
204  buf.strcat(" ]");
205 
207  return result;
208  }
209  struct Lpins
210  {
214 
215 
217  {
218  lprimvert = UT_Vector2D(0,0);
219  lpinuv = UT_Vector2D(0,0);
220  lpinrefuv = UT_Vector2D(0,0);
221 
222  }
223 
224  bool operator==(const Lpins &src) const
225  {
226  if (lprimvert != src.lprimvert) return false;
227  if (lpinuv != src.lpinuv) return false;
228  if (lpinrefuv != src.lpinrefuv) return false;
229 
230  return true;
231  }
232  bool operator!=(const Lpins &src) const
233  {
234  return !operator==(src);
235  }
236 
237  };
238 
240  {
242 
243  buf.strcat("[ ");
244  for (int i = 0; i < list.entries(); i++)
245  {
246  if (i)
247  buf.strcat(", ");
248  buf.strcat("( ");
249  buf.append("");
250  buf.appendSprintf("(%f, %f)", list(i).lprimvert.x(), list(i).lprimvert.y());
251  buf.append(", ");
252  buf.appendSprintf("(%f, %f)", list(i).lpinuv.x(), list(i).lpinuv.y());
253  buf.append(", ");
254  buf.appendSprintf("(%f, %f)", list(i).lpinrefuv.x(), list(i).lpinrefuv.y());
255 
256  buf.strcat(" )");
257  }
258  buf.strcat(" ]");
259 
261  return result;
262  }
263  struct Lalignments
264  {
267 
268 
270  {
271  lalign_group = ""_sh;
272  lalign_axis = 0;
273 
274  }
275 
276  bool operator==(const Lalignments &src) const
277  {
278  if (lalign_group != src.lalign_group) return false;
279  if (lalign_axis != src.lalign_axis) return false;
280 
281  return true;
282  }
283  bool operator!=(const Lalignments &src) const
284  {
285  return !operator==(src);
286  }
287 
288  };
289 
291  {
293 
294  buf.strcat("[ ");
295  for (int i = 0; i < list.entries(); i++)
296  {
297  if (i)
298  buf.strcat(", ");
299  buf.strcat("( ");
300  buf.append("");
301  { UT_String tmp; tmp = UT_StringWrap(list(i).lalign_group).makeQuotedString('"'); buf.strcat(tmp); }
302  buf.append(", ");
303  buf.appendSprintf("%d", (int) list(i).lalign_axis);
304 
305  buf.strcat(" )");
306  }
307  buf.strcat(" ]");
308 
310  return result;
311  }
313  {
315 
316 
318  {
319  lstraight_group = ""_sh;
320 
321  }
322 
323  bool operator==(const Lstraightenings &src) const
324  {
325  if (lstraight_group != src.lstraight_group) return false;
326 
327  return true;
328  }
329  bool operator!=(const Lstraightenings &src) const
330  {
331  return !operator==(src);
332  }
333 
334  };
335 
337  {
339 
340  buf.strcat("[ ");
341  for (int i = 0; i < list.entries(); i++)
342  {
343  if (i)
344  buf.strcat(", ");
345  buf.strcat("( ");
346  buf.append("");
347  { UT_String tmp; tmp = UT_StringWrap(list(i).lstraight_group).makeQuotedString('"'); buf.strcat(tmp); }
348 
349  buf.strcat(" )");
350  }
351  buf.strcat(" ]");
352 
354  return result;
355  }
356 
358  {
359  myGroup = ""_sh;
360  myUVAttrib = "uv"_sh;
361  myMethod = 0;
362  myKeepExistingSeams = false;
363  myKeepExistingLayout = false;
364  myPinBoundaries = false;
365  mySeams = ""_sh;
366  myUsePins = true;
367  myUseAlignments = true;
368  myUseStraightenings = true;
369  myManualLayout = true;
370  myLayoutSeams = ""_sh;
371  myUseOutputSeams = false;
372  myOutputSeams = "outputseams"_sh;
373  myUseOutputConstrIslands = false;
374  myOutputConstrIslands = "constrainedprims"_sh;
375  myBboxCenter = UT_Vector2D(0.5,0.5);
376  myBboxSize = UT_Vector2D(1,1);
377 
378  }
379 
380  explicit SOP_UVFlatten_2_0Parms(const SOP_UVFlatten_2_0Parms &) = default;
381 
383 
385  {
386  if (myGroup != src.myGroup) return false;
387  if (myUVAttrib != src.myUVAttrib) return false;
388  if (myMethod != src.myMethod) return false;
389  if (myKeepExistingSeams != src.myKeepExistingSeams) return false;
390  if (myKeepExistingLayout != src.myKeepExistingLayout) return false;
391  if (myPinBoundaries != src.myPinBoundaries) return false;
392  if (mySeams != src.mySeams) return false;
393  if (myUsePins != src.myUsePins) return false;
394  if (myPins != src.myPins) return false;
395  if (myUseAlignments != src.myUseAlignments) return false;
396  if (myAlignments != src.myAlignments) return false;
397  if (myUseStraightenings != src.myUseStraightenings) return false;
398  if (myStraightenings != src.myStraightenings) return false;
399  if (myManualLayout != src.myManualLayout) return false;
400  if (myLayoutSeams != src.myLayoutSeams) return false;
401  if (myLpins != src.myLpins) return false;
402  if (myLalignments != src.myLalignments) return false;
403  if (myLstraightenings != src.myLstraightenings) return false;
404  if (myUseOutputSeams != src.myUseOutputSeams) return false;
405  if (myOutputSeams != src.myOutputSeams) return false;
406  if (myUseOutputConstrIslands != src.myUseOutputConstrIslands) return false;
407  if (myOutputConstrIslands != src.myOutputConstrIslands) return false;
408  if (myBboxCenter != src.myBboxCenter) return false;
409  if (myBboxSize != src.myBboxSize) return false;
410 
411  return true;
412  }
414  {
415  return !operator==(src);
416  }
420 
421 
422 
423  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
424  {
425  myGroup = ""_sh;
426  if (true)
427  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
428  myUVAttrib = "uv"_sh;
429  if (true)
430  graph->evalOpParm(myUVAttrib, nodeidx, "uvattrib", time, 0);
431  myMethod = 0;
432  if (true)
433  graph->evalOpParm(myMethod, nodeidx, "method", time, 0);
434  myKeepExistingSeams = false;
435  if (true)
436  graph->evalOpParm(myKeepExistingSeams, nodeidx, "keepexistingseams", time, 0);
437  myKeepExistingLayout = false;
438  if (true && ( (!(((getKeepExistingSeams()==0)))) ) )
439  graph->evalOpParm(myKeepExistingLayout, nodeidx, "keepexistinglayout", time, 0);
440  myPinBoundaries = false;
441  if (true && ( (!(((getKeepExistingSeams()==0))||((int64(getMethod())!=0)))) ) )
442  graph->evalOpParm(myPinBoundaries, nodeidx, "pinboundaries", time, 0);
443  mySeams = ""_sh;
444  if (true)
445  graph->evalOpParm(mySeams, nodeidx, "seamgroup", time, 0);
446  myUsePins = true;
447  if (true)
448  graph->evalOpParm(myUsePins, nodeidx, "usepins", time, 0);
449  if (true && ( (!(((getUsePins()==0)))) ) )
450  {
451  int64 length = 0;
452  graph->evalOpParm(length, nodeidx, "pins", time, 0);
453  myPins.entries(length);
454  for (exint i = 0; i < length; i++)
455  {
456  int parmidx = i+0;
457  auto && _curentry = myPins(i);
458  (void) _curentry;
459  myPins(i).usepin = true;
460  if (true && ( (!(((getUsePins()==0)))) ) )
461  graph->evalOpParmInst(myPins(i).usepin, nodeidx, "usepin#", &parmidx, time, 0);
462  myPins(i).primvert = UT_Vector2D(0,0);
463  if (true && ( (!(((getUsePins()==0)))) ) )
464  graph->evalOpParmInst(myPins(i).primvert, nodeidx, "primvert#", &parmidx, time, 0);
465  myPins(i).pinuv = UT_Vector2D(0,0);
466  if (true && ( (!(((getUsePins()==0)))) ) )
467  graph->evalOpParmInst(myPins(i).pinuv, nodeidx, "pinuv#", &parmidx, time, 0);
468  myPins(i).pinrefuv = UT_Vector2D(0,0);
469  if (true && ( (!(((getUsePins()==0)))) ) )
470  graph->evalOpParmInst(myPins(i).pinrefuv, nodeidx, "pinrefuv#", &parmidx, time, 0);
471 
472  }
473  }
474  else
475  myPins.clear();
476  myUseAlignments = true;
477  if (true)
478  graph->evalOpParm(myUseAlignments, nodeidx, "usealignments", time, 0);
479  if (true && ( (!(((getUseAlignments()==0)))) ) )
480  {
481  int64 length = 0;
482  graph->evalOpParm(length, nodeidx, "alignments", time, 0);
483  myAlignments.entries(length);
484  for (exint i = 0; i < length; i++)
485  {
486  int parmidx = i+0;
487  auto && _curentry = myAlignments(i);
488  (void) _curentry;
489  myAlignments(i).align_enabled = true;
490  if (true && ( (!(((getUseAlignments()==0)))) ) )
491  graph->evalOpParmInst(myAlignments(i).align_enabled, nodeidx, "align_enabled#", &parmidx, time, 0);
492  myAlignments(i).align_group = ""_sh;
493  if (true && ( (!(((getUseAlignments()==0)))) ) )
494  graph->evalOpParmInst(myAlignments(i).align_group, nodeidx, "align_group#", &parmidx, time, 0);
495  myAlignments(i).align_axis = 0;
496  if (true && ( (!(((getUseAlignments()==0)))) ) )
497  graph->evalOpParmInst(myAlignments(i).align_axis, nodeidx, "align_axis#", &parmidx, time, 0);
498 
499  }
500  }
501  else
502  myAlignments.clear();
503  myUseStraightenings = true;
504  if (true)
505  graph->evalOpParm(myUseStraightenings, nodeidx, "usestraightenings", time, 0);
506  if (true && ( (!(((getUseStraightenings()==0)))) ) )
507  {
508  int64 length = 0;
509  graph->evalOpParm(length, nodeidx, "straightenings", time, 0);
510  myStraightenings.entries(length);
511  for (exint i = 0; i < length; i++)
512  {
513  int parmidx = i+0;
514  auto && _curentry = myStraightenings(i);
515  (void) _curentry;
516  myStraightenings(i).straight_enabled = true;
517  if (true && ( (!(((getUseStraightenings()==0)))) ) )
518  graph->evalOpParmInst(myStraightenings(i).straight_enabled, nodeidx, "straight_enabled#", &parmidx, time, 0);
519  myStraightenings(i).straight_group = ""_sh;
520  if (true && ( (!(((getUseStraightenings()==0)))) ) )
521  graph->evalOpParmInst(myStraightenings(i).straight_group, nodeidx, "straight_group#", &parmidx, time, 0);
522 
523  }
524  }
525  else
526  myStraightenings.clear();
527  myManualLayout = true;
528  if (true)
529  graph->evalOpParm(myManualLayout, nodeidx, "manuallayout", time, 0);
530  myLayoutSeams = ""_sh;
531  if (true && ( (!(((getManualLayout()==0)))) ) )
532  graph->evalOpParm(myLayoutSeams, nodeidx, "layoutseamgroup", time, 0);
533  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) )
534  {
535  int64 length = 0;
536  graph->evalOpParm(length, nodeidx, "lpins", time, 0);
537  myLpins.entries(length);
538  for (exint i = 0; i < length; i++)
539  {
540  int parmidx = i+0;
541  auto && _curentry = myLpins(i);
542  (void) _curentry;
543  myLpins(i).lprimvert = UT_Vector2D(0,0);
544  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) && ( (!(((getManualLayout()==0)))) ) )
545  graph->evalOpParmInst(myLpins(i).lprimvert, nodeidx, "lprimvert#", &parmidx, time, 0);
546  myLpins(i).lpinuv = UT_Vector2D(0,0);
547  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) && ( (!(((getManualLayout()==0)))) ) )
548  graph->evalOpParmInst(myLpins(i).lpinuv, nodeidx, "lpinuv#", &parmidx, time, 0);
549  myLpins(i).lpinrefuv = UT_Vector2D(0,0);
550  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) && ( (!(((getManualLayout()==0)))) ) )
551  graph->evalOpParmInst(myLpins(i).lpinrefuv, nodeidx, "lpinrefuv#", &parmidx, time, 0);
552 
553  }
554  }
555  else
556  myLpins.clear();
557  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) )
558  {
559  int64 length = 0;
560  graph->evalOpParm(length, nodeidx, "lalignments", time, 0);
561  myLalignments.entries(length);
562  for (exint i = 0; i < length; i++)
563  {
564  int parmidx = i+0;
565  auto && _curentry = myLalignments(i);
566  (void) _curentry;
567  myLalignments(i).lalign_group = ""_sh;
568  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) && ( (!(((getManualLayout()==0)))) ) )
569  graph->evalOpParmInst(myLalignments(i).lalign_group, nodeidx, "lalign_group#", &parmidx, time, 0);
570  myLalignments(i).lalign_axis = 0;
571  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) && ( (!(((getManualLayout()==0)))) ) )
572  graph->evalOpParmInst(myLalignments(i).lalign_axis, nodeidx, "lalign_axis#", &parmidx, time, 0);
573 
574  }
575  }
576  else
577  myLalignments.clear();
578  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) )
579  {
580  int64 length = 0;
581  graph->evalOpParm(length, nodeidx, "lstraightenings", time, 0);
582  myLstraightenings.entries(length);
583  for (exint i = 0; i < length; i++)
584  {
585  int parmidx = i+0;
586  auto && _curentry = myLstraightenings(i);
587  (void) _curentry;
588  myLstraightenings(i).lstraight_group = ""_sh;
589  if (true && ( (!(((getManualLayout()==0))||((getManualLayout()==0)))) ) && ( (!(((getManualLayout()==0)))) ) )
590  graph->evalOpParmInst(myLstraightenings(i).lstraight_group, nodeidx, "lstraight_group#", &parmidx, time, 0);
591 
592  }
593  }
594  else
595  myLstraightenings.clear();
596  myUseOutputSeams = false;
597  if (true)
598  graph->evalOpParm(myUseOutputSeams, nodeidx, "useoutputseams", time, 0);
599  myOutputSeams = "outputseams"_sh;
600  if (true && ( (!(((getUseOutputSeams()==0)))) ) )
601  graph->evalOpParm(myOutputSeams, nodeidx, "outputseams", time, 0);
602  myUseOutputConstrIslands = false;
603  if (true)
604  graph->evalOpParm(myUseOutputConstrIslands, nodeidx, "useoutputconstrislands", time, 0);
605  myOutputConstrIslands = "constrainedprims"_sh;
606  if (true && ( (!(((getUseOutputConstrIslands()==0)))) ) )
607  graph->evalOpParm(myOutputConstrIslands, nodeidx, "outputconstrislands", time, 0);
608  myBboxCenter = UT_Vector2D(0.5,0.5);
609  if (true)
610  graph->evalOpParm(myBboxCenter, nodeidx, "bboxcenter", time, 0);
611  myBboxSize = UT_Vector2D(1,1);
612  if (true)
613  graph->evalOpParm(myBboxSize, nodeidx, "bboxsize", time, 0);
614 
615  }
616 
617 
618  void loadFromOpSubclass(const LoadParms &loadparms) override
619  {
620  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
621  }
622 
623 
624  void copyFrom(const SOP_NodeParms *src) override
625  {
626  *this = *((const SOP_UVFlatten_2_0Parms *)src);
627  }
628 
629  template <typename T>
630  void
631  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
632  {
633  if (idx.size() < 1)
634  return;
635  UT_ASSERT(idx.size() == instance.size()+1);
636  if (idx.size() != instance.size()+1)
637  return;
638  switch (idx[0])
639  {
640  case 0:
641  coerceValue(value, myGroup);
642  break;
643  case 1:
644  coerceValue(value, myUVAttrib);
645  break;
646  case 2:
647  coerceValue(value, myMethod);
648  break;
649  case 3:
650  coerceValue(value, myKeepExistingSeams);
651  break;
652  case 4:
653  coerceValue(value, myKeepExistingLayout);
654  break;
655  case 5:
656  coerceValue(value, myPinBoundaries);
657  break;
658  case 6:
659  coerceValue(value, mySeams);
660  break;
661  case 7:
662  coerceValue(value, myUsePins);
663  break;
664  case 8:
665  if (idx.size() == 1)
666  coerceValue(value, myPins.entries());
667  else if (instance[0] < myPins.entries())
668  {
669  auto && _data = myPins(instance[0]);
670  switch (idx[1])
671  {
672  case 0:
673  coerceValue(value, _data.usepin);
674  break;
675  case 1:
676  coerceValue(value, _data.primvert);
677  break;
678  case 2:
679  coerceValue(value, _data.pinuv);
680  break;
681  case 3:
682  coerceValue(value, _data.pinrefuv);
683  break;
684 
685  }
686  }
687  break;
688  case 9:
689  coerceValue(value, myUseAlignments);
690  break;
691  case 10:
692  if (idx.size() == 1)
693  coerceValue(value, myAlignments.entries());
694  else if (instance[0] < myAlignments.entries())
695  {
696  auto && _data = myAlignments(instance[0]);
697  switch (idx[1])
698  {
699  case 0:
700  coerceValue(value, _data.align_enabled);
701  break;
702  case 1:
703  coerceValue(value, _data.align_group);
704  break;
705  case 2:
706  coerceValue(value, _data.align_axis);
707  break;
708 
709  }
710  }
711  break;
712  case 11:
713  coerceValue(value, myUseStraightenings);
714  break;
715  case 12:
716  if (idx.size() == 1)
717  coerceValue(value, myStraightenings.entries());
718  else if (instance[0] < myStraightenings.entries())
719  {
720  auto && _data = myStraightenings(instance[0]);
721  switch (idx[1])
722  {
723  case 0:
724  coerceValue(value, _data.straight_enabled);
725  break;
726  case 1:
727  coerceValue(value, _data.straight_group);
728  break;
729 
730  }
731  }
732  break;
733  case 13:
734  coerceValue(value, myManualLayout);
735  break;
736  case 14:
737  coerceValue(value, myLayoutSeams);
738  break;
739  case 15:
740  if (idx.size() == 1)
741  coerceValue(value, myLpins.entries());
742  else if (instance[0] < myLpins.entries())
743  {
744  auto && _data = myLpins(instance[0]);
745  switch (idx[1])
746  {
747  case 0:
748  coerceValue(value, _data.lprimvert);
749  break;
750  case 1:
751  coerceValue(value, _data.lpinuv);
752  break;
753  case 2:
754  coerceValue(value, _data.lpinrefuv);
755  break;
756 
757  }
758  }
759  break;
760  case 16:
761  if (idx.size() == 1)
762  coerceValue(value, myLalignments.entries());
763  else if (instance[0] < myLalignments.entries())
764  {
765  auto && _data = myLalignments(instance[0]);
766  switch (idx[1])
767  {
768  case 0:
769  coerceValue(value, _data.lalign_group);
770  break;
771  case 1:
772  coerceValue(value, _data.lalign_axis);
773  break;
774 
775  }
776  }
777  break;
778  case 17:
779  if (idx.size() == 1)
780  coerceValue(value, myLstraightenings.entries());
781  else if (instance[0] < myLstraightenings.entries())
782  {
783  auto && _data = myLstraightenings(instance[0]);
784  switch (idx[1])
785  {
786  case 0:
787  coerceValue(value, _data.lstraight_group);
788  break;
789 
790  }
791  }
792  break;
793  case 18:
794  coerceValue(value, myUseOutputSeams);
795  break;
796  case 19:
797  coerceValue(value, myOutputSeams);
798  break;
799  case 20:
800  coerceValue(value, myUseOutputConstrIslands);
801  break;
802  case 21:
803  coerceValue(value, myOutputConstrIslands);
804  break;
805  case 22:
806  coerceValue(value, myBboxCenter);
807  break;
808  case 23:
809  coerceValue(value, myBboxSize);
810  break;
811 
812  }
813  }
814 
815  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
816  { doGetParmValue(idx, instance, value); }
817  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
818  { doGetParmValue(idx, instance, value); }
819  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
820  { doGetParmValue(idx, instance, value); }
821  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
822  { doGetParmValue(idx, instance, value); }
823  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
824  { doGetParmValue(idx, instance, value); }
825  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
826  { doGetParmValue(idx, instance, value); }
827  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
828  { doGetParmValue(idx, instance, value); }
829  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
830  { doGetParmValue(idx, instance, value); }
831  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
832  { doGetParmValue(idx, instance, value); }
833  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
834  { doGetParmValue(idx, instance, value); }
835  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
836  { doGetParmValue(idx, instance, value); }
837 
838  template <typename T>
839  void
840  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
841  {
842  if (idx.size() < 1)
843  return;
844  UT_ASSERT(idx.size() == instance.size()+1);
845  if (idx.size() != instance.size()+1)
846  return;
847  switch (idx[0])
848  {
849  case 0:
850  coerceValue(myGroup, value);
851  break;
852  case 1:
853  coerceValue(myUVAttrib, value);
854  break;
855  case 2:
856  coerceValue(myMethod, value);
857  break;
858  case 3:
859  coerceValue(myKeepExistingSeams, value);
860  break;
861  case 4:
862  coerceValue(myKeepExistingLayout, value);
863  break;
864  case 5:
865  coerceValue(myPinBoundaries, value);
866  break;
867  case 6:
868  coerceValue(mySeams, value);
869  break;
870  case 7:
871  coerceValue(myUsePins, value);
872  break;
873  case 8:
874  if (idx.size() == 1)
875  {
876  exint newsize;
877  coerceValue(newsize, value);
878  myPins.setSize(newsize);
879  }
880  else
881  {
882  myPins.setSizeIfNeeded(instance[0]+1);
883  auto && _data = myPins(instance[0]);
884  switch (idx[1])
885  {
886  case 0:
887  coerceValue(_data.usepin, value);
888  break;
889  case 1:
890  coerceValue(_data.primvert, value);
891  break;
892  case 2:
893  coerceValue(_data.pinuv, value);
894  break;
895  case 3:
896  coerceValue(_data.pinrefuv, value);
897  break;
898 
899  }
900  }
901  break;
902  case 9:
903  coerceValue(myUseAlignments, value);
904  break;
905  case 10:
906  if (idx.size() == 1)
907  {
908  exint newsize;
909  coerceValue(newsize, value);
910  myAlignments.setSize(newsize);
911  }
912  else
913  {
914  myAlignments.setSizeIfNeeded(instance[0]+1);
915  auto && _data = myAlignments(instance[0]);
916  switch (idx[1])
917  {
918  case 0:
919  coerceValue(_data.align_enabled, value);
920  break;
921  case 1:
922  coerceValue(_data.align_group, value);
923  break;
924  case 2:
925  coerceValue(_data.align_axis, value);
926  break;
927 
928  }
929  }
930  break;
931  case 11:
932  coerceValue(myUseStraightenings, value);
933  break;
934  case 12:
935  if (idx.size() == 1)
936  {
937  exint newsize;
938  coerceValue(newsize, value);
939  myStraightenings.setSize(newsize);
940  }
941  else
942  {
943  myStraightenings.setSizeIfNeeded(instance[0]+1);
944  auto && _data = myStraightenings(instance[0]);
945  switch (idx[1])
946  {
947  case 0:
948  coerceValue(_data.straight_enabled, value);
949  break;
950  case 1:
951  coerceValue(_data.straight_group, value);
952  break;
953 
954  }
955  }
956  break;
957  case 13:
958  coerceValue(myManualLayout, value);
959  break;
960  case 14:
961  coerceValue(myLayoutSeams, value);
962  break;
963  case 15:
964  if (idx.size() == 1)
965  {
966  exint newsize;
967  coerceValue(newsize, value);
968  myLpins.setSize(newsize);
969  }
970  else
971  {
972  myLpins.setSizeIfNeeded(instance[0]+1);
973  auto && _data = myLpins(instance[0]);
974  switch (idx[1])
975  {
976  case 0:
977  coerceValue(_data.lprimvert, value);
978  break;
979  case 1:
980  coerceValue(_data.lpinuv, value);
981  break;
982  case 2:
983  coerceValue(_data.lpinrefuv, value);
984  break;
985 
986  }
987  }
988  break;
989  case 16:
990  if (idx.size() == 1)
991  {
992  exint newsize;
993  coerceValue(newsize, value);
994  myLalignments.setSize(newsize);
995  }
996  else
997  {
998  myLalignments.setSizeIfNeeded(instance[0]+1);
999  auto && _data = myLalignments(instance[0]);
1000  switch (idx[1])
1001  {
1002  case 0:
1003  coerceValue(_data.lalign_group, value);
1004  break;
1005  case 1:
1006  coerceValue(_data.lalign_axis, value);
1007  break;
1008 
1009  }
1010  }
1011  break;
1012  case 17:
1013  if (idx.size() == 1)
1014  {
1015  exint newsize;
1016  coerceValue(newsize, value);
1017  myLstraightenings.setSize(newsize);
1018  }
1019  else
1020  {
1021  myLstraightenings.setSizeIfNeeded(instance[0]+1);
1022  auto && _data = myLstraightenings(instance[0]);
1023  switch (idx[1])
1024  {
1025  case 0:
1026  coerceValue(_data.lstraight_group, value);
1027  break;
1028 
1029  }
1030  }
1031  break;
1032  case 18:
1033  coerceValue(myUseOutputSeams, value);
1034  break;
1035  case 19:
1036  coerceValue(myOutputSeams, value);
1037  break;
1038  case 20:
1039  coerceValue(myUseOutputConstrIslands, value);
1040  break;
1041  case 21:
1042  coerceValue(myOutputConstrIslands, value);
1043  break;
1044  case 22:
1045  coerceValue(myBboxCenter, value);
1046  break;
1047  case 23:
1048  coerceValue(myBboxSize, value);
1049  break;
1050 
1051  }
1052  }
1053 
1054  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
1055  { doSetParmValue(idx, instance, value); }
1056  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
1057  { doSetParmValue(idx, instance, value); }
1058  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
1059  { doSetParmValue(idx, instance, value); }
1060  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
1061  { doSetParmValue(idx, instance, value); }
1062  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
1063  { doSetParmValue(idx, instance, value); }
1064  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
1065  { doSetParmValue(idx, instance, value); }
1066  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
1067  { doSetParmValue(idx, instance, value); }
1068  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
1069  { doSetParmValue(idx, instance, value); }
1070  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
1071  { doSetParmValue(idx, instance, value); }
1072  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
1073  { doSetParmValue(idx, instance, value); }
1074  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
1075  { doSetParmValue(idx, instance, value); }
1076 
1077  exint getNestNumParms(TempIndex idx) const override
1078  {
1079  if (idx.size() == 0)
1080  return 24;
1081  switch (idx[0])
1082  {
1083  case 8:
1084  return 4;
1085  case 10:
1086  return 3;
1087  case 12:
1088  return 2;
1089  case 15:
1090  return 3;
1091  case 16:
1092  return 2;
1093  case 17:
1094  return 1;
1095 
1096  }
1097  // Invalid
1098  return 0;
1099  }
1100 
1101  const char *getNestParmName(TempIndex fieldnum) const override
1102  {
1103  if (fieldnum.size() < 1)
1104  return 0;
1105  switch (fieldnum[0])
1106  {
1107  case 0:
1108  return "group";
1109  case 1:
1110  return "uvattrib";
1111  case 2:
1112  return "method";
1113  case 3:
1114  return "keepexistingseams";
1115  case 4:
1116  return "keepexistinglayout";
1117  case 5:
1118  return "pinboundaries";
1119  case 6:
1120  return "seamgroup";
1121  case 7:
1122  return "usepins";
1123  case 8:
1124  if (fieldnum.size() == 1)
1125  return "pins";
1126  switch (fieldnum[1])
1127  {
1128  case 0:
1129  return "usepin#";
1130  case 1:
1131  return "primvert#";
1132  case 2:
1133  return "pinuv#";
1134  case 3:
1135  return "pinrefuv#";
1136 
1137  }
1138  return 0;
1139  case 9:
1140  return "usealignments";
1141  case 10:
1142  if (fieldnum.size() == 1)
1143  return "alignments";
1144  switch (fieldnum[1])
1145  {
1146  case 0:
1147  return "align_enabled#";
1148  case 1:
1149  return "align_group#";
1150  case 2:
1151  return "align_axis#";
1152 
1153  }
1154  return 0;
1155  case 11:
1156  return "usestraightenings";
1157  case 12:
1158  if (fieldnum.size() == 1)
1159  return "straightenings";
1160  switch (fieldnum[1])
1161  {
1162  case 0:
1163  return "straight_enabled#";
1164  case 1:
1165  return "straight_group#";
1166 
1167  }
1168  return 0;
1169  case 13:
1170  return "manuallayout";
1171  case 14:
1172  return "layoutseamgroup";
1173  case 15:
1174  if (fieldnum.size() == 1)
1175  return "lpins";
1176  switch (fieldnum[1])
1177  {
1178  case 0:
1179  return "lprimvert#";
1180  case 1:
1181  return "lpinuv#";
1182  case 2:
1183  return "lpinrefuv#";
1184 
1185  }
1186  return 0;
1187  case 16:
1188  if (fieldnum.size() == 1)
1189  return "lalignments";
1190  switch (fieldnum[1])
1191  {
1192  case 0:
1193  return "lalign_group#";
1194  case 1:
1195  return "lalign_axis#";
1196 
1197  }
1198  return 0;
1199  case 17:
1200  if (fieldnum.size() == 1)
1201  return "lstraightenings";
1202  switch (fieldnum[1])
1203  {
1204  case 0:
1205  return "lstraight_group#";
1206 
1207  }
1208  return 0;
1209  case 18:
1210  return "useoutputseams";
1211  case 19:
1212  return "outputseams";
1213  case 20:
1214  return "useoutputconstrislands";
1215  case 21:
1216  return "outputconstrislands";
1217  case 22:
1218  return "bboxcenter";
1219  case 23:
1220  return "bboxsize";
1221 
1222  }
1223  return 0;
1224  }
1225 
1226  ParmType getNestParmType(TempIndex fieldnum) const override
1227  {
1228  if (fieldnum.size() < 1)
1229  return PARM_UNSUPPORTED;
1230  switch (fieldnum[0])
1231  {
1232  case 0:
1233  return PARM_STRING;
1234  case 1:
1235  return PARM_STRING;
1236  case 2:
1237  return PARM_INTEGER;
1238  case 3:
1239  return PARM_INTEGER;
1240  case 4:
1241  return PARM_INTEGER;
1242  case 5:
1243  return PARM_INTEGER;
1244  case 6:
1245  return PARM_STRING;
1246  case 7:
1247  return PARM_INTEGER;
1248  case 8:
1249  if (fieldnum.size() == 1)
1250  return PARM_MULTIPARM;
1251  switch (fieldnum[1])
1252  {
1253  case 0:
1254  return PARM_INTEGER;
1255  case 1:
1256  return PARM_VECTOR2;
1257  case 2:
1258  return PARM_VECTOR2;
1259  case 3:
1260  return PARM_VECTOR2;
1261 
1262  }
1263  return PARM_UNSUPPORTED;
1264  case 9:
1265  return PARM_INTEGER;
1266  case 10:
1267  if (fieldnum.size() == 1)
1268  return PARM_MULTIPARM;
1269  switch (fieldnum[1])
1270  {
1271  case 0:
1272  return PARM_INTEGER;
1273  case 1:
1274  return PARM_STRING;
1275  case 2:
1276  return PARM_INTEGER;
1277 
1278  }
1279  return PARM_UNSUPPORTED;
1280  case 11:
1281  return PARM_INTEGER;
1282  case 12:
1283  if (fieldnum.size() == 1)
1284  return PARM_MULTIPARM;
1285  switch (fieldnum[1])
1286  {
1287  case 0:
1288  return PARM_INTEGER;
1289  case 1:
1290  return PARM_STRING;
1291 
1292  }
1293  return PARM_UNSUPPORTED;
1294  case 13:
1295  return PARM_INTEGER;
1296  case 14:
1297  return PARM_STRING;
1298  case 15:
1299  if (fieldnum.size() == 1)
1300  return PARM_MULTIPARM;
1301  switch (fieldnum[1])
1302  {
1303  case 0:
1304  return PARM_VECTOR2;
1305  case 1:
1306  return PARM_VECTOR2;
1307  case 2:
1308  return PARM_VECTOR2;
1309 
1310  }
1311  return PARM_UNSUPPORTED;
1312  case 16:
1313  if (fieldnum.size() == 1)
1314  return PARM_MULTIPARM;
1315  switch (fieldnum[1])
1316  {
1317  case 0:
1318  return PARM_STRING;
1319  case 1:
1320  return PARM_INTEGER;
1321 
1322  }
1323  return PARM_UNSUPPORTED;
1324  case 17:
1325  if (fieldnum.size() == 1)
1326  return PARM_MULTIPARM;
1327  switch (fieldnum[1])
1328  {
1329  case 0:
1330  return PARM_STRING;
1331 
1332  }
1333  return PARM_UNSUPPORTED;
1334  case 18:
1335  return PARM_INTEGER;
1336  case 19:
1337  return PARM_STRING;
1338  case 20:
1339  return PARM_INTEGER;
1340  case 21:
1341  return PARM_STRING;
1342  case 22:
1343  return PARM_VECTOR2;
1344  case 23:
1345  return PARM_VECTOR2;
1346 
1347  }
1348  return PARM_UNSUPPORTED;
1349  }
1350 
1351  // Boiler plate to load individual types.
1352  static void loadData(UT_IStream &is, int64 &v)
1353  { is.bread(&v, 1); }
1354  static void loadData(UT_IStream &is, bool &v)
1355  { int64 iv; is.bread(&iv, 1); v = iv; }
1356  static void loadData(UT_IStream &is, fpreal64 &v)
1357  { is.bread<fpreal64>(&v, 1); }
1358  static void loadData(UT_IStream &is, UT_Vector2D &v)
1359  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
1360  static void loadData(UT_IStream &is, UT_Vector3D &v)
1361  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
1362  is.bread<fpreal64>(&v.z(), 1); }
1363  static void loadData(UT_IStream &is, UT_Vector4D &v)
1364  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
1365  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
1366  static void loadData(UT_IStream &is, UT_Matrix2D &v)
1367  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
1368  static void loadData(UT_IStream &is, UT_Matrix3D &v)
1369  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
1370  static void loadData(UT_IStream &is, UT_Matrix4D &v)
1371  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
1372  static void loadData(UT_IStream &is, UT_Vector2I &v)
1373  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
1374  static void loadData(UT_IStream &is, UT_Vector3I &v)
1375  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
1376  is.bread<int64>(&v.z(), 1); }
1377  static void loadData(UT_IStream &is, UT_Vector4I &v)
1378  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
1379  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
1381  { is.bread(v); }
1383  { UT_StringHolder rampdata;
1384  loadData(is, rampdata);
1385  if (rampdata.isstring())
1386  {
1387  v.reset(new UT_Ramp());
1388  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
1389  v->load(istr);
1390  }
1391  else v.reset();
1392  }
1395  loadData(is, data);
1396  if (data.isstring())
1397  {
1398  // Find the data type.
1399  const char *colon = UT_StringWrap(data).findChar(':');
1400  if (colon)
1401  {
1402  int typelen = colon - data.buffer();
1404  type.strncpy(data.buffer(), typelen);
1405  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
1406 
1407  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
1408  }
1409  }
1410  else v.reset();
1411  }
1412 
1413  static void saveData(std::ostream &os, int64 v)
1414  { UTwrite(os, &v); }
1415  static void saveData(std::ostream &os, bool v)
1416  { int64 iv = v; UTwrite(os, &iv); }
1417  static void saveData(std::ostream &os, fpreal64 v)
1418  { UTwrite<fpreal64>(os, &v); }
1419  static void saveData(std::ostream &os, UT_Vector2D v)
1420  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
1421  static void saveData(std::ostream &os, UT_Vector3D v)
1422  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
1423  UTwrite<fpreal64>(os, &v.z()); }
1424  static void saveData(std::ostream &os, UT_Vector4D v)
1425  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
1426  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
1427  static void saveData(std::ostream &os, UT_Matrix2D v)
1429  static void saveData(std::ostream &os, UT_Matrix3D v)
1431  static void saveData(std::ostream &os, UT_Matrix4D v)
1433  static void saveData(std::ostream &os, UT_StringHolder s)
1434  { UT_StringWrap(s).saveBinary(os); }
1435  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
1437  UT_OStringStream ostr;
1438  if (s) s->save(ostr);
1439  result = ostr.str();
1440  saveData(os, result);
1441  }
1442  static void saveData(std::ostream &os, PRM_DataItemHandle s)
1444  UT_OStringStream ostr;
1445  if (s)
1446  {
1447  ostr << s->getDataTypeToken();
1448  ostr << ":";
1449  s->saveBinary(ostr);
1450  }
1451  result = ostr.str();
1452  saveData(os, result);
1453  }
1454 
1455 
1456  void save(std::ostream &os) const
1457  {
1458  int32 v = version();
1459  UTwrite(os, &v);
1460  saveData(os, myGroup);
1461  saveData(os, myUVAttrib);
1462  saveData(os, myMethod);
1463  saveData(os, myKeepExistingSeams);
1464  saveData(os, myKeepExistingLayout);
1465  saveData(os, myPinBoundaries);
1466  saveData(os, mySeams);
1467  saveData(os, myUsePins);
1468  {
1469  int64 length = myPins.entries();
1470  UTwrite(os, &length);
1471  for (exint i = 0; i < length; i++)
1472  {
1473  saveData(os, myPins(i).usepin);
1474  saveData(os, myPins(i).primvert);
1475  saveData(os, myPins(i).pinuv);
1476  saveData(os, myPins(i).pinrefuv);
1477 
1478  }
1479  }
1480  saveData(os, myUseAlignments);
1481  {
1482  int64 length = myAlignments.entries();
1483  UTwrite(os, &length);
1484  for (exint i = 0; i < length; i++)
1485  {
1486  saveData(os, myAlignments(i).align_enabled);
1487  saveData(os, myAlignments(i).align_group);
1488  saveData(os, myAlignments(i).align_axis);
1489 
1490  }
1491  }
1492  saveData(os, myUseStraightenings);
1493  {
1494  int64 length = myStraightenings.entries();
1495  UTwrite(os, &length);
1496  for (exint i = 0; i < length; i++)
1497  {
1498  saveData(os, myStraightenings(i).straight_enabled);
1499  saveData(os, myStraightenings(i).straight_group);
1500 
1501  }
1502  }
1503  saveData(os, myManualLayout);
1504  saveData(os, myLayoutSeams);
1505  {
1506  int64 length = myLpins.entries();
1507  UTwrite(os, &length);
1508  for (exint i = 0; i < length; i++)
1509  {
1510  saveData(os, myLpins(i).lprimvert);
1511  saveData(os, myLpins(i).lpinuv);
1512  saveData(os, myLpins(i).lpinrefuv);
1513 
1514  }
1515  }
1516  {
1517  int64 length = myLalignments.entries();
1518  UTwrite(os, &length);
1519  for (exint i = 0; i < length; i++)
1520  {
1521  saveData(os, myLalignments(i).lalign_group);
1522  saveData(os, myLalignments(i).lalign_axis);
1523 
1524  }
1525  }
1526  {
1527  int64 length = myLstraightenings.entries();
1528  UTwrite(os, &length);
1529  for (exint i = 0; i < length; i++)
1530  {
1531  saveData(os, myLstraightenings(i).lstraight_group);
1532 
1533  }
1534  }
1535  saveData(os, myUseOutputSeams);
1536  saveData(os, myOutputSeams);
1537  saveData(os, myUseOutputConstrIslands);
1538  saveData(os, myOutputConstrIslands);
1539  saveData(os, myBboxCenter);
1540  saveData(os, myBboxSize);
1541 
1542  }
1543 
1544  bool load(UT_IStream &is)
1545  {
1546  int32 v;
1547  is.bread(&v, 1);
1548  if (version() != v)
1549  {
1550  // Fail incompatible versions
1551  return false;
1552  }
1553  loadData(is, myGroup);
1554  loadData(is, myUVAttrib);
1555  loadData(is, myMethod);
1556  loadData(is, myKeepExistingSeams);
1557  loadData(is, myKeepExistingLayout);
1558  loadData(is, myPinBoundaries);
1559  loadData(is, mySeams);
1560  loadData(is, myUsePins);
1561  {
1562  int64 length;
1563  is.read(&length, 1);
1564  myPins.entries(length);
1565  for (exint i = 0; i < length; i++)
1566  {
1567  loadData(is, myPins(i).usepin);
1568  loadData(is, myPins(i).primvert);
1569  loadData(is, myPins(i).pinuv);
1570  loadData(is, myPins(i).pinrefuv);
1571 
1572  }
1573  }
1574  loadData(is, myUseAlignments);
1575  {
1576  int64 length;
1577  is.read(&length, 1);
1578  myAlignments.entries(length);
1579  for (exint i = 0; i < length; i++)
1580  {
1581  loadData(is, myAlignments(i).align_enabled);
1582  loadData(is, myAlignments(i).align_group);
1583  loadData(is, myAlignments(i).align_axis);
1584 
1585  }
1586  }
1587  loadData(is, myUseStraightenings);
1588  {
1589  int64 length;
1590  is.read(&length, 1);
1591  myStraightenings.entries(length);
1592  for (exint i = 0; i < length; i++)
1593  {
1594  loadData(is, myStraightenings(i).straight_enabled);
1595  loadData(is, myStraightenings(i).straight_group);
1596 
1597  }
1598  }
1599  loadData(is, myManualLayout);
1600  loadData(is, myLayoutSeams);
1601  {
1602  int64 length;
1603  is.read(&length, 1);
1604  myLpins.entries(length);
1605  for (exint i = 0; i < length; i++)
1606  {
1607  loadData(is, myLpins(i).lprimvert);
1608  loadData(is, myLpins(i).lpinuv);
1609  loadData(is, myLpins(i).lpinrefuv);
1610 
1611  }
1612  }
1613  {
1614  int64 length;
1615  is.read(&length, 1);
1616  myLalignments.entries(length);
1617  for (exint i = 0; i < length; i++)
1618  {
1619  loadData(is, myLalignments(i).lalign_group);
1620  loadData(is, myLalignments(i).lalign_axis);
1621 
1622  }
1623  }
1624  {
1625  int64 length;
1626  is.read(&length, 1);
1627  myLstraightenings.entries(length);
1628  for (exint i = 0; i < length; i++)
1629  {
1630  loadData(is, myLstraightenings(i).lstraight_group);
1631 
1632  }
1633  }
1634  loadData(is, myUseOutputSeams);
1635  loadData(is, myOutputSeams);
1636  loadData(is, myUseOutputConstrIslands);
1637  loadData(is, myOutputConstrIslands);
1638  loadData(is, myBboxCenter);
1639  loadData(is, myBboxSize);
1640 
1641  return true;
1642  }
1643 
1644  const UT_StringHolder & getGroup() const { return myGroup; }
1645  void setGroup(const UT_StringHolder & val) { myGroup = val; }
1647  {
1648  SOP_Node *thissop = cookparms.getNode();
1649  if (!thissop) return getGroup();
1651  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
1652  return result;
1653  }
1654  const UT_StringHolder & getUVAttrib() const { return myUVAttrib; }
1655  void setUVAttrib(const UT_StringHolder & val) { myUVAttrib = val; }
1657  {
1658  SOP_Node *thissop = cookparms.getNode();
1659  if (!thissop) return getUVAttrib();
1661  OP_Utils::evalOpParm(result, thissop, "uvattrib", cookparms.getCookTime(), 0);
1662  return result;
1663  }
1664  Method getMethod() const { return Method(myMethod); }
1665  void setMethod(Method val) { myMethod = int64(val); }
1666  Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
1667  {
1668  SOP_Node *thissop = cookparms.getNode();
1669  if (!thissop) return getMethod();
1670  int64 result;
1671  OP_Utils::evalOpParm(result, thissop, "method", cookparms.getCookTime(), 0);
1672  return Method(result);
1673  }
1674  bool getKeepExistingSeams() const { return myKeepExistingSeams; }
1675  void setKeepExistingSeams(bool val) { myKeepExistingSeams = val; }
1676  bool opKeepExistingSeams(const SOP_NodeVerb::CookParms &cookparms) const
1677  {
1678  SOP_Node *thissop = cookparms.getNode();
1679  if (!thissop) return getKeepExistingSeams();
1680  bool result;
1681  OP_Utils::evalOpParm(result, thissop, "keepexistingseams", cookparms.getCookTime(), 0);
1682  return result;
1683  }
1684  bool getKeepExistingLayout() const { return myKeepExistingLayout; }
1685  void setKeepExistingLayout(bool val) { myKeepExistingLayout = val; }
1686  bool opKeepExistingLayout(const SOP_NodeVerb::CookParms &cookparms) const
1687  {
1688  SOP_Node *thissop = cookparms.getNode();
1689  if (!thissop) return getKeepExistingLayout();
1690  bool result;
1691  OP_Utils::evalOpParm(result, thissop, "keepexistinglayout", cookparms.getCookTime(), 0);
1692  return result;
1693  }
1694  bool getPinBoundaries() const { return myPinBoundaries; }
1695  void setPinBoundaries(bool val) { myPinBoundaries = val; }
1696  bool opPinBoundaries(const SOP_NodeVerb::CookParms &cookparms) const
1697  {
1698  SOP_Node *thissop = cookparms.getNode();
1699  if (!thissop) return getPinBoundaries();
1700  bool result;
1701  OP_Utils::evalOpParm(result, thissop, "pinboundaries", cookparms.getCookTime(), 0);
1702  return result;
1703  }
1704  const UT_StringHolder & getSeams() const { return mySeams; }
1705  void setSeams(const UT_StringHolder & val) { mySeams = val; }
1707  {
1708  SOP_Node *thissop = cookparms.getNode();
1709  if (!thissop) return getSeams();
1711  OP_Utils::evalOpParm(result, thissop, "seamgroup", cookparms.getCookTime(), 0);
1712  return result;
1713  }
1714  bool getUsePins() const { return myUsePins; }
1715  void setUsePins(bool val) { myUsePins = val; }
1716  bool opUsePins(const SOP_NodeVerb::CookParms &cookparms) const
1717  {
1718  SOP_Node *thissop = cookparms.getNode();
1719  if (!thissop) return getUsePins();
1720  bool result;
1721  OP_Utils::evalOpParm(result, thissop, "usepins", cookparms.getCookTime(), 0);
1722  return result;
1723  }
1724  const UT_Array<Pins> &getPins() const { return myPins; }
1725  void setPins(const UT_Array<Pins> &val) { myPins = val; }
1726  exint opPins(const SOP_NodeVerb::CookParms &cookparms) const
1727  {
1728  SOP_Node *thissop = cookparms.getNode();
1729  if (!thissop) return getPins().entries();
1730  exint result;
1731  OP_Utils::evalOpParm(result, thissop, "pins", cookparms.getCookTime(), 0);
1732  return result;
1733  }
1734  bool opPins_usepin(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
1735  {
1736  SOP_Node *thissop = cookparms.getNode();
1737  if (!thissop) return (myPins(_idx).usepin);
1738  int _parmidx = _idx + 0;
1739  bool result;
1740  OP_Utils::evalOpParmInst(result, thissop, "usepin#", &_parmidx, cookparms.getCookTime(), 0);
1741  return (result);
1742  }
1744  {
1745  SOP_Node *thissop = cookparms.getNode();
1746  if (!thissop) return (myPins(_idx).primvert);
1747  int _parmidx = _idx + 0;
1749  OP_Utils::evalOpParmInst(result, thissop, "primvert#", &_parmidx, cookparms.getCookTime(), 0);
1750  return (result);
1751  }
1753  {
1754  SOP_Node *thissop = cookparms.getNode();
1755  if (!thissop) return (myPins(_idx).pinuv);
1756  int _parmidx = _idx + 0;
1758  OP_Utils::evalOpParmInst(result, thissop, "pinuv#", &_parmidx, cookparms.getCookTime(), 0);
1759  return (result);
1760  }
1762  {
1763  SOP_Node *thissop = cookparms.getNode();
1764  if (!thissop) return (myPins(_idx).pinrefuv);
1765  int _parmidx = _idx + 0;
1767  OP_Utils::evalOpParmInst(result, thissop, "pinrefuv#", &_parmidx, cookparms.getCookTime(), 0);
1768  return (result);
1769  }
1770 
1771  bool getUseAlignments() const { return myUseAlignments; }
1772  void setUseAlignments(bool val) { myUseAlignments = val; }
1773  bool opUseAlignments(const SOP_NodeVerb::CookParms &cookparms) const
1774  {
1775  SOP_Node *thissop = cookparms.getNode();
1776  if (!thissop) return getUseAlignments();
1777  bool result;
1778  OP_Utils::evalOpParm(result, thissop, "usealignments", cookparms.getCookTime(), 0);
1779  return result;
1780  }
1781  const UT_Array<Alignments> &getAlignments() const { return myAlignments; }
1782  void setAlignments(const UT_Array<Alignments> &val) { myAlignments = val; }
1784  {
1785  SOP_Node *thissop = cookparms.getNode();
1786  if (!thissop) return getAlignments().entries();
1787  exint result;
1788  OP_Utils::evalOpParm(result, thissop, "alignments", cookparms.getCookTime(), 0);
1789  return result;
1790  }
1791  bool opAlignments_align_enabled(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
1792  {
1793  SOP_Node *thissop = cookparms.getNode();
1794  if (!thissop) return (myAlignments(_idx).align_enabled);
1795  int _parmidx = _idx + 0;
1796  bool result;
1797  OP_Utils::evalOpParmInst(result, thissop, "align_enabled#", &_parmidx, cookparms.getCookTime(), 0);
1798  return (result);
1799  }
1801  {
1802  SOP_Node *thissop = cookparms.getNode();
1803  if (!thissop) return (myAlignments(_idx).align_group);
1804  int _parmidx = _idx + 0;
1806  OP_Utils::evalOpParmInst(result, thissop, "align_group#", &_parmidx, cookparms.getCookTime(), 0);
1807  return (result);
1808  }
1810  {
1811  SOP_Node *thissop = cookparms.getNode();
1812  if (!thissop) return (myAlignments(_idx).align_axis);
1813  int _parmidx = _idx + 0;
1814  int64 result;
1815  OP_Utils::evalOpParmInst(result, thissop, "align_axis#", &_parmidx, cookparms.getCookTime(), 0);
1816  return (result);
1817  }
1818 
1819  bool getUseStraightenings() const { return myUseStraightenings; }
1820  void setUseStraightenings(bool val) { myUseStraightenings = val; }
1821  bool opUseStraightenings(const SOP_NodeVerb::CookParms &cookparms) const
1822  {
1823  SOP_Node *thissop = cookparms.getNode();
1824  if (!thissop) return getUseStraightenings();
1825  bool result;
1826  OP_Utils::evalOpParm(result, thissop, "usestraightenings", cookparms.getCookTime(), 0);
1827  return result;
1828  }
1829  const UT_Array<Straightenings> &getStraightenings() const { return myStraightenings; }
1830  void setStraightenings(const UT_Array<Straightenings> &val) { myStraightenings = val; }
1832  {
1833  SOP_Node *thissop = cookparms.getNode();
1834  if (!thissop) return getStraightenings().entries();
1835  exint result;
1836  OP_Utils::evalOpParm(result, thissop, "straightenings", cookparms.getCookTime(), 0);
1837  return result;
1838  }
1840  {
1841  SOP_Node *thissop = cookparms.getNode();
1842  if (!thissop) return (myStraightenings(_idx).straight_enabled);
1843  int _parmidx = _idx + 0;
1844  bool result;
1845  OP_Utils::evalOpParmInst(result, thissop, "straight_enabled#", &_parmidx, cookparms.getCookTime(), 0);
1846  return (result);
1847  }
1849  {
1850  SOP_Node *thissop = cookparms.getNode();
1851  if (!thissop) return (myStraightenings(_idx).straight_group);
1852  int _parmidx = _idx + 0;
1854  OP_Utils::evalOpParmInst(result, thissop, "straight_group#", &_parmidx, cookparms.getCookTime(), 0);
1855  return (result);
1856  }
1857 
1858  bool getManualLayout() const { return myManualLayout; }
1859  void setManualLayout(bool val) { myManualLayout = val; }
1860  bool opManualLayout(const SOP_NodeVerb::CookParms &cookparms) const
1861  {
1862  SOP_Node *thissop = cookparms.getNode();
1863  if (!thissop) return getManualLayout();
1864  bool result;
1865  OP_Utils::evalOpParm(result, thissop, "manuallayout", cookparms.getCookTime(), 0);
1866  return result;
1867  }
1868  const UT_StringHolder & getLayoutSeams() const { return myLayoutSeams; }
1869  void setLayoutSeams(const UT_StringHolder & val) { myLayoutSeams = val; }
1871  {
1872  SOP_Node *thissop = cookparms.getNode();
1873  if (!thissop) return getLayoutSeams();
1875  OP_Utils::evalOpParm(result, thissop, "layoutseamgroup", cookparms.getCookTime(), 0);
1876  return result;
1877  }
1878  const UT_Array<Lpins> &getLpins() const { return myLpins; }
1879  void setLpins(const UT_Array<Lpins> &val) { myLpins = val; }
1880  exint opLpins(const SOP_NodeVerb::CookParms &cookparms) const
1881  {
1882  SOP_Node *thissop = cookparms.getNode();
1883  if (!thissop) return getLpins().entries();
1884  exint result;
1885  OP_Utils::evalOpParm(result, thissop, "lpins", cookparms.getCookTime(), 0);
1886  return result;
1887  }
1889  {
1890  SOP_Node *thissop = cookparms.getNode();
1891  if (!thissop) return (myLpins(_idx).lprimvert);
1892  int _parmidx = _idx + 0;
1894  OP_Utils::evalOpParmInst(result, thissop, "lprimvert#", &_parmidx, cookparms.getCookTime(), 0);
1895  return (result);
1896  }
1898  {
1899  SOP_Node *thissop = cookparms.getNode();
1900  if (!thissop) return (myLpins(_idx).lpinuv);
1901  int _parmidx = _idx + 0;
1903  OP_Utils::evalOpParmInst(result, thissop, "lpinuv#", &_parmidx, cookparms.getCookTime(), 0);
1904  return (result);
1905  }
1907  {
1908  SOP_Node *thissop = cookparms.getNode();
1909  if (!thissop) return (myLpins(_idx).lpinrefuv);
1910  int _parmidx = _idx + 0;
1912  OP_Utils::evalOpParmInst(result, thissop, "lpinrefuv#", &_parmidx, cookparms.getCookTime(), 0);
1913  return (result);
1914  }
1915 
1916  const UT_Array<Lalignments> &getLalignments() const { return myLalignments; }
1917  void setLalignments(const UT_Array<Lalignments> &val) { myLalignments = val; }
1919  {
1920  SOP_Node *thissop = cookparms.getNode();
1921  if (!thissop) return getLalignments().entries();
1922  exint result;
1923  OP_Utils::evalOpParm(result, thissop, "lalignments", cookparms.getCookTime(), 0);
1924  return result;
1925  }
1927  {
1928  SOP_Node *thissop = cookparms.getNode();
1929  if (!thissop) return (myLalignments(_idx).lalign_group);
1930  int _parmidx = _idx + 0;
1932  OP_Utils::evalOpParmInst(result, thissop, "lalign_group#", &_parmidx, cookparms.getCookTime(), 0);
1933  return (result);
1934  }
1936  {
1937  SOP_Node *thissop = cookparms.getNode();
1938  if (!thissop) return (myLalignments(_idx).lalign_axis);
1939  int _parmidx = _idx + 0;
1940  int64 result;
1941  OP_Utils::evalOpParmInst(result, thissop, "lalign_axis#", &_parmidx, cookparms.getCookTime(), 0);
1942  return (result);
1943  }
1944 
1945  const UT_Array<Lstraightenings> &getLstraightenings() const { return myLstraightenings; }
1946  void setLstraightenings(const UT_Array<Lstraightenings> &val) { myLstraightenings = val; }
1948  {
1949  SOP_Node *thissop = cookparms.getNode();
1950  if (!thissop) return getLstraightenings().entries();
1951  exint result;
1952  OP_Utils::evalOpParm(result, thissop, "lstraightenings", cookparms.getCookTime(), 0);
1953  return result;
1954  }
1956  {
1957  SOP_Node *thissop = cookparms.getNode();
1958  if (!thissop) return (myLstraightenings(_idx).lstraight_group);
1959  int _parmidx = _idx + 0;
1961  OP_Utils::evalOpParmInst(result, thissop, "lstraight_group#", &_parmidx, cookparms.getCookTime(), 0);
1962  return (result);
1963  }
1964 
1965  bool getUseOutputSeams() const { return myUseOutputSeams; }
1966  void setUseOutputSeams(bool val) { myUseOutputSeams = val; }
1967  bool opUseOutputSeams(const SOP_NodeVerb::CookParms &cookparms) const
1968  {
1969  SOP_Node *thissop = cookparms.getNode();
1970  if (!thissop) return getUseOutputSeams();
1971  bool result;
1972  OP_Utils::evalOpParm(result, thissop, "useoutputseams", cookparms.getCookTime(), 0);
1973  return result;
1974  }
1975  const UT_StringHolder & getOutputSeams() const { return myOutputSeams; }
1976  void setOutputSeams(const UT_StringHolder & val) { myOutputSeams = val; }
1978  {
1979  SOP_Node *thissop = cookparms.getNode();
1980  if (!thissop) return getOutputSeams();
1982  OP_Utils::evalOpParm(result, thissop, "outputseams", cookparms.getCookTime(), 0);
1983  return result;
1984  }
1985  bool getUseOutputConstrIslands() const { return myUseOutputConstrIslands; }
1986  void setUseOutputConstrIslands(bool val) { myUseOutputConstrIslands = val; }
1988  {
1989  SOP_Node *thissop = cookparms.getNode();
1990  if (!thissop) return getUseOutputConstrIslands();
1991  bool result;
1992  OP_Utils::evalOpParm(result, thissop, "useoutputconstrislands", cookparms.getCookTime(), 0);
1993  return result;
1994  }
1995  const UT_StringHolder & getOutputConstrIslands() const { return myOutputConstrIslands; }
1996  void setOutputConstrIslands(const UT_StringHolder & val) { myOutputConstrIslands = val; }
1998  {
1999  SOP_Node *thissop = cookparms.getNode();
2000  if (!thissop) return getOutputConstrIslands();
2002  OP_Utils::evalOpParm(result, thissop, "outputconstrislands", cookparms.getCookTime(), 0);
2003  return result;
2004  }
2005  UT_Vector2D getBboxCenter() const { return myBboxCenter; }
2006  void setBboxCenter(UT_Vector2D val) { myBboxCenter = val; }
2008  {
2009  SOP_Node *thissop = cookparms.getNode();
2010  if (!thissop) return getBboxCenter();
2012  OP_Utils::evalOpParm(result, thissop, "bboxcenter", cookparms.getCookTime(), 0);
2013  return result;
2014  }
2015  UT_Vector2D getBboxSize() const { return myBboxSize; }
2016  void setBboxSize(UT_Vector2D val) { myBboxSize = val; }
2018  {
2019  SOP_Node *thissop = cookparms.getNode();
2020  if (!thissop) return getBboxSize();
2022  OP_Utils::evalOpParm(result, thissop, "bboxsize", cookparms.getCookTime(), 0);
2023  return result;
2024  }
2025 
2026 private:
2027  UT_StringHolder myGroup;
2028  UT_StringHolder myUVAttrib;
2029  int64 myMethod;
2030  bool myKeepExistingSeams;
2031  bool myKeepExistingLayout;
2032  bool myPinBoundaries;
2033  UT_StringHolder mySeams;
2034  bool myUsePins;
2035  UT_Array<Pins> myPins;
2036  bool myUseAlignments;
2037  UT_Array<Alignments> myAlignments;
2038  bool myUseStraightenings;
2039  UT_Array<Straightenings> myStraightenings;
2040  bool myManualLayout;
2041  UT_StringHolder myLayoutSeams;
2042  UT_Array<Lpins> myLpins;
2043  UT_Array<Lalignments> myLalignments;
2044  UT_Array<Lstraightenings> myLstraightenings;
2045  bool myUseOutputSeams;
2046  UT_StringHolder myOutputSeams;
2047  bool myUseOutputConstrIslands;
2048  UT_StringHolder myOutputConstrIslands;
2049  UT_Vector2D myBboxCenter;
2050  UT_Vector2D myBboxSize;
2051 
2052 };
GLdouble s
Definition: glew.h:1390
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
exint nodeIdx() const
Definition: SOP_NodeVerb.h:114
GLenum src
Definition: glew.h:2410
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:640
exint getNestNumParms(TempIndex idx) const override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
const UT_Array< Lstraightenings > & getLstraightenings() const
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
virtual void evalOpParmInst(int64 &v, NodeIdx node, const char *parmname, int *inst, fpreal time, DEP_MicroNode *depnode) const =0
void setLstraightenings(const UT_Array< Lstraightenings > &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void doGetParmValue(TempIndex idx, TempIndex instance, T &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)
GT_API const UT_StringHolder time
bool opUsePins(const SOP_NodeVerb::CookParms &cookparms) const
fpreal getTime() const
Definition: OP_Context.h:60
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
GLuint const GLfloat * val
Definition: glew.h:2794
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
bool operator==(const Lpins &src) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void loadFromOpSubclass(const LoadParms &loadparms) override
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
int64 exint
Definition: SYS_Types.h:125
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)
SYS_FORCE_INLINE const char * buffer() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setBboxSize(UT_Vector2D val)
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:113
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 GLdouble * v
Definition: glew.h:1391
const UT_Array< Lpins > & getLpins() const
const UT_StringHolder & getGroup() const
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)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
UT_Vector2D opBboxCenter(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
const UT_Array< Lalignments > & getLalignments() const
UT_StringHolder opLayoutSeams(const SOP_NodeVerb::CookParms &cookparms) const
void setOutputConstrIslands(const UT_StringHolder &val)
UT_StringHolder createString(const UT_Array< Lstraightenings > &list) const
bool operator!=(const Lstraightenings &src) const
void setLpins(const UT_Array< Lpins > &val)
exint opLstraightenings(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool opAlignments_align_enabled(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
exint opAlignments(const SOP_NodeVerb::CookParms &cookparms) const
double fpreal64
Definition: SYS_Types.h:201
static void saveData(std::ostream &os, UT_Matrix4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void loadData(UT_IStream &is, UT_Vector4I &v)
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, UT_Vector3D &v)
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)
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:513
void setBboxCenter(UT_Vector2D val)
exint length() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
bool operator!=(const Pins &src) const
const UT_Array< Alignments > & getAlignments() const
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:284
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:515
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
const UT_StringHolder & getUVAttrib() const
void
Definition: png.h:1083
UT_Vector2D opPins_pinuv(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
static void saveData(std::ostream &os, UT_Vector2D v)
bool operator!=(const Lpins &src) const
UT_StringHolder createString(const UT_Array< Lalignments > &list) const
const GLfloat * c
Definition: glew.h:16296
GLuint GLsizei GLsizei * length
Definition: glew.h:1825
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
long long int64
Definition: SYS_Types.h:116
bool opKeepExistingLayout(const SOP_NodeVerb::CookParms &cookparms) const
bool opUseStraightenings(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getOutputConstrIslands() const
bool operator!=(const Alignments &src) const
ParmType getNestParmType(TempIndex fieldnum) const override
UT_Vector2D opLpins_lprimvert(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
void copyFrom(const SOP_NodeParms *src) override
UT_StringHolder createString(const UT_Array< Straightenings > &list) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
bool operator!=(const Lalignments &src) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
SYS_FORCE_INLINE void strcat(const char *src)
bool opUseOutputConstrIslands(const SOP_NodeVerb::CookParms &cookparms) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
bool operator!=(const Straightenings &src) const
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, fpreal64 v)
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:121
void setPins(const UT_Array< Pins > &val)
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:460
exint opLpins(const SOP_NodeVerb::CookParms &cookparms) const
const char * getNestParmName(TempIndex fieldnum) const override
const UT_StringHolder & getSeams() const
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)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
bool opManualLayout(const SOP_NodeVerb::CookParms &cookparms) const
Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setOutputSeams(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
UT_StringHolder opLalignments_lalign_group(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
fpreal64 fpreal
Definition: SYS_Types.h:277
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
const UT_Array< Straightenings > & getStraightenings() const
void setUVAttrib(const UT_StringHolder &val)
SYS_FORCE_INLINE void append(char character)
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setLayoutSeams(const UT_StringHolder &val)
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
UT_Vector2D getBboxSize() const
UT_StringHolder opUVAttrib(const SOP_NodeVerb::CookParms &cookparms) const
bool opUseOutputSeams(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getOutputSeams() const
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
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
bool operator==(const Lalignments &src) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
UT_StringHolder opSeams(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:511
static void loadData(UT_IStream &is, UT_Vector3I &v)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:654
bool operator!=(const SOP_UVFlatten_2_0Parms &src) const
GLuint64EXT * result
Definition: glew.h:14007
bool opStraightenings_straight_enabled(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
const char * findChar(int c) const
Definition: UT_String.h:1367
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
static void saveData(std::ostream &os, UT_Vector4D v)
void setLalignments(const UT_Array< Lalignments > &val)
static void saveData(std::ostream &os, UT_Vector3D v)
bool operator==(const Lstraightenings &src) const
void setSeams(const UT_StringHolder &val)
UT_StringHolder opLstraightenings_lstraight_group(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
GLenum GLuint GLsizei const GLchar * buf
Definition: glew.h:2580
int64 opLalignments_lalign_axis(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
GLsizei const GLfloat * value
Definition: glew.h:1849
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
const OP_Context & context() const
Definition: SOP_NodeVerb.h:119
bool operator==(const Straightenings &src) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
static void loadData(UT_IStream &is, UT_Vector2I &v)
void save(std::ostream &os) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
SYS_FORCE_INLINE bool isstring() const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
UT_Vector2D getBboxCenter() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
type
Definition: core.h:528
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override