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  {
114  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(0));
115  v = node->evalInt(parmname, 0, time);
116  }
117  static inline void evalOpParm(
118  bool &v, const OP_Node *node, const char *parmname, fpreal time,
119  DEP_MicroNode *depnode)
120  {
121  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(0));
122  v = node->evalInt(parmname, 0, time);
123  }
124  static inline void evalOpParm(
125  fpreal64 &v, const OP_Node *node, const char *parmname, fpreal time,
126  DEP_MicroNode *depnode)
127  {
128  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(0));
129  v = node->evalFloat(parmname, 0, time);
130  }
131  static inline void evalOpParm(
132  UT_Vector2D &v, const OP_Node *node, const char *parmname, fpreal time,
133  DEP_MicroNode *depnode)
134  {
135  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(0));
136  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(1));
137  v.x() = node->evalFloat(parmname, 0, time);
138  v.y() = node->evalFloat(parmname, 1, time);
139  }
140  static inline void evalOpParm(
141  UT_Vector3D &v, const OP_Node *node, const char *parmname, fpreal time,
142  DEP_MicroNode *depnode)
143  {
144  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(0));
145  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(1));
146  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(2));
147  v.x() = node->evalFloat(parmname, 0, time);
148  v.y() = node->evalFloat(parmname, 1, time);
149  v.z() = node->evalFloat(parmname, 2, time);
150  }
151  static inline void evalOpParm(
152  UT_Vector4D &v, const OP_Node *node, const char *parmname, fpreal time,
153  DEP_MicroNode *depnode)
154  {
155  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(0));
156  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(1));
157  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(2));
158  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(3));
159  v.x() = node->evalFloat(parmname, 0, time);
160  v.y() = node->evalFloat(parmname, 1, time);
161  v.z() = node->evalFloat(parmname, 2, time);
162  v.w() = node->evalFloat(parmname, 3, time);
163  }
164 
165  static inline void evalOpParm(
166  UT_Matrix2D &v, const OP_Node *node, const char *parmname, fpreal time,
167  DEP_MicroNode *depnode)
168  { for (int r = 0; r < 2; r++)
169  {
170  for (int c = 0; c < 2; c++)
171  {
172  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(r * 2 + c));
173  v(r, c) = node->evalFloat(parmname, r * 2 + c, time);
174  }
175  }
176  }
177  static inline void evalOpParm(
178  UT_Matrix3D &v, const OP_Node *node, const char *parmname, fpreal time,
179  DEP_MicroNode *depnode)
180  { for (int r = 0; r < 3; r++)
181  {
182  for (int c = 0; c < 3; c++)
183  {
184  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(r * 3 + c));
185  v(r, c) = node->evalFloat(parmname, r * 3 + c, time);
186  }
187  }
188  }
189  static inline void evalOpParm(
190  UT_Matrix4D &v, const OP_Node *node, const char *parmname, fpreal time,
191  DEP_MicroNode *depnode)
192  { for (int r = 0; r < 4; r++)
193  {
194  for (int c = 0; c < 4; c++)
195  {
196  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(r * 4 + c));
197  v(r, c) = node->evalFloat(parmname, r * 4 + c, time);
198  }
199  }
200  }
201 
202  static void inline evalOpParm(
203  UT_Vector2I &v, const OP_Node *node, const char *parmname, fpreal time,
204  DEP_MicroNode *depnode)
205  {
206  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(0));
207  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(1));
208  v.x() = node->evalInt(parmname, 0, time);
209  v.y() = node->evalInt(parmname, 1, time);
210  }
211  static void inline evalOpParm(
212  UT_Vector3I &v, const OP_Node *node, const char *parmname, fpreal time,
213  DEP_MicroNode *depnode)
214  {
215  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(0));
216  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(1));
217  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(2));
218  v.x() = node->evalInt(parmname, 0, time);
219  v.y() = node->evalInt(parmname, 1, time);
220  v.z() = node->evalInt(parmname, 2, time);
221  }
222  static void inline evalOpParm(
223  UT_Vector4I &v, const OP_Node *node, const char *parmname, fpreal time,
224  DEP_MicroNode *depnode)
225  {
226  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(0));
227  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(1));
228  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(2));
229  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(3));
230  v.x() = node->evalInt(parmname, 0, time);
231  v.y() = node->evalInt(parmname, 1, time);
232  v.z() = node->evalInt(parmname, 2, time);
233  v.w() = node->evalInt(parmname, 3, time);
234  }
235  static void inline evalOpParm(
236  UT_StringHolder &v, const OP_Node *node, const char *parmname, fpreal time,
237  DEP_MicroNode *depnode)
238  {
239  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(0));
240  UT_String result; node->evalString(result, parmname, 0, time); v.adoptFromString(result);
241  }
242  static void inline evalOpParmRaw(
243  UT_StringHolder &v, const OP_Node *node, const char *parmname, fpreal time,
244  DEP_MicroNode *depnode)
245  {
246  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(0));
247  UT_String result; node->evalStringRaw(result, parmname, 0, time); v.adoptFromString(result);
248  }
249  static void inline evalOpParm(
250  UT_SharedPtr<UT_Ramp> &v, const OP_Node *node, const char *parmname, fpreal time,
251  DEP_MicroNode *depnode)
252  {
253  v.reset(new UT_Ramp());
254 
255  if (node->hasParm(parmname))
256  node->updateRampFromMultiParm(time, node->getParm(parmname), *v, 0, depnode);
257  }
258  static void inline evalOpParm(
259  PRM_DataItemHandle &v, const OP_Node *node, const char *parmname, fpreal time,
260  DEP_MicroNode *depnode)
261  {
262  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParm(parmname).microNode(0));
263  v = node->evalData(parmname, 0, time);
264  }
265 
266 
267  static void inline evalOpParmInst(
268  int64 &v, const OP_Node *node, const char *parmname,
269  const int *inst, fpreal time,
270  DEP_MicroNode *depnode,
271  int nestlevel=1)
272  {
273  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(0));
274  v = node->evalIntInst(parmname, inst, 0, time, nestlevel);
275  }
276  static void inline evalOpParmInst(
277  bool &v, const OP_Node *node, const char *parmname,
278  const int *inst, fpreal time,
279  DEP_MicroNode *depnode,
280  int nestlevel=1)
281  {
282  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(0));
283  v = node->evalIntInst(parmname, inst, 0, time, nestlevel);
284  }
285  static void inline evalOpParmInst(
286  fpreal64 &v, const OP_Node *node, const char *parmname,
287  const int *inst, fpreal time,
288  DEP_MicroNode *depnode,
289  int nestlevel=1)
290  {
291  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(0));
292  v = node->evalFloatInst(parmname, inst, 0, time, nestlevel);
293  }
294  static void inline evalOpParmInst(
295  UT_Vector2D &v, const OP_Node *node, const char *parmname,
296  const int *inst, fpreal time,
297  DEP_MicroNode *depnode,
298  int nestlevel=1)
299  {
300  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(0));
301  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(1));
302  v.x() = node->evalFloatInst(parmname, inst, 0, time, nestlevel);
303  v.y() = node->evalFloatInst(parmname, inst, 1, time, nestlevel);
304  }
305  static void inline evalOpParmInst(
306  UT_Vector3D &v, const OP_Node *node, const char *parmname,
307  const int *inst, fpreal time,
308  DEP_MicroNode *depnode,
309  int nestlevel=1)
310  {
311  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(0));
312  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(1));
313  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(2));
314  v.x() = node->evalFloatInst(parmname, inst, 0, time, nestlevel);
315  v.y() = node->evalFloatInst(parmname, inst, 1, time, nestlevel);
316  v.z() = node->evalFloatInst(parmname, inst, 2, time, nestlevel);
317  }
318  static void inline evalOpParmInst(
319  UT_Vector4D &v, const OP_Node *node, const char *parmname,
320  const int *inst, fpreal time,
321  DEP_MicroNode *depnode,
322  int nestlevel=1)
323  {
324  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(0));
325  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(1));
326  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(2));
327  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(3));
328  v.x() = node->evalFloatInst(parmname, inst, 0, time, nestlevel);
329  v.y() = node->evalFloatInst(parmname, inst, 1, time, nestlevel);
330  v.z() = node->evalFloatInst(parmname, inst, 2, time, nestlevel);
331  v.w() = node->evalFloatInst(parmname, inst, 3, time, nestlevel);
332  }
333 
334  static void inline evalOpParmInst(
335  UT_Matrix2D &v, const OP_Node *node, const char *parmname,
336  const int *inst, fpreal time,
337  DEP_MicroNode *depnode,
338  int nestlevel=1)
339  { for (int r = 0; r < 2; r++)
340  {
341  for (int c = 0; c < 2; c++)
342  {
343  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(r * 2 + c));
344  v(r, c) = node->evalFloatInst(parmname, inst, r * 2 + c, time, nestlevel);
345  }
346  }
347  }
348  static void inline evalOpParmInst(
349  UT_Matrix3D &v, const OP_Node *node, const char *parmname,
350  const int *inst, fpreal time,
351  DEP_MicroNode *depnode,
352  int nestlevel=1)
353  { for (int r = 0; r < 3; r++)
354  {
355  for (int c = 0; c < 3; c++)
356  {
357  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(r * 3 + c));
358  v(r, c) = node->evalFloatInst(parmname, inst, r * 3 + c, time, nestlevel);
359  }
360  }
361  }
362  static void inline evalOpParmInst(
363  UT_Matrix4D &v, const OP_Node *node, const char *parmname,
364  const int *inst, fpreal time,
365  DEP_MicroNode *depnode,
366  int nestlevel=1)
367  { for (int r = 0; r < 4; r++)
368  {
369  for (int c = 0; c < 4; c++)
370  {
371  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(r * 4 + c));
372  v(r, c) = node->evalFloatInst(parmname, inst, r * 4 + c, time, nestlevel);
373  }
374  }
375  }
376 
377  static void inline evalOpParmInst(
378  UT_Vector2I &v, const OP_Node *node, const char *parmname,
379  const int *inst, fpreal time,
380  DEP_MicroNode *depnode,
381  int nestlevel=1)
382  {
383  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(0));
384  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(1));
385  v.x() = node->evalIntInst(parmname, inst, 0, time, nestlevel);
386  v.y() = node->evalIntInst(parmname, inst, 1, time, nestlevel);
387  }
388  static void inline evalOpParmInst(
389  UT_Vector3I &v, const OP_Node *node, const char *parmname,
390  const int *inst, fpreal time,
391  DEP_MicroNode *depnode,
392  int nestlevel=1)
393  {
394  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(0));
395  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(1));
396  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(2));
397  v.x() = node->evalIntInst(parmname, inst, 0, time, nestlevel);
398  v.y() = node->evalIntInst(parmname, inst, 1, time, nestlevel);
399  v.z() = node->evalIntInst(parmname, inst, 2, time, nestlevel);
400  }
401  static void inline evalOpParmInst(
402  UT_Vector4I &v, const OP_Node *node, const char *parmname,
403  const int *inst, fpreal time,
404  DEP_MicroNode *depnode,
405  int nestlevel=1)
406  {
407  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(0));
408  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(1));
409  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(2));
410  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(3));
411  v.x() = node->evalIntInst(parmname, inst, 0, time, nestlevel);
412  v.y() = node->evalIntInst(parmname, inst, 1, time, nestlevel);
413  v.z() = node->evalIntInst(parmname, inst, 2, time, nestlevel);
414  v.w() = node->evalIntInst(parmname, inst, 3, time, nestlevel);
415  }
416 
417  static void inline evalOpParmInst(
418  UT_StringHolder &v, const OP_Node *node, const char *parmname,
419  const int *inst, fpreal time,
420  DEP_MicroNode *depnode,
421  int nestlevel=1)
422  {
423  UT_String result; node->evalStringInst(parmname, inst, result, 0, time, nestlevel); v.adoptFromString(result);
424  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(0));
425  }
426  static void inline evalOpParmInst(
427  UT_SharedPtr<UT_Ramp> &v, const OP_Node *node, const char *parmname,
428  const int *inst, fpreal time,
429  DEP_MicroNode *depnode,
430  int nestlevel=1)
431  {
432  v.reset(new UT_Ramp());
433 
434  const PRM_Parm *rampparm = node->getParmList()->getParmPtrInst(parmname, inst, nestlevel);
435  if (rampparm)
436  node->updateRampFromMultiParm(time, *rampparm, *v, 0, depnode);
437  }
438  static void inline evalOpParmInst(
439  PRM_DataItemHandle &v, const OP_Node *node, const char *parmname,
440  const int *inst, fpreal time,
441  DEP_MicroNode *depnode,
442  int nestlevel=1)
443  {
444  if (depnode) depnode->addExplicitInput(SYSconst_cast(node)->getParmPtrInst(parmname, inst, nestlevel)->microNode(0));
445  v = node->evalDataInst(parmname, inst, 0, time, nestlevel);
446  }
447 
448  // Callback class to receive the results of an OP python callback
449  // or script evaluation. Clients must implement this interface and
450  // register with registerPythonResultClient to be notified.
451  // See registerPythonResultClient, notifyPythonResultClients
453  {
454  public:
456 
457  PythonResultClient() = default;
458  virtual ~PythonResultClient() = default;
459 
460  // results: Python result structure.
461  // script_source: The script source e.g. OpInstall
462  // script_path: The script file path or a reference to the
463  // embedded node e.g. opdef:/Object/mynode?OnInstall
464  virtual void onNotifyOPPythonResult(PY_Result const & result, char const * script_source, char const * script_path) = 0;
465  };
466 
467  // Registers a client interested in the OP python script evaluation results.
469 
470  // Notifies registered PythonResultClient objects about the result of a
471  // OP python script evaluation.
472  OP_API void notifyPythonResultClients(PY_Result const & result, char const * script_source, char const * script_path);
473 }
474 
475 #endif
void adoptFromString(UT_String &str)
OP_API void OPmarkRootNodes(UT_BitArray &roots, const OP_NodeList &nodes, bool assume_picked)
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
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
void addExplicitInput(DEP_MicroNode &inp, bool check_dup)
Methods for manipulating explicit edges.
GLuint start
Definition: glcorearb.h:475
SYS_FORCE_INLINE T * SYSconst_cast(const T *foo)
Definition: SYS_Types.h:136
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
fpreal evalFloat(int pi, int vi, fpreal t) const
**But if you need a result
Definition: thread.h:613
OP_API bool OPconvertOrWarnExternalOverrides(OP_Node *node, bool checktoplevelnode, UT_WorkBuffer &err)
GLdouble GLdouble x2
Definition: glad.h:2349
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
OP_API bool OPisStandInShaderParm(const PRM_Template &parm)
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
PRM_Parm & getParm(int i)
OP_API bool OPmatchesShaderContextTag(const PRM_Template &parm, const char *context_name)
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
void evalString(UT_String &val, int pi, int vi, fpreal t) const
OP_API void OPgetVopSubnetMask(OP_Node *node, UT_String &vopnetmask)
PRM_DataItemHandle evalDataInst(const UT_StringRef &name, const int *inst, int vi, fpreal t, int nestlevel=1) const
GLuint GLuint end
Definition: glcorearb.h:475
OP_API void OPtopologicalSort(UT_IntArray &order, const OP_NodeList &nodes, const UT_BitArray *roots=nullptr)
GLdouble y1
Definition: glad.h:2349
GLdouble GLdouble GLint GLint order
Definition: glad.h:2676
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
GLuint const GLchar * name
Definition: glcorearb.h:786
PRM_DataItemHandle evalData(int pi, int vi, fpreal t) const
OP_API bool OPcheckForVopnetDefinedNodes(OP_Node *node, UT_WorkBuffer &err)
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:88
#define OP_API
Definition: OP_API.h:10
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
OP_API void OPwarnBadRefs(UT_WorkBuffer &msg, const UT_StringArray &badrefs)
UT_WeakPtr< PythonResultClient > WPtr
Definition: OP_Utils.h:455
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
GLboolean r
Definition: glcorearb.h:1222
exint evalIntInst(const UT_StringRef &name, const int *inst, int vi, fpreal t, int nestlevel=1) const
GLdouble GLdouble GLdouble y2
Definition: glad.h:2349
PRM_Parm * getParmPtrInst(const UT_StringRef &parm_name, const int *instance, int nest_level)
Definition: PRM_ParmList.h:474
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
SYS_FORCE_INLINE PRM_ParmList * getParmList()
Definition: PRM_ParmOwner.h:71
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:49
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
bool hasParm(const UT_StringRef &name) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663