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 <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_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  return true;
105  }
107  {
108  return !operator==(src);
109  }
112 
113 
114 
115  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
116  {
117  myConnecttype = 0;
118  if (true)
119  graph->evalOpParm(myConnecttype, nodeidx, "connecttype", time, 0);
120  myPrimitiveIncludeGroup = ""_UTsh;
121  if (true)
122  graph->evalOpParm(myPrimitiveIncludeGroup, nodeidx, "primincgroup", time, 0);
123  myPointIncludeGroup = ""_UTsh;
124  if (true && ( (true&&!(((int64(getConnecttype())!=0)))) ) )
125  graph->evalOpParm(myPointIncludeGroup, nodeidx, "pointincgroup", time, 0);
126  myAttribname = "class"_UTsh;
127  if (true)
128  graph->evalOpParm(myAttribname, nodeidx, "attribname", time, 0);
129  myAttribType = 0;
130  if (true)
131  graph->evalOpParm(myAttribType, nodeidx, "attribtype", time, 0);
132  myPrefix = "piece"_UTsh;
133  if (true && ( (true&&!(((int64(getAttribType())!=1))||((int64(getAttribType())!=1)))) ) )
134  graph->evalOpParm(myPrefix, nodeidx, "prefix", time, 0);
135  myCreatevarmap = false;
136  if (true)
137  graph->evalOpParm(myCreatevarmap, nodeidx, "createvarmap", time, 0);
138  myVarname = ""_UTsh;
139  if (true && ( (true&&!(((getCreatevarmap()==0)))) ) )
140  graph->evalOpParm(myVarname, nodeidx, "varname", time, 0);
141  mySeamgroup = ""_UTsh;
142  if (true && ( (true&&!(((int64(getConnecttype())==0)))) ) )
143  graph->evalOpParm(mySeamgroup, nodeidx, "seamgroup", time, 0);
144  myByuv = false;
145  if (true && ( (true&&!(((int64(getConnecttype())==0))||((getSeamgroup()!="")))) ) )
146  graph->evalOpParm(myByuv, nodeidx, "byuv", time, 0);
147  myUVAttrib = "uv"_UTsh;
148  if (true && ( (true&&!(((int64(getConnecttype())==0))||((getSeamgroup()!=""))||((getByuv()==0)))) ) )
149  graph->evalOpParm(myUVAttrib, nodeidx, "uvattrib", time, 0);
150 
151  }
152 
153 
154  void loadFromOpSubclass(const LoadParms &loadparms) override
155  {
156  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
157  }
158 
159 
160  void copyFrom(const OP_NodeParms *src) override
161  {
162  *this = *((const SOP_ConnectivityParms *)src);
163  }
164 
165  template <typename T>
166  void
167  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
168  {
169  if (idx.size() < 1)
170  return;
171  UT_ASSERT(idx.size() == instance.size()+1);
172  if (idx.size() != instance.size()+1)
173  return;
174  switch (idx[0])
175  {
176  case 0:
177  coerceValue(value, myConnecttype);
178  break;
179  case 1:
180  coerceValue(value, myPrimitiveIncludeGroup);
181  break;
182  case 2:
183  coerceValue(value, myPointIncludeGroup);
184  break;
185  case 3:
186  coerceValue(value, myAttribname);
187  break;
188  case 4:
189  coerceValue(value, myAttribType);
190  break;
191  case 5:
192  coerceValue(value, myPrefix);
193  break;
194  case 6:
195  coerceValue(value, myCreatevarmap);
196  break;
197  case 7:
198  coerceValue(value, myVarname);
199  break;
200  case 8:
201  coerceValue(value, mySeamgroup);
202  break;
203  case 9:
204  coerceValue(value, myByuv);
205  break;
206  case 10:
207  coerceValue(value, myUVAttrib);
208  break;
209 
210  }
211  }
212 
213  bool isParmColorRamp(exint idx) const override
214  {
215  switch (idx)
216  {
217 
218  }
219  return false;
220  }
221 
222  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
223  { doGetParmValue(idx, instance, value); }
224  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
225  { doGetParmValue(idx, instance, value); }
226  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
227  { doGetParmValue(idx, instance, value); }
228  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
229  { doGetParmValue(idx, instance, value); }
230  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
231  { doGetParmValue(idx, instance, value); }
232  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
233  { doGetParmValue(idx, instance, value); }
234  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
235  { doGetParmValue(idx, instance, value); }
236  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
237  { doGetParmValue(idx, instance, value); }
238  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
239  { doGetParmValue(idx, instance, value); }
240  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
241  { doGetParmValue(idx, instance, value); }
242  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
243  { doGetParmValue(idx, instance, value); }
244 
245  template <typename T>
246  void
247  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
248  {
249  if (idx.size() < 1)
250  return;
251  UT_ASSERT(idx.size() == instance.size()+1);
252  if (idx.size() != instance.size()+1)
253  return;
254  switch (idx[0])
255  {
256  case 0:
257  coerceValue(myConnecttype, clampMinValue(0, clampMaxValue(1, value ) ));
258  break;
259  case 1:
260  coerceValue(myPrimitiveIncludeGroup, ( ( value ) ));
261  break;
262  case 2:
263  coerceValue(myPointIncludeGroup, ( ( value ) ));
264  break;
265  case 3:
266  coerceValue(myAttribname, ( ( value ) ));
267  break;
268  case 4:
269  coerceValue(myAttribType, clampMinValue(0, clampMaxValue(1, value ) ));
270  break;
271  case 5:
272  coerceValue(myPrefix, ( ( value ) ));
273  break;
274  case 6:
275  coerceValue(myCreatevarmap, ( ( value ) ));
276  break;
277  case 7:
278  coerceValue(myVarname, ( ( value ) ));
279  break;
280  case 8:
281  coerceValue(mySeamgroup, ( ( value ) ));
282  break;
283  case 9:
284  coerceValue(myByuv, ( ( value ) ));
285  break;
286  case 10:
287  coerceValue(myUVAttrib, ( ( value ) ));
288  break;
289 
290  }
291  }
292 
293  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
294  { doSetParmValue(idx, instance, value); }
295  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
296  { doSetParmValue(idx, instance, value); }
297  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
298  { doSetParmValue(idx, instance, value); }
299  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
300  { doSetParmValue(idx, instance, value); }
301  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
302  { doSetParmValue(idx, instance, value); }
303  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
304  { doSetParmValue(idx, instance, value); }
305  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
306  { doSetParmValue(idx, instance, value); }
307  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
308  { doSetParmValue(idx, instance, value); }
309  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
310  { doSetParmValue(idx, instance, value); }
311  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
312  { doSetParmValue(idx, instance, value); }
313  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
314  { doSetParmValue(idx, instance, value); }
315 
316  exint getNestNumParms(TempIndex idx) const override
317  {
318  if (idx.size() == 0)
319  return 11;
320  switch (idx[0])
321  {
322 
323  }
324  // Invalid
325  return 0;
326  }
327 
328  const char *getNestParmName(TempIndex fieldnum) const override
329  {
330  if (fieldnum.size() < 1)
331  return 0;
332  switch (fieldnum[0])
333  {
334  case 0:
335  return "connecttype";
336  case 1:
337  return "primincgroup";
338  case 2:
339  return "pointincgroup";
340  case 3:
341  return "attribname";
342  case 4:
343  return "attribtype";
344  case 5:
345  return "prefix";
346  case 6:
347  return "createvarmap";
348  case 7:
349  return "varname";
350  case 8:
351  return "seamgroup";
352  case 9:
353  return "byuv";
354  case 10:
355  return "uvattrib";
356 
357  }
358  return 0;
359  }
360 
361  ParmType getNestParmType(TempIndex fieldnum) const override
362  {
363  if (fieldnum.size() < 1)
364  return PARM_UNSUPPORTED;
365  switch (fieldnum[0])
366  {
367  case 0:
368  return PARM_INTEGER;
369  case 1:
370  return PARM_STRING;
371  case 2:
372  return PARM_STRING;
373  case 3:
374  return PARM_STRING;
375  case 4:
376  return PARM_INTEGER;
377  case 5:
378  return PARM_STRING;
379  case 6:
380  return PARM_INTEGER;
381  case 7:
382  return PARM_STRING;
383  case 8:
384  return PARM_STRING;
385  case 9:
386  return PARM_INTEGER;
387  case 10:
388  return PARM_STRING;
389 
390  }
391  return PARM_UNSUPPORTED;
392  }
393 
394  // Boiler plate to load individual types.
395  static void loadData(UT_IStream &is, int64 &v)
396  { is.bread(&v, 1); }
397  static void loadData(UT_IStream &is, bool &v)
398  { int64 iv; is.bread(&iv, 1); v = iv; }
399  static void loadData(UT_IStream &is, fpreal64 &v)
400  { is.bread<fpreal64>(&v, 1); }
401  static void loadData(UT_IStream &is, UT_Vector2D &v)
402  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
403  static void loadData(UT_IStream &is, UT_Vector3D &v)
404  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
405  is.bread<fpreal64>(&v.z(), 1); }
406  static void loadData(UT_IStream &is, UT_Vector4D &v)
407  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
408  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
409  static void loadData(UT_IStream &is, UT_Matrix2D &v)
410  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
411  static void loadData(UT_IStream &is, UT_Matrix3D &v)
412  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
413  static void loadData(UT_IStream &is, UT_Matrix4D &v)
414  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
415  static void loadData(UT_IStream &is, UT_Vector2I &v)
416  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
417  static void loadData(UT_IStream &is, UT_Vector3I &v)
418  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
419  is.bread<int64>(&v.z(), 1); }
420  static void loadData(UT_IStream &is, UT_Vector4I &v)
421  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
422  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
424  { is.bread(v); }
426  { UT_StringHolder rampdata;
427  loadData(is, rampdata);
428  if (rampdata.isstring())
429  {
430  v.reset(new UT_Ramp());
431  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
432  v->load(istr);
433  }
434  else v.reset();
435  }
438  loadData(is, data);
439  if (data.isstring())
440  {
441  // Find the data type.
442  const char *colon = UT_StringWrap(data).findChar(':');
443  if (colon)
444  {
445  int typelen = colon - data.buffer();
447  type.strncpy(data.buffer(), typelen);
448  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
449 
450  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
451  }
452  }
453  else v.reset();
454  }
455 
456  static void saveData(std::ostream &os, int64 v)
457  { UTwrite(os, &v); }
458  static void saveData(std::ostream &os, bool v)
459  { int64 iv = v; UTwrite(os, &iv); }
460  static void saveData(std::ostream &os, fpreal64 v)
461  { UTwrite<fpreal64>(os, &v); }
462  static void saveData(std::ostream &os, UT_Vector2D v)
463  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
464  static void saveData(std::ostream &os, UT_Vector3D v)
465  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
466  UTwrite<fpreal64>(os, &v.z()); }
467  static void saveData(std::ostream &os, UT_Vector4D v)
468  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
469  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
470  static void saveData(std::ostream &os, UT_Matrix2D v)
472  static void saveData(std::ostream &os, UT_Matrix3D v)
474  static void saveData(std::ostream &os, UT_Matrix4D v)
476  static void saveData(std::ostream &os, UT_StringHolder s)
477  { UT_StringWrap(s).saveBinary(os); }
478  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
480  UT_OStringStream ostr;
481  if (s) s->save(ostr);
482  result = ostr.str();
483  saveData(os, result);
484  }
485  static void saveData(std::ostream &os, PRM_DataItemHandle s)
487  UT_OStringStream ostr;
488  if (s)
489  {
490  ostr << s->getDataTypeToken();
491  ostr << ":";
492  s->saveBinary(ostr);
493  }
494  result = ostr.str();
495  saveData(os, result);
496  }
497 
498 
499  void save(std::ostream &os) const
500  {
501  int32 v = version();
502  UTwrite(os, &v);
503  saveData(os, myConnecttype);
504  saveData(os, myPrimitiveIncludeGroup);
505  saveData(os, myPointIncludeGroup);
506  saveData(os, myAttribname);
507  saveData(os, myAttribType);
508  saveData(os, myPrefix);
509  saveData(os, myCreatevarmap);
510  saveData(os, myVarname);
511  saveData(os, mySeamgroup);
512  saveData(os, myByuv);
513  saveData(os, myUVAttrib);
514 
515  }
516 
517  bool load(UT_IStream &is)
518  {
519  int32 v;
520  is.bread(&v, 1);
521  if (version() != v)
522  {
523  // Fail incompatible versions
524  return false;
525  }
526  loadData(is, myConnecttype);
527  loadData(is, myPrimitiveIncludeGroup);
528  loadData(is, myPointIncludeGroup);
529  loadData(is, myAttribname);
530  loadData(is, myAttribType);
531  loadData(is, myPrefix);
532  loadData(is, myCreatevarmap);
533  loadData(is, myVarname);
534  loadData(is, mySeamgroup);
535  loadData(is, myByuv);
536  loadData(is, myUVAttrib);
537 
538  return true;
539  }
540 
541  Connecttype getConnecttype() const { return Connecttype(myConnecttype); }
542  void setConnecttype(Connecttype val) { myConnecttype = int64(val); }
544  {
545  SOP_Node *thissop = cookparms.getNode();
546  if (!thissop) return getConnecttype();
547  int64 result;
548  OP_Utils::evalOpParm(result, thissop, "connecttype", cookparms.getCookTime(), 0);
549  return Connecttype(result);
550  }
551  const UT_StringHolder & getPrimitiveIncludeGroup() const { return myPrimitiveIncludeGroup; }
552  void setPrimitiveIncludeGroup(const UT_StringHolder & val) { myPrimitiveIncludeGroup = val; }
554  {
555  SOP_Node *thissop = cookparms.getNode();
556  if (!thissop) return getPrimitiveIncludeGroup();
558  OP_Utils::evalOpParm(result, thissop, "primincgroup", cookparms.getCookTime(), 0);
559  return result;
560  }
561  const UT_StringHolder & getPointIncludeGroup() const { return myPointIncludeGroup; }
562  void setPointIncludeGroup(const UT_StringHolder & val) { myPointIncludeGroup = val; }
564  {
565  SOP_Node *thissop = cookparms.getNode();
566  if (!thissop) return getPointIncludeGroup();
568  OP_Utils::evalOpParm(result, thissop, "pointincgroup", cookparms.getCookTime(), 0);
569  return result;
570  }
571  const UT_StringHolder & getAttribname() const { return myAttribname; }
572  void setAttribname(const UT_StringHolder & val) { myAttribname = val; }
574  {
575  SOP_Node *thissop = cookparms.getNode();
576  if (!thissop) return getAttribname();
578  OP_Utils::evalOpParm(result, thissop, "attribname", cookparms.getCookTime(), 0);
579  return result;
580  }
581  AttribType getAttribType() const { return AttribType(myAttribType); }
582  void setAttribType(AttribType val) { myAttribType = int64(val); }
584  {
585  SOP_Node *thissop = cookparms.getNode();
586  if (!thissop) return getAttribType();
587  int64 result;
588  OP_Utils::evalOpParm(result, thissop, "attribtype", cookparms.getCookTime(), 0);
589  return AttribType(result);
590  }
591  const UT_StringHolder & getPrefix() const { return myPrefix; }
592  void setPrefix(const UT_StringHolder & val) { myPrefix = val; }
594  {
595  SOP_Node *thissop = cookparms.getNode();
596  if (!thissop) return getPrefix();
598  OP_Utils::evalOpParm(result, thissop, "prefix", cookparms.getCookTime(), 0);
599  return result;
600  }
601  bool getCreatevarmap() const { return myCreatevarmap; }
602  void setCreatevarmap(bool val) { myCreatevarmap = val; }
603  bool opCreatevarmap(const SOP_NodeVerb::CookParms &cookparms) const
604  {
605  SOP_Node *thissop = cookparms.getNode();
606  if (!thissop) return getCreatevarmap();
607  bool result;
608  OP_Utils::evalOpParm(result, thissop, "createvarmap", cookparms.getCookTime(), 0);
609  return result;
610  }
611  const UT_StringHolder & getVarname() const { return myVarname; }
612  void setVarname(const UT_StringHolder & val) { myVarname = val; }
614  {
615  SOP_Node *thissop = cookparms.getNode();
616  if (!thissop) return getVarname();
618  OP_Utils::evalOpParm(result, thissop, "varname", cookparms.getCookTime(), 0);
619  return result;
620  }
621  const UT_StringHolder & getSeamgroup() const { return mySeamgroup; }
622  void setSeamgroup(const UT_StringHolder & val) { mySeamgroup = val; }
624  {
625  SOP_Node *thissop = cookparms.getNode();
626  if (!thissop) return getSeamgroup();
628  OP_Utils::evalOpParm(result, thissop, "seamgroup", cookparms.getCookTime(), 0);
629  return result;
630  }
631  bool getByuv() const { return myByuv; }
632  void setByuv(bool val) { myByuv = val; }
633  bool opByuv(const SOP_NodeVerb::CookParms &cookparms) const
634  {
635  SOP_Node *thissop = cookparms.getNode();
636  if (!thissop) return getByuv();
637  bool result;
638  OP_Utils::evalOpParm(result, thissop, "byuv", cookparms.getCookTime(), 0);
639  return result;
640  }
641  const UT_StringHolder & getUVAttrib() const { return myUVAttrib; }
642  void setUVAttrib(const UT_StringHolder & val) { myUVAttrib = val; }
644  {
645  SOP_Node *thissop = cookparms.getNode();
646  if (!thissop) return getUVAttrib();
648  OP_Utils::evalOpParm(result, thissop, "uvattrib", cookparms.getCookTime(), 0);
649  return result;
650  }
651 
652 private:
653  int64 myConnecttype;
654  UT_StringHolder myPrimitiveIncludeGroup;
655  UT_StringHolder myPointIncludeGroup;
656  UT_StringHolder myAttribname;
657  int64 myAttribType;
658  UT_StringHolder myPrefix;
659  bool myCreatevarmap;
660  UT_StringHolder myVarname;
661  UT_StringHolder mySeamgroup;
662  bool myByuv;
663  UT_StringHolder myUVAttrib;
664 
665 };
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:62
const UT_StringHolder & getPrimitiveIncludeGroup() const
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:613
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
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:296
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:277
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:92
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
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:361
AttribType getAttribType() const
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
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)
type
Definition: core.h:1059
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
const UT_StringHolder & getPrefix() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
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