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