HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_FontParms.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 
25 {
26 public:
27  static int version() { return 1; }
28 
30  {
31  myType = 2;
32  myFontFile = "Helvetica Bold"_sh;
33  myText = "Frame: $F"_sh;
34  myHAlign = 1;
35  myVAlign = 2;
36  myUseDescender = false;
37  myTranslate = 0;
38  myRotate = 0;
39  myScale = 1;
40  myFontSize = 1;
41  myTracking = 0;
42  myAutoKern = true;
43  myOblique = 0;
44  myLOD = 1;
45  myHole = true;
46  myAddAttrib = false;
47 
48  }
49 
50  explicit SOP_FontParms(const SOP_FontParms &) = default;
51 
52  ~SOP_FontParms() override {}
53 
54  bool operator==(const SOP_FontParms &src) const
55  {
56  if (myType != src.myType) return false;
57  if (myFontFile != src.myFontFile) return false;
58  if (myText != src.myText) return false;
59  if (myHAlign != src.myHAlign) return false;
60  if (myVAlign != src.myVAlign) return false;
61  if (myUseDescender != src.myUseDescender) return false;
62  if (myTranslate != src.myTranslate) return false;
63  if (myRotate != src.myRotate) return false;
64  if (myScale != src.myScale) return false;
65  if (myFontSize != src.myFontSize) return false;
66  if (myTracking != src.myTracking) return false;
67  if (myAutoKern != src.myAutoKern) return false;
68  if (myOblique != src.myOblique) return false;
69  if (myLOD != src.myLOD) return false;
70  if (myHole != src.myHole) return false;
71  if (myAddAttrib != src.myAddAttrib) return false;
72 
73  return true;
74  }
75  bool operator!=(const SOP_FontParms &src) const
76  {
77  return !operator==(src);
78  }
79 
80 
81 
82  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
83  {
84  myType = 2;
85  if (true)
86  graph->evalOpParm(myType, nodeidx, "type", time, 0);
87  myFontFile = "Helvetica Bold"_sh;
88  if (true)
89  graph->evalOpParm(myFontFile, nodeidx, "file", time, 0);
90  myText = "Frame: $F"_sh;
91  if (true)
92  graph->evalOpParm(myText, nodeidx, "text", time, 0);
93  myHAlign = 1;
94  if (true)
95  graph->evalOpParm(myHAlign, nodeidx, "halign", time, 0);
96  myVAlign = 2;
97  if (true)
98  graph->evalOpParm(myVAlign, nodeidx, "valign", time, 0);
99  myUseDescender = false;
100  if (true)
101  graph->evalOpParm(myUseDescender, nodeidx, "use_descender", time, 0);
102  myTranslate = 0;
103  if (true)
104  graph->evalOpParm(myTranslate, nodeidx, "t", time, 0);
105  myRotate = 0;
106  if (true)
107  graph->evalOpParm(myRotate, nodeidx, "r", time, 0);
108  myScale = 1;
109  if (true)
110  graph->evalOpParm(myScale, nodeidx, "s", time, 0);
111  myFontSize = 1;
112  if (true)
113  graph->evalOpParm(myFontSize, nodeidx, "fontsize", time, 0);
114  myTracking = 0;
115  if (true)
116  graph->evalOpParm(myTracking, nodeidx, "tracking", time, 0);
117  myAutoKern = true;
118  if (true)
119  graph->evalOpParm(myAutoKern, nodeidx, "autokern", time, 0);
120  myOblique = 0;
121  if (true)
122  graph->evalOpParm(myOblique, nodeidx, "oblique", time, 0);
123  myLOD = 1;
124  if (true)
125  graph->evalOpParm(myLOD, nodeidx, "lod", time, 0);
126  myHole = true;
127  if (true)
128  graph->evalOpParm(myHole, nodeidx, "hole", time, 0);
129  myAddAttrib = false;
130  if (true)
131  graph->evalOpParm(myAddAttrib, nodeidx, "addattrib", time, 0);
132 
133  }
134 
135 
136  void loadFromOpSubclass(const LoadParms &loadparms) override
137  {
138  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
139  }
140 
141 
142  void copyFrom(const SOP_NodeParms *src) override
143  {
144  *this = *((const SOP_FontParms *)src);
145  }
146 
147  template <typename T>
148  void
149  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
150  {
151  if (idx.size() < 1)
152  return;
153  UT_ASSERT(idx.size() == instance.size()+1);
154  if (idx.size() != instance.size()+1)
155  return;
156  switch (idx[0])
157  {
158  case 0:
159  coerceValue(value, myType);
160  break;
161  case 1:
162  coerceValue(value, myFontFile);
163  break;
164  case 2:
165  coerceValue(value, myText);
166  break;
167  case 3:
168  coerceValue(value, myHAlign);
169  break;
170  case 4:
171  coerceValue(value, myVAlign);
172  break;
173  case 5:
174  coerceValue(value, myUseDescender);
175  break;
176  case 6:
177  coerceValue(value, myTranslate);
178  break;
179  case 7:
180  coerceValue(value, myRotate);
181  break;
182  case 8:
183  coerceValue(value, myScale);
184  break;
185  case 9:
186  coerceValue(value, myFontSize);
187  break;
188  case 10:
189  coerceValue(value, myTracking);
190  break;
191  case 11:
192  coerceValue(value, myAutoKern);
193  break;
194  case 12:
195  coerceValue(value, myOblique);
196  break;
197  case 13:
198  coerceValue(value, myLOD);
199  break;
200  case 14:
201  coerceValue(value, myHole);
202  break;
203  case 15:
204  coerceValue(value, myAddAttrib);
205  break;
206 
207  }
208  }
209 
210  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
211  { doGetParmValue(idx, instance, value); }
212  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
213  { doGetParmValue(idx, instance, value); }
214  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
215  { doGetParmValue(idx, instance, value); }
216  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
217  { doGetParmValue(idx, instance, value); }
218  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
219  { doGetParmValue(idx, instance, value); }
220  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
221  { doGetParmValue(idx, instance, value); }
222  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
223  { doGetParmValue(idx, instance, value); }
224  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
225  { doGetParmValue(idx, instance, value); }
226  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
227  { doGetParmValue(idx, instance, value); }
228  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
229  { doGetParmValue(idx, instance, value); }
230  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
231  { doGetParmValue(idx, instance, value); }
232 
233  template <typename T>
234  void
235  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
236  {
237  if (idx.size() < 1)
238  return;
239  UT_ASSERT(idx.size() == instance.size()+1);
240  if (idx.size() != instance.size()+1)
241  return;
242  switch (idx[0])
243  {
244  case 0:
245  coerceValue(myType, value);
246  break;
247  case 1:
248  coerceValue(myFontFile, value);
249  break;
250  case 2:
251  coerceValue(myText, value);
252  break;
253  case 3:
254  coerceValue(myHAlign, value);
255  break;
256  case 4:
257  coerceValue(myVAlign, value);
258  break;
259  case 5:
260  coerceValue(myUseDescender, value);
261  break;
262  case 6:
263  coerceValue(myTranslate, value);
264  break;
265  case 7:
266  coerceValue(myRotate, value);
267  break;
268  case 8:
269  coerceValue(myScale, value);
270  break;
271  case 9:
272  coerceValue(myFontSize, value);
273  break;
274  case 10:
275  coerceValue(myTracking, value);
276  break;
277  case 11:
278  coerceValue(myAutoKern, value);
279  break;
280  case 12:
281  coerceValue(myOblique, value);
282  break;
283  case 13:
284  coerceValue(myLOD, value);
285  break;
286  case 14:
287  coerceValue(myHole, value);
288  break;
289  case 15:
290  coerceValue(myAddAttrib, value);
291  break;
292 
293  }
294  }
295 
296  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
297  { doSetParmValue(idx, instance, value); }
298  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
299  { doSetParmValue(idx, instance, value); }
300  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
301  { doSetParmValue(idx, instance, value); }
302  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
303  { doSetParmValue(idx, instance, value); }
304  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
305  { doSetParmValue(idx, instance, value); }
306  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
307  { doSetParmValue(idx, instance, value); }
308  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
309  { doSetParmValue(idx, instance, value); }
310  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
311  { doSetParmValue(idx, instance, value); }
312  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
313  { doSetParmValue(idx, instance, value); }
314  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
315  { doSetParmValue(idx, instance, value); }
316  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
317  { doSetParmValue(idx, instance, value); }
318 
319  exint getNestNumParms(TempIndex idx) const override
320  {
321  if (idx.size() == 0)
322  return 16;
323  switch (idx[0])
324  {
325 
326  }
327  // Invalid
328  return 0;
329  }
330 
331  const char *getNestParmName(TempIndex fieldnum) const override
332  {
333  if (fieldnum.size() < 1)
334  return 0;
335  switch (fieldnum[0])
336  {
337  case 0:
338  return "type";
339  case 1:
340  return "file";
341  case 2:
342  return "text";
343  case 3:
344  return "halign";
345  case 4:
346  return "valign";
347  case 5:
348  return "use_descender";
349  case 6:
350  return "t";
351  case 7:
352  return "r";
353  case 8:
354  return "s";
355  case 9:
356  return "fontsize";
357  case 10:
358  return "tracking";
359  case 11:
360  return "autokern";
361  case 12:
362  return "oblique";
363  case 13:
364  return "lod";
365  case 14:
366  return "hole";
367  case 15:
368  return "addattrib";
369 
370  }
371  return 0;
372  }
373 
374  ParmType getNestParmType(TempIndex fieldnum) const override
375  {
376  if (fieldnum.size() < 1)
377  return PARM_UNSUPPORTED;
378  switch (fieldnum[0])
379  {
380  case 0:
381  return PARM_INTEGER;
382  case 1:
383  return PARM_STRING;
384  case 2:
385  return PARM_STRING;
386  case 3:
387  return PARM_INTEGER;
388  case 4:
389  return PARM_INTEGER;
390  case 5:
391  return PARM_INTEGER;
392  case 6:
393  return PARM_VECTOR3;
394  case 7:
395  return PARM_VECTOR3;
396  case 8:
397  return PARM_VECTOR2;
398  case 9:
399  return PARM_FLOAT;
400  case 10:
401  return PARM_VECTOR2;
402  case 11:
403  return PARM_INTEGER;
404  case 12:
405  return PARM_FLOAT;
406  case 13:
407  return PARM_FLOAT;
408  case 14:
409  return PARM_INTEGER;
410  case 15:
411  return PARM_INTEGER;
412 
413  }
414  return PARM_UNSUPPORTED;
415  }
416 
417  // Boiler plate to load individual types.
418  static void loadData(UT_IStream &is, int64 &v)
419  { is.bread(&v, 1); }
420  static void loadData(UT_IStream &is, bool &v)
421  { int64 iv; is.bread(&iv, 1); v = iv; }
422  static void loadData(UT_IStream &is, fpreal64 &v)
423  { is.bread<fpreal64>(&v, 1); }
424  static void loadData(UT_IStream &is, UT_Vector2D &v)
425  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
426  static void loadData(UT_IStream &is, UT_Vector3D &v)
427  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
428  is.bread<fpreal64>(&v.z(), 1); }
429  static void loadData(UT_IStream &is, UT_Vector4D &v)
430  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
431  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
432  static void loadData(UT_IStream &is, UT_Matrix2D &v)
433  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
434  static void loadData(UT_IStream &is, UT_Matrix3D &v)
435  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
436  static void loadData(UT_IStream &is, UT_Matrix4D &v)
437  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
438  static void loadData(UT_IStream &is, UT_Vector2I &v)
439  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
440  static void loadData(UT_IStream &is, UT_Vector3I &v)
441  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
442  is.bread<int64>(&v.z(), 1); }
443  static void loadData(UT_IStream &is, UT_Vector4I &v)
444  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
445  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
447  { is.bread(v); }
449  { UT_StringHolder rampdata;
450  loadData(is, rampdata);
451  if (rampdata.isstring())
452  {
453  v.reset(new UT_Ramp());
454  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
455  v->load(istr);
456  }
457  else v.reset();
458  }
461  loadData(is, data);
462  if (data.isstring())
463  {
464  // Find the data type.
465  const char *colon = UT_StringWrap(data).findChar(':');
466  if (colon)
467  {
468  int typelen = colon - data.buffer();
470  type.strncpy(data.buffer(), typelen);
471  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
472 
473  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
474  }
475  }
476  else v.reset();
477  }
478 
479  static void saveData(std::ostream &os, int64 v)
480  { UTwrite(os, &v); }
481  static void saveData(std::ostream &os, bool v)
482  { int64 iv = v; UTwrite(os, &iv); }
483  static void saveData(std::ostream &os, fpreal64 v)
484  { UTwrite<fpreal64>(os, &v); }
485  static void saveData(std::ostream &os, UT_Vector2D v)
486  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
487  static void saveData(std::ostream &os, UT_Vector3D v)
488  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
489  UTwrite<fpreal64>(os, &v.z()); }
490  static void saveData(std::ostream &os, UT_Vector4D v)
491  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
492  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
493  static void saveData(std::ostream &os, UT_Matrix2D v)
495  static void saveData(std::ostream &os, UT_Matrix3D v)
497  static void saveData(std::ostream &os, UT_Matrix4D v)
499  static void saveData(std::ostream &os, UT_StringHolder s)
500  { UT_StringWrap(s).saveBinary(os); }
501  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
503  UT_OStringStream ostr;
504  if (s) s->save(ostr);
505  result = ostr.str();
506  saveData(os, result);
507  }
508  static void saveData(std::ostream &os, PRM_DataItemHandle s)
510  UT_OStringStream ostr;
511  if (s)
512  {
513  ostr << s->getDataTypeToken();
514  ostr << ":";
515  s->saveBinary(ostr);
516  }
517  result = ostr.str();
518  saveData(os, result);
519  }
520 
521 
522  void save(std::ostream &os) const
523  {
524  int32 v = version();
525  UTwrite(os, &v);
526  saveData(os, myType);
527  saveData(os, myFontFile);
528  saveData(os, myText);
529  saveData(os, myHAlign);
530  saveData(os, myVAlign);
531  saveData(os, myUseDescender);
532  saveData(os, myTranslate);
533  saveData(os, myRotate);
534  saveData(os, myScale);
535  saveData(os, myFontSize);
536  saveData(os, myTracking);
537  saveData(os, myAutoKern);
538  saveData(os, myOblique);
539  saveData(os, myLOD);
540  saveData(os, myHole);
541  saveData(os, myAddAttrib);
542 
543  }
544 
545  bool load(UT_IStream &is)
546  {
547  int32 v;
548  is.bread(&v, 1);
549  if (version() != v)
550  {
551  // Fail incompatible versions
552  return false;
553  }
554  loadData(is, myType);
555  loadData(is, myFontFile);
556  loadData(is, myText);
557  loadData(is, myHAlign);
558  loadData(is, myVAlign);
559  loadData(is, myUseDescender);
560  loadData(is, myTranslate);
561  loadData(is, myRotate);
562  loadData(is, myScale);
563  loadData(is, myFontSize);
564  loadData(is, myTracking);
565  loadData(is, myAutoKern);
566  loadData(is, myOblique);
567  loadData(is, myLOD);
568  loadData(is, myHole);
569  loadData(is, myAddAttrib);
570 
571  return true;
572  }
573 
574  int64 getType() const { return myType; }
575  void setType(int64 val) { myType = val; }
576  int64 opType(const SOP_NodeVerb::CookParms &cookparms) const
577  {
578  SOP_Node *thissop = cookparms.getNode();
579  if (!thissop) return getType();
580  int64 result;
581  OP_Utils::evalOpParm(result, thissop, "type", cookparms.getCookTime(), 0);
582  return result;
583  }
584  const UT_StringHolder & getFontFile() const { return myFontFile; }
585  void setFontFile(const UT_StringHolder & val) { myFontFile = val; }
587  {
588  SOP_Node *thissop = cookparms.getNode();
589  if (!thissop) return getFontFile();
591  OP_Utils::evalOpParm(result, thissop, "file", cookparms.getCookTime(), 0);
592  return result;
593  }
594  const UT_StringHolder & getText() const { return myText; }
595  void setText(const UT_StringHolder & val) { myText = val; }
597  {
598  SOP_Node *thissop = cookparms.getNode();
599  if (!thissop) return getText();
601  OP_Utils::evalOpParm(result, thissop, "text", cookparms.getCookTime(), 0);
602  return result;
603  }
604  int64 getHAlign() const { return myHAlign; }
605  void setHAlign(int64 val) { myHAlign = val; }
606  int64 opHAlign(const SOP_NodeVerb::CookParms &cookparms) const
607  {
608  SOP_Node *thissop = cookparms.getNode();
609  if (!thissop) return getHAlign();
610  int64 result;
611  OP_Utils::evalOpParm(result, thissop, "halign", cookparms.getCookTime(), 0);
612  return result;
613  }
614  int64 getVAlign() const { return myVAlign; }
615  void setVAlign(int64 val) { myVAlign = val; }
616  int64 opVAlign(const SOP_NodeVerb::CookParms &cookparms) const
617  {
618  SOP_Node *thissop = cookparms.getNode();
619  if (!thissop) return getVAlign();
620  int64 result;
621  OP_Utils::evalOpParm(result, thissop, "valign", cookparms.getCookTime(), 0);
622  return result;
623  }
624  bool getUseDescender() const { return myUseDescender; }
625  void setUseDescender(bool val) { myUseDescender = val; }
626  bool opUseDescender(const SOP_NodeVerb::CookParms &cookparms) const
627  {
628  SOP_Node *thissop = cookparms.getNode();
629  if (!thissop) return getUseDescender();
630  bool result;
631  OP_Utils::evalOpParm(result, thissop, "use_descender", cookparms.getCookTime(), 0);
632  return result;
633  }
634  UT_Vector3D getTranslate() const { return myTranslate; }
635  void setTranslate(UT_Vector3D val) { myTranslate = val; }
637  {
638  SOP_Node *thissop = cookparms.getNode();
639  if (!thissop) return getTranslate();
641  OP_Utils::evalOpParm(result, thissop, "t", cookparms.getCookTime(), 0);
642  return result;
643  }
644  UT_Vector3D getRotate() const { return myRotate; }
645  void setRotate(UT_Vector3D val) { myRotate = val; }
647  {
648  SOP_Node *thissop = cookparms.getNode();
649  if (!thissop) return getRotate();
651  OP_Utils::evalOpParm(result, thissop, "r", cookparms.getCookTime(), 0);
652  return result;
653  }
654  UT_Vector2D getScale() const { return myScale; }
655  void setScale(UT_Vector2D val) { myScale = val; }
657  {
658  SOP_Node *thissop = cookparms.getNode();
659  if (!thissop) return getScale();
661  OP_Utils::evalOpParm(result, thissop, "s", cookparms.getCookTime(), 0);
662  return result;
663  }
664  fpreal64 getFontSize() const { return myFontSize; }
665  void setFontSize(fpreal64 val) { myFontSize = val; }
667  {
668  SOP_Node *thissop = cookparms.getNode();
669  if (!thissop) return getFontSize();
671  OP_Utils::evalOpParm(result, thissop, "fontsize", cookparms.getCookTime(), 0);
672  return result;
673  }
674  UT_Vector2D getTracking() const { return myTracking; }
675  void setTracking(UT_Vector2D val) { myTracking = val; }
677  {
678  SOP_Node *thissop = cookparms.getNode();
679  if (!thissop) return getTracking();
681  OP_Utils::evalOpParm(result, thissop, "tracking", cookparms.getCookTime(), 0);
682  return result;
683  }
684  bool getAutoKern() const { return myAutoKern; }
685  void setAutoKern(bool val) { myAutoKern = val; }
686  bool opAutoKern(const SOP_NodeVerb::CookParms &cookparms) const
687  {
688  SOP_Node *thissop = cookparms.getNode();
689  if (!thissop) return getAutoKern();
690  bool result;
691  OP_Utils::evalOpParm(result, thissop, "autokern", cookparms.getCookTime(), 0);
692  return result;
693  }
694  fpreal64 getOblique() const { return myOblique; }
695  void setOblique(fpreal64 val) { myOblique = val; }
697  {
698  SOP_Node *thissop = cookparms.getNode();
699  if (!thissop) return getOblique();
701  OP_Utils::evalOpParm(result, thissop, "oblique", cookparms.getCookTime(), 0);
702  return result;
703  }
704  fpreal64 getLOD() const { return myLOD; }
705  void setLOD(fpreal64 val) { myLOD = val; }
706  fpreal64 opLOD(const SOP_NodeVerb::CookParms &cookparms) const
707  {
708  SOP_Node *thissop = cookparms.getNode();
709  if (!thissop) return getLOD();
711  OP_Utils::evalOpParm(result, thissop, "lod", cookparms.getCookTime(), 0);
712  return result;
713  }
714  bool getHole() const { return myHole; }
715  void setHole(bool val) { myHole = val; }
716  bool opHole(const SOP_NodeVerb::CookParms &cookparms) const
717  {
718  SOP_Node *thissop = cookparms.getNode();
719  if (!thissop) return getHole();
720  bool result;
721  OP_Utils::evalOpParm(result, thissop, "hole", cookparms.getCookTime(), 0);
722  return result;
723  }
724  bool getAddAttrib() const { return myAddAttrib; }
725  void setAddAttrib(bool val) { myAddAttrib = val; }
726  bool opAddAttrib(const SOP_NodeVerb::CookParms &cookparms) const
727  {
728  SOP_Node *thissop = cookparms.getNode();
729  if (!thissop) return getAddAttrib();
730  bool result;
731  OP_Utils::evalOpParm(result, thissop, "addattrib", cookparms.getCookTime(), 0);
732  return result;
733  }
734 
735 private:
736  int64 myType;
737  UT_StringHolder myFontFile;
738  UT_StringHolder myText;
739  int64 myHAlign;
740  int64 myVAlign;
741  bool myUseDescender;
742  UT_Vector3D myTranslate;
743  UT_Vector3D myRotate;
744  UT_Vector2D myScale;
745  fpreal64 myFontSize;
746  UT_Vector2D myTracking;
747  bool myAutoKern;
748  fpreal64 myOblique;
749  fpreal64 myLOD;
750  bool myHole;
751  bool myAddAttrib;
752 
753 };
static void saveData(std::ostream &os, fpreal64 v)
GLdouble s
Definition: glew.h:1390
bool opAddAttrib(const SOP_NodeVerb::CookParms &cookparms) const
bool getAutoKern() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
UT_Vector3D getTranslate() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
bool opUseDescender(const SOP_NodeVerb::CookParms &cookparms) const
exint nodeIdx() const
Definition: SOP_NodeVerb.h:114
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
void setUseDescender(bool val)
GLenum src
Definition: glew.h:2410
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:640
void loadFromOpSubclass(const LoadParms &loadparms) override
static void loadData(UT_IStream &is, UT_Matrix3D &v)
bool operator==(const SOP_FontParms &src) const
int64 getHAlign() const
void copyFrom(const SOP_NodeParms *src) override
bool opAutoKern(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
UT_Vector2D getScale() const
static void loadData(UT_IStream &is, fpreal64 &v)
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
fpreal getTime() const
Definition: OP_Context.h:60
UT_Vector2D getTracking() const
void setAddAttrib(bool val)
exint getNestNumParms(TempIndex idx) const override
GLuint const GLfloat * val
Definition: glew.h:2794
fpreal64 opLOD(const SOP_NodeVerb::CookParms &cookparms) const
int64 exint
Definition: SYS_Types.h:125
bool getUseDescender() const
void setType(int64 val)
SYS_FORCE_INLINE const char * buffer() const
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:113
int64 opVAlign(const SOP_NodeVerb::CookParms &cookparms) const
void setHole(bool val)
An output stream object that owns its own string buffer storage.
static void loadData(UT_IStream &is, UT_Matrix2D &v)
void setTranslate(UT_Vector3D val)
static void loadData(UT_IStream &is, bool &v)
const GLdouble * v
Definition: glew.h:1391
static void loadData(UT_IStream &is, UT_Vector3I &v)
bool load(UT_IStream &is)
fpreal64 getLOD() const
static void saveData(std::ostream &os, UT_StringHolder s)
static void saveData(std::ostream &os, int64 v)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void setFontFile(const UT_StringHolder &val)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setLOD(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
double fpreal64
Definition: SYS_Types.h:201
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
const UT_StringHolder & getText() const
UT_Vector3D opRotate(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, UT_Vector2D &v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:513
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
static int version()
exint length() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
UT_Vector2D opTracking(const SOP_NodeVerb::CookParms &cookparms) const
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
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setHAlign(int64 val)
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:515
bool getAddAttrib() const
static void saveData(std::ostream &os, UT_Vector4D v)
static void saveData(std::ostream &os, UT_Matrix2D v)
const GLfloat * c
Definition: glew.h:16296
void setFontSize(fpreal64 val)
void save(std::ostream &os) const
int64 opHAlign(const SOP_NodeVerb::CookParms &cookparms) const
long long int64
Definition: SYS_Types.h:116
~SOP_FontParms() override
UT_StringHolder opText(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opFontSize(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
UT_StringHolder opFontFile(const SOP_NodeVerb::CookParms &cookparms) const
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:294
int64 getType() const
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:121
static void saveData(std::ostream &os, bool v)
const UT_StringHolder & getFontFile() const
static void loadData(UT_IStream &is, UT_Vector3D &v)
UT_Vector3D getRotate() const
int64 opType(const SOP_NodeVerb::CookParms &cookparms) const
void setTracking(UT_Vector2D val)
static void saveData(std::ostream &os, UT_Matrix4D v)
bool getHole() const
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
static void loadData(UT_IStream &is, int64 &v)
fpreal64 fpreal
Definition: SYS_Types.h:277
UT_Vector3D opTranslate(const SOP_NodeVerb::CookParms &cookparms) const
bool operator!=(const SOP_FontParms &src) const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
int64 getVAlign() const
static void saveData(std::ostream &os, UT_Vector2D v)
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
static void saveData(std::ostream &os, UT_Matrix3D v)
UT_Vector2D opScale(const SOP_NodeVerb::CookParms &cookparms) const
Vec3< typename MatType::value_type > getScale(const MatType &mat)
Return a Vec3 representing the lengths of the passed matrix's upper 3×3's rows.
Definition: Mat.h:648
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
#define SOP_API
Definition: SOP_API.h:10
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:511
void setOblique(fpreal64 val)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:654
static void saveData(std::ostream &os, UT_Vector3D v)
fpreal64 getOblique() const
GLuint64EXT * result
Definition: glew.h:14007
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
static void loadData(UT_IStream &is, UT_Vector2I &v)
const char * findChar(int c) const
Definition: UT_String.h:1367
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
void setVAlign(int64 val)
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setText(const UT_StringHolder &val)
bool opHole(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opOblique(const SOP_NodeVerb::CookParms &cookparms) const
ParmType getNestParmType(TempIndex fieldnum) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setScale(UT_Vector2D val)
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
GLsizei const GLfloat * value
Definition: glew.h:1849
const OP_Context & context() const
Definition: SOP_NodeVerb.h:119
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
fpreal64 getFontSize() const
const char * getNestParmName(TempIndex fieldnum) const override
SYS_FORCE_INLINE bool isstring() const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setRotate(UT_Vector3D val)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
type
Definition: core.h:528
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setAutoKern(bool val)