HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OP_NodeParms.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: OP_NodeParms.h ( OP Library, C++)
7  *
8  * COMMENTS:
9  * Marshalled parms for OP cooking mechanisms. OPs can return
10  * one of these objects to describe their parms
11  */
12 
13 #ifndef __OP_NodeParms_h__
14 #define __OP_NodeParms_h__
15 
16 #include "OP_API.h"
17 #include "OP_Context.h"
18 #include <PRM/PRM_Parm.h>
19 #include <UT/UT_Assert.h>
20 #include <UT/UT_Error.h>
21 #include <UT/UT_ErrorManager.h>
22 #include <UT/UT_Matrix2.h>
23 #include <UT/UT_Matrix3.h>
24 #include <UT/UT_Matrix4.h>
25 #include <UT/UT_SharedPtr.h>
26 #include <UT/UT_StringHolder.h>
27 #include <UT/UT_Vector2.h>
28 #include <UT/UT_Vector3.h>
29 #include <UT/UT_Vector4.h>
30 #include <UT/UT_Ramp.h>
31 #include <SYS/SYS_Math.h>
32 #include <SYS/SYS_Types.h>
33 
34 #include <initializer_list>
35 
36 class DEP_MicroNode;
37 class OP_GraphProxy;
38 class OP_Node;
39 class UT_Options;
40 class UT_SourceLocation;
41 
43 {
46 };
47 
48 
50 {
51 public:
53  {
54  }
55  virtual ~OP_NodeCache();
56 
57  virtual int64 getMemoryUsage(bool inclusive) const;
58 
59 protected:
60  OP_NodeCache(const OP_NodeCache &) = default;
61  OP_NodeCache &operator=(const OP_NodeCache &) = default;
62 
63  friend class OP_NodeParms;
64 };
65 
67 {
68 public:
70  virtual ~OP_NodeParms() {}
71 
73  {
74  public:
76  const OP_GraphProxy *graph,
77  exint nodeidx,
78  const OP_Context &context,
79  OP_NodeCache *cache,
81  DEP_MicroNode *depnode)
82  : myCookEngine(cookengine)
83  , myGraph(graph)
84  , myNodeIdx(nodeidx)
85  , myContext(context)
86  , myCache(cache)
87  , myError(error)
88  , myDepNode(depnode)
89  {
90  }
92 
93  const OP_Node *node() const;
94  const OP_GraphProxy *graph() const { return myGraph; }
95  exint nodeIdx() const { return myNodeIdx; }
96  OP_NodeCache *cache() const { return myCache; }
97  const OP_Context &context() const { return myContext; }
98  UT_ErrorManager *error() const { return myError; }
99  DEP_MicroNode *depnode() const { return myDepNode; }
100 
101  /// Methods to wire directly to the optional depnode.
102  void addExplicitInput(DEP_MicroNode &inp, bool check_dup)
103  { if (myDepNode) myDepNode->addExplicitInput(inp, check_dup); }
105  { addExplicitInput(inp, /*check_dup*/true); }
106 
107  /// Methods to add directly to any present error manager.
108  UT_ErrorSeverity addMessage (const char *type, int code, const char *msg=0,
109  const UT_SourceLocation *loc=0) const
110  { if (myError) return myError->addMessage(type, code, formatError(msg), loc);
111  return UT_ERROR_MESSAGE; }
112  UT_ErrorSeverity addWarning (const char *type, int code, const char *msg=0,
113  const UT_SourceLocation *loc=0) const
114  { if (myError) return myError->addWarning(type, code, formatError(msg), loc);
115  return UT_ERROR_WARNING; }
116  UT_ErrorSeverity addError (const char *type, int code, const char *msg=0,
117  const UT_SourceLocation *loc=0) const
118  { if (myError) return myError->addError(type, code, formatError(msg), loc);
119  return UT_ERROR_ABORT; }
120 
121  UT_ErrorSeverity sopAddMessage (int code, const char *msg=0,
122  const UT_SourceLocation *loc=0) const
123  { return addMessage("SOP", code, msg, loc); }
124  UT_ErrorSeverity sopAddWarning (int code, const char *msg=0,
125  const UT_SourceLocation *loc=0) const
126  { return addWarning("SOP", code, msg, loc); }
127  UT_ErrorSeverity sopAddError (int code, const char *msg=0,
128  const UT_SourceLocation *loc=0) const
129  { return addError("SOP", code, msg, loc); }
130 
132  bool borrow_only = false) const
133  { if (myError) myError->stealErrors(src,0, -1, UT_ERROR_NONE, borrow_only); }
134 
135  protected:
136  /// Prefix errors so we can get sensible results.
137  UT_StringHolder formatError(const char *msg) const;
138 
146  };
147 
148  void loadFromOp(const LoadParms &loadparms);
149 
150 
151  /// Overloads all the parmaeters according to matching entries in
152  /// the provided options table.
153  bool applyOptionsOverride(const UT_Options *options);
154 
155  virtual void copyFrom(const OP_NodeParms *src)
156  {
157  if (src) baseSetSignature(src->baseGetSignature());
158  else baseSetSignature(UT_StringHolder());
159  }
160 
161 
162 
163  enum ParmType
164  {
177  PARM_UNSUPPORTED
178  };
179 
180  /// Marshalling interface to rest of world
181  /// These all use index based notation.
182  virtual exint getNumParms() const { return getNestNumParms({}); }
183  virtual const char *getParmName(exint idx) const { return getNestParmName({idx}); }
184  virtual ParmType getParmType(exint idx) const { return getNestParmType({idx}); }
185 
186  virtual bool isParmColorRamp(exint idx) const { return false; }
187 
188  virtual void getParmValue(exint idx, exint &value) const
189  { getNestParmValue( {idx}, {}, value ); }
190  virtual void getParmValue(exint idx, fpreal &value) const
191  { getNestParmValue( {idx}, {}, value ); }
192  virtual void getParmValue(exint idx, UT_Vector2D &value) const
193  { getNestParmValue( {idx}, {}, value ); }
194  virtual void getParmValue(exint idx, UT_Vector3D &value) const
195  { getNestParmValue( {idx}, {}, value ); }
196  virtual void getParmValue(exint idx, UT_Vector4D &value) const
197  { getNestParmValue( {idx}, {}, value ); }
198  virtual void getParmValue(exint idx, UT_Matrix2D &value) const
199  { getNestParmValue( {idx}, {}, value ); }
200  virtual void getParmValue(exint idx, UT_Matrix3D &value) const
201  { getNestParmValue( {idx}, {}, value ); }
202  virtual void getParmValue(exint idx, UT_Matrix4D &value) const
203  { getNestParmValue( {idx}, {}, value ); }
204  virtual void getParmValue(exint idx, UT_StringHolder &value) const
205  { getNestParmValue( {idx}, {}, value ); }
206  virtual void getParmValue(exint idx, UT_SharedPtr<UT_Ramp> &value) const
207  { getNestParmValue( {idx}, {}, value ); }
208  virtual void getParmValue(exint idx, PRM_DataItemHandle &value) const
209  { getNestParmValue( {idx}, {}, value ); }
210 
211  virtual void setParmValue(exint idx, const exint &value)
212  { setNestParmValue( {idx}, {}, value ); }
213  virtual void setParmValue(exint idx, const fpreal &value)
214  { setNestParmValue( {idx}, {}, value ); }
215  virtual void setParmValue(exint idx, const UT_Vector2D &value)
216  { setNestParmValue( {idx}, {}, value ); }
217  virtual void setParmValue(exint idx, const UT_Vector3D &value)
218  { setNestParmValue( {idx}, {}, value ); }
219  virtual void setParmValue(exint idx, const UT_Vector4D &value)
220  { setNestParmValue( {idx}, {}, value ); }
221  virtual void setParmValue(exint idx, const UT_Matrix2D &value)
222  { setNestParmValue( {idx}, {}, value ); }
223  virtual void setParmValue(exint idx, const UT_Matrix3D &value)
224  { setNestParmValue( {idx}, {}, value ); }
225  virtual void setParmValue(exint idx, const UT_Matrix4D &value)
226  { setNestParmValue( {idx}, {}, value ); }
227  virtual void setParmValue(exint idx, const UT_StringHolder &value)
228  { setNestParmValue( {idx}, {}, value ); }
229  virtual void setParmValue(exint idx, const UT_SharedPtr<UT_Ramp> &value)
230  { setNestParmValue( {idx}, {}, value ); }
231  virtual void setParmValue(exint idx, const PRM_DataItemHandle &value)
232  { setNestParmValue( {idx}, {}, value ); }
233 
234  /// This makes a temporary index structure out of either an
235  /// initializer list or an exint array. It does *NOT* own
236  /// the data so should never be explicitly constructed.
237  class TempIndex
238  {
239  public:
240  TempIndex(std::initializer_list<exint> list)
241  {
242  if (list.size())
243  myVec = &*list.begin();
244  else
245  myVec = 0;
246  mySize = list.size();
247  }
249  {
250  myVec = list.data();
251  mySize = list.size();
252  }
253 
254  const exint *begin() const { return myVec; }
255  exint size() const { return mySize; }
256  exint operator[](const exint off) const
257  {
258  UT_ASSERT_P(off >= 0 && off < mySize);
259  return myVec[off];
260  }
261  protected:
262  const exint *myVec;
264  };
265 
266  virtual exint getNestNumParms(TempIndex idx) const { return 0; }
267  virtual const char *getNestParmName(TempIndex idx) const { return 0; }
268  virtual ParmType getNestParmType(TempIndex idx) const { return PARM_UNSUPPORTED; }
269 
270  virtual void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const {}
271  virtual void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const {}
272  virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const {}
273  virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const {}
274  virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const {}
275  virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const {}
276  virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const {}
277  virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const {}
278  virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const {}
279  virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const {}
280  virtual void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const {}
281 
282  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) {}
283  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) {}
284  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) {}
285  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) {}
286  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) {}
287  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) {}
288  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) {}
289  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) {}
290  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) {}
291  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) {}
292  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) {}
293 
294  virtual UT_StringHolder baseGetSignature() const { return _myBaseSignature; }
295  virtual void baseSetSignature(const UT_StringHolder &sig)
296  { _myBaseSignature = sig; }
297 
298  virtual int64 getMemoryUsage(bool inclusive) const
299  { return inclusive ? sizeof(*this) : 0; }
300 
301 protected:
302  virtual void loadFromOpSubclass(const LoadParms &loadparms) = 0;
303 
304  // These are needed to implement copyFrom() in subclasses
305  OP_NodeParms(const OP_NodeParms &) = default;
306  OP_NodeParms &operator=(const OP_NodeParms &) = default;
307 
308  // Used for coercing one type to another
309  template <typename T, typename S>
310  void coerceValue(T &result, const S &src) const
311  {
312  UT_ASSERT(!"Unimplemented OP_NodeParms::coerceValue() called!");
313  result = T{};
314  }
315 
316  template <typename T>
317  T clampMinValue(fpreal minvalue, const T &src) const
318  {
319  UT_ASSERT(!"Unimplemented OP_NodeParms::clampMinValue() called!");
320  return src;
321  }
322 
323  template <typename T>
324  T clampMaxValue(fpreal maxvalue, const T &src) const
325  {
326  UT_ASSERT(!"Unimplemented OP_NodeParms::clampMaxValue() called!");
327  return src;
328  }
329 
330  // We auto-generate member variables in derived classes, so this
331  // is to avoid name collisions.
333 };
334 
335 template <>
336 void inline OP_NodeParms::coerceValue(exint &result, const exint &src) const
337 { result = src; }
338 template <>
339 void inline OP_NodeParms::coerceValue(bool &result, const exint &src) const
340 { result = src; }
341 template <>
342 void inline OP_NodeParms::coerceValue(exint &result, const bool &src) const
343 { result = src; }
344 template <>
345 void inline OP_NodeParms::coerceValue(bool &result, const bool &src) const
346 { result = src; }
347 template <>
348 void inline OP_NodeParms::coerceValue(fpreal &result, const fpreal &src) const
349 { result = src; }
350 template <>
352 { result = src; }
353 template <>
355 { result = src; }
356 template <>
358 { result = src; }
359 template <>
361 { result = src; }
362 template <>
364 { result = src; }
365 template <>
367 { result = src; }
368 template <>
370 { result = src; }
371 template <>
373 { result = src; }
374 template <>
376 { result = src; }
377 template <>
379 { result = src; }
380 template <>
382 { result = src; }
383 template <>
385 { result = src; }
386 template <>
388 { result = src; }
389 template <>
391 { result = src; }
392 template <>
394 { result = src; }
395 
396 template <>
398 { return SYSmax((exint)clamp, src); }
399 template <>
400 bool inline OP_NodeParms::clampMinValue(fpreal clamp, const bool &src) const
401 { return SYSmax((exint)clamp, src); }
402 template <>
404 { return SYSmax(clamp, src); }
405 template <>
407 { return SYSmax(UT_Vector2D(clamp, clamp), src); }
408 template <>
410 { return SYSmax(UT_Vector3D(clamp, clamp, clamp), src); }
411 template <>
413 { return SYSmax(UT_Vector4D(clamp, clamp, clamp, clamp), src); }
414 template <>
416 { return SYSmax(UT_Matrix2D(clamp, clamp, clamp, clamp), src); }
417 template <>
419 { return SYSmax(UT_Matrix3D(clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp), src); }
420 template <>
422 { return SYSmax(UT_Matrix4D(clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp), src); }
423 template <>
425 { return SYSmax(UT_Vector2I(clamp, clamp), src); }
426 template <>
428 { return SYSmax(UT_Vector3I(clamp, clamp, clamp), src); }
429 template <>
431 { return SYSmax(UT_Vector4I(clamp, clamp, clamp, clamp), src); }
432 template <>
434  fpreal clamp,
435  const UT_SharedPtr<UT_Ramp> &src) const
436 {
437  const int number_of_new_nodes_needed = static_cast<int>(clamp) - src->getNodeCount();
438  if (number_of_new_nodes_needed <= 0)
439  {
440  return src;
441  }
442 
443  const fpreal spacing_between_new_nodes
444  = 0.5f / static_cast<fpreal>(number_of_new_nodes_needed);
445  const auto *last_node = src->getClosestNode(1);
446  fpreal last_node_pos = last_node ? last_node->t : 0;
447 
448  // Move all nodes to the first half of the src
449  if (last_node_pos > 0.5f)
450  {
451  fpreal scaler = 0.5f / last_node_pos;
452  for (int i = 0, n = src->getNodeCount(); i < n; ++i)
453  {
454  src->moveNode(i, src->getNode(i)->t * scaler);
455  }
456  }
457 
458  // Add new nodes to second half of the src
459  fpreal current_position = 0.5f + spacing_between_new_nodes;
460  for (int i = 0; i < number_of_new_nodes_needed; ++i)
461  {
462  src->addNode(current_position);
463  current_position += spacing_between_new_nodes;
464  }
465  return src;
466 }
467 
468 template <>
470 { return SYSmin((exint)clamp, src); }
471 template <>
472 bool inline OP_NodeParms::clampMaxValue(fpreal clamp, const bool &src) const
473 { return SYSmin((exint)clamp, src); }
474 template <>
476 { return SYSmin(clamp, src); }
477 template <>
479 { return SYSmin(UT_Vector2D(clamp, clamp), src); }
480 template <>
482 { return SYSmin(UT_Vector3D(clamp, clamp, clamp), src); }
483 template <>
485 { return SYSmin(UT_Vector4D(clamp, clamp, clamp, clamp), src); }
486 template <>
488 { return SYSmin(UT_Matrix2D(clamp, clamp, clamp, clamp), src); }
489 template <>
491 { return SYSmin(UT_Matrix3D(clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp), src); }
492 template <>
494 { return SYSmin(UT_Matrix4D(clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp), src); }
495 template <>
497 { return SYSmin(UT_Vector2I(clamp, clamp), src); }
498 template <>
500 { return SYSmin(UT_Vector3I(clamp, clamp, clamp), src); }
501 template <>
503 { return SYSmin(UT_Vector4I(clamp, clamp, clamp, clamp), src); }
504 
505 
506 #endif
OP_CookEngine
Definition: OP_NodeParms.h:42
UT_Vector2T< int64 > UT_Vector2I
#define SYSmax(a, b)
Definition: SYS_Math.h:1582
virtual void setParmValue(exint idx, const UT_Vector4D &value)
Definition: OP_NodeParms.h:219
virtual void setParmValue(exint idx, const UT_StringHolder &value)
Definition: OP_NodeParms.h:227
TempIndex(const UT_ExintArray &list)
Definition: OP_NodeParms.h:248
UT_Matrix4T< fpreal64 > UT_Matrix4D
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value)
Definition: OP_NodeParms.h:287
virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const
Definition: OP_NodeParms.h:276
virtual void setParmValue(exint idx, const UT_Vector2D &value)
Definition: OP_NodeParms.h:215
UT_ErrorManager * error() const
Definition: OP_NodeParms.h:98
OP_NodeCache * cache() const
Definition: OP_NodeParms.h:96
UT_ErrorSeverity sopAddWarning(int code, const char *msg=0, const UT_SourceLocation *loc=0) const
Definition: OP_NodeParms.h:124
virtual void getParmValue(exint idx, UT_Matrix3D &value) const
Definition: OP_NodeParms.h:200
virtual void getParmValue(exint idx, PRM_DataItemHandle &value) const
Definition: OP_NodeParms.h:208
virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const
Definition: OP_NodeParms.h:273
UT_ErrorSeverity sopAddError(int code, const char *msg=0, const UT_SourceLocation *loc=0) const
Definition: OP_NodeParms.h:127
GLenum clamp
Definition: glcorearb.h:1234
T clampMaxValue(fpreal maxvalue, const T &src) const
Definition: OP_NodeParms.h:324
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value)
Definition: OP_NodeParms.h:283
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value)
Definition: OP_NodeParms.h:288
virtual void setParmValue(exint idx, const exint &value)
Definition: OP_NodeParms.h:211
UT_ErrorManager * myError
Definition: OP_NodeParms.h:144
UT_Vector2T< fpreal64 > UT_Vector2D
GLsizei const GLfloat * value
Definition: glcorearb.h:824
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value)
Definition: OP_NodeParms.h:289
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value)
Definition: OP_NodeParms.h:282
const OP_Context & context() const
Definition: OP_NodeParms.h:97
LoadParms(OP_CookEngine cookengine, const OP_GraphProxy *graph, exint nodeidx, const OP_Context &context, OP_NodeCache *cache, UT_ErrorManager *error, DEP_MicroNode *depnode)
Definition: OP_NodeParms.h:75
int64 exint
Definition: SYS_Types.h:125
UT_ErrorSeverity
Definition: UT_Error.h:25
UT_Vector4T< int64 > UT_Vector4I
**But if you need a result
Definition: thread.h:622
exint operator[](const exint off) const
Definition: OP_NodeParms.h:256
UT_Vector3T< int64 > UT_Vector3I
virtual ParmType getNestParmType(TempIndex idx) const
Definition: OP_NodeParms.h:268
T clampMinValue(fpreal minvalue, const T &src) const
Definition: OP_NodeParms.h:317
virtual void setParmValue(exint idx, const UT_Vector3D &value)
Definition: OP_NodeParms.h:217
exint nodeIdx() const
Definition: OP_NodeParms.h:95
exint size() const
Definition: UT_Array.h:653
virtual void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const
Definition: OP_NodeParms.h:271
virtual void setParmValue(exint idx, const PRM_DataItemHandle &value)
Definition: OP_NodeParms.h:231
< returns > If no error
Definition: snippets.dox:2
const OP_Context & myContext
Definition: OP_NodeParms.h:142
UT_ErrorSeverity sopAddMessage(int code, const char *msg=0, const UT_SourceLocation *loc=0) const
Definition: OP_NodeParms.h:121
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
GLdouble n
Definition: glcorearb.h:2008
virtual exint getNestNumParms(TempIndex idx) const
Definition: OP_NodeParms.h:266
GLfloat f
Definition: glcorearb.h:1926
const exint * begin() const
Definition: OP_NodeParms.h:254
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:108
const OP_GraphProxy * myGraph
Definition: OP_NodeParms.h:140
UT_ErrorSeverity addMessage(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0) const
Methods to add directly to any present error manager.
Definition: OP_NodeParms.h:108
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value)
Definition: OP_NodeParms.h:285
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
#define UT_ASSERT_P(ZZ)
Definition: UT_Assert.h:155
virtual ParmType getParmType(exint idx) const
Definition: OP_NodeParms.h:184
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const
Definition: OP_NodeParms.h:278
virtual void setParmValue(exint idx, const UT_Matrix4D &value)
Definition: OP_NodeParms.h:225
virtual void baseSetSignature(const UT_StringHolder &sig)
Definition: OP_NodeParms.h:295
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value)
Definition: OP_NodeParms.h:284
void addExplicitInput(DEP_MicroNode &inp)
Definition: OP_NodeParms.h:104
virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const
Definition: OP_NodeParms.h:272
virtual int64 getMemoryUsage(bool inclusive) const
Definition: OP_NodeParms.h:298
virtual void getParmValue(exint idx, UT_Vector2D &value) const
Definition: OP_NodeParms.h:192
OP_NodeCache * myCache
Definition: OP_NodeParms.h:143
virtual void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
Definition: OP_NodeParms.h:229
long long int64
Definition: SYS_Types.h:116
UT_StringHolder _myBaseSignature
Definition: OP_NodeParms.h:332
virtual void setParmValue(exint idx, const UT_Matrix3D &value)
Definition: OP_NodeParms.h:223
UT_Vector3T< fpreal64 > UT_Vector3D
TempIndex(std::initializer_list< exint > list)
Definition: OP_NodeParms.h:240
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value)
Definition: OP_NodeParms.h:291
virtual void getParmValue(exint idx, UT_Matrix2D &value) const
Definition: OP_NodeParms.h:198
virtual bool isParmColorRamp(exint idx) const
Definition: OP_NodeParms.h:186
void addExplicitInput(DEP_MicroNode &inp, bool check_dup)
Methods to wire directly to the optional depnode.
Definition: OP_NodeParms.h:102
UT_ErrorSeverity addWarning(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0) const
Definition: OP_NodeParms.h:112
UT_Matrix2T< fpreal64 > UT_Matrix2D
virtual ~OP_NodeParms()
Definition: OP_NodeParms.h:70
virtual void getParmValue(exint idx, exint &value) const
Definition: OP_NodeParms.h:188
virtual void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
Definition: OP_NodeParms.h:206
A map of string to various well defined value types.
Definition: UT_Options.h:84
virtual exint getNumParms() const
Definition: OP_NodeParms.h:182
virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const
Definition: OP_NodeParms.h:277
virtual void copyFrom(const OP_NodeParms *src)
Definition: OP_NodeParms.h:155
void coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:310
virtual const char * getParmName(exint idx) const
Definition: OP_NodeParms.h:183
DEP_MicroNode * myDepNode
Definition: OP_NodeParms.h:145
fpreal64 fpreal
Definition: SYS_Types.h:278
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
T * data()
Definition: UT_Array.h:849
LeafData & operator=(const LeafData &)=delete
#define OP_API
Definition: OP_API.h:10
void stealErrors(UT_ErrorManager &src, bool borrow_only=false) const
Definition: OP_NodeParms.h:131
virtual void getParmValue(exint idx, fpreal &value) const
Definition: OP_NodeParms.h:190
virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const
Definition: OP_NodeParms.h:274
UT_ErrorSeverity addError(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0) const
Definition: OP_NodeParms.h:116
virtual void getParmValue(exint idx, UT_StringHolder &value) const
Definition: OP_NodeParms.h:204
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
A global error manager scope.
virtual void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const
Definition: OP_NodeParms.h:280
virtual void getParmValue(exint idx, UT_Vector4D &value) const
Definition: OP_NodeParms.h:196
virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const
Definition: OP_NodeParms.h:279
virtual void setParmValue(exint idx, const UT_Matrix2D &value)
Definition: OP_NodeParms.h:221
virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const
Definition: OP_NodeParms.h:275
virtual void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const
Definition: OP_NodeParms.h:270
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value)
Definition: OP_NodeParms.h:292
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
virtual void setParmValue(exint idx, const fpreal &value)
Definition: OP_NodeParms.h:213
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value)
Definition: OP_NodeParms.h:286
UT_Vector4T< fpreal64 > UT_Vector4D
#define SYSmin(a, b)
Definition: SYS_Math.h:1583
virtual const char * getNestParmName(TempIndex idx) const
Definition: OP_NodeParms.h:267
UT_Matrix3T< fpreal64 > UT_Matrix3D
GLenum src
Definition: glcorearb.h:1793
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value)
Definition: OP_NodeParms.h:290
virtual void getParmValue(exint idx, UT_Vector3D &value) const
Definition: OP_NodeParms.h:194
virtual void getParmValue(exint idx, UT_Matrix4D &value) const
Definition: OP_NodeParms.h:202