HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_UVRelax.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <OP/OP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 namespace SOP_UVRelaxEnums
24 {
25  enum class PackingMethod
26  {
27  RECTANGLE = 0,
28  NONE
29  };
30 
32  getToken(PackingMethod enum_value)
33  {
34  using namespace UT::Literal;
35  switch (enum_value) {
36  case PackingMethod::RECTANGLE: return "rectangle"_sh;
37  case PackingMethod::NONE: return "none"_sh;
38  default: UT_ASSERT(false); return ""_sh;
39  }
40  }
41 
42 }
43 
44 
46 {
47 public:
48  static int version() { return 1; }
49 
51  {
52  myGroup = ""_UTsh;
53  myUVAttrib = "uv"_UTsh;
54  myMaxOptimizationIterations = 1;
55  myPinnedVertices = ""_UTsh;
56  myPinUVBoundaries = false;
57  mySeamEdges = ""_UTsh;
58  mySewEdges = ""_UTsh;
59  myScale = 1;
60  myPackingMethod = 1;
61  myBBoxCenter = UT_Vector2D(0.5,0.5);
62  myBBoxSize = UT_Vector2D(1,1);
63 
64  }
65 
66  explicit SOP_UVRelaxParms(const SOP_UVRelaxParms &) = default;
67  SOP_UVRelaxParms &operator=(const SOP_UVRelaxParms &) = default;
68  SOP_UVRelaxParms(SOP_UVRelaxParms &&) noexcept = default;
69  SOP_UVRelaxParms &operator=(SOP_UVRelaxParms &&) noexcept = default;
70 
71  ~SOP_UVRelaxParms() override {}
72 
73  bool operator==(const SOP_UVRelaxParms &src) const
74  {
75  if (myGroup != src.myGroup) return false;
76  if (myUVAttrib != src.myUVAttrib) return false;
77  if (myMaxOptimizationIterations != src.myMaxOptimizationIterations) return false;
78  if (myPinnedVertices != src.myPinnedVertices) return false;
79  if (myPinUVBoundaries != src.myPinUVBoundaries) return false;
80  if (mySeamEdges != src.mySeamEdges) return false;
81  if (mySewEdges != src.mySewEdges) return false;
82  if (myScale != src.myScale) return false;
83  if (myPackingMethod != src.myPackingMethod) return false;
84  if (myBBoxCenter != src.myBBoxCenter) return false;
85  if (myBBoxSize != src.myBBoxSize) return false;
86 
87 
88  if (baseGetSignature() != src.baseGetSignature()) return false;
89 
90  return true;
91  }
92  bool operator!=(const SOP_UVRelaxParms &src) const
93  {
94  return !operator==(src);
95  }
97 
98 
99 
100  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
101  {
102  myGroup = ""_UTsh;
103  if (true)
104  graph->evalOpParm(myGroup, nodeidx, "group", time, graph->isDirect()?nullptr:depnode);
105  myUVAttrib = "uv"_UTsh;
106  if (true)
107  graph->evalOpParm(myUVAttrib, nodeidx, "uvattrib", time, graph->isDirect()?nullptr:depnode);
108  myMaxOptimizationIterations = 1;
109  if (true)
110  graph->evalOpParm(myMaxOptimizationIterations, nodeidx, "maxoptimizationiterations", time, graph->isDirect()?nullptr:depnode);
111  myPinnedVertices = ""_UTsh;
112  if (true)
113  graph->evalOpParm(myPinnedVertices, nodeidx, "pinnedvertices", time, graph->isDirect()?nullptr:depnode);
114  myPinUVBoundaries = false;
115  if (true)
116  graph->evalOpParm(myPinUVBoundaries, nodeidx, "pinboundaries", time, graph->isDirect()?nullptr:depnode);
117  mySeamEdges = ""_UTsh;
118  if (true && ( (true&&!(((getPinUVBoundaries()==1)))) ) )
119  graph->evalOpParm(mySeamEdges, nodeidx, "seamedges", time, graph->isDirect()?nullptr:depnode);
120  mySewEdges = ""_UTsh;
121  if (true && ( (true&&!(((getPinUVBoundaries()==1)))) ) )
122  graph->evalOpParm(mySewEdges, nodeidx, "sewedges", time, graph->isDirect()?nullptr:depnode);
123  myScale = 1;
124  if (true)
125  graph->evalOpParm(myScale, nodeidx, "scale", time, graph->isDirect()?nullptr:depnode);
126  myPackingMethod = 1;
127  if (true)
128  graph->evalOpParm(myPackingMethod, nodeidx, "packingmethod", time, graph->isDirect()?nullptr:depnode);
129  myBBoxCenter = UT_Vector2D(0.5,0.5);
130  if (true && ( (true&&!(((int64(getPackingMethod())!=0)))) ) )
131  graph->evalOpParm(myBBoxCenter, nodeidx, "bboxcenter", time, graph->isDirect()?nullptr:depnode);
132  myBBoxSize = UT_Vector2D(1,1);
133  if (true && ( (true&&!(((int64(getPackingMethod())!=0)))) ) )
134  graph->evalOpParm(myBBoxSize, nodeidx, "bboxsize", time, graph->isDirect()?nullptr:depnode);
135 
136  }
137 
138 
139  void loadFromOpSubclass(const LoadParms &loadparms) override
140  {
141  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
142  }
143 
144 
145  void copyFrom(const OP_NodeParms *src) override
146  {
147  *this = *((const SOP_UVRelaxParms *)src);
148  }
149 
150  template <typename T>
151  void
152  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
153  {
154  if (idx.size() < 1)
155  return;
156  UT_ASSERT(idx.size() == instance.size()+1);
157  if (idx.size() != instance.size()+1)
158  return;
159  switch (idx[0])
160  {
161  case 0:
162  coerceValue(value, myGroup);
163  break;
164  case 1:
165  coerceValue(value, myUVAttrib);
166  break;
167  case 2:
168  coerceValue(value, myMaxOptimizationIterations);
169  break;
170  case 3:
171  coerceValue(value, myPinnedVertices);
172  break;
173  case 4:
174  coerceValue(value, myPinUVBoundaries);
175  break;
176  case 5:
177  coerceValue(value, mySeamEdges);
178  break;
179  case 6:
180  coerceValue(value, mySewEdges);
181  break;
182  case 7:
183  coerceValue(value, myScale);
184  break;
185  case 8:
186  coerceValue(value, myPackingMethod);
187  break;
188  case 9:
189  coerceValue(value, myBBoxCenter);
190  break;
191  case 10:
192  coerceValue(value, myBBoxSize);
193  break;
194 
195  }
196  }
197 
198  bool isParmColorRamp(exint idx) const override
199  {
200  switch (idx)
201  {
202 
203  }
204  return false;
205  }
206 
207  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
208  { doGetParmValue(idx, instance, value); }
209  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
210  { doGetParmValue(idx, instance, value); }
211  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
212  { doGetParmValue(idx, instance, value); }
213  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
214  { doGetParmValue(idx, instance, value); }
215  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
216  { doGetParmValue(idx, instance, value); }
217  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
218  { doGetParmValue(idx, instance, value); }
219  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
220  { doGetParmValue(idx, instance, value); }
221  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
222  { doGetParmValue(idx, instance, value); }
223  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
224  { doGetParmValue(idx, instance, value); }
225  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
226  { doGetParmValue(idx, instance, value); }
227  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
228  { doGetParmValue(idx, instance, value); }
229 
230  template <typename T>
231  void
232  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
233  {
234  if (idx.size() < 1)
235  return;
236  UT_ASSERT(idx.size() == instance.size()+1);
237  if (idx.size() != instance.size()+1)
238  return;
239  switch (idx[0])
240  {
241  case 0:
242  coerceValue(myGroup, ( ( value ) ));
243  break;
244  case 1:
245  coerceValue(myUVAttrib, ( ( value ) ));
246  break;
247  case 2:
248  coerceValue(myMaxOptimizationIterations, clampMinValue(0, ( value ) ));
249  break;
250  case 3:
251  coerceValue(myPinnedVertices, ( ( value ) ));
252  break;
253  case 4:
254  coerceValue(myPinUVBoundaries, ( ( value ) ));
255  break;
256  case 5:
257  coerceValue(mySeamEdges, ( ( value ) ));
258  break;
259  case 6:
260  coerceValue(mySewEdges, ( ( value ) ));
261  break;
262  case 7:
263  coerceValue(myScale, clampMinValue(0.5, ( value ) ));
264  break;
265  case 8:
266  coerceValue(myPackingMethod, clampMinValue(0, clampMaxValue(1, value ) ));
267  break;
268  case 9:
269  coerceValue(myBBoxCenter, ( ( value ) ));
270  break;
271  case 10:
272  coerceValue(myBBoxSize, clampMinValue(0, ( value ) ));
273  break;
274 
275  }
276  }
277 
278  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
279  { doSetParmValue(idx, instance, value); }
280  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
281  { doSetParmValue(idx, instance, value); }
282  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
283  { doSetParmValue(idx, instance, value); }
284  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
285  { doSetParmValue(idx, instance, value); }
286  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
287  { doSetParmValue(idx, instance, value); }
288  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
289  { doSetParmValue(idx, instance, value); }
290  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
291  { doSetParmValue(idx, instance, value); }
292  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
293  { doSetParmValue(idx, instance, value); }
294  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
295  { doSetParmValue(idx, instance, value); }
296  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
297  { doSetParmValue(idx, instance, value); }
298  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
299  { doSetParmValue(idx, instance, value); }
300 
301  exint getNestNumParms(TempIndex idx) const override
302  {
303  if (idx.size() == 0)
304  return 11;
305  switch (idx[0])
306  {
307 
308  }
309  // Invalid
310  return 0;
311  }
312 
313  const char *getNestParmName(TempIndex fieldnum) const override
314  {
315  if (fieldnum.size() < 1)
316  return 0;
317  switch (fieldnum[0])
318  {
319  case 0:
320  return "group";
321  case 1:
322  return "uvattrib";
323  case 2:
324  return "maxoptimizationiterations";
325  case 3:
326  return "pinnedvertices";
327  case 4:
328  return "pinboundaries";
329  case 5:
330  return "seamedges";
331  case 6:
332  return "sewedges";
333  case 7:
334  return "scale";
335  case 8:
336  return "packingmethod";
337  case 9:
338  return "bboxcenter";
339  case 10:
340  return "bboxsize";
341 
342  }
343  return 0;
344  }
345 
346  ParmType getNestParmType(TempIndex fieldnum) const override
347  {
348  if (fieldnum.size() < 1)
349  return PARM_UNSUPPORTED;
350  switch (fieldnum[0])
351  {
352  case 0:
353  return PARM_STRING;
354  case 1:
355  return PARM_STRING;
356  case 2:
357  return PARM_INTEGER;
358  case 3:
359  return PARM_STRING;
360  case 4:
361  return PARM_INTEGER;
362  case 5:
363  return PARM_STRING;
364  case 6:
365  return PARM_STRING;
366  case 7:
367  return PARM_FLOAT;
368  case 8:
369  return PARM_INTEGER;
370  case 9:
371  return PARM_VECTOR2;
372  case 10:
373  return PARM_VECTOR2;
374 
375  }
376  return PARM_UNSUPPORTED;
377  }
378 
379  // Boiler plate to load individual types.
380  static void loadData(UT_IStream &is, int64 &v)
381  { is.bread(&v, 1); }
382  static void loadData(UT_IStream &is, bool &v)
383  { int64 iv; is.bread(&iv, 1); v = iv; }
384  static void loadData(UT_IStream &is, fpreal64 &v)
385  { is.bread<fpreal64>(&v, 1); }
386  static void loadData(UT_IStream &is, UT_Vector2D &v)
387  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
388  static void loadData(UT_IStream &is, UT_Vector3D &v)
389  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
390  is.bread<fpreal64>(&v.z(), 1); }
391  static void loadData(UT_IStream &is, UT_Vector4D &v)
392  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
393  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
394  static void loadData(UT_IStream &is, UT_Matrix2D &v)
395  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
396  static void loadData(UT_IStream &is, UT_Matrix3D &v)
397  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
398  static void loadData(UT_IStream &is, UT_Matrix4D &v)
399  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
400  static void loadData(UT_IStream &is, UT_Vector2I &v)
401  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
402  static void loadData(UT_IStream &is, UT_Vector3I &v)
403  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
404  is.bread<int64>(&v.z(), 1); }
405  static void loadData(UT_IStream &is, UT_Vector4I &v)
406  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
407  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
409  { is.bread(v); }
411  { UT_StringHolder rampdata;
412  loadData(is, rampdata);
413  if (rampdata.isstring())
414  {
415  v.reset(new UT_Ramp());
416  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
417  v->load(istr);
418  }
419  else v.reset();
420  }
423  loadData(is, data);
424  if (data.isstring())
425  {
426  // Find the data type.
427  const char *colon = UT_StringWrap(data).findChar(':');
428  if (colon)
429  {
430  int typelen = colon - data.buffer();
432  type.strncpy(data.buffer(), typelen);
433  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
434 
435  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
436  }
437  }
438  else v.reset();
439  }
440 
441  static void saveData(std::ostream &os, int64 v)
442  { UTwrite(os, &v); }
443  static void saveData(std::ostream &os, bool v)
444  { int64 iv = v; UTwrite(os, &iv); }
445  static void saveData(std::ostream &os, fpreal64 v)
446  { UTwrite<fpreal64>(os, &v); }
447  static void saveData(std::ostream &os, UT_Vector2D v)
448  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
449  static void saveData(std::ostream &os, UT_Vector3D v)
450  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
451  UTwrite<fpreal64>(os, &v.z()); }
452  static void saveData(std::ostream &os, UT_Vector4D v)
453  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
454  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
455  static void saveData(std::ostream &os, UT_Matrix2D v)
457  static void saveData(std::ostream &os, UT_Matrix3D v)
459  static void saveData(std::ostream &os, UT_Matrix4D v)
461  static void saveData(std::ostream &os, UT_StringHolder s)
462  { UT_StringWrap(s).saveBinary(os); }
463  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
465  UT_OStringStream ostr;
466  if (s) s->save(ostr);
467  result = ostr.str();
468  saveData(os, result);
469  }
470  static void saveData(std::ostream &os, PRM_DataItemHandle s)
472  UT_OStringStream ostr;
473  if (s)
474  {
475  ostr << s->getDataTypeToken();
476  ostr << ":";
477  s->saveBinary(ostr);
478  }
479  result = ostr.str();
480  saveData(os, result);
481  }
482 
483 
484  void save(std::ostream &os) const
485  {
486  int32 v = version();
487  UTwrite(os, &v);
488  saveData(os, myGroup);
489  saveData(os, myUVAttrib);
490  saveData(os, myMaxOptimizationIterations);
491  saveData(os, myPinnedVertices);
492  saveData(os, myPinUVBoundaries);
493  saveData(os, mySeamEdges);
494  saveData(os, mySewEdges);
495  saveData(os, myScale);
496  saveData(os, myPackingMethod);
497  saveData(os, myBBoxCenter);
498  saveData(os, myBBoxSize);
499 
500  }
501 
502  bool load(UT_IStream &is)
503  {
504  int32 v;
505  is.bread(&v, 1);
506  if (version() != v)
507  {
508  // Fail incompatible versions
509  return false;
510  }
511  loadData(is, myGroup);
512  loadData(is, myUVAttrib);
513  loadData(is, myMaxOptimizationIterations);
514  loadData(is, myPinnedVertices);
515  loadData(is, myPinUVBoundaries);
516  loadData(is, mySeamEdges);
517  loadData(is, mySewEdges);
518  loadData(is, myScale);
519  loadData(is, myPackingMethod);
520  loadData(is, myBBoxCenter);
521  loadData(is, myBBoxSize);
522 
523  return true;
524  }
525 
526  const UT_StringHolder & getGroup() const { return myGroup; }
527  void setGroup(const UT_StringHolder & val) { myGroup = val; }
529  {
530  SOP_Node *thissop = cookparms.getNode();
531  if (!thissop) return getGroup();
533  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
534  return result;
535  }
536  const UT_StringHolder & getUVAttrib() const { return myUVAttrib; }
537  void setUVAttrib(const UT_StringHolder & val) { myUVAttrib = val; }
539  {
540  SOP_Node *thissop = cookparms.getNode();
541  if (!thissop) return getUVAttrib();
543  OP_Utils::evalOpParm(result, thissop, "uvattrib", cookparms.getCookTime(), 0);
544  return result;
545  }
546  int64 getMaxOptimizationIterations() const { return myMaxOptimizationIterations; }
547  void setMaxOptimizationIterations(int64 val) { myMaxOptimizationIterations = val; }
549  {
550  SOP_Node *thissop = cookparms.getNode();
551  if (!thissop) return getMaxOptimizationIterations();
552  int64 result;
553  OP_Utils::evalOpParm(result, thissop, "maxoptimizationiterations", cookparms.getCookTime(), 0);
554  return result;
555  }
556  const UT_StringHolder & getPinnedVertices() const { return myPinnedVertices; }
557  void setPinnedVertices(const UT_StringHolder & val) { myPinnedVertices = val; }
559  {
560  SOP_Node *thissop = cookparms.getNode();
561  if (!thissop) return getPinnedVertices();
563  OP_Utils::evalOpParm(result, thissop, "pinnedvertices", cookparms.getCookTime(), 0);
564  return result;
565  }
566  bool getPinUVBoundaries() const { return myPinUVBoundaries; }
567  void setPinUVBoundaries(bool val) { myPinUVBoundaries = val; }
568  bool opPinUVBoundaries(const SOP_NodeVerb::CookParms &cookparms) const
569  {
570  SOP_Node *thissop = cookparms.getNode();
571  if (!thissop) return getPinUVBoundaries();
572  bool result;
573  OP_Utils::evalOpParm(result, thissop, "pinboundaries", cookparms.getCookTime(), 0);
574  return result;
575  }
576  const UT_StringHolder & getSeamEdges() const { return mySeamEdges; }
577  void setSeamEdges(const UT_StringHolder & val) { mySeamEdges = val; }
579  {
580  SOP_Node *thissop = cookparms.getNode();
581  if (!thissop) return getSeamEdges();
583  OP_Utils::evalOpParm(result, thissop, "seamedges", cookparms.getCookTime(), 0);
584  return result;
585  }
586  const UT_StringHolder & getSewEdges() const { return mySewEdges; }
587  void setSewEdges(const UT_StringHolder & val) { mySewEdges = val; }
589  {
590  SOP_Node *thissop = cookparms.getNode();
591  if (!thissop) return getSewEdges();
593  OP_Utils::evalOpParm(result, thissop, "sewedges", cookparms.getCookTime(), 0);
594  return result;
595  }
596  fpreal64 getScale() const { return myScale; }
597  void setScale(fpreal64 val) { myScale = val; }
598  fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
599  {
600  SOP_Node *thissop = cookparms.getNode();
601  if (!thissop) return getScale();
603  OP_Utils::evalOpParm(result, thissop, "scale", cookparms.getCookTime(), 0);
604  return result;
605  }
606  PackingMethod getPackingMethod() const { return PackingMethod(myPackingMethod); }
607  void setPackingMethod(PackingMethod val) { myPackingMethod = int64(val); }
609  {
610  SOP_Node *thissop = cookparms.getNode();
611  if (!thissop) return getPackingMethod();
612  int64 result;
613  OP_Utils::evalOpParm(result, thissop, "packingmethod", cookparms.getCookTime(), 0);
614  return PackingMethod(result);
615  }
616  UT_Vector2D getBBoxCenter() const { return myBBoxCenter; }
617  void setBBoxCenter(UT_Vector2D val) { myBBoxCenter = val; }
619  {
620  SOP_Node *thissop = cookparms.getNode();
621  if (!thissop) return getBBoxCenter();
623  OP_Utils::evalOpParm(result, thissop, "bboxcenter", cookparms.getCookTime(), 0);
624  return result;
625  }
626  UT_Vector2D getBBoxSize() const { return myBBoxSize; }
627  void setBBoxSize(UT_Vector2D val) { myBBoxSize = val; }
629  {
630  SOP_Node *thissop = cookparms.getNode();
631  if (!thissop) return getBBoxSize();
633  OP_Utils::evalOpParm(result, thissop, "bboxsize", cookparms.getCookTime(), 0);
634  return result;
635  }
636 
637 private:
638  UT_StringHolder myGroup;
639  UT_StringHolder myUVAttrib;
640  int64 myMaxOptimizationIterations;
641  UT_StringHolder myPinnedVertices;
642  bool myPinUVBoundaries;
643  UT_StringHolder mySeamEdges;
644  UT_StringHolder mySewEdges;
645  fpreal64 myScale;
646  int64 myPackingMethod;
647  UT_Vector2D myBBoxCenter;
648  UT_Vector2D myBBoxSize;
649 
650 };
static void loadData(UT_IStream &is, UT_Matrix4D &v)
type
Definition: core.h:556
static void saveData(std::ostream &os, int64 v)
PackingMethod getPackingMethod() const
PackingMethod opPackingMethod(const SOP_NodeVerb::CookParms &cookparms) const
void setSeamEdges(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
ParmType getNestParmType(TempIndex fieldnum) const override
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:403
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
bool operator==(const SOP_UVRelaxParms &src) const
bool isParmColorRamp(exint idx) const override
static void loadData(UT_IStream &is, int64 &v)
const UT_StringHolder & getSeamEdges() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setGroup(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
bool load(UT_IStream &is)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:495
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:63
void setMaxOptimizationIterations(int64 val)
UT_Vector2T< fpreal64 > UT_Vector2D
GLsizei const GLfloat * value
Definition: glcorearb.h:824
SYS_FORCE_INLINE UT_StringHolder getToken(PackingMethod enum_value)
const UT_StringHolder & getGroup() const
const OP_Context & context() const
Definition: OP_NodeParms.h:105
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:669
int64 exint
Definition: SYS_Types.h:125
UT_StringHolder opSewEdges(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE const char * buffer() const
GLdouble s
Definition: glad.h:3009
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_Vector4D &v)
UT_StringHolder opSeamEdges(const SOP_NodeVerb::CookParms &cookparms) const
**But if you need a result
Definition: thread.h:622
fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
exint nodeIdx() const
Definition: OP_NodeParms.h:103
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void saveData(std::ostream &os, bool v)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:493
static void saveData(std::ostream &os, UT_Vector2D v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
double fpreal64
Definition: SYS_Types.h:201
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
static void saveData(std::ostream &os, PRM_DataItemHandle s)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:426
void setPackingMethod(PackingMethod val)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void saveData(std::ostream &os, fpreal64 v)
void setSewEdges(const UT_StringHolder &val)
exint length() const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:497
static void loadData(UT_IStream &is, UT_StringHolder &v)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:102
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
static void loadData(UT_IStream &is, bool &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void loadFromOpSubclass(const LoadParms &loadparms) override
const UT_StringHolder & getSewEdges() const
long long int64
Definition: SYS_Types.h:116
static void loadData(UT_IStream &is, UT_Vector2D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void copyFrom(const OP_NodeParms *src) override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
UT_Vector2D getBBoxSize() const
UT_StringHolder opUVAttrib(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector2D getBBoxCenter() const
bool operator!=(const SOP_UVRelaxParms &src) const
void save(std::ostream &os) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
const UT_StringHolder & getUVAttrib() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setBBoxCenter(UT_Vector2D val)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:306
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
GT_API const UT_StringHolder version
void setUVAttrib(const UT_StringHolder &val)
void setBBoxSize(UT_Vector2D val)
static void loadData(UT_IStream &is, UT_Vector2I &v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
const UT_StringHolder & getPinnedVertices() const
UT_StringHolder opPinnedVertices(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setPinUVBoundaries(bool val)
static void saveData(std::ostream &os, UT_Matrix2D v)
fpreal64 fpreal
Definition: SYS_Types.h:283
bool opPinUVBoundaries(const SOP_NodeVerb::CookParms &cookparms) const
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:107
static void saveData(std::ostream &os, UT_Matrix3D v)
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
int64 getMaxOptimizationIterations() const
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:499
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void saveData(std::ostream &os, UT_StringHolder s)
GLuint GLfloat * val
Definition: glcorearb.h:1608
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:302
Vec3< typename MatType::value_type > getScale(const MatType &mat)
Return a Vec3 representing the lengths of the passed matrix's upper 3×3's rows.
Definition: Mat.h:633
static void loadData(UT_IStream &is, fpreal64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
#define SOP_API
Definition: SOP_API.h:10
void setScale(fpreal64 val)
fpreal64 getScale() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
int64 opMaxOptimizationIterations(const SOP_NodeVerb::CookParms &cookparms) const
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:432
bool getPinUVBoundaries() const
UT_Vector2D opBBoxSize(const SOP_NodeVerb::CookParms &cookparms) const
const char * findChar(int c) const
Definition: UT_String.h:1421
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:165
static void loadData(UT_IStream &is, UT_Vector3I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
GLboolean r
Definition: glcorearb.h:1222
exint bread(uint8 *buffer, exint asize=1)
exint getNestNumParms(TempIndex idx) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:667
static void saveData(std::ostream &os, UT_Vector4D v)
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
void setPinnedVertices(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
const char * getNestParmName(TempIndex fieldnum) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:428
static void saveData(std::ostream &os, UT_Vector3D v)
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:665
static int version()
static void saveData(std::ostream &os, UT_Matrix4D v)
UT_Vector2D opBBoxCenter(const SOP_NodeVerb::CookParms &cookparms) const