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  /// Unloading nodes doesn't unload the node cache, as usually
60  /// it caches parameters or snippets. This can be overriden
61  /// to unload additional data
62  virtual bool unload()
63  {
64  return true;
65  }
66 
67 protected:
68  OP_NodeCache(const OP_NodeCache &) = default;
69  OP_NodeCache &operator=(const OP_NodeCache &) = default;
70 
71  friend class OP_NodeParms;
72 };
73 
75 {
76 public:
78  virtual ~OP_NodeParms() {}
79 
81  {
82  public:
84  const OP_GraphProxy *graph,
85  exint nodeidx,
86  const OP_Context &context,
87  OP_NodeCache *cache,
89  DEP_MicroNode *depnode)
90  : myCookEngine(cookengine)
91  , myGraph(graph)
92  , myNodeIdx(nodeidx)
93  , myContext(context)
94  , myCache(cache)
95  , myError(error)
96  , myDepNode(depnode)
97  {
98  }
100 
101  const OP_Node *node() const;
102  const OP_GraphProxy *graph() const { return myGraph; }
103  exint nodeIdx() const { return myNodeIdx; }
104  OP_NodeCache *cache() const { return myCache; }
105  const OP_Context &context() const { return myContext; }
106  UT_ErrorManager *error() const { return myError; }
107  DEP_MicroNode *depnode() const { return myDepNode; }
108 
109  /// Methods to wire directly to the optional depnode.
110  void addExplicitInput(DEP_MicroNode &inp, bool check_dup)
111  { if (myDepNode) myDepNode->addExplicitInput(inp, check_dup); }
113  { addExplicitInput(inp, /*check_dup*/true); }
114 
115  /// Methods to add directly to any present error manager.
116  UT_ErrorSeverity addMessage (const char *type, int code, const char *msg=0,
117  const UT_SourceLocation *loc=0) const
118  { if (myError) return myError->addMessage(type, code, formatError(msg), loc);
119  return UT_ERROR_MESSAGE; }
120  UT_ErrorSeverity addWarning (const char *type, int code, const char *msg=0,
121  const UT_SourceLocation *loc=0) const
122  { if (myError) return myError->addWarning(type, code, formatError(msg), loc);
123  return UT_ERROR_WARNING; }
124  UT_ErrorSeverity addError (const char *type, int code, const char *msg=0,
125  const UT_SourceLocation *loc=0) const
126  { if (myError) return myError->addError(type, code, formatError(msg), loc);
127  return UT_ERROR_ABORT; }
128 
129  UT_ErrorSeverity sopAddMessage (int code, const char *msg=0,
130  const UT_SourceLocation *loc=0) const
131  { return addMessage("SOP", code, msg, loc); }
132  UT_ErrorSeverity sopAddWarning (int code, const char *msg=0,
133  const UT_SourceLocation *loc=0) const
134  { return addWarning("SOP", code, msg, loc); }
135  UT_ErrorSeverity sopAddError (int code, const char *msg=0,
136  const UT_SourceLocation *loc=0) const
137  { return addError("SOP", code, msg, loc); }
138 
140  bool borrow_only = false) const
141  { if (myError) myError->stealErrors(src,0, -1, UT_ERROR_NONE, borrow_only); }
142 
143  protected:
144  /// Prefix errors so we can get sensible results.
145  UT_StringHolder formatError(const char *msg) const;
146 
154  };
155 
156  void loadFromOp(const LoadParms &loadparms);
157 
158 
159  /// Overloads all the parmaeters according to matching entries in
160  /// the provided options table.
161  bool applyOptionsOverride(const UT_Options *options);
162 
163  virtual void copyFrom(const OP_NodeParms *src)
164  {
165  if (src) baseSetSignature(src->baseGetSignature());
166  else baseSetSignature(UT_StringHolder());
167  }
168 
169 
170 
171  enum ParmType
172  {
185  PARM_UNSUPPORTED
186  };
187 
188  /// Marshalling interface to rest of world
189  /// These all use index based notation.
190  virtual exint getNumParms() const { return getNestNumParms({}); }
191  virtual const char *getParmName(exint idx) const { return getNestParmName({idx}); }
192  virtual ParmType getParmType(exint idx) const { return getNestParmType({idx}); }
193 
194  virtual bool isParmColorRamp(exint idx) const { return false; }
195 
196  virtual void getParmValue(exint idx, exint &value) const
197  { getNestParmValue( {idx}, {}, value ); }
198  virtual void getParmValue(exint idx, fpreal &value) const
199  { getNestParmValue( {idx}, {}, value ); }
200  virtual void getParmValue(exint idx, UT_Vector2D &value) const
201  { getNestParmValue( {idx}, {}, value ); }
202  virtual void getParmValue(exint idx, UT_Vector3D &value) const
203  { getNestParmValue( {idx}, {}, value ); }
204  virtual void getParmValue(exint idx, UT_Vector4D &value) const
205  { getNestParmValue( {idx}, {}, value ); }
206  virtual void getParmValue(exint idx, UT_Matrix2D &value) const
207  { getNestParmValue( {idx}, {}, value ); }
208  virtual void getParmValue(exint idx, UT_Matrix3D &value) const
209  { getNestParmValue( {idx}, {}, value ); }
210  virtual void getParmValue(exint idx, UT_Matrix4D &value) const
211  { getNestParmValue( {idx}, {}, value ); }
212  virtual void getParmValue(exint idx, UT_StringHolder &value) const
213  { getNestParmValue( {idx}, {}, value ); }
214  virtual void getParmValue(exint idx, UT_SharedPtr<UT_Ramp> &value) const
215  { getNestParmValue( {idx}, {}, value ); }
216  virtual void getParmValue(exint idx, PRM_DataItemHandle &value) const
217  { getNestParmValue( {idx}, {}, value ); }
218 
219  virtual void setParmValue(exint idx, const exint &value)
220  { setNestParmValue( {idx}, {}, value ); }
221  virtual void setParmValue(exint idx, const fpreal &value)
222  { setNestParmValue( {idx}, {}, value ); }
223  virtual void setParmValue(exint idx, const UT_Vector2D &value)
224  { setNestParmValue( {idx}, {}, value ); }
225  virtual void setParmValue(exint idx, const UT_Vector3D &value)
226  { setNestParmValue( {idx}, {}, value ); }
227  virtual void setParmValue(exint idx, const UT_Vector4D &value)
228  { setNestParmValue( {idx}, {}, value ); }
229  virtual void setParmValue(exint idx, const UT_Matrix2D &value)
230  { setNestParmValue( {idx}, {}, value ); }
231  virtual void setParmValue(exint idx, const UT_Matrix3D &value)
232  { setNestParmValue( {idx}, {}, value ); }
233  virtual void setParmValue(exint idx, const UT_Matrix4D &value)
234  { setNestParmValue( {idx}, {}, value ); }
235  virtual void setParmValue(exint idx, const UT_StringHolder &value)
236  { setNestParmValue( {idx}, {}, value ); }
237  virtual void setParmValue(exint idx, const UT_SharedPtr<UT_Ramp> &value)
238  { setNestParmValue( {idx}, {}, value ); }
239  virtual void setParmValue(exint idx, const PRM_DataItemHandle &value)
240  { setNestParmValue( {idx}, {}, value ); }
241 
242  /// This makes a temporary index structure out of either an
243  /// initializer list or an exint array. It does *NOT* own
244  /// the data so should never be explicitly constructed.
245  class TempIndex
246  {
247  public:
248  TempIndex(std::initializer_list<exint> list)
249  {
250  if (list.size())
251  myVec = &*list.begin();
252  else
253  myVec = 0;
254  mySize = list.size();
255  }
257  {
258  myVec = list.data();
259  mySize = list.size();
260  }
261 
262  const exint *begin() const { return myVec; }
263  exint size() const { return mySize; }
264  exint operator[](const exint off) const
265  {
266  UT_ASSERT_P(off >= 0 && off < mySize);
267  return myVec[off];
268  }
269  protected:
270  const exint *myVec;
272  };
273 
274  virtual exint getNestNumParms(TempIndex idx) const { return 0; }
275  virtual const char *getNestParmName(TempIndex idx) const { return 0; }
276  virtual ParmType getNestParmType(TempIndex idx) const { return PARM_UNSUPPORTED; }
277 
278  virtual void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const {}
279  virtual void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const {}
280  virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const {}
281  virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const {}
282  virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const {}
283  virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const {}
284  virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const {}
285  virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const {}
286  virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const {}
287  virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const {}
288  virtual void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const {}
289 
290  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) {}
291  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) {}
292  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) {}
293  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) {}
294  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) {}
295  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) {}
296  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) {}
297  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) {}
298  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) {}
299  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) {}
300  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) {}
301 
302  virtual UT_StringHolder baseGetSignature() const { return _myBaseSignature; }
303  virtual void baseSetSignature(const UT_StringHolder &sig)
304  { _myBaseSignature = sig; }
305 
306  virtual int64 getMemoryUsage(bool inclusive) const
307  { return inclusive ? sizeof(*this) : 0; }
308 
309 protected:
310  virtual void loadFromOpSubclass(const LoadParms &loadparms) = 0;
311 
312  // These are needed to implement copyFrom() in subclasses
313  OP_NodeParms(const OP_NodeParms &) = default;
314  OP_NodeParms &operator=(const OP_NodeParms &) = default;
315 
316  // Used for coercing one type to another
317  template <typename T, typename S>
318  void coerceValue(T &result, const S &src) const
319  {
320  UT_ASSERT(!"Unimplemented OP_NodeParms::coerceValue() called!");
321  result = T{};
322  }
323 
324  template <typename T>
325  T clampMinValue(fpreal minvalue, const T &src) const
326  {
327  UT_ASSERT(!"Unimplemented OP_NodeParms::clampMinValue() called!");
328  return src;
329  }
330 
331  template <typename T>
332  T clampMaxValue(fpreal maxvalue, const T &src) const
333  {
334  UT_ASSERT(!"Unimplemented OP_NodeParms::clampMaxValue() called!");
335  return src;
336  }
337 
338  // We auto-generate member variables in derived classes, so this
339  // is to avoid name collisions.
341 };
342 
343 template <>
344 void inline OP_NodeParms::coerceValue(exint &result, const exint &src) const
345 { result = src; }
346 template <>
347 void inline OP_NodeParms::coerceValue(bool &result, const exint &src) const
348 { result = src; }
349 template <>
350 void inline OP_NodeParms::coerceValue(exint &result, const bool &src) const
351 { result = src; }
352 template <>
353 void inline OP_NodeParms::coerceValue(bool &result, const bool &src) const
354 { result = src; }
355 template <>
356 void inline OP_NodeParms::coerceValue(fpreal &result, const fpreal &src) const
357 { result = src; }
358 template <>
360 { result = src; }
361 template <>
363 { result = src; }
364 template <>
366 { result = src; }
367 template <>
369 { result = src; }
370 template <>
372 { result = src; }
373 template <>
375 { result = src; }
376 template <>
378 { result = src; }
379 template <>
381 { result = src; }
382 template <>
384 { result = src; }
385 template <>
387 { result = src; }
388 template <>
390 { result = src; }
391 template <>
393 { result = src; }
394 template <>
396 { result = src; }
397 template <>
399 { result = src; }
400 template <>
402 { result = src; }
403 
404 template <>
406 { return SYSmax((exint)clamp, src); }
407 template <>
408 bool inline OP_NodeParms::clampMinValue(fpreal clamp, const bool &src) const
409 { return SYSmax((exint)clamp, src); }
410 template <>
412 { return SYSmax(clamp, src); }
413 template <>
415 { return SYSmax(UT_Vector2D(clamp, clamp), src); }
416 template <>
418 { return SYSmax(UT_Vector3D(clamp, clamp, clamp), src); }
419 template <>
421 { return SYSmax(UT_Vector4D(clamp, clamp, clamp, clamp), src); }
422 template <>
424 { return SYSmax(UT_Matrix2D(clamp, clamp, clamp, clamp), src); }
425 template <>
427 { return SYSmax(UT_Matrix3D(clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp), src); }
428 template <>
430 { return SYSmax(UT_Matrix4D(clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp), src); }
431 template <>
433 { return SYSmax(UT_Vector2I(clamp, clamp), src); }
434 template <>
436 { return SYSmax(UT_Vector3I(clamp, clamp, clamp), src); }
437 template <>
439 { return SYSmax(UT_Vector4I(clamp, clamp, clamp, clamp), src); }
440 template <>
442  fpreal clamp,
443  const UT_SharedPtr<UT_Ramp> &src) const
444 {
445  const int number_of_new_nodes_needed = static_cast<int>(clamp) - src->getNodeCount();
446  if (number_of_new_nodes_needed <= 0)
447  {
448  return src;
449  }
450 
451  const fpreal spacing_between_new_nodes
452  = 0.5f / static_cast<fpreal>(number_of_new_nodes_needed);
453  const auto *last_node = src->getClosestNode(1);
454  fpreal last_node_pos = last_node ? last_node->t : 0;
455 
456  // Move all nodes to the first half of the src
457  if (last_node_pos > 0.5f)
458  {
459  fpreal scaler = 0.5f / last_node_pos;
460  for (int i = 0, n = src->getNodeCount(); i < n; ++i)
461  {
462  src->moveNode(i, src->getNode(i)->t * scaler);
463  }
464  }
465 
466  // Add new nodes to second half of the src
467  fpreal current_position = 0.5f + spacing_between_new_nodes;
468  for (int i = 0; i < number_of_new_nodes_needed; ++i)
469  {
470  src->addNode(current_position);
471  current_position += spacing_between_new_nodes;
472  }
473  return src;
474 }
475 
476 template <>
478 { return SYSmin((exint)clamp, src); }
479 template <>
480 bool inline OP_NodeParms::clampMaxValue(fpreal clamp, const bool &src) const
481 { return SYSmin((exint)clamp, src); }
482 template <>
484 { return SYSmin(clamp, src); }
485 template <>
487 { return SYSmin(UT_Vector2D(clamp, clamp), src); }
488 template <>
490 { return SYSmin(UT_Vector3D(clamp, clamp, clamp), src); }
491 template <>
493 { return SYSmin(UT_Vector4D(clamp, clamp, clamp, clamp), src); }
494 template <>
496 { return SYSmin(UT_Matrix2D(clamp, clamp, clamp, clamp), src); }
497 template <>
499 { return SYSmin(UT_Matrix3D(clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp), src); }
500 template <>
502 { return SYSmin(UT_Matrix4D(clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp), src); }
503 template <>
505 { return SYSmin(UT_Vector2I(clamp, clamp), src); }
506 template <>
508 { return SYSmin(UT_Vector3I(clamp, clamp, clamp), src); }
509 template <>
511 { return SYSmin(UT_Vector4I(clamp, clamp, clamp, clamp), src); }
512 
513 
514 #endif
OP_CookEngine
Definition: OP_NodeParms.h:42
UT_Vector2T< int64 > UT_Vector2I
#define SYSmax(a, b)
Definition: SYS_Math.h:1952
virtual void setParmValue(exint idx, const UT_Vector4D &value)
Definition: OP_NodeParms.h:227
virtual void setParmValue(exint idx, const UT_StringHolder &value)
Definition: OP_NodeParms.h:235
TempIndex(const UT_ExintArray &list)
Definition: OP_NodeParms.h:256
UT_Matrix4T< fpreal64 > UT_Matrix4D
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value)
Definition: OP_NodeParms.h:295
virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const
Definition: OP_NodeParms.h:284
virtual void setParmValue(exint idx, const UT_Vector2D &value)
Definition: OP_NodeParms.h:223
UT_ErrorManager * error() const
Definition: OP_NodeParms.h:106
OP_NodeCache * cache() const
Definition: OP_NodeParms.h:104
UT_ErrorSeverity sopAddWarning(int code, const char *msg=0, const UT_SourceLocation *loc=0) const
Definition: OP_NodeParms.h:132
virtual void getParmValue(exint idx, UT_Matrix3D &value) const
Definition: OP_NodeParms.h:208
virtual void getParmValue(exint idx, PRM_DataItemHandle &value) const
Definition: OP_NodeParms.h:216
virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const
Definition: OP_NodeParms.h:281
UT_ErrorSeverity sopAddError(int code, const char *msg=0, const UT_SourceLocation *loc=0) const
Definition: OP_NodeParms.h:135
GLenum clamp
Definition: glcorearb.h:1234
T clampMaxValue(fpreal maxvalue, const T &src) const
Definition: OP_NodeParms.h:332
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value)
Definition: OP_NodeParms.h:291
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value)
Definition: OP_NodeParms.h:296
virtual void setParmValue(exint idx, const exint &value)
Definition: OP_NodeParms.h:219
UT_ErrorManager * myError
Definition: OP_NodeParms.h:152
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:297
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value)
Definition: OP_NodeParms.h:290
const OP_Context & context() const
Definition: OP_NodeParms.h:105
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:83
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:264
UT_Vector3T< int64 > UT_Vector3I
virtual ParmType getNestParmType(TempIndex idx) const
Definition: OP_NodeParms.h:276
T clampMinValue(fpreal minvalue, const T &src) const
Definition: OP_NodeParms.h:325
virtual void setParmValue(exint idx, const UT_Vector3D &value)
Definition: OP_NodeParms.h:225
exint nodeIdx() const
Definition: OP_NodeParms.h:103
exint size() const
Definition: UT_Array.h:667
virtual void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const
Definition: OP_NodeParms.h:279
virtual void setParmValue(exint idx, const PRM_DataItemHandle &value)
Definition: OP_NodeParms.h:239
< returns > If no error
Definition: snippets.dox:2
const OP_Context & myContext
Definition: OP_NodeParms.h:150
UT_ErrorSeverity sopAddMessage(int code, const char *msg=0, const UT_SourceLocation *loc=0) const
Definition: OP_NodeParms.h:129
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:274
GLfloat f
Definition: glcorearb.h:1926
const exint * begin() const
Definition: OP_NodeParms.h:262
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:108
const OP_GraphProxy * myGraph
Definition: OP_NodeParms.h:148
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:116
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value)
Definition: OP_NodeParms.h:293
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:164
virtual ParmType getParmType(exint idx) const
Definition: OP_NodeParms.h:192
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:102
virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const
Definition: OP_NodeParms.h:286
virtual void setParmValue(exint idx, const UT_Matrix4D &value)
Definition: OP_NodeParms.h:233
virtual void baseSetSignature(const UT_StringHolder &sig)
Definition: OP_NodeParms.h:303
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value)
Definition: OP_NodeParms.h:292
void addExplicitInput(DEP_MicroNode &inp)
Definition: OP_NodeParms.h:112
virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const
Definition: OP_NodeParms.h:280
virtual int64 getMemoryUsage(bool inclusive) const
Definition: OP_NodeParms.h:306
virtual void getParmValue(exint idx, UT_Vector2D &value) const
Definition: OP_NodeParms.h:200
OP_NodeCache * myCache
Definition: OP_NodeParms.h:151
virtual void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
Definition: OP_NodeParms.h:237
long long int64
Definition: SYS_Types.h:116
UT_StringHolder _myBaseSignature
Definition: OP_NodeParms.h:340
virtual void setParmValue(exint idx, const UT_Matrix3D &value)
Definition: OP_NodeParms.h:231
UT_Vector3T< fpreal64 > UT_Vector3D
TempIndex(std::initializer_list< exint > list)
Definition: OP_NodeParms.h:248
virtual bool unload()
Definition: OP_NodeParms.h:62
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value)
Definition: OP_NodeParms.h:299
virtual void getParmValue(exint idx, UT_Matrix2D &value) const
Definition: OP_NodeParms.h:206
virtual bool isParmColorRamp(exint idx) const
Definition: OP_NodeParms.h:194
void addExplicitInput(DEP_MicroNode &inp, bool check_dup)
Methods to wire directly to the optional depnode.
Definition: OP_NodeParms.h:110
UT_ErrorSeverity addWarning(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0) const
Definition: OP_NodeParms.h:120
UT_Matrix2T< fpreal64 > UT_Matrix2D
virtual ~OP_NodeParms()
Definition: OP_NodeParms.h:78
virtual void getParmValue(exint idx, exint &value) const
Definition: OP_NodeParms.h:196
virtual void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
Definition: OP_NodeParms.h:214
A map of string to various well defined value types.
Definition: UT_Options.h:87
virtual exint getNumParms() const
Definition: OP_NodeParms.h:190
virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const
Definition: OP_NodeParms.h:285
virtual void copyFrom(const OP_NodeParms *src)
Definition: OP_NodeParms.h:163
void coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:318
virtual const char * getParmName(exint idx) const
Definition: OP_NodeParms.h:191
DEP_MicroNode * myDepNode
Definition: OP_NodeParms.h:153
fpreal64 fpreal
Definition: SYS_Types.h:283
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:107
T * data()
Definition: UT_Array.h:866
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:139
virtual void getParmValue(exint idx, fpreal &value) const
Definition: OP_NodeParms.h:198
virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const
Definition: OP_NodeParms.h:282
UT_ErrorSeverity addError(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0) const
Definition: OP_NodeParms.h:124
virtual void getParmValue(exint idx, UT_StringHolder &value) const
Definition: OP_NodeParms.h:212
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:302
A global error manager scope.
virtual void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const
Definition: OP_NodeParms.h:288
virtual void getParmValue(exint idx, UT_Vector4D &value) const
Definition: OP_NodeParms.h:204
virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const
Definition: OP_NodeParms.h:287
virtual void setParmValue(exint idx, const UT_Matrix2D &value)
Definition: OP_NodeParms.h:229
virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const
Definition: OP_NodeParms.h:283
virtual void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const
Definition: OP_NodeParms.h:278
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value)
Definition: OP_NodeParms.h:300
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:165
virtual void setParmValue(exint idx, const fpreal &value)
Definition: OP_NodeParms.h:221
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value)
Definition: OP_NodeParms.h:294
UT_Vector4T< fpreal64 > UT_Vector4D
#define SYSmin(a, b)
Definition: SYS_Math.h:1953
virtual const char * getNestParmName(TempIndex idx) const
Definition: OP_NodeParms.h:275
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:298
virtual void getParmValue(exint idx, UT_Vector3D &value) const
Definition: OP_NodeParms.h:202
virtual void getParmValue(exint idx, UT_Matrix4D &value) const
Definition: OP_NodeParms.h:210