HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OP_Utils.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 Library (C++)
7  *
8  * COMMENTS: Some utility functions for operators.
9  *
10  */
11 
12 #ifndef __OP_Utils_h__
13 #define __OP_Utils_h__
14 
15 #include "OP_API.h"
16 #include "OP_Node.h"
17 #include <UT/UT_Matrix2.h>
18 #include <UT/UT_Matrix3.h>
19 #include <UT/UT_Matrix4.h>
20 #include <UT/UT_Ramp.h>
21 #include <UT/UT_Vector2.h>
22 #include <UT/UT_Vector3.h>
23 #include <UT/UT_Vector4.h>
24 #include <UT/UT_WeakPtr.h>
25 
26 class OP_NetworkBoxItem;
27 class PY_Result;
28 class UT_BitArray;
29 class UT_WorkBuffer;
30 class UT_StringArray;
31 
33  const UT_StringArray &badrefs);
35  bool checktoplevelnode,
36  UT_WorkBuffer &err);
38  bool checktoplevelnode,
39  UT_WorkBuffer &err);
40 
41 /// Looks for any nodes inside the specified operator that are defined by
42 /// VOP Networks outside the provided node. REtrns true if no such nodes
43 /// are found. Otherwise it puts an error message in the err buffer and
44 /// returns false.
46  UT_WorkBuffer &err);
48  UT_String &vopnetmask);
49 /// Adds a new vopnet mask string to the list of known vopnet context types.
50 /// This list is used to generate a VopNet Mask value when creating an HDA
51 /// from an existing subnet VOP.
53 
54 /// @{ Functions for testing whether a node parameter is used as a shader
55 /// parameter, when the node represents a shader. Some node parameters may
56 /// belong to only certain contexts (eg, surface shader), while other ones
57 /// may be just true spare parameters that are not shader parameters at all.
59 OP_API bool OPisStandInShaderParm(const PRM_Template &parm);
61  const char *context_name);
62 OP_API bool OPisLegacyShaderParm(const PRM_Template &parm, OP_Node *owner);
63 OP_API bool OPhasShaderContextTag(const PRM_Template *list,
64  int start = 0, int end = -1);
65 /// @}
66 
67 OP_API OP_Node *OPfindOpInput(OP_Node *op, const char *find_op_type,
68  bool include_me = true);
69 OP_API OP_Node *OPfindOpInput(OP_Node *op, const char **find_op_types,
70  bool include_me = true);
71 
72 /// Returns coordinates specifying the smallest possible bounding box
73 /// around the items in 'items'. Takes each item's height and width into
74 /// consideration.
76  const OP_NetworkBoxItemList &items);
77 
78 /// Looks for any VOP Networks inside the specified node which define operator
79 /// types that are instantiated outside the node. If it returns false, the
80 /// badvopnets array will be filled with the VOP Networks that are used
81 /// outside the root node.
83  OP_NodeList *badvopnets);
84 
85 /// Creates a sticky note about the lack of vops inside synced HDAs, since the
86 /// children have been removed because the subnet is using cached code.
88 
89 /// Given a set of unique nodes, compute a topological ordering using only the
90 /// connectivity amongst the given nodes. If the roots are not known, then it
91 /// will be internally computed using OPmarkNodeRoots(only_picked=false).
92 /// Otherwise, the nodes will only be sorted by traversing from the given root
93 /// nodes.
96  const OP_NodeList &nodes,
97  const UT_BitArray *roots = nullptr);
98 
99 /// Given a set of nodes return a bit array indicating the nodes which are
100 /// roots WITHIN THE SET. If assume_picked is true, then it's assumed that the
101 /// node is in the set if and only if it's in the set.
103  UT_BitArray &roots,
104  const OP_NodeList &nodes,
105  bool assume_picked);
106 
107 namespace OP_Utils
108 {
109  // Boiler plate to load individual types from op.
110  static inline void evalOpParm(
111  int64 &v, const OP_Node *node, const char *parmname, fpreal time,
112  DEP_MicroNode *depnode)
113  { v = node->evalInt(parmname, 0, time);
114  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(0));
115  }
116  static inline void evalOpParm(
117  bool &v, const OP_Node *node, const char *parmname, fpreal time,
118  DEP_MicroNode *depnode)
119  { v = node->evalInt(parmname, 0, time);
120  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(0));
121  }
122  static inline void evalOpParm(
123  fpreal64 &v, const OP_Node *node, const char *parmname, fpreal time,
124  DEP_MicroNode *depnode)
125  { v = node->evalFloat(parmname, 0, time);
126  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(0));
127  }
128  static inline void evalOpParm(
129  UT_Vector2D &v, const OP_Node *node, const char *parmname, fpreal time,
130  DEP_MicroNode *depnode)
131  { v.x() = node->evalFloat(parmname, 0, time);
132  v.y() = node->evalFloat(parmname, 1, time);
133  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(0));
134  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(1));
135  }
136  static inline void evalOpParm(
137  UT_Vector3D &v, const OP_Node *node, const char *parmname, fpreal time,
138  DEP_MicroNode *depnode)
139  { v.x() = node->evalFloat(parmname, 0, time);
140  v.y() = node->evalFloat(parmname, 1, time);
141  v.z() = node->evalFloat(parmname, 2, time);
142  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(0));
143  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(1));
144  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(2));
145  }
146  static inline void evalOpParm(
147  UT_Vector4D &v, const OP_Node *node, const char *parmname, fpreal time,
148  DEP_MicroNode *depnode)
149  { v.x() = node->evalFloat(parmname, 0, time);
150  v.y() = node->evalFloat(parmname, 1, time);
151  v.z() = node->evalFloat(parmname, 2, time);
152  v.w() = node->evalFloat(parmname, 3, time);
153  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(0));
154  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(1));
155  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(2));
156  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(3));
157  }
158 
159  static inline void evalOpParm(
160  UT_Matrix2D &v, const OP_Node *node, const char *parmname, fpreal time,
161  DEP_MicroNode *depnode)
162  { for (int r = 0; r < 2; r++)
163  {
164  for (int c = 0; c < 2; c++)
165  {
166  v(r, c) = node->evalFloat(parmname, r * 2 + c, time);
167  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(r * 2 + c));
168  }
169  }
170  }
171  static inline void evalOpParm(
172  UT_Matrix3D &v, const OP_Node *node, const char *parmname, fpreal time,
173  DEP_MicroNode *depnode)
174  { for (int r = 0; r < 3; r++)
175  {
176  for (int c = 0; c < 3; c++)
177  {
178  v(r, c) = node->evalFloat(parmname, r * 3 + c, time);
179  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(r * 3 + c));
180  }
181  }
182  }
183  static inline void evalOpParm(
184  UT_Matrix4D &v, const OP_Node *node, const char *parmname, fpreal time,
185  DEP_MicroNode *depnode)
186  { for (int r = 0; r < 4; r++)
187  {
188  for (int c = 0; c < 4; c++)
189  {
190  v(r, c) = node->evalFloat(parmname, r * 4 + c, time);
191  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(r * 4 + c));
192  }
193  }
194  }
195 
196  static void inline evalOpParm(
197  UT_Vector2I &v, const OP_Node *node, const char *parmname, fpreal time,
198  DEP_MicroNode *depnode)
199  { v.x() = node->evalInt(parmname, 0, time);
200  v.y() = node->evalInt(parmname, 1, time);
201  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(0));
202  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(1));
203  }
204  static void inline evalOpParm(
205  UT_Vector3I &v, const OP_Node *node, const char *parmname, fpreal time,
206  DEP_MicroNode *depnode)
207  { v.x() = node->evalInt(parmname, 0, time);
208  v.y() = node->evalInt(parmname, 1, time);
209  v.z() = node->evalInt(parmname, 2, time);
210  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(0));
211  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(1));
212  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(2));
213  }
214  static void inline evalOpParm(
215  UT_Vector4I &v, const OP_Node *node, const char *parmname, fpreal time,
216  DEP_MicroNode *depnode)
217  { v.x() = node->evalInt(parmname, 0, time);
218  v.y() = node->evalInt(parmname, 1, time);
219  v.z() = node->evalInt(parmname, 2, time);
220  v.w() = node->evalInt(parmname, 3, time);
221  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(0));
222  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(1));
223  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(2));
224  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(3));
225  }
226  static void inline evalOpParm(
227  UT_StringHolder &v, const OP_Node *node, const char *parmname, fpreal time,
228  DEP_MicroNode *depnode)
229  { UT_String result; node->evalString(result, parmname, 0, time); v.adoptFromString(result);
230  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(0));
231  }
232  static void inline evalOpParmRaw(
233  UT_StringHolder &v, const OP_Node *node, const char *parmname, fpreal time,
234  DEP_MicroNode *depnode)
235  { UT_String result; node->evalStringRaw(result, parmname, 0, time); v.adoptFromString(result);
236  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(0));
237  }
238  static void inline evalOpParm(
239  UT_SharedPtr<UT_Ramp> &v, const OP_Node *node, const char *parmname, fpreal time,
240  DEP_MicroNode *depnode)
241  {
242  v.reset(new UT_Ramp());
243 
244  if (node->hasParm(parmname))
245  node->updateRampFromMultiParm(time, node->getParm(parmname), *v, 0, depnode);
246  }
247  static void inline evalOpParm(
248  PRM_DataItemHandle &v, const OP_Node *node, const char *parmname, fpreal time,
249  DEP_MicroNode *depnode)
250  {
251  v = node->evalData(parmname, 0, time);
252  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(0));
253  }
254 
255 
256  static void inline evalOpParmInst(
257  int64 &v, const OP_Node *node, const char *parmname,
258  const int *inst, fpreal time,
259  DEP_MicroNode *depnode,
260  int nestlevel=1)
261  {
262  v = node->evalIntInst(parmname, inst, 0, time, nestlevel);
263  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(0));
264  }
265  static void inline evalOpParmInst(
266  bool &v, const OP_Node *node, const char *parmname,
267  const int *inst, fpreal time,
268  DEP_MicroNode *depnode,
269  int nestlevel=1)
270  {
271  v = node->evalIntInst(parmname, inst, 0, time, nestlevel);
272  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(0));
273  }
274  static void inline evalOpParmInst(
275  fpreal64 &v, const OP_Node *node, const char *parmname,
276  const int *inst, fpreal time,
277  DEP_MicroNode *depnode,
278  int nestlevel=1)
279  {
280  v = node->evalFloatInst(parmname, inst, 0, time, nestlevel);
281  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(0));
282  }
283  static void inline evalOpParmInst(
284  UT_Vector2D &v, const OP_Node *node, const char *parmname,
285  const int *inst, fpreal time,
286  DEP_MicroNode *depnode,
287  int nestlevel=1)
288  {
289  v.x() = node->evalFloatInst(parmname, inst, 0, time, nestlevel);
290  v.y() = node->evalFloatInst(parmname, inst, 1, time, nestlevel);
291  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(0));
292  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(1));
293  }
294  static void inline evalOpParmInst(
295  UT_Vector3D &v, const OP_Node *node, const char *parmname,
296  const int *inst, fpreal time,
297  DEP_MicroNode *depnode,
298  int nestlevel=1)
299  {
300  v.x() = node->evalFloatInst(parmname, inst, 0, time, nestlevel);
301  v.y() = node->evalFloatInst(parmname, inst, 1, time, nestlevel);
302  v.z() = node->evalFloatInst(parmname, inst, 2, time, nestlevel);
303  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(0));
304  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(1));
305  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(2));
306  }
307  static void inline evalOpParmInst(
308  UT_Vector4D &v, const OP_Node *node, const char *parmname,
309  const int *inst, fpreal time,
310  DEP_MicroNode *depnode,
311  int nestlevel=1)
312  {
313  v.x() = node->evalFloatInst(parmname, inst, 0, time, nestlevel);
314  v.y() = node->evalFloatInst(parmname, inst, 1, time, nestlevel);
315  v.z() = node->evalFloatInst(parmname, inst, 2, time, nestlevel);
316  v.w() = node->evalFloatInst(parmname, inst, 3, time, nestlevel);
317  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(0));
318  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(1));
319  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(2));
320  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(3));
321  }
322 
323  static void inline evalOpParmInst(
324  UT_Matrix2D &v, const OP_Node *node, const char *parmname,
325  const int *inst, fpreal time,
326  DEP_MicroNode *depnode,
327  int nestlevel=1)
328  { for (int r = 0; r < 2; r++)
329  {
330  for (int c = 0; c < 2; c++)
331  {
332  v(r, c) = node->evalFloatInst(parmname, inst, r * 2 + c, time, nestlevel);
333  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(r * 2 + c));
334  }
335  }
336  }
337  static void inline evalOpParmInst(
338  UT_Matrix3D &v, const OP_Node *node, const char *parmname,
339  const int *inst, fpreal time,
340  DEP_MicroNode *depnode,
341  int nestlevel=1)
342  { for (int r = 0; r < 3; r++)
343  {
344  for (int c = 0; c < 3; c++)
345  {
346  v(r, c) = node->evalFloatInst(parmname, inst, r * 3 + c, time, nestlevel);
347  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(r * 3 + c));
348  }
349  }
350  }
351  static void inline evalOpParmInst(
352  UT_Matrix4D &v, const OP_Node *node, const char *parmname,
353  const int *inst, fpreal time,
354  DEP_MicroNode *depnode,
355  int nestlevel=1)
356  { for (int r = 0; r < 4; r++)
357  {
358  for (int c = 0; c < 4; c++)
359  {
360  v(r, c) = node->evalFloatInst(parmname, inst, r * 4 + c, time, nestlevel);
361  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(r * 4 + c));
362  }
363  }
364  }
365 
366  static void inline evalOpParmInst(
367  UT_Vector2I &v, const OP_Node *node, const char *parmname,
368  const int *inst, fpreal time,
369  DEP_MicroNode *depnode,
370  int nestlevel=1)
371  {
372  v.x() = node->evalIntInst(parmname, inst, 0, time, nestlevel);
373  v.y() = node->evalIntInst(parmname, inst, 1, time, nestlevel);
374  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(0));
375  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(1));
376  }
377  static void inline evalOpParmInst(
378  UT_Vector3I &v, const OP_Node *node, const char *parmname,
379  const int *inst, fpreal time,
380  DEP_MicroNode *depnode,
381  int nestlevel=1)
382  {
383  v.x() = node->evalIntInst(parmname, inst, 0, time, nestlevel);
384  v.y() = node->evalIntInst(parmname, inst, 1, time, nestlevel);
385  v.z() = node->evalIntInst(parmname, inst, 2, time, nestlevel);
386  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(0));
387  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(1));
388  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(2));
389  }
390  static void inline evalOpParmInst(
391  UT_Vector4I &v, const OP_Node *node, const char *parmname,
392  const int *inst, fpreal time,
393  DEP_MicroNode *depnode,
394  int nestlevel=1)
395  {
396  v.x() = node->evalIntInst(parmname, inst, 0, time, nestlevel);
397  v.y() = node->evalIntInst(parmname, inst, 1, time, nestlevel);
398  v.z() = node->evalIntInst(parmname, inst, 2, time, nestlevel);
399  v.w() = node->evalIntInst(parmname, inst, 3, time, nestlevel);
400  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(0));
401  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(1));
402  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(2));
403  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(3));
404  }
405 
406  static void inline evalOpParmInst(
407  UT_StringHolder &v, const OP_Node *node, const char *parmname,
408  const int *inst, fpreal time,
409  DEP_MicroNode *depnode,
410  int nestlevel=1)
411  {
412  UT_String result; node->evalStringInst(parmname, inst, result, 0, time, nestlevel); v.adoptFromString(result);
413  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(0));
414  }
415  static void inline evalOpParmInst(
416  UT_SharedPtr<UT_Ramp> &v, const OP_Node *node, const char *parmname,
417  const int *inst, fpreal time,
418  DEP_MicroNode *depnode,
419  int nestlevel=1)
420  {
421  v.reset(new UT_Ramp());
422 
423  const PRM_Parm *rampparm = node->getParmList()->getParmPtrInst(parmname, inst, nestlevel);
424  if (rampparm)
425  node->updateRampFromMultiParm(time, *rampparm, *v, 0, depnode);
426  }
427  static void inline evalOpParmInst(
428  PRM_DataItemHandle &v, const OP_Node *node, const char *parmname,
429  const int *inst, fpreal time,
430  DEP_MicroNode *depnode,
431  int nestlevel=1)
432  {
433  v = node->evalDataInst(parmname, inst, 0, time, nestlevel);
434  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(0));
435  }
436 
437  // Callback class to receive the results of an OP python callback
438  // or script evaluation. Clients must implement this interface and
439  // register with registerPythonResultClient to be notified.
440  // See registerPythonResultClient, notifyPythonResultClients
442  {
443  public:
445 
446  PythonResultClient() = default;
447  virtual ~PythonResultClient() = default;
448 
449  // results: Python result structure.
450  // script_source: The script source e.g. OpInstall
451  // script_path: The script file path or a reference to the
452  // embedded node e.g. opdef:/Object/mynode?OnInstall
453  virtual void onNotifyOPPythonResult(PY_Result const & result, char const * script_source, char const * script_path) = 0;
454  };
455 
456  // Registers a client interested in the OP python script evaluation results.
458 
459  // Notifies registered PythonResultClient objects about the result of a
460  // OP python script evaluation.
461  OP_API void notifyPythonResultClients(PY_Result const & result, char const * script_source, char const * script_path);
462 }
463 
464 #endif
void adoptFromString(UT_String &str)
OP_API void OPmarkRootNodes(UT_BitArray &roots, const OP_NodeList &nodes, bool assume_picked)
GLuint GLdouble GLdouble GLint GLint order
Definition: glew.h:3460
OP_API bool OPconvertOrWarnExternalReferences(OP_Node *node, bool checktoplevelnode, UT_WorkBuffer &err)
OP_API OP_Node * OPfindOpInput(OP_Node *op, const char *find_op_type, bool include_me=true)
OP_API void OPaddVopSubnetMask(const UT_StringRef &name)
GT_API const UT_StringHolder time
void addExplicitInput(DEP_MicroNode &inp, bool check_dup)
Methods for manipulating explicit edges.
GLuint start
Definition: glcorearb.h:474
const GLfloat * c
Definition: glew.h:16631
SYS_FORCE_INLINE T * SYSconst_cast(const T *foo)
Definition: SYS_Types.h:136
fpreal evalFloat(int pi, int vi, fpreal t) const
GLuint const GLchar * name
Definition: glcorearb.h:785
OP_API bool OPconvertOrWarnExternalOverrides(OP_Node *node, bool checktoplevelnode, UT_WorkBuffer &err)
OP_API bool OPisStandInShaderParm(const PRM_Template &parm)
double fpreal64
Definition: SYS_Types.h:201
PRM_Parm & getParm(int i)
GLuint64EXT * result
Definition: glew.h:14311
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:508
OP_API bool OPmatchesShaderContextTag(const PRM_Template &parm, const char *context_name)
GLuint GLfloat GLfloat GLfloat x1
Definition: glew.h:12900
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:30
void evalString(UT_String &val, int pi, int vi, fpreal t) const
OP_API void OPgetVopSubnetMask(OP_Node *node, UT_String &vopnetmask)
const GLdouble * v
Definition: glcorearb.h:836
PRM_DataItemHandle evalDataInst(const UT_StringRef &name, const int *inst, int vi, fpreal t, int nestlevel=1) const
GLuint GLuint end
Definition: glcorearb.h:474
OP_API void OPtopologicalSort(UT_IntArray &order, const OP_NodeList &nodes, const UT_BitArray *roots=nullptr)
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:510
bool hasParm(const char *name) const
long long int64
Definition: SYS_Types.h:116
OP_API bool OPhasShaderContextTag(const PRM_Template *list, int start=0, int end=-1)
OP_API bool OPisPotentialShaderParm(const PRM_Template &parm)
OP_API void notifyPythonResultClients(PY_Result const &result, char const *script_source, char const *script_path)
fpreal evalFloatInst(const UT_StringRef &name, const int *inst, int vi, fpreal t, int nestlevel=1) const
PRM_DataItemHandle evalData(int pi, int vi, fpreal t) const
OP_API bool OPcheckForVopnetDefinedNodes(OP_Node *node, UT_WorkBuffer &err)
GLuint GLfloat GLfloat GLfloat GLfloat y1
Definition: glew.h:12900
void evalStringRaw(UT_String &val, int pi, int vi, fpreal t) const
OP_API void OPcreateStickyNoteAboutCachedCode(OP_Network *subnet)
void evalStringInst(const UT_StringRef &name, const int *inst, UT_String &val, int vi, fpreal t, int nestlevel=1) const
OP_API bool OPisLegacyShaderParm(const PRM_Template &parm, OP_Node *owner)
fpreal64 fpreal
Definition: SYS_Types.h:277
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
#define OP_API
Definition: OP_API.h:10
OP_API void OPwarnBadRefs(UT_WorkBuffer &msg, const UT_StringArray &badrefs)
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:506
UT_WeakPtr< PythonResultClient > WPtr
Definition: OP_Utils.h:444
void updateRampFromMultiParm(fpreal t, const PRM_Parm &m, UT_Ramp &ramp, bool *time_dep=NULL, DEP_MicroNode *depnode=NULL) const
OP_API void registerPythonResultClient(PythonResultClient::WPtr result_client)
exint evalInt(int pi, int vi, fpreal t) const
exint evalIntInst(const UT_StringRef &name, const int *inst, int vi, fpreal t, int nestlevel=1) const
PRM_Parm * getParmPtrInst(const UT_StringRef &parm_name, const int *instance, int nest_level)
Definition: PRM_ParmList.h:473
GLboolean r
Definition: glcorearb.h:1221
SYS_FORCE_INLINE PRM_ParmList * getParmList()
Definition: PRM_ParmOwner.h:65
OP_API void OPgetItemBounds(fpreal &x1, fpreal &y1, fpreal &x2, fpreal &y2, const OP_NetworkBoxItemList &items)
OP_API bool OPcheckForVopnetsUsedOutside(OP_Node *node, OP_NodeList *badvopnets)
std::weak_ptr< T > UT_WeakPtr
Definition: UT_SharedPtr.h:43
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89