HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_SBlend-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_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_SBlend_2_0Enums
24 {
25  enum class UnmatchedPoints
26  {
27  FREEZE = 0,
28  DELETE,
29  GROUP
30  };
31 
34  {
35  using namespace UT::Literal;
36  switch (enum_value) {
37  case UnmatchedPoints::FREEZE: return "freeze"_sh;
38  case UnmatchedPoints::DELETE: return "delete"_sh;
39  case UnmatchedPoints::GROUP: return "group"_sh;
40  default: UT_ASSERT(false); return ""_sh;
41  }
42  }
43 
44  enum class VoxelBlend
45  {
46  NONE = 0,
48  BYVOXELPOS,
49  ADVECTED
50  };
51 
53  getToken(VoxelBlend enum_value)
54  {
55  using namespace UT::Literal;
56  switch (enum_value) {
57  case VoxelBlend::NONE: return "none"_sh;
58  case VoxelBlend::BYGRIDINDEX: return "bygridindex"_sh;
59  case VoxelBlend::BYVOXELPOS: return "byvoxelpos"_sh;
60  case VoxelBlend::ADVECTED: return "advected"_sh;
61  default: UT_ASSERT(false); return ""_sh;
62  }
63  }
64 
65  enum class Interp
66  {
67  LINEAR = 0,
68  CUBIC,
69  SUBD
70  };
71 
73  getToken(Interp enum_value)
74  {
75  using namespace UT::Literal;
76  switch (enum_value) {
77  case Interp::LINEAR: return "linear"_sh;
78  case Interp::CUBIC: return "cubic"_sh;
79  case Interp::SUBD: return "subd"_sh;
80  default: UT_ASSERT(false); return ""_sh;
81  }
82  }
83 
84 }
85 
86 
88 {
89 public:
90  static int version() { return 1; }
91 
93  {
94  myBlend = 0;
95  myAttribs = "*"_UTsh;
96  myPtIDAttr = "id"_UTsh;
97  myUnmatchedPoints = 0;
98  myUnmatchedPointGroup = "unmatched"_UTsh;
99  myPrimIDAttr = "name"_UTsh;
100  myVoxelBlend = 0;
101  myAdvectionDT = 0.0416667;
102  myVelocityField = "vel"_UTsh;
103  myDoSlerp = true;
104  myInterp = 0;
105  myUseVForPInterp = false;
106  myTimeStep = 0;
107 
108  }
109 
110  explicit SOP_SBlend_2_0Parms(const SOP_SBlend_2_0Parms &) = default;
112  SOP_SBlend_2_0Parms(SOP_SBlend_2_0Parms &&) noexcept = default;
113  SOP_SBlend_2_0Parms &operator=(SOP_SBlend_2_0Parms &&) noexcept = default;
114 
115  ~SOP_SBlend_2_0Parms() override {}
116 
117  bool operator==(const SOP_SBlend_2_0Parms &src) const
118  {
119  if (myBlend != src.myBlend) return false;
120  if (myAttribs != src.myAttribs) return false;
121  if (myPtIDAttr != src.myPtIDAttr) return false;
122  if (myUnmatchedPoints != src.myUnmatchedPoints) return false;
123  if (myUnmatchedPointGroup != src.myUnmatchedPointGroup) return false;
124  if (myPrimIDAttr != src.myPrimIDAttr) return false;
125  if (myVoxelBlend != src.myVoxelBlend) return false;
126  if (myAdvectionDT != src.myAdvectionDT) return false;
127  if (myVelocityField != src.myVelocityField) return false;
128  if (myDoSlerp != src.myDoSlerp) return false;
129  if (myInterp != src.myInterp) return false;
130  if (myUseVForPInterp != src.myUseVForPInterp) return false;
131  if (myTimeStep != src.myTimeStep) return false;
132 
133 
134  if (baseGetSignature() != src.baseGetSignature()) return false;
135 
136  return true;
137  }
138  bool operator!=(const SOP_SBlend_2_0Parms &src) const
139  {
140  return !operator==(src);
141  }
145 
146 
147 
148  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
149  {
150  myBlend = 0;
151  if (true)
152  graph->evalOpParm(myBlend, nodeidx, "blend", time, graph->isDirect()?nullptr:depnode);
153  myAttribs = "*"_UTsh;
154  if (true)
155  graph->evalOpParm(myAttribs, nodeidx, "attribs", time, graph->isDirect()?nullptr:depnode);
156  myPtIDAttr = "id"_UTsh;
157  if (true)
158  graph->evalOpParm(myPtIDAttr, nodeidx, "ptidattr", time, graph->isDirect()?nullptr:depnode);
159  myUnmatchedPoints = 0;
160  if (true)
161  graph->evalOpParm(myUnmatchedPoints, nodeidx, "unmatchedpts", time, graph->isDirect()?nullptr:depnode);
162  myUnmatchedPointGroup = "unmatched"_UTsh;
163  if (true && ( (true&&!(((int64(getUnmatchedPoints())!=2)))) ) )
164  graph->evalOpParm(myUnmatchedPointGroup, nodeidx, "unmatchedgroup", time, graph->isDirect()?nullptr:depnode);
165  myPrimIDAttr = "name"_UTsh;
166  if (true)
167  graph->evalOpParm(myPrimIDAttr, nodeidx, "primidattr", time, graph->isDirect()?nullptr:depnode);
168  myVoxelBlend = 0;
169  if (true)
170  graph->evalOpParm(myVoxelBlend, nodeidx, "voxelblend", time, graph->isDirect()?nullptr:depnode);
171  myAdvectionDT = 0.0416667;
172  if (true && ( (true&&!(((int64(getVoxelBlend())!=3)))) ) )
173  graph->evalOpParm(myAdvectionDT, nodeidx, "adt", time, graph->isDirect()?nullptr:depnode);
174  myVelocityField = "vel"_UTsh;
175  if (true && ( (true&&!(((int64(getVoxelBlend())!=3)))) ) )
176  graph->evalOpParm(myVelocityField, nodeidx, "velocity", time, graph->isDirect()?nullptr:depnode);
177  myDoSlerp = true;
178  if (true)
179  graph->evalOpParm(myDoSlerp, nodeidx, "doslerp", time, graph->isDirect()?nullptr:depnode);
180  myInterp = 0;
181  if (true)
182  graph->evalOpParm(myInterp, nodeidx, "interp", time, graph->isDirect()?nullptr:depnode);
183  myUseVForPInterp = false;
184  if (true && ( (true&&!(((int64(getInterp())!=0)))) ) )
185  graph->evalOpParm(myUseVForPInterp, nodeidx, "usevforpinterp", time, graph->isDirect()?nullptr:depnode);
186  myTimeStep = 0;
187  if (true && ( (true&&!(((getUseVForPInterp()==0)&&(int64(getVoxelBlend())!=3)))) ) )
188  graph->evalOpParm(myTimeStep, nodeidx, "timestep", time, graph->isDirect()?nullptr:depnode);
189 
190  }
191 
192 
193  void loadFromOpSubclass(const LoadParms &loadparms) override
194  {
195  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
196  }
197 
198 
199  void copyFrom(const OP_NodeParms *src) override
200  {
201  *this = *((const SOP_SBlend_2_0Parms *)src);
202  }
203 
204  template <typename T>
205  void
206  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
207  {
208  if (idx.size() < 1)
209  return;
210  UT_ASSERT(idx.size() == instance.size()+1);
211  if (idx.size() != instance.size()+1)
212  return;
213  switch (idx[0])
214  {
215  case 0:
216  coerceValue(value, myBlend);
217  break;
218  case 1:
219  coerceValue(value, myAttribs);
220  break;
221  case 2:
222  coerceValue(value, myPtIDAttr);
223  break;
224  case 3:
225  coerceValue(value, myUnmatchedPoints);
226  break;
227  case 4:
228  coerceValue(value, myUnmatchedPointGroup);
229  break;
230  case 5:
231  coerceValue(value, myPrimIDAttr);
232  break;
233  case 6:
234  coerceValue(value, myVoxelBlend);
235  break;
236  case 7:
237  coerceValue(value, myAdvectionDT);
238  break;
239  case 8:
240  coerceValue(value, myVelocityField);
241  break;
242  case 9:
243  coerceValue(value, myDoSlerp);
244  break;
245  case 10:
246  coerceValue(value, myInterp);
247  break;
248  case 11:
249  coerceValue(value, myUseVForPInterp);
250  break;
251  case 12:
252  coerceValue(value, myTimeStep);
253  break;
254 
255  }
256  }
257 
258  bool isParmColorRamp(exint idx) const override
259  {
260  switch (idx)
261  {
262 
263  }
264  return false;
265  }
266 
267  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
268  { doGetParmValue(idx, instance, value); }
269  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
270  { doGetParmValue(idx, instance, value); }
271  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
272  { doGetParmValue(idx, instance, value); }
273  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
274  { doGetParmValue(idx, instance, value); }
275  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
276  { doGetParmValue(idx, instance, value); }
277  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
278  { doGetParmValue(idx, instance, value); }
279  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
280  { doGetParmValue(idx, instance, value); }
281  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
282  { doGetParmValue(idx, instance, value); }
283  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
284  { doGetParmValue(idx, instance, value); }
285  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
286  { doGetParmValue(idx, instance, value); }
287  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
288  { doGetParmValue(idx, instance, value); }
289 
290  template <typename T>
291  void
292  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
293  {
294  if (idx.size() < 1)
295  return;
296  UT_ASSERT(idx.size() == instance.size()+1);
297  if (idx.size() != instance.size()+1)
298  return;
299  switch (idx[0])
300  {
301  case 0:
302  coerceValue(myBlend, clampMinValue(0, ( value ) ));
303  break;
304  case 1:
305  coerceValue(myAttribs, ( ( value ) ));
306  break;
307  case 2:
308  coerceValue(myPtIDAttr, ( ( value ) ));
309  break;
310  case 3:
311  coerceValue(myUnmatchedPoints, clampMinValue(0, clampMaxValue(2, value ) ));
312  break;
313  case 4:
314  coerceValue(myUnmatchedPointGroup, ( ( value ) ));
315  break;
316  case 5:
317  coerceValue(myPrimIDAttr, ( ( value ) ));
318  break;
319  case 6:
320  coerceValue(myVoxelBlend, clampMinValue(0, clampMaxValue(3, value ) ));
321  break;
322  case 7:
323  coerceValue(myAdvectionDT, clampMinValue(0, ( value ) ));
324  break;
325  case 8:
326  coerceValue(myVelocityField, ( ( value ) ));
327  break;
328  case 9:
329  coerceValue(myDoSlerp, ( ( value ) ));
330  break;
331  case 10:
332  coerceValue(myInterp, clampMinValue(0, clampMaxValue(2, value ) ));
333  break;
334  case 11:
335  coerceValue(myUseVForPInterp, ( ( value ) ));
336  break;
337  case 12:
338  coerceValue(myTimeStep, clampMinValue(0, ( value ) ));
339  break;
340 
341  }
342  }
343 
344  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
345  { doSetParmValue(idx, instance, value); }
346  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
347  { doSetParmValue(idx, instance, value); }
348  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
349  { doSetParmValue(idx, instance, value); }
350  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
351  { doSetParmValue(idx, instance, value); }
352  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
353  { doSetParmValue(idx, instance, value); }
354  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
355  { doSetParmValue(idx, instance, value); }
356  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
357  { doSetParmValue(idx, instance, value); }
358  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
359  { doSetParmValue(idx, instance, value); }
360  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
361  { doSetParmValue(idx, instance, value); }
362  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
363  { doSetParmValue(idx, instance, value); }
364  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
365  { doSetParmValue(idx, instance, value); }
366 
367  exint getNestNumParms(TempIndex idx) const override
368  {
369  if (idx.size() == 0)
370  return 13;
371  switch (idx[0])
372  {
373 
374  }
375  // Invalid
376  return 0;
377  }
378 
379  const char *getNestParmName(TempIndex fieldnum) const override
380  {
381  if (fieldnum.size() < 1)
382  return 0;
383  switch (fieldnum[0])
384  {
385  case 0:
386  return "blend";
387  case 1:
388  return "attribs";
389  case 2:
390  return "ptidattr";
391  case 3:
392  return "unmatchedpts";
393  case 4:
394  return "unmatchedgroup";
395  case 5:
396  return "primidattr";
397  case 6:
398  return "voxelblend";
399  case 7:
400  return "adt";
401  case 8:
402  return "velocity";
403  case 9:
404  return "doslerp";
405  case 10:
406  return "interp";
407  case 11:
408  return "usevforpinterp";
409  case 12:
410  return "timestep";
411 
412  }
413  return 0;
414  }
415 
416  ParmType getNestParmType(TempIndex fieldnum) const override
417  {
418  if (fieldnum.size() < 1)
419  return PARM_UNSUPPORTED;
420  switch (fieldnum[0])
421  {
422  case 0:
423  return PARM_FLOAT;
424  case 1:
425  return PARM_STRING;
426  case 2:
427  return PARM_STRING;
428  case 3:
429  return PARM_INTEGER;
430  case 4:
431  return PARM_STRING;
432  case 5:
433  return PARM_STRING;
434  case 6:
435  return PARM_INTEGER;
436  case 7:
437  return PARM_FLOAT;
438  case 8:
439  return PARM_STRING;
440  case 9:
441  return PARM_INTEGER;
442  case 10:
443  return PARM_INTEGER;
444  case 11:
445  return PARM_INTEGER;
446  case 12:
447  return PARM_FLOAT;
448 
449  }
450  return PARM_UNSUPPORTED;
451  }
452 
453  // Boiler plate to load individual types.
454  static void loadData(UT_IStream &is, int64 &v)
455  { is.bread(&v, 1); }
456  static void loadData(UT_IStream &is, bool &v)
457  { int64 iv; is.bread(&iv, 1); v = iv; }
458  static void loadData(UT_IStream &is, fpreal64 &v)
459  { is.bread<fpreal64>(&v, 1); }
460  static void loadData(UT_IStream &is, UT_Vector2D &v)
461  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
462  static void loadData(UT_IStream &is, UT_Vector3D &v)
463  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
464  is.bread<fpreal64>(&v.z(), 1); }
465  static void loadData(UT_IStream &is, UT_Vector4D &v)
466  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
467  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
468  static void loadData(UT_IStream &is, UT_Matrix2D &v)
469  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
470  static void loadData(UT_IStream &is, UT_Matrix3D &v)
471  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
472  static void loadData(UT_IStream &is, UT_Matrix4D &v)
473  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
474  static void loadData(UT_IStream &is, UT_Vector2I &v)
475  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
476  static void loadData(UT_IStream &is, UT_Vector3I &v)
477  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
478  is.bread<int64>(&v.z(), 1); }
479  static void loadData(UT_IStream &is, UT_Vector4I &v)
480  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
481  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
483  { is.bread(v); }
485  { UT_StringHolder rampdata;
486  loadData(is, rampdata);
487  if (rampdata.isstring())
488  {
489  v.reset(new UT_Ramp());
490  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
491  v->load(istr);
492  }
493  else v.reset();
494  }
497  loadData(is, data);
498  if (data.isstring())
499  {
500  // Find the data type.
501  const char *colon = UT_StringWrap(data).findChar(':');
502  if (colon)
503  {
504  int typelen = colon - data.buffer();
506  type.strncpy(data.buffer(), typelen);
507  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
508 
509  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
510  }
511  }
512  else v.reset();
513  }
514 
515  static void saveData(std::ostream &os, int64 v)
516  { UTwrite(os, &v); }
517  static void saveData(std::ostream &os, bool v)
518  { int64 iv = v; UTwrite(os, &iv); }
519  static void saveData(std::ostream &os, fpreal64 v)
520  { UTwrite<fpreal64>(os, &v); }
521  static void saveData(std::ostream &os, UT_Vector2D v)
522  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
523  static void saveData(std::ostream &os, UT_Vector3D v)
524  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
525  UTwrite<fpreal64>(os, &v.z()); }
526  static void saveData(std::ostream &os, UT_Vector4D v)
527  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
528  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
529  static void saveData(std::ostream &os, UT_Matrix2D v)
531  static void saveData(std::ostream &os, UT_Matrix3D v)
533  static void saveData(std::ostream &os, UT_Matrix4D v)
535  static void saveData(std::ostream &os, UT_StringHolder s)
536  { UT_StringWrap(s).saveBinary(os); }
537  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
539  UT_OStringStream ostr;
540  if (s) s->save(ostr);
541  result = ostr.str();
542  saveData(os, result);
543  }
544  static void saveData(std::ostream &os, PRM_DataItemHandle s)
546  UT_OStringStream ostr;
547  if (s)
548  {
549  ostr << s->getDataTypeToken();
550  ostr << ":";
551  s->saveBinary(ostr);
552  }
553  result = ostr.str();
554  saveData(os, result);
555  }
556 
557 
558  void save(std::ostream &os) const
559  {
560  int32 v = version();
561  UTwrite(os, &v);
562  saveData(os, myBlend);
563  saveData(os, myAttribs);
564  saveData(os, myPtIDAttr);
565  saveData(os, myUnmatchedPoints);
566  saveData(os, myUnmatchedPointGroup);
567  saveData(os, myPrimIDAttr);
568  saveData(os, myVoxelBlend);
569  saveData(os, myAdvectionDT);
570  saveData(os, myVelocityField);
571  saveData(os, myDoSlerp);
572  saveData(os, myInterp);
573  saveData(os, myUseVForPInterp);
574  saveData(os, myTimeStep);
575 
576  }
577 
578  bool load(UT_IStream &is)
579  {
580  int32 v;
581  is.bread(&v, 1);
582  if (version() != v)
583  {
584  // Fail incompatible versions
585  return false;
586  }
587  loadData(is, myBlend);
588  loadData(is, myAttribs);
589  loadData(is, myPtIDAttr);
590  loadData(is, myUnmatchedPoints);
591  loadData(is, myUnmatchedPointGroup);
592  loadData(is, myPrimIDAttr);
593  loadData(is, myVoxelBlend);
594  loadData(is, myAdvectionDT);
595  loadData(is, myVelocityField);
596  loadData(is, myDoSlerp);
597  loadData(is, myInterp);
598  loadData(is, myUseVForPInterp);
599  loadData(is, myTimeStep);
600 
601  return true;
602  }
603 
604  fpreal64 getBlend() const { return myBlend; }
605  void setBlend(fpreal64 val) { myBlend = val; }
606  fpreal64 opBlend(const SOP_NodeVerb::CookParms &cookparms) const
607  {
608  SOP_Node *thissop = cookparms.getNode();
609  if (!thissop) return getBlend();
611  OP_Utils::evalOpParm(result, thissop, "blend", cookparms.getCookTime(), 0);
612  return result;
613  }
614  const UT_StringHolder & getAttribs() const { return myAttribs; }
615  void setAttribs(const UT_StringHolder & val) { myAttribs = val; }
617  {
618  SOP_Node *thissop = cookparms.getNode();
619  if (!thissop) return getAttribs();
621  OP_Utils::evalOpParm(result, thissop, "attribs", cookparms.getCookTime(), 0);
622  return result;
623  }
624  const UT_StringHolder & getPtIDAttr() const { return myPtIDAttr; }
625  void setPtIDAttr(const UT_StringHolder & val) { myPtIDAttr = val; }
627  {
628  SOP_Node *thissop = cookparms.getNode();
629  if (!thissop) return getPtIDAttr();
631  OP_Utils::evalOpParm(result, thissop, "ptidattr", cookparms.getCookTime(), 0);
632  return result;
633  }
634  UnmatchedPoints getUnmatchedPoints() const { return UnmatchedPoints(myUnmatchedPoints); }
635  void setUnmatchedPoints(UnmatchedPoints val) { myUnmatchedPoints = int64(val); }
637  {
638  SOP_Node *thissop = cookparms.getNode();
639  if (!thissop) return getUnmatchedPoints();
640  int64 result;
641  OP_Utils::evalOpParm(result, thissop, "unmatchedpts", cookparms.getCookTime(), 0);
642  return UnmatchedPoints(result);
643  }
644  const UT_StringHolder & getUnmatchedPointGroup() const { return myUnmatchedPointGroup; }
645  void setUnmatchedPointGroup(const UT_StringHolder & val) { myUnmatchedPointGroup = val; }
647  {
648  SOP_Node *thissop = cookparms.getNode();
649  if (!thissop) return getUnmatchedPointGroup();
651  OP_Utils::evalOpParm(result, thissop, "unmatchedgroup", cookparms.getCookTime(), 0);
652  return result;
653  }
654  const UT_StringHolder & getPrimIDAttr() const { return myPrimIDAttr; }
655  void setPrimIDAttr(const UT_StringHolder & val) { myPrimIDAttr = val; }
657  {
658  SOP_Node *thissop = cookparms.getNode();
659  if (!thissop) return getPrimIDAttr();
661  OP_Utils::evalOpParm(result, thissop, "primidattr", cookparms.getCookTime(), 0);
662  return result;
663  }
664  VoxelBlend getVoxelBlend() const { return VoxelBlend(myVoxelBlend); }
665  void setVoxelBlend(VoxelBlend val) { myVoxelBlend = int64(val); }
667  {
668  SOP_Node *thissop = cookparms.getNode();
669  if (!thissop) return getVoxelBlend();
670  int64 result;
671  OP_Utils::evalOpParm(result, thissop, "voxelblend", cookparms.getCookTime(), 0);
672  return VoxelBlend(result);
673  }
674  fpreal64 getAdvectionDT() const { return myAdvectionDT; }
675  void setAdvectionDT(fpreal64 val) { myAdvectionDT = val; }
677  {
678  SOP_Node *thissop = cookparms.getNode();
679  if (!thissop) return getAdvectionDT();
681  OP_Utils::evalOpParm(result, thissop, "adt", cookparms.getCookTime(), 0);
682  return result;
683  }
684  const UT_StringHolder & getVelocityField() const { return myVelocityField; }
685  void setVelocityField(const UT_StringHolder & val) { myVelocityField = val; }
687  {
688  SOP_Node *thissop = cookparms.getNode();
689  if (!thissop) return getVelocityField();
691  OP_Utils::evalOpParm(result, thissop, "velocity", cookparms.getCookTime(), 0);
692  return result;
693  }
694  bool getDoSlerp() const { return myDoSlerp; }
695  void setDoSlerp(bool val) { myDoSlerp = val; }
696  bool opDoSlerp(const SOP_NodeVerb::CookParms &cookparms) const
697  {
698  SOP_Node *thissop = cookparms.getNode();
699  if (!thissop) return getDoSlerp();
700  bool result;
701  OP_Utils::evalOpParm(result, thissop, "doslerp", cookparms.getCookTime(), 0);
702  return result;
703  }
704  Interp getInterp() const { return Interp(myInterp); }
705  void setInterp(Interp val) { myInterp = int64(val); }
706  Interp opInterp(const SOP_NodeVerb::CookParms &cookparms) const
707  {
708  SOP_Node *thissop = cookparms.getNode();
709  if (!thissop) return getInterp();
710  int64 result;
711  OP_Utils::evalOpParm(result, thissop, "interp", cookparms.getCookTime(), 0);
712  return Interp(result);
713  }
714  bool getUseVForPInterp() const { return myUseVForPInterp; }
715  void setUseVForPInterp(bool val) { myUseVForPInterp = val; }
716  bool opUseVForPInterp(const SOP_NodeVerb::CookParms &cookparms) const
717  {
718  SOP_Node *thissop = cookparms.getNode();
719  if (!thissop) return getUseVForPInterp();
720  bool result;
721  OP_Utils::evalOpParm(result, thissop, "usevforpinterp", cookparms.getCookTime(), 0);
722  return result;
723  }
724  fpreal64 getTimeStep() const { return myTimeStep; }
725  void setTimeStep(fpreal64 val) { myTimeStep = val; }
727  {
728  SOP_Node *thissop = cookparms.getNode();
729  if (!thissop) return getTimeStep();
731  OP_Utils::evalOpParm(result, thissop, "timestep", cookparms.getCookTime(), 0);
732  return result;
733  }
734 
735 private:
736  fpreal64 myBlend;
737  UT_StringHolder myAttribs;
738  UT_StringHolder myPtIDAttr;
739  int64 myUnmatchedPoints;
740  UT_StringHolder myUnmatchedPointGroup;
741  UT_StringHolder myPrimIDAttr;
742  int64 myVoxelBlend;
743  fpreal64 myAdvectionDT;
744  UT_StringHolder myVelocityField;
745  bool myDoSlerp;
746  int64 myInterp;
747  bool myUseVForPInterp;
748  fpreal64 myTimeStep;
749 
750 };
exint getNestNumParms(TempIndex idx) const override
type
Definition: core.h:556
UT_StringHolder opPtIDAttr(const SOP_NodeVerb::CookParms &cookparms) const
VoxelBlend getVoxelBlend() const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
static void loadData(UT_IStream &is, UT_Vector3D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
fpreal64 getAdvectionDT() const
static void saveData(std::ostream &os, UT_Vector3D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
const UT_StringHolder & getVelocityField() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setTimeStep(fpreal64 val)
static void saveData(std::ostream &os, UT_Vector2D 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
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:63
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
Interp opInterp(const SOP_NodeVerb::CookParms &cookparms) const
GLsizei const GLfloat * value
Definition: glcorearb.h:824
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
const OP_Context & context() const
Definition: OP_NodeParms.h:97
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
static void loadData(UT_IStream &is, fpreal64 &v)
SYS_FORCE_INLINE const char * buffer() const
const char * getNestParmName(TempIndex fieldnum) const override
GLdouble s
Definition: glad.h:3009
UT_StringHolder opUnmatchedPointGroup(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
bool opUseVForPInterp(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setUseVForPInterp(bool val)
void setVelocityField(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector4I &v)
void save(std::ostream &os) const
UT_StringHolder opVelocityField(const SOP_NodeVerb::CookParms &cookparms) const
**But if you need a result
Definition: thread.h:622
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setUnmatchedPoints(UnmatchedPoints val)
UnmatchedPoints opUnmatchedPoints(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, fpreal64 v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
static void saveData(std::ostream &os, UT_Matrix3D 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.
static void loadData(UT_IStream &is, UT_StringHolder &v)
VoxelBlend opVoxelBlend(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opAttribs(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
static void saveData(std::ostream &os, UT_StringHolder s)
static void loadData(UT_IStream &is, UT_Vector2I &v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
bool load(UT_IStream &is)
double fpreal64
Definition: SYS_Types.h:201
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
fpreal64 getTimeStep() const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
static void loadData(UT_IStream &is, UT_Matrix4D &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
const UT_StringHolder & getPrimIDAttr() const
void setVoxelBlend(VoxelBlend val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
exint length() const
SYS_FORCE_INLINE const char * buffer() const
void setBlend(fpreal64 val)
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
void loadFromOpSubclass(const LoadParms &loadparms) override
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
void setAttribs(const UT_StringHolder &val)
bool operator==(const SOP_SBlend_2_0Parms &src) const
ParmType getNestParmType(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Vector4D v)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
static void loadData(UT_IStream &is, UT_Vector2D &v)
bool operator!=(const SOP_SBlend_2_0Parms &src) const
long long int64
Definition: SYS_Types.h:116
void setAdvectionDT(fpreal64 val)
static void loadData(UT_IStream &is, bool &v)
fpreal64 opAdvectionDT(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE UT_StringHolder getToken(UnmatchedPoints enum_value)
static void loadData(UT_IStream &is, int64 &v)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void saveData(std::ostream &os, UT_Matrix2D v)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:303
void setInterp(Interp val)
static void loadData(UT_IStream &is, UT_Vector3I &v)
GT_API const UT_StringHolder version
void setPrimIDAttr(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
UnmatchedPoints getUnmatchedPoints() const
UT_StringHolder opPrimIDAttr(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 fpreal
Definition: SYS_Types.h:278
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
static void saveData(std::ostream &os, bool v)
bool isParmColorRamp(exint idx) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
fpreal64 opBlend(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
static void loadData(UT_IStream &is, UT_Matrix2D &v)
GLuint GLfloat * val
Definition: glcorearb.h:1608
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
void setPtIDAttr(const UT_StringHolder &val)
#define SOP_API
Definition: SOP_API.h:10
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
const UT_StringHolder & getPtIDAttr() const
static void saveData(std::ostream &os, UT_Matrix4D v)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:372
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
void setUnmatchedPointGroup(const UT_StringHolder &val)
GLboolean r
Definition: glcorearb.h:1222
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
fpreal64 getBlend() const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
const UT_StringHolder & getUnmatchedPointGroup() const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
const UT_StringHolder & getAttribs() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
bool opDoSlerp(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void saveData(std::ostream &os, int64 v)
bool getUseVForPInterp() const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
fpreal64 opTimeStep(const SOP_NodeVerb::CookParms &cookparms) const
GLenum src
Definition: glcorearb.h:1793
void copyFrom(const OP_NodeParms *src) override
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663