HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_VoronoiSplit.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_VoronoiSplitEnums
24 {
25  enum class WeightMethod
26  {
27  POWER = 0,
28  RATIO
29  };
30 
32  getToken(WeightMethod enum_value)
33  {
34  using namespace UT::Literal;
35  switch (enum_value) {
36  case WeightMethod::POWER: return "power"_sh;
37  case WeightMethod::RATIO: return "ratio"_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  myClipptsgrp = ""_UTsh;
54  myOffset = 0;
55  myInterior = false;
56  myTransferAttribs = true;
57  myStamppieces = false;
58  myPieceattrib = "piece"_UTsh;
59  myClipptattrib = "clippt"_UTsh;
60  myUseweightattrib = false;
61  myWeightattrib = "pscale"_UTsh;
62  myWeightMethod = 0;
63 
64  }
65 
66  explicit SOP_VoronoiSplitParms(const SOP_VoronoiSplitParms &) = default;
68  SOP_VoronoiSplitParms(SOP_VoronoiSplitParms &&) noexcept = default;
69  SOP_VoronoiSplitParms &operator=(SOP_VoronoiSplitParms &&) noexcept = default;
70 
71  ~SOP_VoronoiSplitParms() override {}
72 
74  {
75  if (myGroup != src.myGroup) return false;
76  if (myClipptsgrp != src.myClipptsgrp) return false;
77  if (myOffset != src.myOffset) return false;
78  if (myInterior != src.myInterior) return false;
79  if (myTransferAttribs != src.myTransferAttribs) return false;
80  if (myStamppieces != src.myStamppieces) return false;
81  if (myPieceattrib != src.myPieceattrib) return false;
82  if (myClipptattrib != src.myClipptattrib) return false;
83  if (myUseweightattrib != src.myUseweightattrib) return false;
84  if (myWeightattrib != src.myWeightattrib) return false;
85  if (myWeightMethod != src.myWeightMethod) return false;
86 
87 
88  if (baseGetSignature() != src.baseGetSignature()) return false;
89 
90  return true;
91  }
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  myClipptsgrp = ""_UTsh;
106  if (true)
107  graph->evalOpParm(myClipptsgrp, nodeidx, "clipptsgrp", time, graph->isDirect()?nullptr:depnode);
108  myOffset = 0;
109  if (true)
110  graph->evalOpParm(myOffset, nodeidx, "offset", time, graph->isDirect()?nullptr:depnode);
111  myInterior = false;
112  if (true)
113  graph->evalOpParm(myInterior, nodeidx, "interior", time, graph->isDirect()?nullptr:depnode);
114  myTransferAttribs = true;
115  if (true && ( (true&&!(((getInterior()==0))||((getInterior()==0)))) ) )
116  graph->evalOpParm(myTransferAttribs, nodeidx, "transferattribs", time, graph->isDirect()?nullptr:depnode);
117  myStamppieces = false;
118  if (true)
119  graph->evalOpParm(myStamppieces, nodeidx, "stamppieces", time, graph->isDirect()?nullptr:depnode);
120  myPieceattrib = "piece"_UTsh;
121  if (true && ( (true&&!(((getStamppieces()==0)))) ) )
122  graph->evalOpParm(myPieceattrib, nodeidx, "pieceattrib", time, graph->isDirect()?nullptr:depnode);
123  myClipptattrib = "clippt"_UTsh;
124  if (true && ( (true&&!(((getStamppieces()==0))||((getInterior()==0)))) ) )
125  graph->evalOpParm(myClipptattrib, nodeidx, "clipptattrib", time, graph->isDirect()?nullptr:depnode);
126  myUseweightattrib = false;
127  if (true)
128  graph->evalOpParm(myUseweightattrib, nodeidx, "useweightattrib", time, graph->isDirect()?nullptr:depnode);
129  myWeightattrib = "pscale"_UTsh;
130  if (true && ( (true&&!(((getUseweightattrib()==0)))) ) )
131  graph->evalOpParm(myWeightattrib, nodeidx, "weightattrib", time, graph->isDirect()?nullptr:depnode);
132  myWeightMethod = 0;
133  if (true && ( (true&&!(((getUseweightattrib()==0)))) ) )
134  graph->evalOpParm(myWeightMethod, nodeidx, "weightmethod", 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_VoronoiSplitParms *)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, myClipptsgrp);
166  break;
167  case 2:
168  coerceValue(value, myOffset);
169  break;
170  case 3:
171  coerceValue(value, myInterior);
172  break;
173  case 4:
174  coerceValue(value, myTransferAttribs);
175  break;
176  case 5:
177  coerceValue(value, myStamppieces);
178  break;
179  case 6:
180  coerceValue(value, myPieceattrib);
181  break;
182  case 7:
183  coerceValue(value, myClipptattrib);
184  break;
185  case 8:
186  coerceValue(value, myUseweightattrib);
187  break;
188  case 9:
189  coerceValue(value, myWeightattrib);
190  break;
191  case 10:
192  coerceValue(value, myWeightMethod);
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(myClipptsgrp, ( ( value ) ));
246  break;
247  case 2:
248  coerceValue(myOffset, ( ( value ) ));
249  break;
250  case 3:
251  coerceValue(myInterior, ( ( value ) ));
252  break;
253  case 4:
254  coerceValue(myTransferAttribs, ( ( value ) ));
255  break;
256  case 5:
257  coerceValue(myStamppieces, ( ( value ) ));
258  break;
259  case 6:
260  coerceValue(myPieceattrib, ( ( value ) ));
261  break;
262  case 7:
263  coerceValue(myClipptattrib, ( ( value ) ));
264  break;
265  case 8:
266  coerceValue(myUseweightattrib, ( ( value ) ));
267  break;
268  case 9:
269  coerceValue(myWeightattrib, ( ( value ) ));
270  break;
271  case 10:
272  coerceValue(myWeightMethod, clampMinValue(0, clampMaxValue(1, 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 "clipptsgrp";
323  case 2:
324  return "offset";
325  case 3:
326  return "interior";
327  case 4:
328  return "transferattribs";
329  case 5:
330  return "stamppieces";
331  case 6:
332  return "pieceattrib";
333  case 7:
334  return "clipptattrib";
335  case 8:
336  return "useweightattrib";
337  case 9:
338  return "weightattrib";
339  case 10:
340  return "weightmethod";
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_FLOAT;
358  case 3:
359  return PARM_INTEGER;
360  case 4:
361  return PARM_INTEGER;
362  case 5:
363  return PARM_INTEGER;
364  case 6:
365  return PARM_STRING;
366  case 7:
367  return PARM_STRING;
368  case 8:
369  return PARM_INTEGER;
370  case 9:
371  return PARM_STRING;
372  case 10:
373  return PARM_INTEGER;
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, myClipptsgrp);
490  saveData(os, myOffset);
491  saveData(os, myInterior);
492  saveData(os, myTransferAttribs);
493  saveData(os, myStamppieces);
494  saveData(os, myPieceattrib);
495  saveData(os, myClipptattrib);
496  saveData(os, myUseweightattrib);
497  saveData(os, myWeightattrib);
498  saveData(os, myWeightMethod);
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, myClipptsgrp);
513  loadData(is, myOffset);
514  loadData(is, myInterior);
515  loadData(is, myTransferAttribs);
516  loadData(is, myStamppieces);
517  loadData(is, myPieceattrib);
518  loadData(is, myClipptattrib);
519  loadData(is, myUseweightattrib);
520  loadData(is, myWeightattrib);
521  loadData(is, myWeightMethod);
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 & getClipptsgrp() const { return myClipptsgrp; }
537  void setClipptsgrp(const UT_StringHolder & val) { myClipptsgrp = val; }
539  {
540  SOP_Node *thissop = cookparms.getNode();
541  if (!thissop) return getClipptsgrp();
543  OP_Utils::evalOpParm(result, thissop, "clipptsgrp", cookparms.getCookTime(), 0);
544  return result;
545  }
546  fpreal64 getOffset() const { return myOffset; }
547  void setOffset(fpreal64 val) { myOffset = val; }
548  fpreal64 opOffset(const SOP_NodeVerb::CookParms &cookparms) const
549  {
550  SOP_Node *thissop = cookparms.getNode();
551  if (!thissop) return getOffset();
553  OP_Utils::evalOpParm(result, thissop, "offset", cookparms.getCookTime(), 0);
554  return result;
555  }
556  bool getInterior() const { return myInterior; }
557  void setInterior(bool val) { myInterior = val; }
558  bool opInterior(const SOP_NodeVerb::CookParms &cookparms) const
559  {
560  SOP_Node *thissop = cookparms.getNode();
561  if (!thissop) return getInterior();
562  bool result;
563  OP_Utils::evalOpParm(result, thissop, "interior", cookparms.getCookTime(), 0);
564  return result;
565  }
566  bool getTransferAttribs() const { return myTransferAttribs; }
567  void setTransferAttribs(bool val) { myTransferAttribs = val; }
568  bool opTransferAttribs(const SOP_NodeVerb::CookParms &cookparms) const
569  {
570  SOP_Node *thissop = cookparms.getNode();
571  if (!thissop) return getTransferAttribs();
572  bool result;
573  OP_Utils::evalOpParm(result, thissop, "transferattribs", cookparms.getCookTime(), 0);
574  return result;
575  }
576  bool getStamppieces() const { return myStamppieces; }
577  void setStamppieces(bool val) { myStamppieces = val; }
578  bool opStamppieces(const SOP_NodeVerb::CookParms &cookparms) const
579  {
580  SOP_Node *thissop = cookparms.getNode();
581  if (!thissop) return getStamppieces();
582  bool result;
583  OP_Utils::evalOpParm(result, thissop, "stamppieces", cookparms.getCookTime(), 0);
584  return result;
585  }
586  const UT_StringHolder & getPieceattrib() const { return myPieceattrib; }
587  void setPieceattrib(const UT_StringHolder & val) { myPieceattrib = val; }
589  {
590  SOP_Node *thissop = cookparms.getNode();
591  if (!thissop) return getPieceattrib();
593  OP_Utils::evalOpParm(result, thissop, "pieceattrib", cookparms.getCookTime(), 0);
594  return result;
595  }
596  const UT_StringHolder & getClipptattrib() const { return myClipptattrib; }
597  void setClipptattrib(const UT_StringHolder & val) { myClipptattrib = val; }
599  {
600  SOP_Node *thissop = cookparms.getNode();
601  if (!thissop) return getClipptattrib();
603  OP_Utils::evalOpParm(result, thissop, "clipptattrib", cookparms.getCookTime(), 0);
604  return result;
605  }
606  bool getUseweightattrib() const { return myUseweightattrib; }
607  void setUseweightattrib(bool val) { myUseweightattrib = val; }
608  bool opUseweightattrib(const SOP_NodeVerb::CookParms &cookparms) const
609  {
610  SOP_Node *thissop = cookparms.getNode();
611  if (!thissop) return getUseweightattrib();
612  bool result;
613  OP_Utils::evalOpParm(result, thissop, "useweightattrib", cookparms.getCookTime(), 0);
614  return result;
615  }
616  const UT_StringHolder & getWeightattrib() const { return myWeightattrib; }
617  void setWeightattrib(const UT_StringHolder & val) { myWeightattrib = val; }
619  {
620  SOP_Node *thissop = cookparms.getNode();
621  if (!thissop) return getWeightattrib();
623  OP_Utils::evalOpParm(result, thissop, "weightattrib", cookparms.getCookTime(), 0);
624  return result;
625  }
626  WeightMethod getWeightMethod() const { return WeightMethod(myWeightMethod); }
627  void setWeightMethod(WeightMethod val) { myWeightMethod = int64(val); }
629  {
630  SOP_Node *thissop = cookparms.getNode();
631  if (!thissop) return getWeightMethod();
632  int64 result;
633  OP_Utils::evalOpParm(result, thissop, "weightmethod", cookparms.getCookTime(), 0);
634  return WeightMethod(result);
635  }
636 
637 private:
638  UT_StringHolder myGroup;
639  UT_StringHolder myClipptsgrp;
640  fpreal64 myOffset;
641  bool myInterior;
642  bool myTransferAttribs;
643  bool myStamppieces;
644  UT_StringHolder myPieceattrib;
645  UT_StringHolder myClipptattrib;
646  bool myUseweightattrib;
647  UT_StringHolder myWeightattrib;
648  int64 myWeightMethod;
649 
650 };
type
Definition: core.h:556
static void saveData(std::ostream &os, fpreal64 v)
WeightMethod opWeightMethod(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opPieceattrib(const SOP_NodeVerb::CookParms &cookparms) const
void setClipptsgrp(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
bool opUseweightattrib(const SOP_NodeVerb::CookParms &cookparms) const
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
const UT_StringHolder & getClipptsgrp() const
void loadFromOpSubclass(const LoadParms &loadparms) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setOffset(fpreal64 val)
static void loadData(UT_IStream &is, UT_StringHolder &v)
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:63
static void saveData(std::ostream &os, PRM_DataItemHandle s)
GLsizei const GLfloat * value
Definition: glcorearb.h:824
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
exint getNestNumParms(TempIndex idx) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
fpreal64 opOffset(const SOP_NodeVerb::CookParms &cookparms) const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
static void saveData(std::ostream &os, UT_Matrix4D v)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
void copyFrom(const OP_NodeParms *src) override
SYS_FORCE_INLINE const char * buffer() const
const UT_StringHolder & getWeightattrib() const
GLdouble s
Definition: glad.h:3009
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
An output stream object that owns its own string buffer storage.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
**But if you need a result
Definition: thread.h:622
static void saveData(std::ostream &os, UT_Vector3D v)
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
const UT_StringHolder & getPieceattrib() const
double fpreal64
Definition: SYS_Types.h:201
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
static void loadData(UT_IStream &is, UT_Vector3D &v)
ParmType getNestParmType(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void setPieceattrib(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void save(std::ostream &os) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, UT_StringHolder s)
static void saveData(std::ostream &os, UT_Vector4D v)
void setClipptattrib(const UT_StringHolder &val)
exint length() const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
static void loadData(UT_IStream &is, bool &v)
UT_StringHolder opClipptattrib(const SOP_NodeVerb::CookParms &cookparms) const
bool opTransferAttribs(const SOP_NodeVerb::CookParms &cookparms) const
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
WeightMethod getWeightMethod() const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
bool isParmColorRamp(exint idx) const override
bool opInterior(const SOP_NodeVerb::CookParms &cookparms) const
long long int64
Definition: SYS_Types.h:116
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
SYS_FORCE_INLINE UT_StringHolder getToken(WeightMethod enum_value)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, UT_Vector2I &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void loadData(UT_IStream &is, UT_Matrix4D &v)
bool operator==(const SOP_VoronoiSplitParms &src) const
void setWeightattrib(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:303
GT_API const UT_StringHolder version
bool operator!=(const SOP_VoronoiSplitParms &src) const
static void loadData(UT_IStream &is, fpreal64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
const UT_StringHolder & getClipptattrib() const
void setWeightMethod(WeightMethod val)
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, int64 &v)
fpreal64 fpreal
Definition: SYS_Types.h:278
static void saveData(std::ostream &os, bool v)
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
LeafData & operator=(const LeafData &)=delete
bool load(UT_IStream &is)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
GLuint GLfloat * val
Definition: glcorearb.h:1608
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
UT_StringHolder opWeightattrib(const SOP_NodeVerb::CookParms &cookparms) const
#define SOP_API
Definition: SOP_API.h:10
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
const UT_StringHolder & getGroup() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:372
const char * getNestParmName(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
bool opStamppieces(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
GLboolean r
Definition: glcorearb.h:1222
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void saveData(std::ostream &os, UT_Matrix2D v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
static void loadData(UT_IStream &is, UT_Vector3I &v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
static void saveData(std::ostream &os, UT_Matrix3D v)
SYS_FORCE_INLINE bool isstring() const
void setGroup(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
UT_StringHolder opClipptsgrp(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector2D v)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663