HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Connectivity.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_ConnectivityEnums
24 {
25  enum class Connecttype
26  {
27  POINT = 0,
28  PRIM
29  };
30 
32  getToken(Connecttype enum_value)
33  {
34  using namespace UT::Literal;
35  switch (enum_value) {
36  case Connecttype::POINT: return "point"_sh;
37  case Connecttype::PRIM: return "prim"_sh;
38  default: UT_ASSERT(false); return ""_sh;
39  }
40  }
41 
42  enum class AttribType
43  {
44  INT = 0,
45  STRING
46  };
47 
49  getToken(AttribType enum_value)
50  {
51  using namespace UT::Literal;
52  switch (enum_value) {
53  case AttribType::INT: return "int"_sh;
54  case AttribType::STRING: return "string"_sh;
55  default: UT_ASSERT(false); return ""_sh;
56  }
57  }
58 
59 }
60 
61 
63 {
64 public:
65  static int version() { return 1; }
66 
68  {
69  myConnecttype = 0;
70  myPrimitiveIncludeGroup = ""_UTsh;
71  myPointIncludeGroup = ""_UTsh;
72  myAttribname = "class"_UTsh;
73  myAttribType = 0;
74  myPrefix = "piece"_UTsh;
75  myCreatevarmap = false;
76  myVarname = ""_UTsh;
77  mySeamgroup = ""_UTsh;
78  myByuv = false;
79  myUVAttrib = "uv"_UTsh;
80 
81  }
82 
83  explicit SOP_ConnectivityParms(const SOP_ConnectivityParms &) = default;
85  SOP_ConnectivityParms(SOP_ConnectivityParms &&) noexcept = default;
86  SOP_ConnectivityParms &operator=(SOP_ConnectivityParms &&) noexcept = default;
87 
88  ~SOP_ConnectivityParms() override {}
89 
91  {
92  if (myConnecttype != src.myConnecttype) return false;
93  if (myPrimitiveIncludeGroup != src.myPrimitiveIncludeGroup) return false;
94  if (myPointIncludeGroup != src.myPointIncludeGroup) return false;
95  if (myAttribname != src.myAttribname) return false;
96  if (myAttribType != src.myAttribType) return false;
97  if (myPrefix != src.myPrefix) return false;
98  if (myCreatevarmap != src.myCreatevarmap) return false;
99  if (myVarname != src.myVarname) return false;
100  if (mySeamgroup != src.mySeamgroup) return false;
101  if (myByuv != src.myByuv) return false;
102  if (myUVAttrib != src.myUVAttrib) return false;
103 
104 
105  if (baseGetSignature() != src.baseGetSignature()) return false;
106 
107  return true;
108  }
110  {
111  return !operator==(src);
112  }
115 
116 
117 
118  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
119  {
120  myConnecttype = 0;
121  if (true)
122  graph->evalOpParm(myConnecttype, nodeidx, "connecttype", time, graph->isDirect()?nullptr:depnode);
123  myPrimitiveIncludeGroup = ""_UTsh;
124  if (true)
125  graph->evalOpParm(myPrimitiveIncludeGroup, nodeidx, "primincgroup", time, graph->isDirect()?nullptr:depnode);
126  myPointIncludeGroup = ""_UTsh;
127  if (true && ( (true&&!(((int64(getConnecttype())!=0)))) ) )
128  graph->evalOpParm(myPointIncludeGroup, nodeidx, "pointincgroup", time, graph->isDirect()?nullptr:depnode);
129  myAttribname = "class"_UTsh;
130  if (true)
131  graph->evalOpParm(myAttribname, nodeidx, "attribname", time, graph->isDirect()?nullptr:depnode);
132  myAttribType = 0;
133  if (true)
134  graph->evalOpParm(myAttribType, nodeidx, "attribtype", time, graph->isDirect()?nullptr:depnode);
135  myPrefix = "piece"_UTsh;
136  if (true && ( (true&&!(((int64(getAttribType())!=1))||((int64(getAttribType())!=1)))) ) )
137  graph->evalOpParm(myPrefix, nodeidx, "prefix", time, graph->isDirect()?nullptr:depnode);
138  myCreatevarmap = false;
139  if (true)
140  graph->evalOpParm(myCreatevarmap, nodeidx, "createvarmap", time, graph->isDirect()?nullptr:depnode);
141  myVarname = ""_UTsh;
142  if (true && ( (true&&!(((getCreatevarmap()==0)))) ) )
143  graph->evalOpParm(myVarname, nodeidx, "varname", time, graph->isDirect()?nullptr:depnode);
144  mySeamgroup = ""_UTsh;
145  if (true && ( (true&&!(((int64(getConnecttype())==0)))) ) )
146  graph->evalOpParm(mySeamgroup, nodeidx, "seamgroup", time, graph->isDirect()?nullptr:depnode);
147  myByuv = false;
148  if (true && ( (true&&!(((int64(getConnecttype())==0))||((getSeamgroup()!="")))) ) )
149  graph->evalOpParm(myByuv, nodeidx, "byuv", time, graph->isDirect()?nullptr:depnode);
150  myUVAttrib = "uv"_UTsh;
151  if (true && ( (true&&!(((int64(getConnecttype())==0))||((getSeamgroup()!=""))||((getByuv()==0)))) ) )
152  graph->evalOpParm(myUVAttrib, nodeidx, "uvattrib", time, graph->isDirect()?nullptr:depnode);
153 
154  }
155 
156 
157  void loadFromOpSubclass(const LoadParms &loadparms) override
158  {
159  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
160  }
161 
162 
163  void copyFrom(const OP_NodeParms *src) override
164  {
165  *this = *((const SOP_ConnectivityParms *)src);
166  }
167 
168  template <typename T>
169  void
170  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
171  {
172  if (idx.size() < 1)
173  return;
174  UT_ASSERT(idx.size() == instance.size()+1);
175  if (idx.size() != instance.size()+1)
176  return;
177  switch (idx[0])
178  {
179  case 0:
180  coerceValue(value, myConnecttype);
181  break;
182  case 1:
183  coerceValue(value, myPrimitiveIncludeGroup);
184  break;
185  case 2:
186  coerceValue(value, myPointIncludeGroup);
187  break;
188  case 3:
189  coerceValue(value, myAttribname);
190  break;
191  case 4:
192  coerceValue(value, myAttribType);
193  break;
194  case 5:
195  coerceValue(value, myPrefix);
196  break;
197  case 6:
198  coerceValue(value, myCreatevarmap);
199  break;
200  case 7:
201  coerceValue(value, myVarname);
202  break;
203  case 8:
204  coerceValue(value, mySeamgroup);
205  break;
206  case 9:
207  coerceValue(value, myByuv);
208  break;
209  case 10:
210  coerceValue(value, myUVAttrib);
211  break;
212 
213  }
214  }
215 
216  bool isParmColorRamp(exint idx) const override
217  {
218  switch (idx)
219  {
220 
221  }
222  return false;
223  }
224 
225  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
226  { doGetParmValue(idx, instance, value); }
227  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
228  { doGetParmValue(idx, instance, value); }
229  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
230  { doGetParmValue(idx, instance, value); }
231  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
232  { doGetParmValue(idx, instance, value); }
233  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
234  { doGetParmValue(idx, instance, value); }
235  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
236  { doGetParmValue(idx, instance, value); }
237  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
238  { doGetParmValue(idx, instance, value); }
239  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
240  { doGetParmValue(idx, instance, value); }
241  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
242  { doGetParmValue(idx, instance, value); }
243  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
244  { doGetParmValue(idx, instance, value); }
245  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
246  { doGetParmValue(idx, instance, value); }
247 
248  template <typename T>
249  void
250  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
251  {
252  if (idx.size() < 1)
253  return;
254  UT_ASSERT(idx.size() == instance.size()+1);
255  if (idx.size() != instance.size()+1)
256  return;
257  switch (idx[0])
258  {
259  case 0:
260  coerceValue(myConnecttype, clampMinValue(0, clampMaxValue(1, value ) ));
261  break;
262  case 1:
263  coerceValue(myPrimitiveIncludeGroup, ( ( value ) ));
264  break;
265  case 2:
266  coerceValue(myPointIncludeGroup, ( ( value ) ));
267  break;
268  case 3:
269  coerceValue(myAttribname, ( ( value ) ));
270  break;
271  case 4:
272  coerceValue(myAttribType, clampMinValue(0, clampMaxValue(1, value ) ));
273  break;
274  case 5:
275  coerceValue(myPrefix, ( ( value ) ));
276  break;
277  case 6:
278  coerceValue(myCreatevarmap, ( ( value ) ));
279  break;
280  case 7:
281  coerceValue(myVarname, ( ( value ) ));
282  break;
283  case 8:
284  coerceValue(mySeamgroup, ( ( value ) ));
285  break;
286  case 9:
287  coerceValue(myByuv, ( ( value ) ));
288  break;
289  case 10:
290  coerceValue(myUVAttrib, ( ( value ) ));
291  break;
292 
293  }
294  }
295 
296  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
297  { doSetParmValue(idx, instance, value); }
298  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
299  { doSetParmValue(idx, instance, value); }
300  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
301  { doSetParmValue(idx, instance, value); }
302  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
303  { doSetParmValue(idx, instance, value); }
304  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
305  { doSetParmValue(idx, instance, value); }
306  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
307  { doSetParmValue(idx, instance, value); }
308  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
309  { doSetParmValue(idx, instance, value); }
310  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
311  { doSetParmValue(idx, instance, value); }
312  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
313  { doSetParmValue(idx, instance, value); }
314  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
315  { doSetParmValue(idx, instance, value); }
316  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
317  { doSetParmValue(idx, instance, value); }
318 
319  exint getNestNumParms(TempIndex idx) const override
320  {
321  if (idx.size() == 0)
322  return 11;
323  switch (idx[0])
324  {
325 
326  }
327  // Invalid
328  return 0;
329  }
330 
331  const char *getNestParmName(TempIndex fieldnum) const override
332  {
333  if (fieldnum.size() < 1)
334  return 0;
335  switch (fieldnum[0])
336  {
337  case 0:
338  return "connecttype";
339  case 1:
340  return "primincgroup";
341  case 2:
342  return "pointincgroup";
343  case 3:
344  return "attribname";
345  case 4:
346  return "attribtype";
347  case 5:
348  return "prefix";
349  case 6:
350  return "createvarmap";
351  case 7:
352  return "varname";
353  case 8:
354  return "seamgroup";
355  case 9:
356  return "byuv";
357  case 10:
358  return "uvattrib";
359 
360  }
361  return 0;
362  }
363 
364  ParmType getNestParmType(TempIndex fieldnum) const override
365  {
366  if (fieldnum.size() < 1)
367  return PARM_UNSUPPORTED;
368  switch (fieldnum[0])
369  {
370  case 0:
371  return PARM_INTEGER;
372  case 1:
373  return PARM_STRING;
374  case 2:
375  return PARM_STRING;
376  case 3:
377  return PARM_STRING;
378  case 4:
379  return PARM_INTEGER;
380  case 5:
381  return PARM_STRING;
382  case 6:
383  return PARM_INTEGER;
384  case 7:
385  return PARM_STRING;
386  case 8:
387  return PARM_STRING;
388  case 9:
389  return PARM_INTEGER;
390  case 10:
391  return PARM_STRING;
392 
393  }
394  return PARM_UNSUPPORTED;
395  }
396 
397  // Boiler plate to load individual types.
398  static void loadData(UT_IStream &is, int64 &v)
399  { is.bread(&v, 1); }
400  static void loadData(UT_IStream &is, bool &v)
401  { int64 iv; is.bread(&iv, 1); v = iv; }
402  static void loadData(UT_IStream &is, fpreal64 &v)
403  { is.bread<fpreal64>(&v, 1); }
404  static void loadData(UT_IStream &is, UT_Vector2D &v)
405  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
406  static void loadData(UT_IStream &is, UT_Vector3D &v)
407  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
408  is.bread<fpreal64>(&v.z(), 1); }
409  static void loadData(UT_IStream &is, UT_Vector4D &v)
410  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
411  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
412  static void loadData(UT_IStream &is, UT_Matrix2D &v)
413  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
414  static void loadData(UT_IStream &is, UT_Matrix3D &v)
415  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
416  static void loadData(UT_IStream &is, UT_Matrix4D &v)
417  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
418  static void loadData(UT_IStream &is, UT_Vector2I &v)
419  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
420  static void loadData(UT_IStream &is, UT_Vector3I &v)
421  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
422  is.bread<int64>(&v.z(), 1); }
423  static void loadData(UT_IStream &is, UT_Vector4I &v)
424  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
425  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
427  { is.bread(v); }
429  { UT_StringHolder rampdata;
430  loadData(is, rampdata);
431  if (rampdata.isstring())
432  {
433  v.reset(new UT_Ramp());
434  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
435  v->load(istr);
436  }
437  else v.reset();
438  }
441  loadData(is, data);
442  if (data.isstring())
443  {
444  // Find the data type.
445  const char *colon = UT_StringWrap(data).findChar(':');
446  if (colon)
447  {
448  int typelen = colon - data.buffer();
450  type.strncpy(data.buffer(), typelen);
451  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
452 
453  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
454  }
455  }
456  else v.reset();
457  }
458 
459  static void saveData(std::ostream &os, int64 v)
460  { UTwrite(os, &v); }
461  static void saveData(std::ostream &os, bool v)
462  { int64 iv = v; UTwrite(os, &iv); }
463  static void saveData(std::ostream &os, fpreal64 v)
464  { UTwrite<fpreal64>(os, &v); }
465  static void saveData(std::ostream &os, UT_Vector2D v)
466  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
467  static void saveData(std::ostream &os, UT_Vector3D v)
468  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
469  UTwrite<fpreal64>(os, &v.z()); }
470  static void saveData(std::ostream &os, UT_Vector4D v)
471  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
472  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
473  static void saveData(std::ostream &os, UT_Matrix2D v)
475  static void saveData(std::ostream &os, UT_Matrix3D v)
477  static void saveData(std::ostream &os, UT_Matrix4D v)
479  static void saveData(std::ostream &os, UT_StringHolder s)
480  { UT_StringWrap(s).saveBinary(os); }
481  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
483  UT_OStringStream ostr;
484  if (s) s->save(ostr);
485  result = ostr.str();
486  saveData(os, result);
487  }
488  static void saveData(std::ostream &os, PRM_DataItemHandle s)
490  UT_OStringStream ostr;
491  if (s)
492  {
493  ostr << s->getDataTypeToken();
494  ostr << ":";
495  s->saveBinary(ostr);
496  }
497  result = ostr.str();
498  saveData(os, result);
499  }
500 
501 
502  void save(std::ostream &os) const
503  {
504  int32 v = version();
505  UTwrite(os, &v);
506  saveData(os, myConnecttype);
507  saveData(os, myPrimitiveIncludeGroup);
508  saveData(os, myPointIncludeGroup);
509  saveData(os, myAttribname);
510  saveData(os, myAttribType);
511  saveData(os, myPrefix);
512  saveData(os, myCreatevarmap);
513  saveData(os, myVarname);
514  saveData(os, mySeamgroup);
515  saveData(os, myByuv);
516  saveData(os, myUVAttrib);
517 
518  }
519 
520  bool load(UT_IStream &is)
521  {
522  int32 v;
523  is.bread(&v, 1);
524  if (version() != v)
525  {
526  // Fail incompatible versions
527  return false;
528  }
529  loadData(is, myConnecttype);
530  loadData(is, myPrimitiveIncludeGroup);
531  loadData(is, myPointIncludeGroup);
532  loadData(is, myAttribname);
533  loadData(is, myAttribType);
534  loadData(is, myPrefix);
535  loadData(is, myCreatevarmap);
536  loadData(is, myVarname);
537  loadData(is, mySeamgroup);
538  loadData(is, myByuv);
539  loadData(is, myUVAttrib);
540 
541  return true;
542  }
543 
544  Connecttype getConnecttype() const { return Connecttype(myConnecttype); }
545  void setConnecttype(Connecttype val) { myConnecttype = int64(val); }
547  {
548  SOP_Node *thissop = cookparms.getNode();
549  if (!thissop) return getConnecttype();
550  int64 result;
551  OP_Utils::evalOpParm(result, thissop, "connecttype", cookparms.getCookTime(), 0);
552  return Connecttype(result);
553  }
554  const UT_StringHolder & getPrimitiveIncludeGroup() const { return myPrimitiveIncludeGroup; }
555  void setPrimitiveIncludeGroup(const UT_StringHolder & val) { myPrimitiveIncludeGroup = val; }
557  {
558  SOP_Node *thissop = cookparms.getNode();
559  if (!thissop) return getPrimitiveIncludeGroup();
561  OP_Utils::evalOpParm(result, thissop, "primincgroup", cookparms.getCookTime(), 0);
562  return result;
563  }
564  const UT_StringHolder & getPointIncludeGroup() const { return myPointIncludeGroup; }
565  void setPointIncludeGroup(const UT_StringHolder & val) { myPointIncludeGroup = val; }
567  {
568  SOP_Node *thissop = cookparms.getNode();
569  if (!thissop) return getPointIncludeGroup();
571  OP_Utils::evalOpParm(result, thissop, "pointincgroup", cookparms.getCookTime(), 0);
572  return result;
573  }
574  const UT_StringHolder & getAttribname() const { return myAttribname; }
575  void setAttribname(const UT_StringHolder & val) { myAttribname = val; }
577  {
578  SOP_Node *thissop = cookparms.getNode();
579  if (!thissop) return getAttribname();
581  OP_Utils::evalOpParm(result, thissop, "attribname", cookparms.getCookTime(), 0);
582  return result;
583  }
584  AttribType getAttribType() const { return AttribType(myAttribType); }
585  void setAttribType(AttribType val) { myAttribType = int64(val); }
587  {
588  SOP_Node *thissop = cookparms.getNode();
589  if (!thissop) return getAttribType();
590  int64 result;
591  OP_Utils::evalOpParm(result, thissop, "attribtype", cookparms.getCookTime(), 0);
592  return AttribType(result);
593  }
594  const UT_StringHolder & getPrefix() const { return myPrefix; }
595  void setPrefix(const UT_StringHolder & val) { myPrefix = val; }
597  {
598  SOP_Node *thissop = cookparms.getNode();
599  if (!thissop) return getPrefix();
601  OP_Utils::evalOpParm(result, thissop, "prefix", cookparms.getCookTime(), 0);
602  return result;
603  }
604  bool getCreatevarmap() const { return myCreatevarmap; }
605  void setCreatevarmap(bool val) { myCreatevarmap = val; }
606  bool opCreatevarmap(const SOP_NodeVerb::CookParms &cookparms) const
607  {
608  SOP_Node *thissop = cookparms.getNode();
609  if (!thissop) return getCreatevarmap();
610  bool result;
611  OP_Utils::evalOpParm(result, thissop, "createvarmap", cookparms.getCookTime(), 0);
612  return result;
613  }
614  const UT_StringHolder & getVarname() const { return myVarname; }
615  void setVarname(const UT_StringHolder & val) { myVarname = val; }
617  {
618  SOP_Node *thissop = cookparms.getNode();
619  if (!thissop) return getVarname();
621  OP_Utils::evalOpParm(result, thissop, "varname", cookparms.getCookTime(), 0);
622  return result;
623  }
624  const UT_StringHolder & getSeamgroup() const { return mySeamgroup; }
625  void setSeamgroup(const UT_StringHolder & val) { mySeamgroup = val; }
627  {
628  SOP_Node *thissop = cookparms.getNode();
629  if (!thissop) return getSeamgroup();
631  OP_Utils::evalOpParm(result, thissop, "seamgroup", cookparms.getCookTime(), 0);
632  return result;
633  }
634  bool getByuv() const { return myByuv; }
635  void setByuv(bool val) { myByuv = val; }
636  bool opByuv(const SOP_NodeVerb::CookParms &cookparms) const
637  {
638  SOP_Node *thissop = cookparms.getNode();
639  if (!thissop) return getByuv();
640  bool result;
641  OP_Utils::evalOpParm(result, thissop, "byuv", cookparms.getCookTime(), 0);
642  return result;
643  }
644  const UT_StringHolder & getUVAttrib() const { return myUVAttrib; }
645  void setUVAttrib(const UT_StringHolder & val) { myUVAttrib = val; }
647  {
648  SOP_Node *thissop = cookparms.getNode();
649  if (!thissop) return getUVAttrib();
651  OP_Utils::evalOpParm(result, thissop, "uvattrib", cookparms.getCookTime(), 0);
652  return result;
653  }
654 
655 private:
656  int64 myConnecttype;
657  UT_StringHolder myPrimitiveIncludeGroup;
658  UT_StringHolder myPointIncludeGroup;
659  UT_StringHolder myAttribname;
660  int64 myAttribType;
661  UT_StringHolder myPrefix;
662  bool myCreatevarmap;
663  UT_StringHolder myVarname;
664  UT_StringHolder mySeamgroup;
665  bool myByuv;
666  UT_StringHolder myUVAttrib;
667 
668 };
type
Definition: core.h:556
const UT_StringHolder & getAttribname() const
void save(std::ostream &os) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void saveData(std::ostream &os, UT_Vector2D v)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
static void saveData(std::ostream &os, int64 v)
bool opCreatevarmap(const SOP_NodeVerb::CookParms &cookparms) const
void setPointIncludeGroup(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector3I &v)
bool isParmColorRamp(exint idx) const override
static void loadData(UT_IStream &is, bool &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
exint bread(int32 *buffer, exint asize=1)
void setConnecttype(Connecttype val)
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
const UT_StringHolder & getPrimitiveIncludeGroup() const
GLsizei const GLfloat * value
Definition: glcorearb.h:824
void setPrimitiveIncludeGroup(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
bool load(UT_IStream &is)
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
SYS_FORCE_INLINE const char * buffer() const
GLdouble s
Definition: glad.h:3009
ParmType getNestParmType(TempIndex fieldnum) const override
static void saveData(std::ostream &os, fpreal64 v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
An output stream object that owns its own string buffer storage.
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
**But if you need a result
Definition: thread.h:622
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void saveData(std::ostream &os, UT_Matrix4D v)
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
static void loadData(UT_IStream &is, UT_Vector2D &v)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
Connecttype opConnecttype(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
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
UT_StringHolder opPointIncludeGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
bool operator==(const SOP_ConnectivityParms &src) const
void setSeamgroup(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void setUVAttrib(const UT_StringHolder &val)
exint length() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &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
void setAttribType(AttribType val)
static void loadData(UT_IStream &is, UT_Vector4I &v)
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
const UT_StringHolder & getPointIncludeGroup() const
UT_StringHolder opPrimitiveIncludeGroup(const SOP_NodeVerb::CookParms &cookparms) const
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
static void saveData(std::ostream &os, UT_StringHolder s)
static void saveData(std::ostream &os, bool v)
exint getNestNumParms(TempIndex idx) const override
long long int64
Definition: SYS_Types.h:116
SYS_FORCE_INLINE UT_StringHolder getToken(Connecttype enum_value)
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
const UT_StringHolder & getSeamgroup() const
UT_StringHolder opUVAttrib(const SOP_NodeVerb::CookParms &cookparms) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
UT_StringHolder opAttribname(const SOP_NodeVerb::CookParms &cookparms) const
bool operator!=(const SOP_ConnectivityParms &src) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:303
const UT_StringHolder & getVarname() const
GT_API const UT_StringHolder version
UT_StringHolder opVarname(const SOP_NodeVerb::CookParms &cookparms) const
void loadFromOpSubclass(const LoadParms &loadparms) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
bool opByuv(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
const char * getNestParmName(TempIndex fieldnum) const override
AttribType opAttribType(const SOP_NodeVerb::CookParms &cookparms) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
const UT_StringHolder & getUVAttrib() const
fpreal64 fpreal
Definition: SYS_Types.h:278
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
LeafData & operator=(const LeafData &)=delete
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void saveData(std::ostream &os, UT_Vector4D v)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
GLuint GLfloat * val
Definition: glcorearb.h:1608
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
static void saveData(std::ostream &os, UT_Vector3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
#define SOP_API
Definition: SOP_API.h:10
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:372
AttribType getAttribType() const
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
static void loadData(UT_IStream &is, int64 &v)
void setPrefix(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
GLboolean r
Definition: glcorearb.h:1222
Connecttype getConnecttype() const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
void setAttribname(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setVarname(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
const UT_StringHolder & getPrefix() const
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void loadData(UT_IStream &is, UT_StringHolder &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
UT_StringHolder opPrefix(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
UT_StringHolder opSeamgroup(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void copyFrom(const OP_NodeParms *src) override
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663