HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_AttribFromParm.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 <SOP/SOP_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_AttribFromParmEnums
24 {
25  enum class Method
26  {
27  SINGLE = 0,
28  SUBNET,
29  COMPILE,
31  };
32 
34  getToken(Method enum_value)
35  {
36  using namespace UT::Literal;
37  switch (enum_value) {
38  case Method::SINGLE: return "single"_sh;
39  case Method::SUBNET: return "subnet"_sh;
40  case Method::COMPILE: return "compile"_sh;
41  case Method::SINGLEPOINT: return "singlepoint"_sh;
42  default: UT_ASSERT(false); return ""_sh;
43  }
44  }
45 
46 }
47 
48 
50 {
51 public:
52  static int version() { return 1; }
53 
55  {
56  myMethod = 0;
57  myNodepath = ""_UTsh;
58  myCategory = "*"_UTsh;
59  myName = "parms"_UTsh;
60  myParmfilter = "*"_UTsh;
61  myFlattenmultiparm = false;
62  myFlattenramp = false;
63  myEvaluateparms = true;
64  myChannelPrims = false;
65  myPackLockGeometry = true;
66  myExplicitWires = false;
67  myExplicitPorts = false;
68  myUpdateOnMove = false;
69  myUpdateOnRename = false;
70 
71  }
72 
73  explicit SOP_AttribFromParmParms(const SOP_AttribFromParmParms &) = default;
75  SOP_AttribFromParmParms(SOP_AttribFromParmParms &&) noexcept = default;
76  SOP_AttribFromParmParms &operator=(SOP_AttribFromParmParms &&) noexcept = default;
77 
78  ~SOP_AttribFromParmParms() override {}
79 
81  {
82  if (myMethod != src.myMethod) return false;
83  if (myNodepath != src.myNodepath) return false;
84  if (myCategory != src.myCategory) return false;
85  if (myName != src.myName) return false;
86  if (myParmfilter != src.myParmfilter) return false;
87  if (myFlattenmultiparm != src.myFlattenmultiparm) return false;
88  if (myFlattenramp != src.myFlattenramp) return false;
89  if (myEvaluateparms != src.myEvaluateparms) return false;
90  if (myChannelPrims != src.myChannelPrims) return false;
91  if (myPackLockGeometry != src.myPackLockGeometry) return false;
92  if (myExplicitWires != src.myExplicitWires) return false;
93  if (myExplicitPorts != src.myExplicitPorts) return false;
94  if (myUpdateOnMove != src.myUpdateOnMove) return false;
95  if (myUpdateOnRename != src.myUpdateOnRename) return false;
96 
97  return true;
98  }
100  {
101  return !operator==(src);
102  }
104 
105 
106 
107  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
108  {
109  myMethod = 0;
110  if (true)
111  graph->evalOpParm(myMethod, nodeidx, "method", time, 0);
112  myNodepath = ""_UTsh;
113  if (true)
114  graph->evalOpParm(myNodepath, nodeidx, "nodepath", time, 0);
115  myCategory = "*"_UTsh;
116  if (true)
117  graph->evalOpParm(myCategory, nodeidx, "category", time, 0);
118  myName = "parms"_UTsh;
119  if (true)
120  graph->evalOpParm(myName, nodeidx, "name", time, 0);
121  myParmfilter = "*"_UTsh;
122  if (true)
123  graph->evalOpParm(myParmfilter, nodeidx, "parmfilter", time, 0);
124  myFlattenmultiparm = false;
125  if (true)
126  graph->evalOpParm(myFlattenmultiparm, nodeidx, "flattenmultiparm", time, 0);
127  myFlattenramp = false;
128  if (true && ( (true&&!(((getFlattenmultiparm()==1)))) ) )
129  graph->evalOpParm(myFlattenramp, nodeidx, "flattenramp", time, 0);
130  myEvaluateparms = true;
131  if (true)
132  graph->evalOpParm(myEvaluateparms, nodeidx, "evaluateparms", time, 0);
133  myChannelPrims = false;
134  if (true && ( (true&&!(((int64(getMethod())==0))||((getEvaluateparms()==1)))) ) )
135  graph->evalOpParm(myChannelPrims, nodeidx, "channelprims", time, 0);
136  myPackLockGeometry = true;
137  if (true)
138  graph->evalOpParm(myPackLockGeometry, nodeidx, "packlockgeometry", time, 0);
139  myExplicitWires = false;
140  if (true)
141  graph->evalOpParm(myExplicitWires, nodeidx, "explicitwires", time, 0);
142  myExplicitPorts = false;
143  if (true)
144  graph->evalOpParm(myExplicitPorts, nodeidx, "explicitports", time, 0);
145  myUpdateOnMove = false;
146  if (true)
147  graph->evalOpParm(myUpdateOnMove, nodeidx, "updateonmove", time, 0);
148  myUpdateOnRename = false;
149  if (true)
150  graph->evalOpParm(myUpdateOnRename, nodeidx, "updateonrename", time, 0);
151 
152  }
153 
154 
155  void loadFromOpSubclass(const LoadParms &loadparms) override
156  {
157  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
158  }
159 
160 
161  void copyFrom(const OP_NodeParms *src) override
162  {
163  *this = *((const SOP_AttribFromParmParms *)src);
164  }
165 
166  template <typename T>
167  void
168  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
169  {
170  if (idx.size() < 1)
171  return;
172  UT_ASSERT(idx.size() == instance.size()+1);
173  if (idx.size() != instance.size()+1)
174  return;
175  switch (idx[0])
176  {
177  case 0:
178  coerceValue(value, myMethod);
179  break;
180  case 1:
181  coerceValue(value, myNodepath);
182  break;
183  case 2:
184  coerceValue(value, myCategory);
185  break;
186  case 3:
187  coerceValue(value, myName);
188  break;
189  case 4:
190  coerceValue(value, myParmfilter);
191  break;
192  case 5:
193  coerceValue(value, myFlattenmultiparm);
194  break;
195  case 6:
196  coerceValue(value, myFlattenramp);
197  break;
198  case 7:
199  coerceValue(value, myEvaluateparms);
200  break;
201  case 8:
202  coerceValue(value, myChannelPrims);
203  break;
204  case 9:
205  coerceValue(value, myPackLockGeometry);
206  break;
207  case 10:
208  coerceValue(value, myExplicitWires);
209  break;
210  case 11:
211  coerceValue(value, myExplicitPorts);
212  break;
213  case 12:
214  coerceValue(value, myUpdateOnMove);
215  break;
216  case 13:
217  coerceValue(value, myUpdateOnRename);
218  break;
219 
220  }
221  }
222 
223  bool isParmColorRamp(exint idx) const override
224  {
225  switch (idx)
226  {
227 
228  }
229  return false;
230  }
231 
232  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
233  { doGetParmValue(idx, instance, value); }
234  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
235  { doGetParmValue(idx, instance, value); }
236  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
237  { doGetParmValue(idx, instance, value); }
238  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
239  { doGetParmValue(idx, instance, value); }
240  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
241  { doGetParmValue(idx, instance, value); }
242  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
243  { doGetParmValue(idx, instance, value); }
244  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
245  { doGetParmValue(idx, instance, value); }
246  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
247  { doGetParmValue(idx, instance, value); }
248  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
249  { doGetParmValue(idx, instance, value); }
250  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
251  { doGetParmValue(idx, instance, value); }
252  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
253  { doGetParmValue(idx, instance, value); }
254 
255  template <typename T>
256  void
257  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
258  {
259  if (idx.size() < 1)
260  return;
261  UT_ASSERT(idx.size() == instance.size()+1);
262  if (idx.size() != instance.size()+1)
263  return;
264  switch (idx[0])
265  {
266  case 0:
267  coerceValue(myMethod, clampMinValue(0, clampMaxValue(3, value ) ));
268  break;
269  case 1:
270  coerceValue(myNodepath, ( ( value ) ));
271  break;
272  case 2:
273  coerceValue(myCategory, ( ( value ) ));
274  break;
275  case 3:
276  coerceValue(myName, ( ( value ) ));
277  break;
278  case 4:
279  coerceValue(myParmfilter, ( ( value ) ));
280  break;
281  case 5:
282  coerceValue(myFlattenmultiparm, ( ( value ) ));
283  break;
284  case 6:
285  coerceValue(myFlattenramp, ( ( value ) ));
286  break;
287  case 7:
288  coerceValue(myEvaluateparms, ( ( value ) ));
289  break;
290  case 8:
291  coerceValue(myChannelPrims, ( ( value ) ));
292  break;
293  case 9:
294  coerceValue(myPackLockGeometry, ( ( value ) ));
295  break;
296  case 10:
297  coerceValue(myExplicitWires, ( ( value ) ));
298  break;
299  case 11:
300  coerceValue(myExplicitPorts, ( ( value ) ));
301  break;
302  case 12:
303  coerceValue(myUpdateOnMove, ( ( value ) ));
304  break;
305  case 13:
306  coerceValue(myUpdateOnRename, ( ( value ) ));
307  break;
308 
309  }
310  }
311 
312  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
313  { doSetParmValue(idx, instance, value); }
314  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
315  { doSetParmValue(idx, instance, value); }
316  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
317  { doSetParmValue(idx, instance, value); }
318  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
319  { doSetParmValue(idx, instance, value); }
320  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
321  { doSetParmValue(idx, instance, value); }
322  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
323  { doSetParmValue(idx, instance, value); }
324  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
325  { doSetParmValue(idx, instance, value); }
326  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
327  { doSetParmValue(idx, instance, value); }
328  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
329  { doSetParmValue(idx, instance, value); }
330  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
331  { doSetParmValue(idx, instance, value); }
332  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
333  { doSetParmValue(idx, instance, value); }
334 
335  exint getNestNumParms(TempIndex idx) const override
336  {
337  if (idx.size() == 0)
338  return 14;
339  switch (idx[0])
340  {
341 
342  }
343  // Invalid
344  return 0;
345  }
346 
347  const char *getNestParmName(TempIndex fieldnum) const override
348  {
349  if (fieldnum.size() < 1)
350  return 0;
351  switch (fieldnum[0])
352  {
353  case 0:
354  return "method";
355  case 1:
356  return "nodepath";
357  case 2:
358  return "category";
359  case 3:
360  return "name";
361  case 4:
362  return "parmfilter";
363  case 5:
364  return "flattenmultiparm";
365  case 6:
366  return "flattenramp";
367  case 7:
368  return "evaluateparms";
369  case 8:
370  return "channelprims";
371  case 9:
372  return "packlockgeometry";
373  case 10:
374  return "explicitwires";
375  case 11:
376  return "explicitports";
377  case 12:
378  return "updateonmove";
379  case 13:
380  return "updateonrename";
381 
382  }
383  return 0;
384  }
385 
386  ParmType getNestParmType(TempIndex fieldnum) const override
387  {
388  if (fieldnum.size() < 1)
389  return PARM_UNSUPPORTED;
390  switch (fieldnum[0])
391  {
392  case 0:
393  return PARM_INTEGER;
394  case 1:
395  return PARM_STRING;
396  case 2:
397  return PARM_STRING;
398  case 3:
399  return PARM_STRING;
400  case 4:
401  return PARM_STRING;
402  case 5:
403  return PARM_INTEGER;
404  case 6:
405  return PARM_INTEGER;
406  case 7:
407  return PARM_INTEGER;
408  case 8:
409  return PARM_INTEGER;
410  case 9:
411  return PARM_INTEGER;
412  case 10:
413  return PARM_INTEGER;
414  case 11:
415  return PARM_INTEGER;
416  case 12:
417  return PARM_INTEGER;
418  case 13:
419  return PARM_INTEGER;
420 
421  }
422  return PARM_UNSUPPORTED;
423  }
424 
425  // Boiler plate to load individual types.
426  static void loadData(UT_IStream &is, int64 &v)
427  { is.bread(&v, 1); }
428  static void loadData(UT_IStream &is, bool &v)
429  { int64 iv; is.bread(&iv, 1); v = iv; }
430  static void loadData(UT_IStream &is, fpreal64 &v)
431  { is.bread<fpreal64>(&v, 1); }
432  static void loadData(UT_IStream &is, UT_Vector2D &v)
433  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
434  static void loadData(UT_IStream &is, UT_Vector3D &v)
435  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
436  is.bread<fpreal64>(&v.z(), 1); }
437  static void loadData(UT_IStream &is, UT_Vector4D &v)
438  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
439  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
440  static void loadData(UT_IStream &is, UT_Matrix2D &v)
441  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
442  static void loadData(UT_IStream &is, UT_Matrix3D &v)
443  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
444  static void loadData(UT_IStream &is, UT_Matrix4D &v)
445  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
446  static void loadData(UT_IStream &is, UT_Vector2I &v)
447  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
448  static void loadData(UT_IStream &is, UT_Vector3I &v)
449  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
450  is.bread<int64>(&v.z(), 1); }
451  static void loadData(UT_IStream &is, UT_Vector4I &v)
452  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
453  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
455  { is.bread(v); }
457  { UT_StringHolder rampdata;
458  loadData(is, rampdata);
459  if (rampdata.isstring())
460  {
461  v.reset(new UT_Ramp());
462  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
463  v->load(istr);
464  }
465  else v.reset();
466  }
469  loadData(is, data);
470  if (data.isstring())
471  {
472  // Find the data type.
473  const char *colon = UT_StringWrap(data).findChar(':');
474  if (colon)
475  {
476  int typelen = colon - data.buffer();
478  type.strncpy(data.buffer(), typelen);
479  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
480 
481  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
482  }
483  }
484  else v.reset();
485  }
486 
487  static void saveData(std::ostream &os, int64 v)
488  { UTwrite(os, &v); }
489  static void saveData(std::ostream &os, bool v)
490  { int64 iv = v; UTwrite(os, &iv); }
491  static void saveData(std::ostream &os, fpreal64 v)
492  { UTwrite<fpreal64>(os, &v); }
493  static void saveData(std::ostream &os, UT_Vector2D v)
494  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
495  static void saveData(std::ostream &os, UT_Vector3D v)
496  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
497  UTwrite<fpreal64>(os, &v.z()); }
498  static void saveData(std::ostream &os, UT_Vector4D v)
499  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
500  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
501  static void saveData(std::ostream &os, UT_Matrix2D v)
503  static void saveData(std::ostream &os, UT_Matrix3D v)
505  static void saveData(std::ostream &os, UT_Matrix4D v)
507  static void saveData(std::ostream &os, UT_StringHolder s)
508  { UT_StringWrap(s).saveBinary(os); }
509  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
511  UT_OStringStream ostr;
512  if (s) s->save(ostr);
513  result = ostr.str();
514  saveData(os, result);
515  }
516  static void saveData(std::ostream &os, PRM_DataItemHandle s)
518  UT_OStringStream ostr;
519  if (s)
520  {
521  ostr << s->getDataTypeToken();
522  ostr << ":";
523  s->saveBinary(ostr);
524  }
525  result = ostr.str();
526  saveData(os, result);
527  }
528 
529 
530  void save(std::ostream &os) const
531  {
532  int32 v = version();
533  UTwrite(os, &v);
534  saveData(os, myMethod);
535  saveData(os, myNodepath);
536  saveData(os, myCategory);
537  saveData(os, myName);
538  saveData(os, myParmfilter);
539  saveData(os, myFlattenmultiparm);
540  saveData(os, myFlattenramp);
541  saveData(os, myEvaluateparms);
542  saveData(os, myChannelPrims);
543  saveData(os, myPackLockGeometry);
544  saveData(os, myExplicitWires);
545  saveData(os, myExplicitPorts);
546  saveData(os, myUpdateOnMove);
547  saveData(os, myUpdateOnRename);
548 
549  }
550 
551  bool load(UT_IStream &is)
552  {
553  int32 v;
554  is.bread(&v, 1);
555  if (version() != v)
556  {
557  // Fail incompatible versions
558  return false;
559  }
560  loadData(is, myMethod);
561  loadData(is, myNodepath);
562  loadData(is, myCategory);
563  loadData(is, myName);
564  loadData(is, myParmfilter);
565  loadData(is, myFlattenmultiparm);
566  loadData(is, myFlattenramp);
567  loadData(is, myEvaluateparms);
568  loadData(is, myChannelPrims);
569  loadData(is, myPackLockGeometry);
570  loadData(is, myExplicitWires);
571  loadData(is, myExplicitPorts);
572  loadData(is, myUpdateOnMove);
573  loadData(is, myUpdateOnRename);
574 
575  return true;
576  }
577 
578  Method getMethod() const { return Method(myMethod); }
579  void setMethod(Method val) { myMethod = int64(val); }
580  Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
581  {
582  SOP_Node *thissop = cookparms.getNode();
583  if (!thissop) return getMethod();
584  int64 result;
585  OP_Utils::evalOpParm(result, thissop, "method", cookparms.getCookTime(), 0);
586  return Method(result);
587  }
588  const UT_StringHolder & getNodepath() const { return myNodepath; }
589  void setNodepath(const UT_StringHolder & val) { myNodepath = val; }
591  {
592  SOP_Node *thissop = cookparms.getNode();
593  if (!thissop) return getNodepath();
595  OP_Utils::evalOpParm(result, thissop, "nodepath", cookparms.getCookTime(), 0);
596  return result;
597  }
598  const UT_StringHolder & getCategory() const { return myCategory; }
599  void setCategory(const UT_StringHolder & val) { myCategory = val; }
601  {
602  SOP_Node *thissop = cookparms.getNode();
603  if (!thissop) return getCategory();
605  OP_Utils::evalOpParm(result, thissop, "category", cookparms.getCookTime(), 0);
606  return result;
607  }
608  const UT_StringHolder & getName() const { return myName; }
609  void setName(const UT_StringHolder & val) { myName = val; }
611  {
612  SOP_Node *thissop = cookparms.getNode();
613  if (!thissop) return getName();
615  OP_Utils::evalOpParm(result, thissop, "name", cookparms.getCookTime(), 0);
616  return result;
617  }
618  const UT_StringHolder & getParmfilter() const { return myParmfilter; }
619  void setParmfilter(const UT_StringHolder & val) { myParmfilter = val; }
621  {
622  SOP_Node *thissop = cookparms.getNode();
623  if (!thissop) return getParmfilter();
625  OP_Utils::evalOpParm(result, thissop, "parmfilter", cookparms.getCookTime(), 0);
626  return result;
627  }
628  bool getFlattenmultiparm() const { return myFlattenmultiparm; }
629  void setFlattenmultiparm(bool val) { myFlattenmultiparm = val; }
630  bool opFlattenmultiparm(const SOP_NodeVerb::CookParms &cookparms) const
631  {
632  SOP_Node *thissop = cookparms.getNode();
633  if (!thissop) return getFlattenmultiparm();
634  bool result;
635  OP_Utils::evalOpParm(result, thissop, "flattenmultiparm", cookparms.getCookTime(), 0);
636  return result;
637  }
638  bool getFlattenramp() const { return myFlattenramp; }
639  void setFlattenramp(bool val) { myFlattenramp = val; }
640  bool opFlattenramp(const SOP_NodeVerb::CookParms &cookparms) const
641  {
642  SOP_Node *thissop = cookparms.getNode();
643  if (!thissop) return getFlattenramp();
644  bool result;
645  OP_Utils::evalOpParm(result, thissop, "flattenramp", cookparms.getCookTime(), 0);
646  return result;
647  }
648  bool getEvaluateparms() const { return myEvaluateparms; }
649  void setEvaluateparms(bool val) { myEvaluateparms = val; }
650  bool opEvaluateparms(const SOP_NodeVerb::CookParms &cookparms) const
651  {
652  SOP_Node *thissop = cookparms.getNode();
653  if (!thissop) return getEvaluateparms();
654  bool result;
655  OP_Utils::evalOpParm(result, thissop, "evaluateparms", cookparms.getCookTime(), 0);
656  return result;
657  }
658  bool getChannelPrims() const { return myChannelPrims; }
659  void setChannelPrims(bool val) { myChannelPrims = val; }
660  bool opChannelPrims(const SOP_NodeVerb::CookParms &cookparms) const
661  {
662  SOP_Node *thissop = cookparms.getNode();
663  if (!thissop) return getChannelPrims();
664  bool result;
665  OP_Utils::evalOpParm(result, thissop, "channelprims", cookparms.getCookTime(), 0);
666  return result;
667  }
668  bool getPackLockGeometry() const { return myPackLockGeometry; }
669  void setPackLockGeometry(bool val) { myPackLockGeometry = val; }
670  bool opPackLockGeometry(const SOP_NodeVerb::CookParms &cookparms) const
671  {
672  SOP_Node *thissop = cookparms.getNode();
673  if (!thissop) return getPackLockGeometry();
674  bool result;
675  OP_Utils::evalOpParm(result, thissop, "packlockgeometry", cookparms.getCookTime(), 0);
676  return result;
677  }
678  bool getExplicitWires() const { return myExplicitWires; }
679  void setExplicitWires(bool val) { myExplicitWires = val; }
680  bool opExplicitWires(const SOP_NodeVerb::CookParms &cookparms) const
681  {
682  SOP_Node *thissop = cookparms.getNode();
683  if (!thissop) return getExplicitWires();
684  bool result;
685  OP_Utils::evalOpParm(result, thissop, "explicitwires", cookparms.getCookTime(), 0);
686  return result;
687  }
688  bool getExplicitPorts() const { return myExplicitPorts; }
689  void setExplicitPorts(bool val) { myExplicitPorts = val; }
690  bool opExplicitPorts(const SOP_NodeVerb::CookParms &cookparms) const
691  {
692  SOP_Node *thissop = cookparms.getNode();
693  if (!thissop) return getExplicitPorts();
694  bool result;
695  OP_Utils::evalOpParm(result, thissop, "explicitports", cookparms.getCookTime(), 0);
696  return result;
697  }
698  bool getUpdateOnMove() const { return myUpdateOnMove; }
699  void setUpdateOnMove(bool val) { myUpdateOnMove = val; }
700  bool opUpdateOnMove(const SOP_NodeVerb::CookParms &cookparms) const
701  {
702  SOP_Node *thissop = cookparms.getNode();
703  if (!thissop) return getUpdateOnMove();
704  bool result;
705  OP_Utils::evalOpParm(result, thissop, "updateonmove", cookparms.getCookTime(), 0);
706  return result;
707  }
708  bool getUpdateOnRename() const { return myUpdateOnRename; }
709  void setUpdateOnRename(bool val) { myUpdateOnRename = val; }
710  bool opUpdateOnRename(const SOP_NodeVerb::CookParms &cookparms) const
711  {
712  SOP_Node *thissop = cookparms.getNode();
713  if (!thissop) return getUpdateOnRename();
714  bool result;
715  OP_Utils::evalOpParm(result, thissop, "updateonrename", cookparms.getCookTime(), 0);
716  return result;
717  }
718 
719 private:
720  int64 myMethod;
721  UT_StringHolder myNodepath;
722  UT_StringHolder myCategory;
723  UT_StringHolder myName;
724  UT_StringHolder myParmfilter;
725  bool myFlattenmultiparm;
726  bool myFlattenramp;
727  bool myEvaluateparms;
728  bool myChannelPrims;
729  bool myPackLockGeometry;
730  bool myExplicitWires;
731  bool myExplicitPorts;
732  bool myUpdateOnMove;
733  bool myUpdateOnRename;
734 
735 };
static void loadData(UT_IStream &is, bool &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
bool opUpdateOnRename(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setName(const UT_StringHolder &val)
SYS_FORCE_INLINE UT_StringHolder getToken(Method enum_value)
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:62
static void loadData(UT_IStream &is, UT_Vector2I &v)
const OP_Context & context() const
Definition: OP_NodeParms.h:97
static void loadData(UT_IStream &is, int64 &v)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
void copyFrom(const OP_NodeParms *src) override
GLdouble s
Definition: glad.h:3009
const UT_StringHolder & getCategory() const
UT_StringHolder opName(const SOP_NodeVerb::CookParms &cookparms) const
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, fpreal64 &v)
void setCategory(const UT_StringHolder &val)
**But if you need a result
Definition: thread.h:613
bool opExplicitPorts(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector2D v)
static void saveData(std::ostream &os, int64 v)
static void saveData(std::ostream &os, fpreal64 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.
bool isParmColorRamp(exint idx) const override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
const UT_StringHolder & getName() const
bool opEvaluateparms(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
Method opMethod(const SOP_NodeVerb::CookParms &cookparms) const
exint length() const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
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:495
PXL_API const char * getName(const ColorSpace *space)
Return the name of the color space.
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
static void saveData(std::ostream &os, UT_Vector3D v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
bool opExplicitWires(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
long long int64
Definition: SYS_Types.h:116
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
bool operator==(const SOP_AttribFromParmParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
const UT_StringHolder & getNodepath() const
static void saveData(std::ostream &os, bool v)
const char * getNestParmName(TempIndex fieldnum) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
GT_API const UT_StringHolder version
static void saveData(std::ostream &os, UT_Vector4D v)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
exint getNestNumParms(TempIndex idx) const override
UT_StringHolder opNodepath(const SOP_NodeVerb::CookParms &cookparms) const
ParmType getNestParmType(TempIndex fieldnum) const override
const UT_StringHolder & getParmfilter() const
bool operator!=(const SOP_AttribFromParmParms &src) const
bool opUpdateOnMove(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opCategory(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void loadFromOpSubclass(const LoadParms &loadparms) override
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
void setNodepath(const UT_StringHolder &val)
bool opPackLockGeometry(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
static void loadData(UT_IStream &is, UT_Matrix4D &v)
GLuint GLfloat * val
Definition: glcorearb.h:1608
bool opChannelPrims(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
#define SOP_API
Definition: SOP_API.h:10
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, UT_Vector3I &v)
bool opFlattenmultiparm(const SOP_NodeVerb::CookParms &cookparms) const
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
UT_StringHolder opParmfilter(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setParmfilter(const UT_StringHolder &val)
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
bool opFlattenramp(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix2D v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
GLboolean r
Definition: glcorearb.h:1222
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
type
Definition: core.h:1059
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
static void saveData(std::ostream &os, UT_Matrix4D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
void save(std::ostream &os) const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void saveData(std::ostream &os, UT_StringHolder s)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663