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