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/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 
158  enum ParmType
159  {
172  PARM_UNSUPPORTED
173  };
174 
175  /// Marshalling interface to rest of world
176  /// These all use index based notation.
177  virtual exint getNumParms() const { return getNestNumParms({}); }
178  virtual const char *getParmName(exint idx) const { return getNestParmName({idx}); }
179  virtual ParmType getParmType(exint idx) const { return getNestParmType({idx}); }
180 
181  virtual bool isParmColorRamp(exint idx) const { return false; }
182 
183  virtual void getParmValue(exint idx, exint &value) const
184  { getNestParmValue( {idx}, {}, value ); }
185  virtual void getParmValue(exint idx, fpreal &value) const
186  { getNestParmValue( {idx}, {}, value ); }
187  virtual void getParmValue(exint idx, UT_Vector2D &value) const
188  { getNestParmValue( {idx}, {}, value ); }
189  virtual void getParmValue(exint idx, UT_Vector3D &value) const
190  { getNestParmValue( {idx}, {}, value ); }
191  virtual void getParmValue(exint idx, UT_Vector4D &value) const
192  { getNestParmValue( {idx}, {}, value ); }
193  virtual void getParmValue(exint idx, UT_Matrix2D &value) const
194  { getNestParmValue( {idx}, {}, value ); }
195  virtual void getParmValue(exint idx, UT_Matrix3D &value) const
196  { getNestParmValue( {idx}, {}, value ); }
197  virtual void getParmValue(exint idx, UT_Matrix4D &value) const
198  { getNestParmValue( {idx}, {}, value ); }
199  virtual void getParmValue(exint idx, UT_StringHolder &value) const
200  { getNestParmValue( {idx}, {}, value ); }
201  virtual void getParmValue(exint idx, UT_SharedPtr<UT_Ramp> &value) const
202  { getNestParmValue( {idx}, {}, value ); }
203  virtual void getParmValue(exint idx, PRM_DataItemHandle &value) const
204  { getNestParmValue( {idx}, {}, value ); }
205 
206  virtual void setParmValue(exint idx, const exint &value)
207  { setNestParmValue( {idx}, {}, value ); }
208  virtual void setParmValue(exint idx, const fpreal &value)
209  { setNestParmValue( {idx}, {}, value ); }
210  virtual void setParmValue(exint idx, const UT_Vector2D &value)
211  { setNestParmValue( {idx}, {}, value ); }
212  virtual void setParmValue(exint idx, const UT_Vector3D &value)
213  { setNestParmValue( {idx}, {}, value ); }
214  virtual void setParmValue(exint idx, const UT_Vector4D &value)
215  { setNestParmValue( {idx}, {}, value ); }
216  virtual void setParmValue(exint idx, const UT_Matrix2D &value)
217  { setNestParmValue( {idx}, {}, value ); }
218  virtual void setParmValue(exint idx, const UT_Matrix3D &value)
219  { setNestParmValue( {idx}, {}, value ); }
220  virtual void setParmValue(exint idx, const UT_Matrix4D &value)
221  { setNestParmValue( {idx}, {}, value ); }
222  virtual void setParmValue(exint idx, const UT_StringHolder &value)
223  { setNestParmValue( {idx}, {}, value ); }
224  virtual void setParmValue(exint idx, const UT_SharedPtr<UT_Ramp> &value)
225  { setNestParmValue( {idx}, {}, value ); }
226  virtual void setParmValue(exint idx, const PRM_DataItemHandle &value)
227  { setNestParmValue( {idx}, {}, value ); }
228 
229  /// This makes a temporary index structure out of either an
230  /// initializer list or an exint array. It does *NOT* own
231  /// the data so should never be explicitly constructed.
232  class TempIndex
233  {
234  public:
235  TempIndex(std::initializer_list<exint> list)
236  {
237  if (list.size())
238  myVec = &*list.begin();
239  else
240  myVec = 0;
241  mySize = list.size();
242  }
244  {
245  myVec = list.data();
246  mySize = list.size();
247  }
248 
249  const exint *begin() const { return myVec; }
250  exint size() const { return mySize; }
251  exint operator[](const exint off) const
252  {
253  UT_ASSERT_P(off >= 0 && off < mySize);
254  return myVec[off];
255  }
256  protected:
257  const exint *myVec;
259  };
260 
261  virtual exint getNestNumParms(TempIndex idx) const { return 0; }
262  virtual const char *getNestParmName(TempIndex idx) const { return 0; }
263  virtual ParmType getNestParmType(TempIndex idx) const { return PARM_UNSUPPORTED; }
264 
265  virtual void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const {}
266  virtual void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const {}
267  virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const {}
268  virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const {}
269  virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const {}
270  virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const {}
271  virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const {}
272  virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const {}
273  virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const {}
274  virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const {}
275  virtual void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const {}
276 
277  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) {}
278  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) {}
279  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) {}
280  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) {}
281  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) {}
282  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) {}
283  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) {}
284  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) {}
285  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) {}
286  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) {}
287  virtual void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) {}
288 
289  virtual int64 getMemoryUsage(bool inclusive) const
290  { return inclusive ? sizeof(*this) : 0; }
291 
292 protected:
293  virtual void loadFromOpSubclass(const LoadParms &loadparms) = 0;
294 
295  // These are needed to implement copyFrom() in subclasses
296  OP_NodeParms(const OP_NodeParms &) = default;
297  OP_NodeParms &operator=(const OP_NodeParms &) = default;
298 
299  // Used for coercing one type to another
300  template <typename T, typename S>
301  void coerceValue(T &result, const S &src) const
302  {
303  UT_ASSERT(!"Unimplemented OP_NodeParms::coerceValue() called!");
304  result = T{};
305  }
306 
307  template <typename T>
308  T clampMinValue(fpreal minvalue, const T &src) const
309  {
310  UT_ASSERT(!"Unimplemented OP_NodeParms::clampMinValue() called!");
311  return src;
312  }
313 
314  template <typename T>
315  T clampMaxValue(fpreal maxvalue, const T &src) const
316  {
317  UT_ASSERT(!"Unimplemented OP_NodeParms::clampMaxValue() called!");
318  return src;
319  }
320 
321 };
322 
323 template <>
324 void inline OP_NodeParms::coerceValue(exint &result, const exint &src) const
325 { result = src; }
326 template <>
327 void inline OP_NodeParms::coerceValue(bool &result, const exint &src) const
328 { result = src; }
329 template <>
330 void inline OP_NodeParms::coerceValue(exint &result, const bool &src) const
331 { result = src; }
332 template <>
333 void inline OP_NodeParms::coerceValue(bool &result, const bool &src) const
334 { result = src; }
335 template <>
336 void inline OP_NodeParms::coerceValue(fpreal &result, const fpreal &src) const
337 { result = src; }
338 template <>
340 { result = src; }
341 template <>
343 { result = src; }
344 template <>
346 { result = src; }
347 template <>
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 
384 template <>
386 { return SYSmax((exint)clamp, src); }
387 template <>
388 bool inline OP_NodeParms::clampMinValue(fpreal clamp, const bool &src) const
389 { return SYSmax((exint)clamp, src); }
390 template <>
392 { return SYSmax(clamp, src); }
393 template <>
395 { return SYSmax(UT_Vector2D(clamp, clamp), src); }
396 template <>
398 { return SYSmax(UT_Vector3D(clamp, clamp, clamp), src); }
399 template <>
401 { return SYSmax(UT_Vector4D(clamp, clamp, clamp, clamp), src); }
402 template <>
404 { return SYSmax(UT_Matrix2D(clamp, clamp, clamp, clamp), src); }
405 template <>
407 { return SYSmax(UT_Matrix3D(clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp), src); }
408 template <>
410 { return SYSmax(UT_Matrix4D(clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp), src); }
411 template <>
413 { return SYSmax(UT_Vector2I(clamp, clamp), src); }
414 template <>
416 { return SYSmax(UT_Vector3I(clamp, clamp, clamp), src); }
417 template <>
419 { return SYSmax(UT_Vector4I(clamp, clamp, clamp, clamp), src); }
420 template <>
422  fpreal clamp,
423  const UT_SharedPtr<UT_Ramp> &src) const
424 {
425  const int number_of_new_nodes_needed = static_cast<int>(clamp) - src->getNodeCount();
426  if (number_of_new_nodes_needed <= 0)
427  {
428  return src;
429  }
430 
431  const fpreal spacing_between_new_nodes
432  = 0.5f / static_cast<fpreal>(number_of_new_nodes_needed);
433  const auto *last_node = src->getClosestNode(1);
434  fpreal last_node_pos = last_node ? last_node->t : 0;
435 
436  // Move all nodes to the first half of the src
437  if (last_node_pos > 0.5f)
438  {
439  fpreal scaler = 0.5f / last_node_pos;
440  for (int i = 0, n = src->getNodeCount(); i < n; ++i)
441  {
442  src->moveNode(i, src->getNode(i)->t * scaler);
443  }
444  }
445 
446  // Add new nodes to second half of the src
447  fpreal current_position = 0.5f + spacing_between_new_nodes;
448  for (int i = 0; i < number_of_new_nodes_needed; ++i)
449  {
450  src->addNode(current_position);
451  current_position += spacing_between_new_nodes;
452  }
453  return src;
454 }
455 
456 template <>
458 { return SYSmin((exint)clamp, src); }
459 template <>
460 bool inline OP_NodeParms::clampMaxValue(fpreal clamp, const bool &src) const
461 { return SYSmin((exint)clamp, src); }
462 template <>
464 { return SYSmin(clamp, src); }
465 template <>
467 { return SYSmin(UT_Vector2D(clamp, clamp), src); }
468 template <>
470 { return SYSmin(UT_Vector3D(clamp, clamp, clamp), src); }
471 template <>
473 { return SYSmin(UT_Vector4D(clamp, clamp, clamp, clamp), src); }
474 template <>
476 { return SYSmin(UT_Matrix2D(clamp, clamp, clamp, clamp), src); }
477 template <>
479 { return SYSmin(UT_Matrix3D(clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp), src); }
480 template <>
482 { return SYSmin(UT_Matrix4D(clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp, clamp), src); }
483 template <>
485 { return SYSmin(UT_Vector2I(clamp, clamp), src); }
486 template <>
488 { return SYSmin(UT_Vector3I(clamp, clamp, clamp), src); }
489 template <>
491 { return SYSmin(UT_Vector4I(clamp, clamp, clamp, clamp), src); }
492 
493 
494 #endif
OP_CookEngine
Definition: OP_NodeParms.h:42
UT_Vector2T< int64 > UT_Vector2I
#define SYSmax(a, b)
Definition: SYS_Math.h:1570
virtual void setParmValue(exint idx, const UT_Vector4D &value)
Definition: OP_NodeParms.h:214
virtual void setParmValue(exint idx, const UT_StringHolder &value)
Definition: OP_NodeParms.h:222
TempIndex(const UT_ExintArray &list)
Definition: OP_NodeParms.h:243
UT_Matrix4T< fpreal64 > UT_Matrix4D
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value)
Definition: OP_NodeParms.h:282
virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const
Definition: OP_NodeParms.h:271
virtual void setParmValue(exint idx, const UT_Vector2D &value)
Definition: OP_NodeParms.h:210
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:195
virtual void getParmValue(exint idx, PRM_DataItemHandle &value) const
Definition: OP_NodeParms.h:203
virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const
Definition: OP_NodeParms.h:268
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:315
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value)
Definition: OP_NodeParms.h:278
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value)
Definition: OP_NodeParms.h:283
virtual void setParmValue(exint idx, const exint &value)
Definition: OP_NodeParms.h:206
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:284
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value)
Definition: OP_NodeParms.h:277
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:613
exint operator[](const exint off) const
Definition: OP_NodeParms.h:251
UT_Vector3T< int64 > UT_Vector3I
virtual ParmType getNestParmType(TempIndex idx) const
Definition: OP_NodeParms.h:263
T clampMinValue(fpreal minvalue, const T &src) const
Definition: OP_NodeParms.h:308
virtual void setParmValue(exint idx, const UT_Vector3D &value)
Definition: OP_NodeParms.h:212
exint nodeIdx() const
Definition: OP_NodeParms.h:95
exint size() const
Definition: UT_Array.h:646
virtual void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const
Definition: OP_NodeParms.h:266
virtual void setParmValue(exint idx, const PRM_DataItemHandle &value)
Definition: OP_NodeParms.h:226
< 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
GLdouble n
Definition: glcorearb.h:2008
virtual exint getNestNumParms(TempIndex idx) const
Definition: OP_NodeParms.h:261
GLfloat f
Definition: glcorearb.h:1926
const exint * begin() const
Definition: OP_NodeParms.h:249
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:280
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:179
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:273
virtual void setParmValue(exint idx, const UT_Matrix4D &value)
Definition: OP_NodeParms.h:220
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value)
Definition: OP_NodeParms.h:279
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:267
virtual int64 getMemoryUsage(bool inclusive) const
Definition: OP_NodeParms.h:289
virtual void getParmValue(exint idx, UT_Vector2D &value) const
Definition: OP_NodeParms.h:187
OP_NodeCache * myCache
Definition: OP_NodeParms.h:143
virtual void setParmValue(exint idx, const UT_SharedPtr< UT_Ramp > &value)
Definition: OP_NodeParms.h:224
long long int64
Definition: SYS_Types.h:116
virtual void setParmValue(exint idx, const UT_Matrix3D &value)
Definition: OP_NodeParms.h:218
UT_Vector3T< fpreal64 > UT_Vector3D
TempIndex(std::initializer_list< exint > list)
Definition: OP_NodeParms.h:235
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value)
Definition: OP_NodeParms.h:286
virtual void getParmValue(exint idx, UT_Matrix2D &value) const
Definition: OP_NodeParms.h:193
virtual bool isParmColorRamp(exint idx) const
Definition: OP_NodeParms.h:181
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:183
virtual void getParmValue(exint idx, UT_SharedPtr< UT_Ramp > &value) const
Definition: OP_NodeParms.h:201
A map of string to various well defined value types.
Definition: UT_Options.h:84
virtual exint getNumParms() const
Definition: OP_NodeParms.h:177
virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const
Definition: OP_NodeParms.h:272
virtual void copyFrom(const OP_NodeParms *src)
Definition: OP_NodeParms.h:155
void coerceValue(T &result, const S &src) const
Definition: OP_NodeParms.h:301
virtual const char * getParmName(exint idx) const
Definition: OP_NodeParms.h:178
DEP_MicroNode * myDepNode
Definition: OP_NodeParms.h:145
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
T * data()
Definition: UT_Array.h:842
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:185
virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const
Definition: OP_NodeParms.h:269
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:199
A global error manager scope.
virtual void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const
Definition: OP_NodeParms.h:275
virtual void getParmValue(exint idx, UT_Vector4D &value) const
Definition: OP_NodeParms.h:191
virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const
Definition: OP_NodeParms.h:274
virtual void setParmValue(exint idx, const UT_Matrix2D &value)
Definition: OP_NodeParms.h:216
virtual void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const
Definition: OP_NodeParms.h:270
virtual void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const
Definition: OP_NodeParms.h:265
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value)
Definition: OP_NodeParms.h:287
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
virtual void setParmValue(exint idx, const fpreal &value)
Definition: OP_NodeParms.h:208
virtual void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value)
Definition: OP_NodeParms.h:281
UT_Vector4T< fpreal64 > UT_Vector4D
#define SYSmin(a, b)
Definition: SYS_Math.h:1571
type
Definition: core.h:1059
virtual const char * getNestParmName(TempIndex idx) const
Definition: OP_NodeParms.h:262
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
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:285
virtual void getParmValue(exint idx, UT_Vector3D &value) const
Definition: OP_NodeParms.h:189
virtual void getParmValue(exint idx, UT_Matrix4D &value) const
Definition: OP_NodeParms.h:197