HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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  }
105 
106 
107 
108  void buildFromOp(const OP_Node *node, fpreal time, DEP_MicroNode *depnode)
109  {
110  if (true)
111  OP_Utils::evalOpParm(myGroup, node, "group", time, 0);
112  else myGroup = ""_sh;
113  if (true)
114  OP_Utils::evalOpParm(myGroupType, node, "grouptype", time, 0);
115  else myGroupType = 0;
116  if (true)
117  OP_Utils::evalOpParm(myMirrorOp, node, "usegroupas", time, 0);
118  else myMirrorOp = 1;
119  if (true)
120  OP_Utils::evalOpParm(myAttrib, node, "attrib", time, 0);
121  else myAttrib = 0;
122  if (true && ( (!(((int64(getAttrib())!=2)))) ) )
123  OP_Utils::evalOpParm(myAttribName, node, "attribname", time, 0);
124  else myAttribName = ""_sh;
125  if (true)
126  OP_Utils::evalOpParm(myUseTolerance, node, "usetolerance", time, 0);
127  else myUseTolerance = false;
128  if (true && ( (!(((getUseTolerance()==0)))) ) )
129  OP_Utils::evalOpParm(myTolerance, node, "tolerance", time, 0);
130  else myTolerance = 0.1;
131  if (true)
132  OP_Utils::evalOpParm(myOrigin, node, "origin", time, 0);
133  else myOrigin = UT_Vector3D(0,0,0);
134  if (true)
135  OP_Utils::evalOpParm(myDist, node, "dist", time, 0);
136  else myDist = 0;
137  if (true)
138  OP_Utils::evalOpParm(myDir, node, "dir", time, 0);
139  else myDir = UT_Vector3D(1,0,0);
140  if (true)
141  OP_Utils::evalOpParm(myAttribMirrorOp, node, "attribmirror", time, 0);
142  else myAttribMirrorOp = 0;
143  if (true && ( (!(((int64(getAttribMirrorOp())!=1)))) ) )
144  OP_Utils::evalOpParm(myUVOrigin, node, "uvorig", time, 0);
145  else myUVOrigin = UT_Vector2D(0.5,0.5);
146  if (true && ( (!(((int64(getAttribMirrorOp())!=1)))) ) )
147  OP_Utils::evalOpParm(myUVAngle, node, "uvangle", time, 0);
148  else myUVAngle = 90;
149  if (true)
150  OP_Utils::evalOpParm(myStringReplace, node, "stringreplace", time, 0);
151  else myStringReplace = false;
152  if (true && ( (!(((getStringReplace()==0)))) ) )
153  OP_Utils::evalOpParm(mySearch, node, "search", time, 0);
154  else mySearch = "L_*"_sh;
155  if (true && ( (!(((getStringReplace()==0)))) ) )
156  OP_Utils::evalOpParm(myReplace, node, "replace", time, 0);
157  else myReplace = "R_*"_sh;
158 
159  }
160 
161 
162  virtual void loadFromOpSubclass(const LoadParms &loadparms)
163  {
164  buildFromOp(loadparms.node(), loadparms.context().getTime(), loadparms.depnode());
165  }
166 
167 
168  virtual void copyFrom(const SOP_NodeParms *src)
169  {
170  *this = *((const SOP_AttribMirrorParms *)src);
171  }
172 
173  template <typename T>
174  void
175  doGetParmValue(exint idx, T &value) const
176  {
177  switch (idx)
178  {
179  case 0:
180  coerceValue(value, myGroup);
181  break;
182  case 1:
183  coerceValue(value, myGroupType);
184  break;
185  case 2:
186  coerceValue(value, myMirrorOp);
187  break;
188  case 3:
189  coerceValue(value, myAttrib);
190  break;
191  case 4:
192  coerceValue(value, myAttribName);
193  break;
194  case 5:
195  coerceValue(value, myUseTolerance);
196  break;
197  case 6:
198  coerceValue(value, myTolerance);
199  break;
200  case 7:
201  coerceValue(value, myOrigin);
202  break;
203  case 8:
204  coerceValue(value, myDist);
205  break;
206  case 9:
207  coerceValue(value, myDir);
208  break;
209  case 10:
210  coerceValue(value, myAttribMirrorOp);
211  break;
212  case 11:
213  coerceValue(value, myUVOrigin);
214  break;
215  case 12:
216  coerceValue(value, myUVAngle);
217  break;
218  case 13:
219  coerceValue(value, myStringReplace);
220  break;
221  case 14:
222  coerceValue(value, mySearch);
223  break;
224  case 15:
225  coerceValue(value, myReplace);
226  break;
227 
228  }
229  }
230 
231  void getParmValue(exint idx, exint &value) const
232  { doGetParmValue(idx, value); }
233  void getParmValue(exint idx, fpreal &value) const
234  { doGetParmValue(idx, value); }
236  { doGetParmValue(idx, value); }
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); }
253 
254  template <typename T>
255  void
256  doSetParmValue(exint idx, const T &value)
257  {
258  switch (idx)
259  {
260  case 0:
261  coerceValue(myGroup, value);
262  break;
263  case 1:
264  coerceValue(myGroupType, value);
265  break;
266  case 2:
267  coerceValue(myMirrorOp, value);
268  break;
269  case 3:
270  coerceValue(myAttrib, value);
271  break;
272  case 4:
273  coerceValue(myAttribName, value);
274  break;
275  case 5:
276  coerceValue(myUseTolerance, value);
277  break;
278  case 6:
279  coerceValue(myTolerance, value);
280  break;
281  case 7:
282  coerceValue(myOrigin, value);
283  break;
284  case 8:
285  coerceValue(myDist, value);
286  break;
287  case 9:
288  coerceValue(myDir, value);
289  break;
290  case 10:
291  coerceValue(myAttribMirrorOp, value);
292  break;
293  case 11:
294  coerceValue(myUVOrigin, value);
295  break;
296  case 12:
297  coerceValue(myUVAngle, value);
298  break;
299  case 13:
300  coerceValue(myStringReplace, value);
301  break;
302  case 14:
303  coerceValue(mySearch, value);
304  break;
305  case 15:
306  coerceValue(myReplace, value);
307  break;
308 
309  }
310  }
311 
312  void setParmValue(exint idx, const exint &value)
313  { doSetParmValue(idx, value); }
314  void setParmValue(exint idx, const fpreal &value)
315  { doSetParmValue(idx, value); }
316  void setParmValue(exint idx, const UT_Vector2D &value)
317  { doSetParmValue(idx, value); }
318  void setParmValue(exint idx, const UT_Vector3D &value)
319  { doSetParmValue(idx, value); }
320  void setParmValue(exint idx, const UT_Vector4D &value)
321  { doSetParmValue(idx, value); }
322  void setParmValue(exint idx, const UT_Matrix2D &value)
323  { doSetParmValue(idx, value); }
324  void setParmValue(exint idx, const UT_Matrix3D &value)
325  { doSetParmValue(idx, value); }
326  void setParmValue(exint idx, const UT_Matrix4D &value)
327  { doSetParmValue(idx, value); }
329  { doSetParmValue(idx, value); }
331  { doSetParmValue(idx, value); }
333  { doSetParmValue(idx, value); }
334 
335  virtual exint getNumParms() const
336  {
337  return 16;
338  }
339 
340  virtual const char *getParmName(exint fieldnum) const
341  {
342  switch (fieldnum)
343  {
344  case 0:
345  return "group";
346  case 1:
347  return "grouptype";
348  case 2:
349  return "usegroupas";
350  case 3:
351  return "attrib";
352  case 4:
353  return "attribname";
354  case 5:
355  return "usetolerance";
356  case 6:
357  return "tolerance";
358  case 7:
359  return "origin";
360  case 8:
361  return "dist";
362  case 9:
363  return "dir";
364  case 10:
365  return "attribmirror";
366  case 11:
367  return "uvorig";
368  case 12:
369  return "uvangle";
370  case 13:
371  return "stringreplace";
372  case 14:
373  return "search";
374  case 15:
375  return "replace";
376 
377  }
378  return 0;
379  }
380 
381  virtual ParmType getParmType(exint fieldnum) const
382  {
383  switch (fieldnum)
384  {
385  case 0:
386  return PARM_STRING;
387  case 1:
388  return PARM_INTEGER;
389  case 2:
390  return PARM_INTEGER;
391  case 3:
392  return PARM_INTEGER;
393  case 4:
394  return PARM_STRING;
395  case 5:
396  return PARM_INTEGER;
397  case 6:
398  return PARM_FLOAT;
399  case 7:
400  return PARM_VECTOR3;
401  case 8:
402  return PARM_FLOAT;
403  case 9:
404  return PARM_VECTOR3;
405  case 10:
406  return PARM_INTEGER;
407  case 11:
408  return PARM_VECTOR2;
409  case 12:
410  return PARM_FLOAT;
411  case 13:
412  return PARM_INTEGER;
413  case 14:
414  return PARM_STRING;
415  case 15:
416  return PARM_STRING;
417 
418  }
419  return PARM_UNSUPPORTED;
420  }
421 
422  // Boiler plate to load individual types.
423  static void loadData(UT_IStream &is, int64 &v)
424  { is.bread(&v, 1); }
425  static void loadData(UT_IStream &is, bool &v)
426  { int64 iv; is.bread(&iv, 1); v = iv; }
427  static void loadData(UT_IStream &is, fpreal64 &v)
428  { is.bread<fpreal64>(&v, 1); }
429  static void loadData(UT_IStream &is, UT_Vector2D &v)
430  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
431  static void loadData(UT_IStream &is, UT_Vector3D &v)
432  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
433  is.bread<fpreal64>(&v.z(), 1); }
434  static void loadData(UT_IStream &is, UT_Vector4D &v)
435  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
436  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
437  static void loadData(UT_IStream &is, UT_Matrix2D &v)
438  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
439  static void loadData(UT_IStream &is, UT_Matrix3D &v)
440  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
441  static void loadData(UT_IStream &is, UT_Matrix4D &v)
442  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
443  static void loadData(UT_IStream &is, UT_Vector2I &v)
444  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
445  static void loadData(UT_IStream &is, UT_Vector3I &v)
446  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
447  is.bread<int64>(&v.z(), 1); }
448  static void loadData(UT_IStream &is, UT_Vector4I &v)
449  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
450  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
452  { is.bread(v); }
454  { UT_StringHolder rampdata;
455  loadData(is, rampdata);
456  if (rampdata.isstring())
457  {
458  v.reset(new UT_Ramp());
459  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
460  v->load(istr);
461  }
462  else v.reset();
463  }
466  loadData(is, data);
467  if (data.isstring())
468  {
469  // Find the data type.
470  char *colon = UT_StringWrap(data).findChar(':');
471  if (colon)
472  {
473  int typelen = colon - data.buffer();
475  type.strncpy(data.buffer(), typelen);
476  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
477 
478  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
479  }
480  }
481  else v.reset();
482  }
483 
484  static void saveData(std::ostream &os, int64 v)
485  { UTwrite(os, &v); }
486  static void saveData(std::ostream &os, bool v)
487  { int64 iv = v; UTwrite(os, &iv); }
488  static void saveData(std::ostream &os, fpreal64 v)
489  { UTwrite<fpreal64>(os, &v); }
490  static void saveData(std::ostream &os, UT_Vector2D v)
491  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
492  static void saveData(std::ostream &os, UT_Vector3D v)
493  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
494  UTwrite<fpreal64>(os, &v.z()); }
495  static void saveData(std::ostream &os, UT_Vector4D v)
496  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
497  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
498  static void saveData(std::ostream &os, UT_Matrix2D v)
500  static void saveData(std::ostream &os, UT_Matrix3D v)
502  static void saveData(std::ostream &os, UT_Matrix4D v)
504  static void saveData(std::ostream &os, UT_StringHolder s)
505  { UT_StringWrap(s).saveBinary(os); }
506  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
507  { UT_StringHolder result;
508  UT_OStringStream ostr;
509  if (s) s->save(ostr);
510  result = ostr.str();
511  saveData(os, result);
512  }
513  static void saveData(std::ostream &os, PRM_DataItemHandle s)
514  { UT_StringHolder result;
515  UT_OStringStream ostr;
516  if (s)
517  {
518  ostr << s->getDataTypeToken();
519  ostr << ":";
520  s->saveBinary(ostr);
521  }
522  result = ostr.str();
523  saveData(os, result);
524  }
525 
526 
527  void save(std::ostream &os) const
528  {
529  int32 v = version();
530  UTwrite(os, &v);
531  saveData(os, myGroup);
532  saveData(os, myGroupType);
533  saveData(os, myMirrorOp);
534  saveData(os, myAttrib);
535  saveData(os, myAttribName);
536  saveData(os, myUseTolerance);
537  saveData(os, myTolerance);
538  saveData(os, myOrigin);
539  saveData(os, myDist);
540  saveData(os, myDir);
541  saveData(os, myAttribMirrorOp);
542  saveData(os, myUVOrigin);
543  saveData(os, myUVAngle);
544  saveData(os, myStringReplace);
545  saveData(os, mySearch);
546  saveData(os, myReplace);
547 
548  }
549 
550  bool load(UT_IStream &is)
551  {
552  int32 v;
553  is.bread(&v, 1);
554  if (version() != v)
555  {
556  // Fail incompatible versions
557  return false;
558  }
559  loadData(is, myGroup);
560  loadData(is, myGroupType);
561  loadData(is, myMirrorOp);
562  loadData(is, myAttrib);
563  loadData(is, myAttribName);
564  loadData(is, myUseTolerance);
565  loadData(is, myTolerance);
566  loadData(is, myOrigin);
567  loadData(is, myDist);
568  loadData(is, myDir);
569  loadData(is, myAttribMirrorOp);
570  loadData(is, myUVOrigin);
571  loadData(is, myUVAngle);
572  loadData(is, myStringReplace);
573  loadData(is, mySearch);
574  loadData(is, myReplace);
575 
576  return true;
577  }
578 
579  const UT_StringHolder & getGroup() const { return myGroup; }
580  void setGroup(const UT_StringHolder & val) { myGroup = val; }
582  {
583  SOP_Node *thissop = cookparms.getNode();
584  if (!thissop) return getGroup();
585  UT_StringHolder result;
586  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
587  return result;
588  }
589  GroupType getGroupType() const { return GroupType(myGroupType); }
590  void setGroupType(GroupType val) { myGroupType = int64(val); }
592  {
593  SOP_Node *thissop = cookparms.getNode();
594  if (!thissop) return getGroupType();
595  int64 result;
596  OP_Utils::evalOpParm(result, thissop, "grouptype", cookparms.getCookTime(), 0);
597  return GroupType(result);
598  }
599  MirrorOp getMirrorOp() const { return MirrorOp(myMirrorOp); }
600  void setMirrorOp(MirrorOp val) { myMirrorOp = int64(val); }
602  {
603  SOP_Node *thissop = cookparms.getNode();
604  if (!thissop) return getMirrorOp();
605  int64 result;
606  OP_Utils::evalOpParm(result, thissop, "usegroupas", cookparms.getCookTime(), 0);
607  return MirrorOp(result);
608  }
609  Attrib getAttrib() const { return Attrib(myAttrib); }
610  void setAttrib(Attrib val) { myAttrib = int64(val); }
611  Attrib opAttrib(const SOP_NodeVerb::CookParms &cookparms) const
612  {
613  SOP_Node *thissop = cookparms.getNode();
614  if (!thissop) return getAttrib();
615  int64 result;
616  OP_Utils::evalOpParm(result, thissop, "attrib", cookparms.getCookTime(), 0);
617  return Attrib(result);
618  }
619  const UT_StringHolder & getAttribName() const { return myAttribName; }
620  void setAttribName(const UT_StringHolder & val) { myAttribName = val; }
622  {
623  SOP_Node *thissop = cookparms.getNode();
624  if (!thissop) return getAttribName();
625  UT_StringHolder result;
626  OP_Utils::evalOpParm(result, thissop, "attribname", cookparms.getCookTime(), 0);
627  return result;
628  }
629  bool getUseTolerance() const { return myUseTolerance; }
630  void setUseTolerance(bool val) { myUseTolerance = val; }
631  bool opUseTolerance(const SOP_NodeVerb::CookParms &cookparms) const
632  {
633  SOP_Node *thissop = cookparms.getNode();
634  if (!thissop) return getUseTolerance();
635  bool result;
636  OP_Utils::evalOpParm(result, thissop, "usetolerance", cookparms.getCookTime(), 0);
637  return result;
638  }
639  fpreal64 getTolerance() const { return myTolerance; }
640  void setTolerance(fpreal64 val) { myTolerance = val; }
642  {
643  SOP_Node *thissop = cookparms.getNode();
644  if (!thissop) return getTolerance();
645  fpreal64 result;
646  OP_Utils::evalOpParm(result, thissop, "tolerance", cookparms.getCookTime(), 0);
647  return result;
648  }
649  UT_Vector3D getOrigin() const { return myOrigin; }
650  void setOrigin(UT_Vector3D val) { myOrigin = val; }
652  {
653  SOP_Node *thissop = cookparms.getNode();
654  if (!thissop) return getOrigin();
655  UT_Vector3D result;
656  OP_Utils::evalOpParm(result, thissop, "origin", cookparms.getCookTime(), 0);
657  return result;
658  }
659  fpreal64 getDist() const { return myDist; }
660  void setDist(fpreal64 val) { myDist = val; }
661  fpreal64 opDist(const SOP_NodeVerb::CookParms &cookparms) const
662  {
663  SOP_Node *thissop = cookparms.getNode();
664  if (!thissop) return getDist();
665  fpreal64 result;
666  OP_Utils::evalOpParm(result, thissop, "dist", cookparms.getCookTime(), 0);
667  return result;
668  }
669  UT_Vector3D getDir() const { return myDir; }
670  void setDir(UT_Vector3D val) { myDir = val; }
671  UT_Vector3D opDir(const SOP_NodeVerb::CookParms &cookparms) const
672  {
673  SOP_Node *thissop = cookparms.getNode();
674  if (!thissop) return getDir();
675  UT_Vector3D result;
676  OP_Utils::evalOpParm(result, thissop, "dir", cookparms.getCookTime(), 0);
677  return result;
678  }
679  AttribMirrorOp getAttribMirrorOp() const { return AttribMirrorOp(myAttribMirrorOp); }
680  void setAttribMirrorOp(AttribMirrorOp val) { myAttribMirrorOp = int64(val); }
682  {
683  SOP_Node *thissop = cookparms.getNode();
684  if (!thissop) return getAttribMirrorOp();
685  int64 result;
686  OP_Utils::evalOpParm(result, thissop, "attribmirror", cookparms.getCookTime(), 0);
687  return AttribMirrorOp(result);
688  }
689  UT_Vector2D getUVOrigin() const { return myUVOrigin; }
690  void setUVOrigin(UT_Vector2D val) { myUVOrigin = val; }
692  {
693  SOP_Node *thissop = cookparms.getNode();
694  if (!thissop) return getUVOrigin();
695  UT_Vector2D result;
696  OP_Utils::evalOpParm(result, thissop, "uvorig", cookparms.getCookTime(), 0);
697  return result;
698  }
699  fpreal64 getUVAngle() const { return myUVAngle; }
700  void setUVAngle(fpreal64 val) { myUVAngle = val; }
702  {
703  SOP_Node *thissop = cookparms.getNode();
704  if (!thissop) return getUVAngle();
705  fpreal64 result;
706  OP_Utils::evalOpParm(result, thissop, "uvangle", cookparms.getCookTime(), 0);
707  return result;
708  }
709  bool getStringReplace() const { return myStringReplace; }
710  void setStringReplace(bool val) { myStringReplace = val; }
711  bool opStringReplace(const SOP_NodeVerb::CookParms &cookparms) const
712  {
713  SOP_Node *thissop = cookparms.getNode();
714  if (!thissop) return getStringReplace();
715  bool result;
716  OP_Utils::evalOpParm(result, thissop, "stringreplace", cookparms.getCookTime(), 0);
717  return result;
718  }
719  const UT_StringHolder & getSearch() const { return mySearch; }
720  void setSearch(const UT_StringHolder & val) { mySearch = val; }
722  {
723  SOP_Node *thissop = cookparms.getNode();
724  if (!thissop) return getSearch();
725  UT_StringHolder result;
726  OP_Utils::evalOpParm(result, thissop, "search", cookparms.getCookTime(), 0);
727  return result;
728  }
729  const UT_StringHolder & getReplace() const { return myReplace; }
730  void setReplace(const UT_StringHolder & val) { myReplace = val; }
732  {
733  SOP_Node *thissop = cookparms.getNode();
734  if (!thissop) return getReplace();
735  UT_StringHolder result;
736  OP_Utils::evalOpParm(result, thissop, "replace", cookparms.getCookTime(), 0);
737  return result;
738  }
739 
740 private:
741  UT_StringHolder myGroup;
742  int64 myGroupType;
743  int64 myMirrorOp;
744  int64 myAttrib;
745  UT_StringHolder myAttribName;
746  bool myUseTolerance;
747  fpreal64 myTolerance;
748  UT_Vector3D myOrigin;
749  fpreal64 myDist;
750  UT_Vector3D myDir;
751  int64 myAttribMirrorOp;
752  UT_Vector2D myUVOrigin;
753  fpreal64 myUVAngle;
754  bool myStringReplace;
755  UT_StringHolder mySearch;
756  UT_StringHolder myReplace;
757 
758 };
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:492
bool load(UT_IStream &is)
T & z(void)
Definition: UT_Vector4.h:372
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)
UT_Vector3D getDir() const
fpreal getTime() const
Definition: OP_Context.h:34
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)
T & x(void)
Definition: UT_Vector2.h:284
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:581
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:585
bool opUseTolerance(const SOP_NodeVerb::CookParms &cookparms) const
long long int64
Definition: SYS_Types.h:100
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
void getParmValue(exint idx, fpreal &value) const
int64 exint
Definition: SYS_Types.h:109
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:185
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:28
T & y(void)
Definition: UT_Vector4.h:370
void setOrigin(UT_Vector3D val)
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
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:583
GLsizei const GLfloat * value
Definition: glcorearb.h:823
double fpreal
Definition: SYS_Types.h:263
UT_Vector3D opOrigin(const SOP_NodeVerb::CookParms &cookparms) const
void strncpy(const char *src, exint maxlen)
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
const char * buffer() const
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:499
T & x(void)
Definition: UT_Vector4.h:368
UT_Vector3D getOrigin() const
void getParmValue(exint idx, UT_StringHolder &value) const
T & y(void)
Definition: UT_Vector2.h:286
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:374
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
static void saveData(std::ostream &os, UT_Vector3D v)
SYS_FORCE_INLINE bool isstring() const
static void saveData(std::ostream &os, UT_Matrix2D v)
GLenum src
Definition: glcorearb.h:1792
void setParmValue(exint idx, const exint &value)