HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_GroupRename.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_GroupRenameEnums
24 {
25  enum class Grouptype
26  {
27  ANY = 0,
28  POINTS,
29  PRIMS,
30  EDGES,
31  VERTICES
32  };
33 
35  getToken(Grouptype enum_value)
36  {
37  using namespace UT::Literal;
38  switch (enum_value) {
39  case Grouptype::ANY: return "any"_sh;
40  case Grouptype::POINTS: return "points"_sh;
41  case Grouptype::PRIMS: return "prims"_sh;
42  case Grouptype::EDGES: return "edges"_sh;
43  case Grouptype::VERTICES: return "vertices"_sh;
44  default: UT_ASSERT(false); return ""_sh;
45  }
46  }
47 
48 }
49 
50 
52 {
53 public:
54  static int version() { return 1; }
55  struct Renames
56  {
57  bool enable;
61 
62 
64  {
65  enable = true;
66  grouptype = 0;
67  group = ""_UTsh;
68  newname = ""_UTsh;
69 
70  }
71 
72  bool operator==(const Renames &src) const
73  {
74  if (enable != src.enable) return false;
75  if (grouptype != src.grouptype) return false;
76  if (group != src.group) return false;
77  if (newname != src.newname) return false;
78 
79  return true;
80  }
81  bool operator!=(const Renames &src) const
82  {
83  return !operator==(src);
84  }
85 
86  };
87 
89  {
91 
92  buf.strcat("[ ");
93  for (int i = 0; i < list.entries(); i++)
94  {
95  if (i)
96  buf.strcat(", ");
97  buf.strcat("( ");
98  buf.append("");
99  buf.appendSprintf("%s", (list(i).enable) ? "true" : "false");
100  buf.append(", ");
101  buf.appendSprintf("%d", (int) list(i).grouptype);
102  buf.append(", ");
103  { UT_String tmp; tmp = UT_StringWrap(list(i).group).makeQuotedString('"'); buf.strcat(tmp); }
104  buf.append(", ");
105  { UT_String tmp; tmp = UT_StringWrap(list(i).newname).makeQuotedString('"'); buf.strcat(tmp); }
106 
107  buf.strcat(" )");
108  }
109  buf.strcat(" ]");
110 
112  return result;
113  }
114 
116  {
117  myRenames.setSize(1);
118 
119  }
120 
121  explicit SOP_GroupRenameParms(const SOP_GroupRenameParms &) = default;
123  SOP_GroupRenameParms(SOP_GroupRenameParms &&) noexcept = default;
124  SOP_GroupRenameParms &operator=(SOP_GroupRenameParms &&) noexcept = default;
125 
126  ~SOP_GroupRenameParms() override {}
127 
129  {
130  if (myRenames != src.myRenames) return false;
131 
132  return true;
133  }
135  {
136  return !operator==(src);
137  }
139 
140 
141 
142  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
143  {
144  if (true)
145  {
146  int64 length = 0;
147  graph->evalOpParm(length, nodeidx, "renames", time, 0);
148  if (length < 0) length = 0;
149  myRenames.setSize(length);
150  for (exint i = 0; i < length; i++)
151  {
152  int parmidx[1];
153  int offsets[1];
154  parmidx[0] = i+1;
155  offsets[0] = 1;
156  auto && _curentry = myRenames(i);
157  (void) _curentry;
158  _curentry.enable = true;
159  if (true)
160  graph->evalOpParmInst(_curentry.enable, nodeidx, "enable#", parmidx, offsets, time, 0, 2-1);
161  _curentry.grouptype = 0;
162  if (true && ( (true&&!(((_curentry.enable==0)))) ) )
163  graph->evalOpParmInst(_curentry.grouptype, nodeidx, "grouptype#", parmidx, offsets, time, 0, 2-1);
164  _curentry.group = ""_UTsh;
165  if (true && ( (true&&!(((_curentry.enable==0)))) ) )
166  graph->evalOpParmInst(_curentry.group, nodeidx, "group#", parmidx, offsets, time, 0, 2-1);
167  _curentry.newname = ""_UTsh;
168  if (true && ( (true&&!(((_curentry.enable==0)))) ) )
169  graph->evalOpParmInst(_curentry.newname, nodeidx, "newname#", parmidx, offsets, time, 0, 2-1);
170 
171  }
172  }
173  else
174  myRenames.clear();
175 
176  }
177 
178 
179  void loadFromOpSubclass(const LoadParms &loadparms) override
180  {
181  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
182  }
183 
184 
185  void copyFrom(const OP_NodeParms *src) override
186  {
187  *this = *((const SOP_GroupRenameParms *)src);
188  }
189 
190  template <typename T>
191  void
192  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
193  {
194  if (idx.size() < 1)
195  return;
196  UT_ASSERT(idx.size() == instance.size()+1);
197  if (idx.size() != instance.size()+1)
198  return;
199  switch (idx[0])
200  {
201  case 0:
202  if (idx.size() == 1)
203  coerceValue(value, myRenames.entries());
204  else if (instance[0] < myRenames.entries())
205  {
206  auto && _data = myRenames(instance[0]);
207  switch (idx[1])
208  {
209  case 0:
210  coerceValue(value, _data.enable);
211  break;
212  case 1:
213  coerceValue(value, _data.grouptype);
214  break;
215  case 2:
216  coerceValue(value, _data.group);
217  break;
218  case 3:
219  coerceValue(value, _data.newname);
220  break;
221 
222  }
223  }
224  break;
225 
226  }
227  }
228 
229  bool isParmColorRamp(exint idx) const override
230  {
231  switch (idx)
232  {
233 
234  }
235  return false;
236  }
237 
238  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
239  { doGetParmValue(idx, instance, value); }
240  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
241  { doGetParmValue(idx, instance, value); }
242  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
243  { doGetParmValue(idx, instance, value); }
244  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
245  { doGetParmValue(idx, instance, value); }
246  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
247  { doGetParmValue(idx, instance, value); }
248  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
249  { doGetParmValue(idx, instance, value); }
250  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
251  { doGetParmValue(idx, instance, value); }
252  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
253  { doGetParmValue(idx, instance, value); }
254  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
255  { doGetParmValue(idx, instance, value); }
256  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
257  { doGetParmValue(idx, instance, value); }
258  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
259  { doGetParmValue(idx, instance, value); }
260 
261  template <typename T>
262  void
263  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
264  {
265  if (idx.size() < 1)
266  return;
267  UT_ASSERT(idx.size() == instance.size()+1);
268  if (idx.size() != instance.size()+1)
269  return;
270  switch (idx[0])
271  {
272  case 0:
273  if (idx.size() == 1)
274  {
275  exint newsize;
276  coerceValue(newsize, value);
277  if (newsize < 0) newsize = 0;
278  myRenames.setSize(newsize);
279  }
280  else
281  {
282  if (instance[0] < 0)
283  return;
284  myRenames.setSizeIfNeeded(instance[0]+1);
285  auto && _data = myRenames(instance[0]);
286  switch (idx[1])
287  {
288  case 0:
289  coerceValue(_data.enable, value);
290  break;
291  case 1:
292  coerceValue(_data.grouptype, value);
293  break;
294  case 2:
295  coerceValue(_data.group, value);
296  break;
297  case 3:
298  coerceValue(_data.newname, value);
299  break;
300 
301  }
302  }
303  break;
304 
305  }
306  }
307 
308  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
309  { doSetParmValue(idx, instance, value); }
310  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
311  { doSetParmValue(idx, instance, value); }
312  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
313  { doSetParmValue(idx, instance, value); }
314  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
315  { doSetParmValue(idx, instance, value); }
316  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
317  { doSetParmValue(idx, instance, value); }
318  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
319  { doSetParmValue(idx, instance, value); }
320  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
321  { doSetParmValue(idx, instance, value); }
322  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
323  { doSetParmValue(idx, instance, value); }
324  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
325  { doSetParmValue(idx, instance, value); }
326  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
327  { doSetParmValue(idx, instance, value); }
328  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
329  { doSetParmValue(idx, instance, value); }
330 
331  exint getNestNumParms(TempIndex idx) const override
332  {
333  if (idx.size() == 0)
334  return 1;
335  switch (idx[0])
336  {
337  case 0:
338  return 4;
339 
340  }
341  // Invalid
342  return 0;
343  }
344 
345  const char *getNestParmName(TempIndex fieldnum) const override
346  {
347  if (fieldnum.size() < 1)
348  return 0;
349  switch (fieldnum[0])
350  {
351  case 0:
352  if (fieldnum.size() == 1)
353  return "renames";
354  switch (fieldnum[1])
355  {
356  case 0:
357  return "enable#";
358  case 1:
359  return "grouptype#";
360  case 2:
361  return "group#";
362  case 3:
363  return "newname#";
364 
365  }
366  return 0;
367 
368  }
369  return 0;
370  }
371 
372  ParmType getNestParmType(TempIndex fieldnum) const override
373  {
374  if (fieldnum.size() < 1)
375  return PARM_UNSUPPORTED;
376  switch (fieldnum[0])
377  {
378  case 0:
379  if (fieldnum.size() == 1)
380  return PARM_MULTIPARM;
381  switch (fieldnum[1])
382  {
383  case 0:
384  return PARM_INTEGER;
385  case 1:
386  return PARM_INTEGER;
387  case 2:
388  return PARM_STRING;
389  case 3:
390  return PARM_STRING;
391 
392  }
393  return PARM_UNSUPPORTED;
394 
395  }
396  return PARM_UNSUPPORTED;
397  }
398 
399  // Boiler plate to load individual types.
400  static void loadData(UT_IStream &is, int64 &v)
401  { is.bread(&v, 1); }
402  static void loadData(UT_IStream &is, bool &v)
403  { int64 iv; is.bread(&iv, 1); v = iv; }
404  static void loadData(UT_IStream &is, fpreal64 &v)
405  { is.bread<fpreal64>(&v, 1); }
406  static void loadData(UT_IStream &is, UT_Vector2D &v)
407  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
408  static void loadData(UT_IStream &is, UT_Vector3D &v)
409  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
410  is.bread<fpreal64>(&v.z(), 1); }
411  static void loadData(UT_IStream &is, UT_Vector4D &v)
412  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
413  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
414  static void loadData(UT_IStream &is, UT_Matrix2D &v)
415  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
416  static void loadData(UT_IStream &is, UT_Matrix3D &v)
417  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
418  static void loadData(UT_IStream &is, UT_Matrix4D &v)
419  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
420  static void loadData(UT_IStream &is, UT_Vector2I &v)
421  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
422  static void loadData(UT_IStream &is, UT_Vector3I &v)
423  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
424  is.bread<int64>(&v.z(), 1); }
425  static void loadData(UT_IStream &is, UT_Vector4I &v)
426  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
427  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
429  { is.bread(v); }
431  { UT_StringHolder rampdata;
432  loadData(is, rampdata);
433  if (rampdata.isstring())
434  {
435  v.reset(new UT_Ramp());
436  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
437  v->load(istr);
438  }
439  else v.reset();
440  }
443  loadData(is, data);
444  if (data.isstring())
445  {
446  // Find the data type.
447  const char *colon = UT_StringWrap(data).findChar(':');
448  if (colon)
449  {
450  int typelen = colon - data.buffer();
452  type.strncpy(data.buffer(), typelen);
453  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
454 
455  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
456  }
457  }
458  else v.reset();
459  }
460 
461  static void saveData(std::ostream &os, int64 v)
462  { UTwrite(os, &v); }
463  static void saveData(std::ostream &os, bool v)
464  { int64 iv = v; UTwrite(os, &iv); }
465  static void saveData(std::ostream &os, fpreal64 v)
466  { UTwrite<fpreal64>(os, &v); }
467  static void saveData(std::ostream &os, UT_Vector2D v)
468  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
469  static void saveData(std::ostream &os, UT_Vector3D v)
470  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
471  UTwrite<fpreal64>(os, &v.z()); }
472  static void saveData(std::ostream &os, UT_Vector4D v)
473  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
474  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
475  static void saveData(std::ostream &os, UT_Matrix2D v)
477  static void saveData(std::ostream &os, UT_Matrix3D v)
479  static void saveData(std::ostream &os, UT_Matrix4D v)
481  static void saveData(std::ostream &os, UT_StringHolder s)
482  { UT_StringWrap(s).saveBinary(os); }
483  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
485  UT_OStringStream ostr;
486  if (s) s->save(ostr);
487  result = ostr.str();
488  saveData(os, result);
489  }
490  static void saveData(std::ostream &os, PRM_DataItemHandle s)
492  UT_OStringStream ostr;
493  if (s)
494  {
495  ostr << s->getDataTypeToken();
496  ostr << ":";
497  s->saveBinary(ostr);
498  }
499  result = ostr.str();
500  saveData(os, result);
501  }
502 
503 
504  void save(std::ostream &os) const
505  {
506  int32 v = version();
507  UTwrite(os, &v);
508  {
509  int64 length = myRenames.entries();
510  UTwrite(os, &length);
511  for (exint i = 0; i < length; i++)
512  {
513  auto && _curentry = myRenames(i);
514  (void) _curentry;
515  saveData(os, _curentry.enable);
516  saveData(os, _curentry.grouptype);
517  saveData(os, _curentry.group);
518  saveData(os, _curentry.newname);
519 
520  }
521  }
522 
523  }
524 
525  bool load(UT_IStream &is)
526  {
527  int32 v;
528  is.bread(&v, 1);
529  if (version() != v)
530  {
531  // Fail incompatible versions
532  return false;
533  }
534  {
535  int64 length;
536  is.read(&length, 1);
537  myRenames.setSize(length);
538  for (exint i = 0; i < length; i++)
539  {
540  auto && _curentry = myRenames(i);
541  (void) _curentry;
542  loadData(is, _curentry.enable);
543  loadData(is, _curentry.grouptype);
544  loadData(is, _curentry.group);
545  loadData(is, _curentry.newname);
546 
547  }
548  }
549 
550  return true;
551  }
552 
553  const UT_Array<Renames> &getRenames() const { return myRenames; }
554 void setRenames(const UT_Array<Renames> &val) { myRenames = val; }
555  exint opRenames(const SOP_NodeVerb::CookParms &cookparms) const
556  {
557  SOP_Node *thissop = cookparms.getNode();
558  if (!thissop) return getRenames().entries();
559  exint result;
560  OP_Utils::evalOpParm(result, thissop, "renames", cookparms.getCookTime(), 0);
561  return result;
562  }
563  bool opRenames_enable(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
564  { return opinstRenames_enable(cookparms, &_idx); }
565  bool opinstRenames_enable(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
566  {
567  SOP_Node *thissop = cookparms.getNode();
568  if (!thissop) return (myRenames(_idx[0]).enable);
569  int _parmidx[2-1];
570  _parmidx[1-1] = _idx[1-1] + 1;
571 
572  bool result;
573  OP_Utils::evalOpParmInst(result, thissop, "enable#", _parmidx, cookparms.getCookTime(), 0, 2-1);
574  return (result);
575  }
576  int64 opRenames_grouptype(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
577  { return opinstRenames_grouptype(cookparms, &_idx); }
578  int64 opinstRenames_grouptype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
579  {
580  SOP_Node *thissop = cookparms.getNode();
581  if (!thissop) return (myRenames(_idx[0]).grouptype);
582  int _parmidx[2-1];
583  _parmidx[1-1] = _idx[1-1] + 1;
584 
585  int64 result;
586  OP_Utils::evalOpParmInst(result, thissop, "grouptype#", _parmidx, cookparms.getCookTime(), 0, 2-1);
587  return (result);
588  }
589  UT_StringHolder opRenames_group(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
590  { return opinstRenames_group(cookparms, &_idx); }
591  UT_StringHolder opinstRenames_group(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
592  {
593  SOP_Node *thissop = cookparms.getNode();
594  if (!thissop) return (myRenames(_idx[0]).group);
595  int _parmidx[2-1];
596  _parmidx[1-1] = _idx[1-1] + 1;
597 
599  OP_Utils::evalOpParmInst(result, thissop, "group#", _parmidx, cookparms.getCookTime(), 0, 2-1);
600  return (result);
601  }
603  { return opinstRenames_newname(cookparms, &_idx); }
604  UT_StringHolder opinstRenames_newname(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
605  {
606  SOP_Node *thissop = cookparms.getNode();
607  if (!thissop) return (myRenames(_idx[0]).newname);
608  int _parmidx[2-1];
609  _parmidx[1-1] = _idx[1-1] + 1;
610 
612  OP_Utils::evalOpParmInst(result, thissop, "newname#", _parmidx, cookparms.getCookTime(), 0, 2-1);
613  return (result);
614  }
615 
616 
617 private:
618  UT_Array<Renames> myRenames;
619 
620 };
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2540
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void saveData(std::ostream &os, UT_Matrix2D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
UT_StringHolder opRenames_newname(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
const UT_Array< Renames > & getRenames() const
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
static void loadData(UT_IStream &is, UT_StringHolder &v)
void
Definition: png.h:1083
exint bread(int32 *buffer, exint asize=1)
static void loadData(UT_IStream &is, UT_Vector4I &v)
GLboolean * data
Definition: glcorearb.h:131
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
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
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
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
static void saveData(std::ostream &os, fpreal64 v)
GLdouble s
Definition: glad.h:3009
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:795
void setRenames(const UT_Array< Renames > &val)
An output stream object that owns its own string buffer storage.
void copyFrom(const OP_NodeParms *src) override
**But if you need a result
Definition: thread.h:613
static void loadData(UT_IStream &is, UT_Matrix2D &v)
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void saveData(std::ostream &os, UT_Vector4D v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
static void loadData(UT_IStream &is, UT_Vector3I &v)
GLuint GLsizei const GLuint const GLintptr * offsets
Definition: glcorearb.h:2621
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
static void saveData(std::ostream &os, int64 v)
static void loadData(UT_IStream &is, UT_Vector4D &v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void loadData(UT_IStream &is, int64 &v)
UT_StringHolder createString(const UT_Array< Renames > &list) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
exint length() const
bool operator!=(const SOP_GroupRenameParms &src) const
SYS_FORCE_INLINE const char * buffer() const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
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 setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
static void saveData(std::ostream &os, UT_Vector2D v)
static void saveData(std::ostream &os, UT_Matrix4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
bool operator==(const SOP_GroupRenameParms &src) const
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:276
UT_StringHolder opinstRenames_group(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
bool opRenames_enable(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
bool opinstRenames_enable(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
virtual void evalOpParmInst(int64 &v, NodeIdx node, const char *parmname, const int *inst, const int *offsets, fpreal time, DEP_MicroNode *depnode, int nestlevel=1) const =0
long long int64
Definition: SYS_Types.h:116
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
static void saveData(std::ostream &os, bool v)
exint opRenames(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
UT_StringHolder opRenames_group(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
SYS_FORCE_INLINE void strcat(const char *src)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
static void saveData(std::ostream &os, UT_Vector3D v)
GT_API const UT_StringHolder version
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:648
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, UT_Vector2D &v)
void save(std::ostream &os) const
bool operator!=(const Renames &src) const
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
ParmType getNestParmType(TempIndex fieldnum) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
UT_StringHolder opinstRenames_newname(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
void loadFromOpSubclass(const LoadParms &loadparms) override
int64 opinstRenames_grouptype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
SYS_FORCE_INLINE UT_StringHolder getToken(Grouptype enum_value)
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool load(UT_IStream &is)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
SYS_FORCE_INLINE void append(char character)
const char * getNestParmName(TempIndex fieldnum) const override
GLuint GLfloat * val
Definition: glcorearb.h:1608
#define SOP_API
Definition: SOP_API.h:10
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
bool isParmColorRamp(exint idx) const override
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
exint getNestNumParms(TempIndex idx) const override
GLboolean r
Definition: glcorearb.h:1222
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
type
Definition: core.h:1059
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static void loadData(UT_IStream &is, bool &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
int64 opRenames_grouptype(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
bool operator==(const Renames &src) const
static void saveData(std::ostream &os, UT_Matrix3D v)
static void saveData(std::ostream &os, UT_StringHolder s)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override