HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_AttribMirror.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_NodeVerb.h>
7 #include <SOP/SOP_GraphProxy.h>
8 
9 #include <OP/OP_Utils.h>
10 #include <PRM/PRM_Parm.h>
11 #include <UT/UT_IStream.h>
12 #include <UT/UT_NTStreamUtil.h>
13 #include <UT/UT_Ramp.h>
14 #include <UT/UT_SharedPtr.h>
15 #include <UT/UT_StringHolder.h>
16 #include <UT/UT_StringStream.h>
17 #include <UT/UT_VectorTypes.h>
18 #include <SYS/SYS_Types.h>
19 
20 using namespace UT::Literal;
21 
22 class DEP_MicroNode;
23 namespace SOP_AttribMirrorEnums
24 {
25  enum class GroupType
26  {
27  VERTICES = 0,
28  POINTS,
29  PRIMS
30  };
31  enum class MirrorOp
32  {
33  SOURCE = 0,
35  };
36  enum class Attrib
37  {
38  COLORATTRIB = 0,
39  UVATTRIB,
41  };
42  enum class AttribMirrorOp
43  {
44  NOMIRROR = 0,
45  UVMIRROR,
48  };
49 }
50 
51 
53 {
54 public:
55  static int version() { return 1; }
56 
58  {
59  myGroup = ""_sh;
60  myGroupType = 0;
61  myMirrorOp = 1;
62  myAttrib = 0;
63  myAttribName = ""_sh;
64  myUseTolerance = false;
65  myTolerance = 0.1;
66  myOrigin = UT_Vector3D(0,0,0);
67  myDist = 0;
68  myDir = UT_Vector3D(1,0,0);
69  myAttribMirrorOp = 0;
70  myUVOrigin = UT_Vector2D(0.5,0.5);
71  myUVAngle = 90;
72  myStringReplace = false;
73  mySearch = "L_*"_sh;
74  myReplace = "R_*"_sh;
75 
76  }
77 
78  explicit SOP_AttribMirrorParms(const SOP_AttribMirrorParms &) = default;
79 
80  ~SOP_AttribMirrorParms() override {}
81 
83  {
84  if (myGroup != src.myGroup) return false;
85  if (myGroupType != src.myGroupType) return false;
86  if (myMirrorOp != src.myMirrorOp) return false;
87  if (myAttrib != src.myAttrib) return false;
88  if (myAttribName != src.myAttribName) return false;
89  if (myUseTolerance != src.myUseTolerance) return false;
90  if (myTolerance != src.myTolerance) return false;
91  if (myOrigin != src.myOrigin) return false;
92  if (myDist != src.myDist) return false;
93  if (myDir != src.myDir) return false;
94  if (myAttribMirrorOp != src.myAttribMirrorOp) return false;
95  if (myUVOrigin != src.myUVOrigin) return false;
96  if (myUVAngle != src.myUVAngle) return false;
97  if (myStringReplace != src.myStringReplace) return false;
98  if (mySearch != src.mySearch) return false;
99  if (myReplace != src.myReplace) return false;
100 
101  return true;
102  }
104  {
105  return !operator==(src);
106  }
111 
112 
113 
114  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
115  {
116  myGroup = ""_sh;
117  if (true)
118  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
119  myGroupType = 0;
120  if (true)
121  graph->evalOpParm(myGroupType, nodeidx, "grouptype", time, 0);
122  myMirrorOp = 1;
123  if (true)
124  graph->evalOpParm(myMirrorOp, nodeidx, "usegroupas", time, 0);
125  myAttrib = 0;
126  if (true)
127  graph->evalOpParm(myAttrib, nodeidx, "attrib", time, 0);
128  myAttribName = ""_sh;
129  if (true && ( (!(((int64(getAttrib())!=2)))) ) )
130  graph->evalOpParm(myAttribName, nodeidx, "attribname", time, 0);
131  myUseTolerance = false;
132  if (true)
133  graph->evalOpParm(myUseTolerance, nodeidx, "usetolerance", time, 0);
134  myTolerance = 0.1;
135  if (true && ( (!(((getUseTolerance()==0)))) ) )
136  graph->evalOpParm(myTolerance, nodeidx, "tolerance", time, 0);
137  myOrigin = UT_Vector3D(0,0,0);
138  if (true)
139  graph->evalOpParm(myOrigin, nodeidx, "origin", time, 0);
140  myDist = 0;
141  if (true)
142  graph->evalOpParm(myDist, nodeidx, "dist", time, 0);
143  myDir = UT_Vector3D(1,0,0);
144  if (true)
145  graph->evalOpParm(myDir, nodeidx, "dir", time, 0);
146  myAttribMirrorOp = 0;
147  if (true)
148  graph->evalOpParm(myAttribMirrorOp, nodeidx, "attribmirror", time, 0);
149  myUVOrigin = UT_Vector2D(0.5,0.5);
150  if (true && ( (!(((int64(getAttribMirrorOp())!=1)))) ) )
151  graph->evalOpParm(myUVOrigin, nodeidx, "uvorig", time, 0);
152  myUVAngle = 90;
153  if (true && ( (!(((int64(getAttribMirrorOp())!=1)))) ) )
154  graph->evalOpParm(myUVAngle, nodeidx, "uvangle", time, 0);
155  myStringReplace = false;
156  if (true)
157  graph->evalOpParm(myStringReplace, nodeidx, "stringreplace", time, 0);
158  mySearch = "L_*"_sh;
159  if (true && ( (!(((getStringReplace()==0)))) ) )
160  graph->evalOpParm(mySearch, nodeidx, "search", time, 0);
161  myReplace = "R_*"_sh;
162  if (true && ( (!(((getStringReplace()==0)))) ) )
163  graph->evalOpParm(myReplace, nodeidx, "replace", time, 0);
164 
165  }
166 
167 
168  void loadFromOpSubclass(const LoadParms &loadparms) override
169  {
170  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
171  }
172 
173 
174  void copyFrom(const SOP_NodeParms *src) override
175  {
176  *this = *((const SOP_AttribMirrorParms *)src);
177  }
178 
179  template <typename T>
180  void
181  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
182  {
183  if (idx.size() < 1)
184  return;
185  UT_ASSERT(idx.size() == instance.size()+1);
186  if (idx.size() != instance.size()+1)
187  return;
188  switch (idx[0])
189  {
190  case 0:
191  coerceValue(value, myGroup);
192  break;
193  case 1:
194  coerceValue(value, myGroupType);
195  break;
196  case 2:
197  coerceValue(value, myMirrorOp);
198  break;
199  case 3:
200  coerceValue(value, myAttrib);
201  break;
202  case 4:
203  coerceValue(value, myAttribName);
204  break;
205  case 5:
206  coerceValue(value, myUseTolerance);
207  break;
208  case 6:
209  coerceValue(value, myTolerance);
210  break;
211  case 7:
212  coerceValue(value, myOrigin);
213  break;
214  case 8:
215  coerceValue(value, myDist);
216  break;
217  case 9:
218  coerceValue(value, myDir);
219  break;
220  case 10:
221  coerceValue(value, myAttribMirrorOp);
222  break;
223  case 11:
224  coerceValue(value, myUVOrigin);
225  break;
226  case 12:
227  coerceValue(value, myUVAngle);
228  break;
229  case 13:
230  coerceValue(value, myStringReplace);
231  break;
232  case 14:
233  coerceValue(value, mySearch);
234  break;
235  case 15:
236  coerceValue(value, myReplace);
237  break;
238 
239  }
240  }
241 
242  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
243  { doGetParmValue(idx, instance, value); }
244  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
245  { doGetParmValue(idx, instance, value); }
246  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
247  { doGetParmValue(idx, instance, value); }
248  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
249  { doGetParmValue(idx, instance, value); }
250  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
251  { doGetParmValue(idx, instance, value); }
252  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
253  { doGetParmValue(idx, instance, value); }
254  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
255  { doGetParmValue(idx, instance, value); }
256  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
257  { doGetParmValue(idx, instance, value); }
258  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
259  { doGetParmValue(idx, instance, value); }
260  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
261  { doGetParmValue(idx, instance, value); }
262  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
263  { doGetParmValue(idx, instance, value); }
264 
265  template <typename T>
266  void
267  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
268  {
269  if (idx.size() < 1)
270  return;
271  UT_ASSERT(idx.size() == instance.size()+1);
272  if (idx.size() != instance.size()+1)
273  return;
274  switch (idx[0])
275  {
276  case 0:
277  coerceValue(myGroup, value);
278  break;
279  case 1:
280  coerceValue(myGroupType, value);
281  break;
282  case 2:
283  coerceValue(myMirrorOp, value);
284  break;
285  case 3:
286  coerceValue(myAttrib, value);
287  break;
288  case 4:
289  coerceValue(myAttribName, value);
290  break;
291  case 5:
292  coerceValue(myUseTolerance, value);
293  break;
294  case 6:
295  coerceValue(myTolerance, value);
296  break;
297  case 7:
298  coerceValue(myOrigin, value);
299  break;
300  case 8:
301  coerceValue(myDist, value);
302  break;
303  case 9:
304  coerceValue(myDir, value);
305  break;
306  case 10:
307  coerceValue(myAttribMirrorOp, value);
308  break;
309  case 11:
310  coerceValue(myUVOrigin, value);
311  break;
312  case 12:
313  coerceValue(myUVAngle, value);
314  break;
315  case 13:
316  coerceValue(myStringReplace, value);
317  break;
318  case 14:
319  coerceValue(mySearch, value);
320  break;
321  case 15:
322  coerceValue(myReplace, value);
323  break;
324 
325  }
326  }
327 
328  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
329  { doSetParmValue(idx, instance, value); }
330  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
331  { doSetParmValue(idx, instance, value); }
332  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
333  { doSetParmValue(idx, instance, value); }
334  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
335  { doSetParmValue(idx, instance, value); }
336  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
337  { doSetParmValue(idx, instance, value); }
338  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
339  { doSetParmValue(idx, instance, value); }
340  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
341  { doSetParmValue(idx, instance, value); }
342  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
343  { doSetParmValue(idx, instance, value); }
344  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
345  { doSetParmValue(idx, instance, value); }
346  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
347  { doSetParmValue(idx, instance, value); }
348  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
349  { doSetParmValue(idx, instance, value); }
350 
351  exint getNestNumParms(TempIndex idx) const override
352  {
353  if (idx.size() == 0)
354  return 16;
355  switch (idx[0])
356  {
357 
358  }
359  // Invalid
360  return 0;
361  }
362 
363  const char *getNestParmName(TempIndex fieldnum) const override
364  {
365  if (fieldnum.size() < 1)
366  return 0;
367  switch (fieldnum[0])
368  {
369  case 0:
370  return "group";
371  case 1:
372  return "grouptype";
373  case 2:
374  return "usegroupas";
375  case 3:
376  return "attrib";
377  case 4:
378  return "attribname";
379  case 5:
380  return "usetolerance";
381  case 6:
382  return "tolerance";
383  case 7:
384  return "origin";
385  case 8:
386  return "dist";
387  case 9:
388  return "dir";
389  case 10:
390  return "attribmirror";
391  case 11:
392  return "uvorig";
393  case 12:
394  return "uvangle";
395  case 13:
396  return "stringreplace";
397  case 14:
398  return "search";
399  case 15:
400  return "replace";
401 
402  }
403  return 0;
404  }
405 
406  ParmType getNestParmType(TempIndex fieldnum) const override
407  {
408  if (fieldnum.size() < 1)
409  return PARM_UNSUPPORTED;
410  switch (fieldnum[0])
411  {
412  case 0:
413  return PARM_STRING;
414  case 1:
415  return PARM_INTEGER;
416  case 2:
417  return PARM_INTEGER;
418  case 3:
419  return PARM_INTEGER;
420  case 4:
421  return PARM_STRING;
422  case 5:
423  return PARM_INTEGER;
424  case 6:
425  return PARM_FLOAT;
426  case 7:
427  return PARM_VECTOR3;
428  case 8:
429  return PARM_FLOAT;
430  case 9:
431  return PARM_VECTOR3;
432  case 10:
433  return PARM_INTEGER;
434  case 11:
435  return PARM_VECTOR2;
436  case 12:
437  return PARM_FLOAT;
438  case 13:
439  return PARM_INTEGER;
440  case 14:
441  return PARM_STRING;
442  case 15:
443  return PARM_STRING;
444 
445  }
446  return PARM_UNSUPPORTED;
447  }
448 
449  // Boiler plate to load individual types.
450  static void loadData(UT_IStream &is, int64 &v)
451  { is.bread(&v, 1); }
452  static void loadData(UT_IStream &is, bool &v)
453  { int64 iv; is.bread(&iv, 1); v = iv; }
454  static void loadData(UT_IStream &is, fpreal64 &v)
455  { is.bread<fpreal64>(&v, 1); }
456  static void loadData(UT_IStream &is, UT_Vector2D &v)
457  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
458  static void loadData(UT_IStream &is, UT_Vector3D &v)
459  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
460  is.bread<fpreal64>(&v.z(), 1); }
461  static void loadData(UT_IStream &is, UT_Vector4D &v)
462  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
463  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
464  static void loadData(UT_IStream &is, UT_Matrix2D &v)
465  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
466  static void loadData(UT_IStream &is, UT_Matrix3D &v)
467  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
468  static void loadData(UT_IStream &is, UT_Matrix4D &v)
469  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
470  static void loadData(UT_IStream &is, UT_Vector2I &v)
471  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
472  static void loadData(UT_IStream &is, UT_Vector3I &v)
473  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
474  is.bread<int64>(&v.z(), 1); }
475  static void loadData(UT_IStream &is, UT_Vector4I &v)
476  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
477  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
479  { is.bread(v); }
481  { UT_StringHolder rampdata;
482  loadData(is, rampdata);
483  if (rampdata.isstring())
484  {
485  v.reset(new UT_Ramp());
486  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
487  v->load(istr);
488  }
489  else v.reset();
490  }
493  loadData(is, data);
494  if (data.isstring())
495  {
496  // Find the data type.
497  const char *colon = UT_StringWrap(data).findChar(':');
498  if (colon)
499  {
500  int typelen = colon - data.buffer();
502  type.strncpy(data.buffer(), typelen);
503  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
504 
505  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
506  }
507  }
508  else v.reset();
509  }
510 
511  static void saveData(std::ostream &os, int64 v)
512  { UTwrite(os, &v); }
513  static void saveData(std::ostream &os, bool v)
514  { int64 iv = v; UTwrite(os, &iv); }
515  static void saveData(std::ostream &os, fpreal64 v)
516  { UTwrite<fpreal64>(os, &v); }
517  static void saveData(std::ostream &os, UT_Vector2D v)
518  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
519  static void saveData(std::ostream &os, UT_Vector3D v)
520  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
521  UTwrite<fpreal64>(os, &v.z()); }
522  static void saveData(std::ostream &os, UT_Vector4D v)
523  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
524  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
525  static void saveData(std::ostream &os, UT_Matrix2D v)
527  static void saveData(std::ostream &os, UT_Matrix3D v)
529  static void saveData(std::ostream &os, UT_Matrix4D v)
531  static void saveData(std::ostream &os, UT_StringHolder s)
532  { UT_StringWrap(s).saveBinary(os); }
533  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
535  UT_OStringStream ostr;
536  if (s) s->save(ostr);
537  result = ostr.str();
538  saveData(os, result);
539  }
540  static void saveData(std::ostream &os, PRM_DataItemHandle s)
542  UT_OStringStream ostr;
543  if (s)
544  {
545  ostr << s->getDataTypeToken();
546  ostr << ":";
547  s->saveBinary(ostr);
548  }
549  result = ostr.str();
550  saveData(os, result);
551  }
552 
553 
554  void save(std::ostream &os) const
555  {
556  int32 v = version();
557  UTwrite(os, &v);
558  saveData(os, myGroup);
559  saveData(os, myGroupType);
560  saveData(os, myMirrorOp);
561  saveData(os, myAttrib);
562  saveData(os, myAttribName);
563  saveData(os, myUseTolerance);
564  saveData(os, myTolerance);
565  saveData(os, myOrigin);
566  saveData(os, myDist);
567  saveData(os, myDir);
568  saveData(os, myAttribMirrorOp);
569  saveData(os, myUVOrigin);
570  saveData(os, myUVAngle);
571  saveData(os, myStringReplace);
572  saveData(os, mySearch);
573  saveData(os, myReplace);
574 
575  }
576 
577  bool load(UT_IStream &is)
578  {
579  int32 v;
580  is.bread(&v, 1);
581  if (version() != v)
582  {
583  // Fail incompatible versions
584  return false;
585  }
586  loadData(is, myGroup);
587  loadData(is, myGroupType);
588  loadData(is, myMirrorOp);
589  loadData(is, myAttrib);
590  loadData(is, myAttribName);
591  loadData(is, myUseTolerance);
592  loadData(is, myTolerance);
593  loadData(is, myOrigin);
594  loadData(is, myDist);
595  loadData(is, myDir);
596  loadData(is, myAttribMirrorOp);
597  loadData(is, myUVOrigin);
598  loadData(is, myUVAngle);
599  loadData(is, myStringReplace);
600  loadData(is, mySearch);
601  loadData(is, myReplace);
602 
603  return true;
604  }
605 
606  const UT_StringHolder & getGroup() const { return myGroup; }
607  void setGroup(const UT_StringHolder & val) { myGroup = val; }
609  {
610  SOP_Node *thissop = cookparms.getNode();
611  if (!thissop) return getGroup();
613  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
614  return result;
615  }
616  GroupType getGroupType() const { return GroupType(myGroupType); }
617  void setGroupType(GroupType val) { myGroupType = int64(val); }
619  {
620  SOP_Node *thissop = cookparms.getNode();
621  if (!thissop) return getGroupType();
622  int64 result;
623  OP_Utils::evalOpParm(result, thissop, "grouptype", cookparms.getCookTime(), 0);
624  return GroupType(result);
625  }
626  MirrorOp getMirrorOp() const { return MirrorOp(myMirrorOp); }
627  void setMirrorOp(MirrorOp val) { myMirrorOp = int64(val); }
629  {
630  SOP_Node *thissop = cookparms.getNode();
631  if (!thissop) return getMirrorOp();
632  int64 result;
633  OP_Utils::evalOpParm(result, thissop, "usegroupas", cookparms.getCookTime(), 0);
634  return MirrorOp(result);
635  }
636  Attrib getAttrib() const { return Attrib(myAttrib); }
637  void setAttrib(Attrib val) { myAttrib = int64(val); }
638  Attrib opAttrib(const SOP_NodeVerb::CookParms &cookparms) const
639  {
640  SOP_Node *thissop = cookparms.getNode();
641  if (!thissop) return getAttrib();
642  int64 result;
643  OP_Utils::evalOpParm(result, thissop, "attrib", cookparms.getCookTime(), 0);
644  return Attrib(result);
645  }
646  const UT_StringHolder & getAttribName() const { return myAttribName; }
647  void setAttribName(const UT_StringHolder & val) { myAttribName = val; }
649  {
650  SOP_Node *thissop = cookparms.getNode();
651  if (!thissop) return getAttribName();
653  OP_Utils::evalOpParm(result, thissop, "attribname", cookparms.getCookTime(), 0);
654  return result;
655  }
656  bool getUseTolerance() const { return myUseTolerance; }
657  void setUseTolerance(bool val) { myUseTolerance = val; }
658  bool opUseTolerance(const SOP_NodeVerb::CookParms &cookparms) const
659  {
660  SOP_Node *thissop = cookparms.getNode();
661  if (!thissop) return getUseTolerance();
662  bool result;
663  OP_Utils::evalOpParm(result, thissop, "usetolerance", cookparms.getCookTime(), 0);
664  return result;
665  }
666  fpreal64 getTolerance() const { return myTolerance; }
667  void setTolerance(fpreal64 val) { myTolerance = val; }
669  {
670  SOP_Node *thissop = cookparms.getNode();
671  if (!thissop) return getTolerance();
673  OP_Utils::evalOpParm(result, thissop, "tolerance", cookparms.getCookTime(), 0);
674  return result;
675  }
676  UT_Vector3D getOrigin() const { return myOrigin; }
677  void setOrigin(UT_Vector3D val) { myOrigin = val; }
679  {
680  SOP_Node *thissop = cookparms.getNode();
681  if (!thissop) return getOrigin();
683  OP_Utils::evalOpParm(result, thissop, "origin", cookparms.getCookTime(), 0);
684  return result;
685  }
686  fpreal64 getDist() const { return myDist; }
687  void setDist(fpreal64 val) { myDist = val; }
688  fpreal64 opDist(const SOP_NodeVerb::CookParms &cookparms) const
689  {
690  SOP_Node *thissop = cookparms.getNode();
691  if (!thissop) return getDist();
693  OP_Utils::evalOpParm(result, thissop, "dist", cookparms.getCookTime(), 0);
694  return result;
695  }
696  UT_Vector3D getDir() const { return myDir; }
697  void setDir(UT_Vector3D val) { myDir = val; }
698  UT_Vector3D opDir(const SOP_NodeVerb::CookParms &cookparms) const
699  {
700  SOP_Node *thissop = cookparms.getNode();
701  if (!thissop) return getDir();
703  OP_Utils::evalOpParm(result, thissop, "dir", cookparms.getCookTime(), 0);
704  return result;
705  }
706  AttribMirrorOp getAttribMirrorOp() const { return AttribMirrorOp(myAttribMirrorOp); }
707  void setAttribMirrorOp(AttribMirrorOp val) { myAttribMirrorOp = int64(val); }
709  {
710  SOP_Node *thissop = cookparms.getNode();
711  if (!thissop) return getAttribMirrorOp();
712  int64 result;
713  OP_Utils::evalOpParm(result, thissop, "attribmirror", cookparms.getCookTime(), 0);
714  return AttribMirrorOp(result);
715  }
716  UT_Vector2D getUVOrigin() const { return myUVOrigin; }
717  void setUVOrigin(UT_Vector2D val) { myUVOrigin = val; }
719  {
720  SOP_Node *thissop = cookparms.getNode();
721  if (!thissop) return getUVOrigin();
723  OP_Utils::evalOpParm(result, thissop, "uvorig", cookparms.getCookTime(), 0);
724  return result;
725  }
726  fpreal64 getUVAngle() const { return myUVAngle; }
727  void setUVAngle(fpreal64 val) { myUVAngle = val; }
729  {
730  SOP_Node *thissop = cookparms.getNode();
731  if (!thissop) return getUVAngle();
733  OP_Utils::evalOpParm(result, thissop, "uvangle", cookparms.getCookTime(), 0);
734  return result;
735  }
736  bool getStringReplace() const { return myStringReplace; }
737  void setStringReplace(bool val) { myStringReplace = val; }
738  bool opStringReplace(const SOP_NodeVerb::CookParms &cookparms) const
739  {
740  SOP_Node *thissop = cookparms.getNode();
741  if (!thissop) return getStringReplace();
742  bool result;
743  OP_Utils::evalOpParm(result, thissop, "stringreplace", cookparms.getCookTime(), 0);
744  return result;
745  }
746  const UT_StringHolder & getSearch() const { return mySearch; }
747  void setSearch(const UT_StringHolder & val) { mySearch = val; }
749  {
750  SOP_Node *thissop = cookparms.getNode();
751  if (!thissop) return getSearch();
753  OP_Utils::evalOpParm(result, thissop, "search", cookparms.getCookTime(), 0);
754  return result;
755  }
756  const UT_StringHolder & getReplace() const { return myReplace; }
757  void setReplace(const UT_StringHolder & val) { myReplace = val; }
759  {
760  SOP_Node *thissop = cookparms.getNode();
761  if (!thissop) return getReplace();
763  OP_Utils::evalOpParm(result, thissop, "replace", cookparms.getCookTime(), 0);
764  return result;
765  }
766 
767 private:
768  UT_StringHolder myGroup;
769  int64 myGroupType;
770  int64 myMirrorOp;
771  int64 myAttrib;
772  UT_StringHolder myAttribName;
773  bool myUseTolerance;
774  fpreal64 myTolerance;
775  UT_Vector3D myOrigin;
776  fpreal64 myDist;
777  UT_Vector3D myDir;
778  int64 myAttribMirrorOp;
779  UT_Vector2D myUVOrigin;
780  fpreal64 myUVAngle;
781  bool myStringReplace;
782  UT_StringHolder mySearch;
783  UT_StringHolder myReplace;
784 
785 };
GLdouble s
Definition: glew.h:1390
fpreal64 opTolerance(const SOP_NodeVerb::CookParms &cookparms) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
fpreal64 opUVAngle(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
exint nodeIdx() const
Definition: SOP_NodeVerb.h:114
GLenum src
Definition: glew.h:2410
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:640
bool load(UT_IStream &is)
UT_StringHolder opReplace(const SOP_NodeVerb::CookParms &cookparms) const
void setGroup(const UT_StringHolder &val)
exint getNestNumParms(TempIndex idx) const override
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
UT_Vector3D getDir() const
fpreal getTime() const
Definition: OP_Context.h:60
static void loadData(UT_IStream &is, UT_Vector3I &v)
UT_Vector2T< fpreal64 > UT_Vector2D
GLuint const GLfloat * val
Definition: glew.h:2794
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setUVOrigin(UT_Vector2D val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void loadFromOpSubclass(const LoadParms &loadparms) override
MirrorOp opMirrorOp(const SOP_NodeVerb::CookParms &cookparms) const
int64 exint
Definition: SYS_Types.h:125
static void saveData(std::ostream &os, UT_Matrix4D v)
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:113
static void loadData(UT_IStream &is, int64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
An output stream object that owns its own string buffer storage.
bool opStringReplace(const SOP_NodeVerb::CookParms &cookparms) const
const GLdouble * v
Definition: glew.h:1391
UT_Vector3D opDir(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, fpreal64 v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void save(std::ostream &os) const
void setAttribMirrorOp(AttribMirrorOp val)
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_Vector2D v)
void setAttribName(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
UT_Vector2D opUVOrigin(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void saveData(std::ostream &os, int64 v)
UT_Vector2D getUVOrigin() const
double fpreal64
Definition: SYS_Types.h:201
static void saveData(std::ostream &os, UT_Vector4D v)
bool opUseTolerance(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
const UT_StringHolder & getReplace() const
GroupType getGroupType() const
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:513
void copyFrom(const SOP_NodeParms *src) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
exint length() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
UT_StringHolder opAttribName(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opSearch(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getSearch() const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:515
void setUVAngle(fpreal64 val)
fpreal64 getTolerance() const
void setGroupType(GroupType val)
const GLfloat * c
Definition: glew.h:16296
static void saveData(std::ostream &os, UT_StringHolder s)
static void loadData(UT_IStream &is, UT_Vector2D &v)
long long int64
Definition: SYS_Types.h:116
UT_Vector3T< fpreal64 > UT_Vector3D
static void loadData(UT_IStream &is, UT_Vector4I &v)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
const char * getNestParmName(TempIndex fieldnum) const override
void setOrigin(UT_Vector3D val)
bool operator!=(const SOP_AttribMirrorParms &src) const
fpreal64 opDist(const SOP_NodeVerb::CookParms &cookparms) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
static void loadData(UT_IStream &is, fpreal64 &v)
const UT_StringHolder & getAttribName() const
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:121
void setTolerance(fpreal64 val)
void setReplace(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
GroupType opGroupType(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D opOrigin(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const SOP_AttribMirrorParms &src) const
void setSearch(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_StringHolder &v)
fpreal64 fpreal
Definition: SYS_Types.h:277
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
static void loadData(UT_IStream &is, UT_Vector2I &v)
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
void setDir(UT_Vector3D val)
#define SOP_API
Definition: SOP_API.h:10
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
static void loadData(UT_IStream &is, UT_Matrix3D &v)
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:511
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:654
ParmType getNestParmType(TempIndex fieldnum) const override
UT_Vector3D getOrigin() const
GLuint64EXT * result
Definition: glew.h:14007
const char * findChar(int c) const
Definition: UT_String.h:1376
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
AttribMirrorOp getAttribMirrorOp() const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
const UT_StringHolder & getGroup() const
Attrib opAttrib(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void saveData(std::ostream &os, bool v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
GLsizei const GLfloat * value
Definition: glew.h:1849
void setMirrorOp(MirrorOp val)
const OP_Context & context() const
Definition: SOP_NodeVerb.h:119
static void loadData(UT_IStream &is, bool &v)
AttribMirrorOp opAttribMirrorOp(const SOP_NodeVerb::CookParms &cookparms) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
static void saveData(std::ostream &os, UT_Vector3D v)
SYS_FORCE_INLINE bool isstring() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
type
Definition: core.h:528
static void saveData(std::ostream &os, UT_Matrix2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override