HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OP_Parameters.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: OP_Parameters encapsulates the parameter lists used
9  * by the OP library.
10  *
11  */
12 
13 #ifndef __OP_Parameters_h__
14 #define __OP_Parameters_h__
15 
16 #include <iosfwd>
17 
18 #include <CH/CH_ExprLanguage.h>
19 #include <EXPR/EX_Error.h>
20 #include <PRM/PRM_ChanState.h>
21 #include <PRM/PRM_ParmList.h>
22 #include <PRM/PRM_ParmOwner.h>
23 #include <SYS/SYS_Types.h>
24 #include <UT/UT_Assert.h>
25 #include <UT/UT_Defines.h>
26 #include <UT/UT_LockedRawPtr.h>
27 #include <UT/UT_String.h>
28 #include <UT/UT_StringSet.h>
29 #include <UT/UT_Thread.h>
30 
31 #include "OP_API.h"
32 #include "OP_Error.h"
33 #include "OP_Lock.h"
34 #include "OP_Stat.h"
35 #include "OP_Value.h"
36 #include "OP_Context.h"
37 
38 class UT_BitArray;
39 class UT_Ramp;
40 class UT_JSONValueMap;
41 class PRM_Parm;
42 class PRM_ParmList;
43 class PRM_ScriptPage;
44 class PRM_ScriptImports;
45 class PRM_BatchList;
46 class CH_LocalVariable;
47 class CMD_Args;
48 class OP_Channels;
49 class OP_Operator;
50 class OP_ParmCache;
51 class OP_PostIt;
52 class OP_MultiparmInfo;
54 class OP_SpareParms;
55 
56 enum OP_ScopeOp {
60  OP_SCOPE_NUM_OPS // sentinel
61 };
62 
64 {
65 public:
66  // allow_nonchannels - determines whether or not we should scope parameters
67  // that don't have CH_Channel pointers associated with
68  // them.
69  //
70  // exclude_animated - determines whether or not to exclude channels that
71  // are time dependent.
72  //
73  // exclude_constant - determines whether or not to exclude channels that
74  // are not time dependent.
75  //
76  // include_only_nonint_keys - determines whether or not to include only
77  // those channels that have non integer
78  // keyframes.
79  // scoped_related_layers - scope the related animation layers
80  OP_ScopeOptions(bool allow_nonchannels, bool exclude_animated,
81  bool exclude_constant, bool include_only_nonint_keys,
82  bool scoped_related_layers) :
83  myAllowNonChannels(allow_nonchannels),
84  myExcludeAnimated(exclude_animated),
85  myExcludeConstant(exclude_constant),
86  myIncludeOnlyNonIntKeys(include_only_nonint_keys),
87  myScopedRelatedLayers(scoped_related_layers) { }
88 
94 };
95 
97 {
98 public:
100  : myTime(t)
101  , myFollowCHOPLayerOverrides(true)
102  , myFollowReferences(true)
103  {
104  }
105 
109 };
110 
112 {
113 public:
114  const UT_String &getName() const { return myName; }
115  OP_Operator *getOperator() const { return myTableEntry; }
116 
117  // This function updates the hidden/disable flags on all parameters by
118  // asking both the conditionals and the overridden updateParmsFlags
119  // functions.
120  // Returns true if something was changed.
121  bool updateParmsAndSpareParmsFlags();
122 
123  // Clone a parameter by referencing all the parameters of the "from"
124  // OP_Parameters.
125  virtual unsigned referenceAllParameters(OP_Parameters *from,
126  bool relative_references = true);
127  /// Reference a single parameter from the @c from node. This builds a
128  /// channel reference for the given parameter index.
129  /// If the @c relative_path isn't specified, it will be computed as @code
130  /// from->getFullPath(frompath);
131  /// this->getFullPath(thispath);
132  /// relative_path.getRelativePath(thispath, frompath);
133  /// @endcode
134  virtual bool referenceSingleParameter(OP_Parameters *from,
135  int parm_idx,
136  const char *relative_path = NULL);
137 
138  // Methods for dealing with channels & key frames
139  void animate(unsigned idx);
140  void animate(const char *name);
141  void deAnimate(unsigned idx);
142  void deAnimate(const char *name);
143  CH_Channel *addChannel(const char *name);
144  CH_Channel *getChannel(const char *name);
145  const CH_Channel *getChannel(const char *name) const;
146  int destroyChannel(const char *name);
147 
148  bool isObsoleteChannel(const char *name) const;
149 
150  void takeActivateParm(uint idx, bool enable=true);
151  void takeActivateParm(const char *name, bool enable=true);
152  void takeActivateParm(PRM_Parm *parm, bool enable=true);
154  { takeActivateParm(idx, false); }
155  void takeDeactivateParm(const char *name)
156  { takeActivateParm(name, false); }
158  { takeActivateParm(parm, false); }
159 
160  bool takeIsActiveParm(uint idx);
161  bool takeIsActiveParm(const char *name);
162  bool takeIsActiveParm(const PRM_Parm *parm);
163 
164  // Activates the parm for the take if it should be automatically
165  // activated based on its current state and the current take state.
166  void takeAutoActivateParm(PRM_Parm *) override;
167 
168  fpreal findKey(fpreal t, int direction) const;
169 
170  PRM_ChanState getChanState(fpreal t, bool scoped_only) const;
172  { return getChanState(t, false); }
173  void updatePending(fpreal t);
174  bool isPending( fpreal t );
175 
176  OP_Channels *getChannels(void) const { return myChannels; }
177 
178  // This gets the variable value AS as string. Not the string corresponding
179  // to the specified index! Note that you should call the base class if you
180  // don't handle the given index.
181  virtual bool evalVariableValue(UT_String &val, int index,
182  int thread);
183  // Note that you should call the base class if you don't handle the given
184  // index.
185  virtual bool evalVariableValue(fpreal &val, int index, int thread);
186 
187  /// @deprecated Please override evalVariableValue() above instead
188  SYS_DEPRECATED(10.0)
189  virtual void getVariableString(int index, UT_String &value,
190  int thread);
191  /// @deprecated Please override the evalVariableValue() above instead
192  SYS_DEPRECATED(10.0)
193  virtual float getVariableValue(int index, int thread);
194 
195  int getNumParms() const
196  { return myParmList->getEntries(); }
198  { return *myParmList->getParmPtr(i); }
199  const PRM_Parm &getParm(int i) const
200  { return *myParmList->getParmPtr(i); }
201  PRM_Parm &getParm(const char *name)
202  { return *myParmList->getParmPtr(name); }
203  const PRM_Parm &getParm(const char *name) const
204  { return *myParmList->getParmPtr(name); }
205  bool hasParm(const char *name) const
206  { return myParmList->getParmPtr(name) != 0; }
208  { return myParmList->getParmPtr(name); }
209  const PRM_Parm *getParmPtr(const UT_StringRef &name) const
210  { return myParmList->getParmPtr(name); }
211  PRM_Parm *getParmPtrInst(const char *name, const int *inst,
212  int nestlevel = 1);
213  const PRM_Parm *getParmPtrInst(const char *name, const int *inst,
214  int nestlevel = 1) const;
215 
216  // This function is called when our spare parm definition is changing.
217  // Parses the supplied dialog script and uses it to update the spare
218  // parms for this node.
219  virtual bool changeSpareParms(UT_IStream &ds, UT_String &errors);
220  // Returns true if we are in the middle of chaning our spare parm
221  // definition. Lets us avoid handling certain events (such as multiparm
222  // change handling in OPUI_Dialog).
224  { return myChangingSpareParms; }
225 
226  // This is a secondary parm list where all obsolete parameters are
227  // placed (if any)
230  PRM_ParmList *&obsolete_parms) override;
231 
232  // After any call which might have loaded something into the ObsoleteList,
233  // we should call this to resolve those parameters:
234  virtual void resolveObsoleteParms(PRM_ParmList * /*obsolete_parms*/) { /*nothing at this level*/ }
235 
236  /// Sync the node assuming that it is currently at old_version to the
237  /// current_version.
238  virtual void syncNodeVersion(
239  const char *old_version,
240  const char *current_version,
241  bool *node_deleted)
242  { /*nothing at this level*/ }
243 
244  /// Track down the parameter associated with a given property
245  /// @{
246  virtual bool getParameterOrProperty(const char *name, fpreal now,
247  OP_Node *&op,
248  PRM_Parm *&parm,
249  bool create_missing_multiparms,
250  PRM_ParmList *obsolete=0);
251  virtual bool getParameterOrPropertyByChannel(const char *chname,
252  fpreal now,
253  OP_Node *&op,
254  PRM_Parm *&parm,
255  int &vector_index,
256  PRM_ParmList *obsolete=0);
257  /// @}
258 
259  /// This just calls getParameterOrProperty() with
260  /// create_missing_multiparms=false and allows for const correctness.
262  const char *name,
263  fpreal now,
264  OP_Node *&op,
265  PRM_Parm *&parm,
266  PRM_ParmList *obsolete) const
267  {
268  return const_cast<OP_Parameters*>(this)->getParameterOrProperty(
269  name, now, op, parm, false, obsolete);
270  }
271 
272  /// Fill out the property lookup list with parameters.
273  /// Returns the total of found and resolved parameters in the list
274  /// (whether they were resolved by previous calls or this particular call,
275  /// ie, NOT the total of nodes found in this call)
276  virtual int findParametersOrProperties(fpreal now,
277  OP_PropertyLookupList &list);
278 
279  // Take a PRM_Parm pointer, and look at its value. If it is a simple
280  // channel reference, return the referenced node, parm, and vecidx.
282  OP_Node *&newop,
283  PRM_Parm *&newparm,
284  int &newvecidx)
285  {
286  return followChannelReferencesOneStepT(
287  opt, newop, newparm, newvecidx,
288  SYSgetSTID());
289  }
290  static bool followChannelReferencesOneStepT(const OP_FollowChanRefsOptions& opt,
291  OP_Node *&newop,
292  PRM_Parm *&newparm,
293  int &newvecidx,
294  int thread);
296  OP_Node *&newop,
297  PRM_Parm *&newparm,
298  int &newvecidx)
299  {
300  followChannelReferencesT(
301  opt, newop, newparm, newvecidx,
302  SYSgetSTID());
303  }
304  static void followChannelReferencesT(const OP_FollowChanRefsOptions& opt,
305  OP_Node *&newop,
306  PRM_Parm *&newparm,
307  int &newvecidx,
308  int thread);
310  {
311  followChannelReferencesT(opt, ref, SYSgetSTID());
312  }
313  static void followChannelReferencesT(const OP_FollowChanRefsOptions& opt, CH_ChannelRef &ref,
314  int thread);
315 
316  static void getValueAsProcessedNodePaths(fpreal t,
317  UT_WorkBuffer &resultbuf,
318  PRM_Parm *parm, int index,
319  OP_Node *srcnode
320  );
321 
322  const OP_Stat &getStat() const { return myStats; }
323  OP_Stat &getStat() { return myStats; }
324 
325  // "vi" refers to the vector index. "pi" is the parameter index.
326  // "pn" refers to the parmeter name. "v" refers to the vector component.
327  // if v == -1, all components are affected.
328  bool enableParm(int pi, int state, int v = -1);
329  bool enableParm(const char *pn, int state, int v = -1);
330  bool enableParmInst(const char *name, const int *inst,
331  int state, int nestlevel = 1,
332  int v = -1);
333  unsigned getEnableState(int pi, int v = -1);
334  unsigned getEnableState(const char *pn, int v = -1);
335  unsigned getEnableStateInst(const char *name, const int *inst,
336  int nestlevel = 1, int v = -1);
337 
338  bool setVisibleState(int pi, bool state, int v = -1);
339  bool setVisibleState(const char *pn, bool state, int v = -1);
340  bool setVisibleStateInst(const char *name, const int *inst,
341  int state, int nestlevel = 1,
342  int v = -1);
343 
344  bool getVisibleState(int pi, int v = -1);
345  bool getVisibleState(const char *pn, int v = -1);
346 
347  /// @anchor OP_Node_EvalParameters
348 
349  /// @name Parameter evaluation
350  ///
351  /// - int pi @n Parameter index
352  /// - const char *pn @n Parameter name token
353  /// - int *pi @n Parameter index passed by reference, looked up
354  /// using 'pn'
355  /// - PRM_Parm *parm @n Parameter by reference
356  /// - int vi @n Component index of a parameter
357  /// - fpreal t @n Evaluation time
358  /// - int thread @n Thread id (ie. return value from SYSgetSTID())
359  // @{
360  exint evalInt(int pi, int vi, fpreal t) const
361  { return evalIntT(pi, vi, t, SYSgetSTID()); }
362  exint evalIntT(int pi, int vi, fpreal t, int thread) const;
363  exint evalInt(const char *pn, int vi, fpreal t) const
364  { return evalIntT(pn, vi, t, SYSgetSTID()); }
365  exint evalIntT(const char *pn, int vi, fpreal t,
366  int thread) const;
367  exint evalInt(const char *pn, int *pi, int vi, fpreal t) const
368  { return evalIntT(pn, pi, vi, t, SYSgetSTID()); }
369  exint evalIntT(const char *pn, int *pi, int vi, fpreal t,
370  int thread) const;
371  exint evalInt(const PRM_Parm *parm, int vi, fpreal t) const
372  { return evalIntT(parm, vi, t, SYSgetSTID()); }
373  exint evalIntT(const PRM_Parm *parm, int vi, fpreal t,
374  int thread) const;
375 
376  fpreal evalFloat(int pi, int vi, fpreal t) const
377  { return evalFloatT(pi, vi, t, SYSgetSTID()); }
378  fpreal evalFloatT(int pi, int vi, fpreal t, int thread) const;
379  fpreal evalFloat(const char *pn, int vi, fpreal t) const
380  { return evalFloatT(pn, vi, t, SYSgetSTID()); }
381  fpreal evalFloatT(const char *pn, int vi, fpreal t,
382  int thread) const;
383  fpreal evalFloat(const char *pn, int *pi, int vi,
384  fpreal t) const
385  { return evalFloatT(pn, pi, vi, t, SYSgetSTID()); }
386  fpreal evalFloatT(const char *pn, int *pi, int vi, fpreal t,
387  int thread) const;
388  fpreal evalFloat(const PRM_Parm *parm, int vi, fpreal t) const
389  { return evalFloatT(parm, vi, t, SYSgetSTID()); }
390  fpreal evalFloatT(const PRM_Parm *parm, int vi, fpreal t,
391  int thread) const;
392 
393  // Evaluate an array of floats
394  void evalFloats(int pi, fpreal64 *v, fpreal t) const
395  { return evalFloatsT(pi, v, t, SYSgetSTID()); }
396  void evalFloatsT(int pi, fpreal64 *v,
397  fpreal t, int thread) const;
398  void evalFloats(const char *pn, fpreal64 *v, fpreal t) const
399  { return evalFloatsT(pn, v, t, SYSgetSTID()); }
400  void evalFloatsT(const char *pn, fpreal64 *v,
401  fpreal t, int thread) const;
402  void evalFloats(const char *pn, int *pi, fpreal64 *v,
403  fpreal t) const
404  { return evalFloatsT(pn, pi, v, t, SYSgetSTID()); }
405  void evalFloatsT(const char *pn, int *pi, fpreal64 *v,
406  fpreal t, int thread) const;
407  void evalFloats(const PRM_Parm *parm, fpreal64 *v, fpreal t) const
408  { return evalFloatsT(parm, v, t, SYSgetSTID()); }
409  void evalFloatsT(const PRM_Parm *parm, fpreal64 *v,
410  fpreal t, int thread) const;
411 
412  // @deprecated Please use the other evalFloats() versions
413  // @{
414  void evalFloats(int pi, fpreal32 *v, fpreal t) const;
415  void evalFloats(const char *pn, fpreal32 *v,
416  fpreal t) const;
417  void evalFloats(const char *pn, int *pi, fpreal32 *v,
418  fpreal t) const;
419  void evalFloats(const PRM_Parm *parm, fpreal32 *v,
420  fpreal t) const;
421  void evalFloatsInst(const char *name, const int *inst,
422  fpreal32 *v, fpreal t,
423  int nestlevel = 1) const;
424  // @}
425 
426  // String evaluation, expanding any inline expressions (backticks) and
427  // variables
428  void evalString(UT_String &val, int pi, int vi,
429  fpreal t) const
430  { return evalStringT(val, pi, vi, t, SYSgetSTID()); }
431  void evalStringT(UT_String &val, int pi, int vi, fpreal t,
432  int thread) const;
433  void evalString(UT_String &val, const char *pn, int vi,
434  fpreal t) const
435  { return evalStringT(val, pn, vi, t, SYSgetSTID()); }
436  void evalStringT(UT_String &val, const char *pn, int vi,
437  fpreal t, int thread) const;
438  void evalString(UT_String &val, const char *pn, int *pi,
439  int vi, fpreal t) const
440  {
441  return evalStringT(val, pn, pi, vi, t,
442  SYSgetSTID());
443  }
444  void evalStringT(UT_String &val, const char *pn, int *pi,
445  int vi, fpreal t, int thread) const;
446  void evalString(UT_String &val, const PRM_Parm *parm,
447  int vi, fpreal t) const
448  {
449  return evalStringT(val, parm, vi, t,
450  SYSgetSTID());
451  }
452  void evalStringT(UT_String &val, const PRM_Parm *parm,
453  int vi, fpreal t, int thread) const;
454 
455  // String evaluation, with no expression or variable expansion
456  void evalStringRaw(UT_String &val, int pi, int vi,
457  fpreal t) const
458  {
459  return evalStringRawT(val, pi, vi, t,
460  SYSgetSTID());
461  }
462  void evalStringRawT(UT_String &val, int pi, int vi, fpreal t,
463  int thread) const;
464  void evalStringRaw(UT_String &val, const char *pn, int vi,
465  fpreal t) const
466  {
467  return evalStringRawT(val, pn, vi, t,
468  SYSgetSTID());
469  }
470  void evalStringRawT(UT_String &val, const char *pn, int vi,
471  fpreal t, int thread) const;
472  void evalStringRaw(UT_String &val, const char *pn, int *pi,
473  int vi, fpreal t) const
474  {
475  return evalStringRawT(val, pn, pi, vi, t,
476  SYSgetSTID());
477  }
478  void evalStringRawT(UT_String &val, const char *pn, int *pi,
479  int vi, fpreal t, int thread) const;
480  void evalStringRaw(UT_String &val, const PRM_Parm *parm,
481  int vi, fpreal t) const
482  {
483  return evalStringRawT(val, parm, vi, t,
484  SYSgetSTID());
485  }
486  void evalStringRawT(UT_String &val, const PRM_Parm *parm,
487  int vi, fpreal t, int thread) const;
488 
489  PRM_DataItemHandle evalData(int pi, int vi, fpreal t) const
490  { return evalDataT(pi, vi, t, SYSgetSTID()); }
491  PRM_DataItemHandle evalDataT(int pi, int vi, fpreal t, int thread) const;
492  PRM_DataItemHandle evalData(const char *pn, int vi, fpreal t) const
493  { return evalDataT(pn, vi, t, SYSgetSTID()); }
494  PRM_DataItemHandle evalDataT(const char *pn, int vi, fpreal t,
495  int thread) const;
496  PRM_DataItemHandle evalData(const char *pn, int *pi, int vi, fpreal t) const
497  { return evalDataT(pn, pi, vi, t, SYSgetSTID()); }
498  PRM_DataItemHandle evalDataT(const char *pn, int *pi, int vi, fpreal t,
499  int thread) const;
500  PRM_DataItemHandle evalData(const PRM_Parm *parm, int vi, fpreal t) const
501  { return evalDataT(parm, vi, t, SYSgetSTID()); }
502  PRM_DataItemHandle evalDataT(const PRM_Parm *parm, int vi, fpreal t,
503  int thread) const;
504 
505  // JSON map evaluation, expanding any inline expressions (backticks) and
506  // variables
507  void evalJSONMap(UT_JSONValueMap &val, int pi, int vi,
508  fpreal t) const
509  { return evalJSONMapT(
510  val, pi, vi, t, SYSgetSTID()); }
511  void evalJSONMapT(UT_JSONValueMap &val, int pi, int vi,
512  fpreal t, int thread) const;
513  void evalJSONMap(UT_JSONValueMap &val, const char *pn,
514  int vi, fpreal t) const
515  { return evalJSONMapT(
516  val, pn, vi, t, SYSgetSTID()); }
517  void evalJSONMapT(UT_JSONValueMap &val, const char *pn,
518  int vi, fpreal t, int thread) const;
519  void evalJSONMap(UT_JSONValueMap &val, const char *pn,
520  int *pi, int vi, fpreal t) const
521  {
522  return evalJSONMapT(
523  val, pn, pi, vi, t, SYSgetSTID());
524  }
525  void evalJSONMapT(UT_JSONValueMap &val, const char *pn,
526  int *pi, int vi, fpreal t, int thread)
527  const;
529  const PRM_Parm *parm, int vi, fpreal t)
530  const
531  {
532  return evalJSONMapT(
533  val, parm, vi, t, SYSgetSTID());
534  }
535  void evalJSONMapT(UT_JSONValueMap &val,
536  const PRM_Parm *parm, int vi, fpreal t,
537  int thread) const;
538 
539  // JSON map evaluation, with no expression or variable expansion
540  void evalJSONMapRaw(UT_JSONValueMap &val, int pi, int vi,
541  fpreal t) const
542  {
543  return evalJSONMapRawT(
544  val, pi, vi, t, SYSgetSTID());
545  }
546  void evalJSONMapRawT(UT_JSONValueMap &val, int pi, int vi,
547  fpreal t, int thread) const;
548  void evalJSONMapRaw(UT_JSONValueMap &val, const char *pn,
549  int vi, fpreal t) const
550  {
551  return evalJSONMapRawT(
552  val, pn, vi, t, SYSgetSTID());
553  }
554  void evalJSONMapRawT(UT_JSONValueMap &val, const char *pn,
555  int vi, fpreal t, int thread) const;
556  void evalJSONMapRaw(UT_JSONValueMap &val, const char *pn,
557  int *pi, int vi, fpreal t) const
558  {
559  return evalJSONMapRawT(
560  val, pn, pi, vi, t, SYSgetSTID());
561  }
562  void evalJSONMapRawT(UT_JSONValueMap &val, const char *pn,
563  int *pi, int vi, fpreal t, int thread)
564  const;
566  const PRM_Parm *parm, int vi, fpreal t)
567  const
568  {
569  return evalJSONMapRawT(
570  val, parm, vi, t, SYSgetSTID());
571  }
572  void evalJSONMapRawT(UT_JSONValueMap &val,
573  const PRM_Parm *parm, int vi,
574  fpreal t, int thread) const;
575  // @}
576 
577  /// @name Multi-Parameter evaluation
578  ///
579  /// - name @n Parameter name token
580  /// - inst @n Array of instance indices to evaluate at
581  /// - vi @n Component index of a parameter
582  /// - t @n Evaluation time
583  /// - nestlevel @n Number of entries in 'inst'
584  /// - thread @n Thread id (ie. return value from SYSgetSTID())
585  // @{
586  exint evalIntInst(const char *name, const int *inst, int vi,
587  fpreal t, int nestlevel = 1) const
588  {
589  return evalIntInstT(name, inst, vi, t,
590  SYSgetSTID(), nestlevel);
591  }
592  exint evalIntInstT(const char *name, const int *inst, int vi,
593  fpreal t, int thread,
594  int nestlevel = 1) const;
595  fpreal evalFloatInst(const char *name, const int *inst,
596  int vi, fpreal t, int nestlevel = 1) const
597  {
598  return evalFloatInstT(name, inst, vi, t,
599  SYSgetSTID(), nestlevel);
600  }
601  fpreal evalFloatInstT(const char *name, const int *inst,
602  int vi, fpreal t, int thread,
603  int nestlevel = 1) const;
604  void evalFloatsInst(const char *name, const int *inst,
605  fpreal64 *v, fpreal t,
606  int nestlevel = 1) const
607  {
608  return evalFloatsInstT(name, inst, v, t,
609  SYSgetSTID(), nestlevel);
610  }
611  void evalFloatsInstT(const char *name, const int *inst,
612  fpreal64 *v, fpreal t, int thread,
613  int nestlevel = 1) const;
614  void evalStringInst(const char *name, const int *inst,
615  UT_String &val, int vi, fpreal t,
616  int nestlevel = 1) const
617  {
618  return evalStringInstT(name, inst, val, vi,
619  t, SYSgetSTID(), nestlevel);
620  }
621  void evalStringInstT(const char *name, const int *inst,
622  UT_String &val, int vi, fpreal t,
623  int thread, int nestlevel = 1) const;
624  void evalStringInstRaw(const char *name, const int *inst,
625  UT_String &val, int vi, fpreal t,
626  int nestlevel = 1) const
627  {
628  return evalStringInstRawT(name, inst, val, vi,
629  t, SYSgetSTID(), nestlevel);
630  }
631  void evalStringInstRawT(const char *name, const int *inst,
632  UT_String &val, int vi, fpreal t,
633  int thread,
634  int nestlevel = 1) const;
635  PRM_DataItemHandle evalDataInst(const char *name, const int *inst, int vi,
636  fpreal t, int nestlevel = 1) const
637  {
638  return evalDataInstT(name, inst, vi, t,
639  SYSgetSTID(), nestlevel);
640  }
641  PRM_DataItemHandle evalDataInstT(const char *name, const int *inst, int vi,
642  fpreal t, int thread,
643  int nestlevel = 1) const;
644  // @}
645 
646  /// @name Property evaluation
647  ///
648  /// Properties will be evaluated if the parameter is not found.
649  ///
650  /// - parm_name @n Parameter name token
651  /// - vec_index @n Component index of a parameter
652  /// - now @n Evaluation time
653  /// - thread @n Thread id (ie. return value from SYSgetSTID())
654  /// - parmptr @n optional source parameter return value
655  // @{
656  bool evalParameterOrProperty(const char *parm_name,
657  int vec_index,
658  fpreal now,
659  int &value,
660  PRM_Parm **parmptr = NULL) const
661  {
662  return evalParameterOrPropertyT(parm_name,
663  vec_index, now, value, SYSgetSTID(),
664  parmptr);
665  }
666  bool evalParameterOrPropertyT(const char *parm_name,
667  int vec_index,
668  fpreal now,
669  int &value,
670  int thread,
671  PRM_Parm **parmptr=NULL) const;
672  bool evalParameterOrProperty(const char *parm_name,
673  int vec_index,
674  fpreal now,
675  fpreal &values,
676  PRM_Parm **parmptr=NULL) const
677  {
678  return evalParameterOrPropertyT(parm_name,
679  vec_index, now, values, SYSgetSTID(),
680  parmptr);
681  }
682  bool evalParameterOrPropertyT(const char *parm_name,
683  int vec_index,
684  fpreal now,
685  fpreal &values, int thread,
686  PRM_Parm **parmptr=NULL) const;
687  bool evalParameterOrProperty(const char *parm_name,
688  int vec_index,
689  fpreal now,
690  UT_String &value,
691  PRM_Parm **parmptr=NULL) const
692  {
693  return evalParameterOrPropertyT(parm_name,
694  vec_index, now, value, SYSgetSTID(),
695  parmptr);
696  }
697  bool evalParameterOrPropertyT(const char *parm_name,
698  int vec_index,
699  fpreal now,
700  UT_String &value,
701  int thread,
702  PRM_Parm **parmptr=NULL) const;
703  bool evalParameterOrPropertyRaw(const char *parm_name,
704  int vec_index,
705  fpreal now,
706  UT_String &value,
707  PRM_Parm **parmptr=NULL) const
708  {
709  return evalParameterOrPropertyRawT(parm_name,
710  vec_index, now, value, SYSgetSTID(),
711  parmptr);
712  }
713  bool evalParameterOrPropertyRawT(const char *parm_name,
714  int vec_index,
715  fpreal now,
716  UT_String &value,
717  int thread,
718  PRM_Parm **parmptr=NULL) const;
719  bool evalParameterOrPropertyExpr(const char *parm_name,
720  int vec_index,
721  fpreal now,
722  UT_String &value,
723  PRM_Parm **parmptr=NULL) const
724  {
725  return evalParameterOrPropertyExprT(parm_name,
726  vec_index, now, value, SYSgetSTID(),
727  parmptr);
728  }
729  bool evalParameterOrPropertyExprT(const char *parm_name,
730  int vec_index,
731  fpreal now,
732  UT_String &value,
733  int thread,
734  PRM_Parm **parmptr=NULL) const;
735 
736  bool evalVectorProperty(const char *parm_name,
737  fpreal now,
738  int *values,
739  int vec_size,
740  PRM_Parm **parmptr = NULL) const
741  {
742  return evalVectorPropertyT(parm_name,
743  now, values, vec_size, SYSgetSTID(),
744  parmptr);
745  }
746  bool evalVectorPropertyT(const char *parm_name,
747  fpreal now,
748  int *values,
749  int vec_size,
750  int thread,
751  PRM_Parm **parmptr = NULL) const;
752  bool evalVectorProperty(const char *parm_name,
753  fpreal now,
754  fpreal *values,
755  int vec_size,
756  PRM_Parm **parmptr = NULL) const
757  {
758  return evalVectorPropertyT(parm_name,
759  now, values, vec_size, SYSgetSTID(),
760  parmptr);
761  }
762  bool evalVectorPropertyT(const char *parm_name,
763  fpreal now,
764  fpreal *values,
765  int vec_size,
766  int thread,
767  PRM_Parm **parmptr = NULL) const;
768  // @}
769 
770  /// @anchor OP_Node_SetParameters
771 
772  /// @name Setting parameter values
773  ///
774  /// - parmi @n Parameter index
775  /// - parmname @n Parameter name string
776  /// - vectori @n Component index of a parameter
777  /// - t @n Evaluation time
778  /// - value @n Value to set
779  /// - h @n If true, it will set a keyframe if the parameter
780  /// has a channel. If false, then the value will
781  /// need to committed first.
782  // @{
783  void setInt(int parmi, int vectori, fpreal t, exint value);
784  void setInt(const char *parmname, int vectori, fpreal t, exint value);
785  void setInt(const char *parmname, int &parmi, int vectori, fpreal t,
786  exint value);
787  void setFloat(int parmi, int vectori, fpreal t, fpreal value, int h=0);
788  void setFloat(const char *parmname, int vectori, fpreal t, fpreal value,
789  int h=0);
790  void setFloat(const char *parmname, int &parmi, int vectori,
791  fpreal t, fpreal value, int h=0);
792  void setString(const UT_String &val,
793  CH_StringMeaning meaning,
794  int parmi, int vectori,
795  fpreal t);
796  void setString(const UT_String &val,
797  CH_StringMeaning meaning,
798  const char *parmname, int vectori, fpreal t);
799  void setString(const UT_String &val,
800  CH_StringMeaning meaning,
801  const char *parmname,
802  int &parmi, int vectori, fpreal t);
803  void setData(int parmi, int vectori, fpreal t,
804  const PRM_DataItemHandle &val);
805  void setData(const char *parmname, int vectori, fpreal t,
806  const PRM_DataItemHandle &val);
807  void setData(const char *parmname, int &parmi, int vectori, fpreal t,
808  const PRM_DataItemHandle &val);
809  // @}
810 
811  /// @name Setting parameter values, following channel references
812  ///
813  /// These functions will follow simple channel references first, and then
814  /// set the value on the destination parameter.
815  ///
816  /// - pi @n Parameter index
817  /// - pn @n Parameter name string
818  /// - vi @n Component index of a parameter
819  /// - t @n Time at which to set the value
820  /// - val @n Value to set
821  /// - set_key @n If true, it will set a keyframe if the parameter
822  /// has a channel. If false, then the value will
823  /// need to committed first.
824  /// - propagate @n If true, it notify observers
825  /// - thread @n Thread id (ie. return value from SYSgetSTID())
826  // @{
827  void setChRefInt(int pi, int vi, fpreal t, exint val,
828  bool set_key=false,
829  bool propagate=true);
830  void setChRefInt(const char *pn, int vi, fpreal t, exint val,
831  bool set_key=false, bool propagate=true);
832  void setChRefFloat(int pi, int vi, fpreal t, fpreal val,
833  bool set_key=false, bool propagate=true);
834  void setChRefFloat(const char *pn, int vi, fpreal t,
835  fpreal val, bool set_key=false,
836  bool propagate=true);
837  void setChRefString(const UT_String &val,
838  CH_StringMeaning meaning,
839  int pi, int vi,
840  fpreal t, bool set_key=false,
841  bool propagate=true);
842  void setChRefString(int pi, int vi,
843  fpreal t,
844  const UT_String &val,
845  CH_StringMeaning meaning,
846  bool set_key=false, bool propagate=true)
847  {
848  setChRefString(val, meaning, pi, vi, t,
849  set_key, propagate);
850  }
851  void setChRefString(const UT_String &val,
852  CH_StringMeaning meaning,
853  const char *pn,
854  int vi, fpreal t,
855  bool set_key=false,
856  bool propagate=true);
857  void setChRefString(const char *pn,
858  int vi, fpreal t,
859  const UT_String &val,
860  CH_StringMeaning meaning,
861  bool set_key=false,
862  bool propagate=true)
863  {
864  setChRefString(val, meaning, pn, vi, t,
865  set_key, propagate);
866  }
867  // @}
868 
869  /// @name Setting property values
870  ///
871  /// The setParameterOrProperty methods will track down, not only channel
872  /// references, but also property parameter references.
873  /// The bool result indicates whether the parameter was actually set.
874  /// Some possible causes of failure are:
875  /// - Parameter or property not found
876  /// - Permissions error
877  /// - Locked parameter
878  /// - Out of bounds vector index
879  ///
880  /// Parameters:
881  /// - parm_name @n Parameter name string
882  /// - vec_index @n Component index of a parameter
883  /// - now @n Time at which to set the value
884  /// - val @n Value to set
885  /// - set_key @n If true, it will set a keyframe if the parameter
886  /// has a channel. If false, then the value will
887  /// need to committed first.
888  /// - propagate @n If true, it notify observers
889  // @{
890  bool setParameterOrProperty(const char *parm_name,
891  int vec_index,
892  fpreal now,
893  int32 value,
894  bool set_key=false,
895  bool propagate=true);
896  bool setParameterOrProperty(const char *parm_name,
897  int vec_index,
898  fpreal now,
899  int64 value,
900  bool set_key=false,
901  bool propagate=true);
902  bool setParameterOrProperty(const char *parm_name,
903  int vec_index,
904  fpreal now,
905  fpreal value,
906  bool set_key=false,
907  bool propagate=true);
908  bool setParameterOrProperty(const char *parm_name,
909  int vec_index,
910  fpreal now,
911  const char *value,
912  CH_StringMeaning meaning,
913  bool set_key=false,
914  bool propagate=true);
915  // @}
916 
917  /// @name Multi-Parameter evaluation
918  ///
919  /// - name @n Parameter name token
920  /// - inst @n Array of instance indices to evaluate at
921  /// - vectori @n Component index of a parameter
922  /// - t @n Evaluation time
923  /// - nestlevel @n Number of entries in 'inst'
924  /// - value @n Value to set
925  // @{
926  void setIntInst(exint value, const char *parmname,
927  const int *inst, int vectori, fpreal t,
928  int nestlevel = 1);
929  void setFloatInst(fpreal value, const char *parmname,
930  const int *inst, int vectori, fpreal t,
931  int nestlevel = 1);
932  void setStringInst(const UT_String &value,
933  CH_StringMeaning meaning,
934  const char *parmname,
935  const int *inst, int vectori, fpreal t,
936  int nestlevel = 1);
937  void setDataInst(const PRM_DataItemHandle &value,
938  const char *parmname, const int *inst,
939  int vectori, fpreal t, int nestlevel = 1);
940  // @}
941 
942  /// @name Setting parameter values silently
943  ///
944  /// These methods do not trigger additional events to notify observers
945  ///
946  /// - int pi @n Parameter index
947  /// - const char *pn @n Parameter name string
948  /// - int &pi @n Parameter index, returned from 'pn' lookup
949  /// - int vi @n Component index of a parameter
950  /// - fpreal t @n Time at which to set the value
951  /// - value @n Value to set
952  // @{
953  void setSilentInt(int parmi, int vectori, fpreal t,
954  exint value);
955  void setSilentInt(const char *parmname, int vectori,
956  fpreal t, exint value);
957  void setSilentInt(const char *parmname, int &parmi,
958  int vectori, fpreal t,exint value);
959 
960  void setSilentFloat(int parmi, int vectori, fpreal t,
961  fpreal value, int h=0);
962  void setSilentFloat(const char *parmname, int vectori,
963  fpreal t, fpreal value, int h=0);
964  void setSilentFloat(const char *parmname,
965  int &parmi, int vectori,
966  fpreal t, fpreal value, int h=0);
967 
968  void setSilentString(const UT_String &value,
969  CH_StringMeaning meaning,
970  int parmi, int vectori, fpreal t);
971  void setSilentString(const UT_String &value,
972  CH_StringMeaning meaning,
973  const char *parmname, int vectori, fpreal t);
974  void setSilentString(const UT_String &value,
975  CH_StringMeaning meaning,
976  const char *parmname,
977  int &parmi, int vectori, fpreal t);
978  void setSilentData(int parmi, int vectori, fpreal t,
979  const PRM_DataItemHandle &value);
980  void setSilentData(const char *parmname, int vectori,
981  fpreal t, const PRM_DataItemHandle &value);
982  void setSilentData(const char *parmname,
983  int &parmi, int vectori, fpreal t,
984  const PRM_DataItemHandle &value);
985 
986  void setSilentIntInst(exint value, const char *parmname,
987  const int *inst, int vectori,
988  fpreal t, int nestlevel = 1);
989  void setSilentFloatInst(fpreal value, const char *parmname,
990  const int *inst, int vectori,
991  fpreal t, int nestlevel = 1);
992  void setSilentStringInst(const UT_String &value,
993  CH_StringMeaning meaning,
994  const char *parmname,
995  const int *inst, int vectori,
996  fpreal t, int nestlevel = 1);
997  void setSilentDataInst(const PRM_DataItemHandle &value,
998  const char *parmname, const int *inst,
999  int vectori, fpreal t, int nestlevel = 1);
1000  // @}
1001 
1002  CH_StringMeaning getStringMeaning(int pi, int vi, fpreal t) const;
1003  CH_StringMeaning getStringMeaning(const char *pn, int vi,
1004  fpreal t) const;
1005  CH_StringMeaning getStringMeaningInst(const char *name, const int *inst,
1006  int vi, fpreal t, int nest_level = 1) const;
1007 
1008  // Batch setting of parameters. The value stored in the batch list will be
1009  // assigned to the operator/parameter which the parameter was last
1010  // evaluated from. This assumes that the parameter list has actually been
1011  // evaluated. Modifications will be done in block mode.
1012  static void setBatchParms(PRM_BatchList &list, fpreal now,
1013  bool set_key=false,
1014  bool create_channels=false);
1015  static bool canSetBatchParms(PRM_BatchList &list, fpreal now);
1016 
1017  // When a new expression is created it will use the node's expression
1018  // language.
1019  CH_ExprLanguage getExprLanguage() const override;
1020  void setExprLanguage(CH_ExprLanguage language);
1021 
1022  // multiparm manipulation
1023  void insertMultiParmItem(const char *pn, int i);
1024  void removeMultiParmItem(const char *pn, int i);
1025 
1026  /// updateMultiParmFromRamp() will follow simple channel references as
1027  /// necessary
1028  void updateMultiParmFromRamp(fpreal t, const UT_Ramp &ramp,
1029  PRM_Parm &m, bool add_wrap,
1030  bool set_key=false);
1031  void updateRampFromMultiParm(fpreal t, const PRM_Parm &m,
1032  UT_Ramp &ramp, bool *time_dep = NULL,
1033  DEP_MicroNode *depnode = NULL) const;
1034 
1035  // This method converts an obsolete animated parm to a string parm. It
1036  // will create the necessary backticks for expressions. It does not,
1037  // however, support keyframed channel data or multiple-segment channels,
1038  // in which case the evaluated value at the given time is returned.
1039  // It also does not support CHOP overrides.
1040  // When reset_obs is true, the obsolete parameter is reset to factory
1041  // defaults after the expression has been extracted.
1042  // Returns true if successful, and false otherwise. False is returned
1043  // if the obsolete is at the factory default.
1044  bool convertObsAnimatedToStringExpression(
1045  PRM_ParmList *obsolete_parms,
1046  const char *pn, int vi, fpreal t,
1047  UT_String &result, bool reset_obs);
1048 
1049  /// Expand expressions within string value.
1050  ///
1051  /// This method will expand backtick expressions and local/global
1052  /// variables by modifying the input string. Always use this method instead
1053  /// of calling CH_Manager::expandString() directly within node evaluation
1054  /// code paths in order to establish proper node dependencies.
1055  ///
1056  /// @param channel_name Channel name of the parameter from where val
1057  /// was obtained from. This is important for
1058  /// establishing data and time dependencies.
1059  ///
1060  bool expandString(UT_String &val, fpreal t, int thread,
1061  const char *channel_name = 0);
1062 
1063  virtual int findString(const char *str, bool fullword,
1064  bool usewildcards) const;
1065  virtual int changeString(const char *from, const char *to,
1066  bool fullword);
1067 
1068  // These methods check to see if the current value differs from
1069  // the cached ones. The time is the time to evaluate the parm at,
1070  // this does NOT support independent dirty flags for multiple times
1071  // (and likely you wouldn't want that anyways)
1072  // cacheParmValues ONLY saves those who had been tested for dirtiness
1073  //
1074  // NOTE: This is deprecated, please use the override the
1075  // OP_Node::parmListMicroNode() method to detect parm value changes.
1076  //
1077  // This legacy mechanism will cause your parameter to be evaluated
1078  // multiple times per cook.
1079  bool isParmDirty(int idx, fpreal t);
1080  bool isParmDirty(const char *n, fpreal t);
1081  bool isParmDirtyInst(const char *name, const int *inst,
1082  fpreal t, int nestlevel=1);
1083  void cacheParmValues(const OP_Context &context);
1084  void clearParmCache();
1085 
1086  /// Query if a parameter is time dependent, by parm index. If comp == -1,
1087  /// any vector component that is time dependent will return true for the
1088  /// parm.
1089  bool isParmTimeDependent(int idx, int comp = -1) const;
1090 
1091  /// Query if a parameter is time dependent, by parm name. If comp == -1,
1092  /// any vector component that is time dependent will return true for the
1093  /// parm.
1094  bool isParmTimeDependent(const char *name,
1095  int comp = -1) const;
1096 
1097  // error stuff
1098  int getErrorMessages(UT_String &messages,
1100  = UT_ERROR_NONE)
1101  {
1102  ensureErrorsAreUpdatedSubclass();
1103 
1104  OP_Lock::Scope lock(myErrorManagerLock);
1105  stealGlobalErrors();
1106  return myErrorManager.getErrorMessages(messages,
1107  severity);
1108  }
1109 
1110  void getRawErrors(UT_Array<UT_Error> &errors, bool update);
1111 
1112  int findError(const char *type, int code) const
1113  {
1114  OP_Lock::Scope lock(myErrorManagerLock);
1115  return myErrorManager.findError(type, code);
1116  }
1117 
1118  int removeError(int idx)
1119  {
1120  OP_Lock::Scope lock(myErrorManagerLock);
1121  return myErrorManager.removeError(idx);
1122  }
1123 
1125  {
1126  OP_Lock::Scope lock(myErrorManagerLock);
1127  myErrorManager.pruneDuplicates();
1128  }
1129 
1130  void opMessage(int code, const char *m=0) const
1131  { UTaddMessage("OP",code,m);}
1132  void opWarning(int code, const char *m=0) const
1133  { UTaddWarning("OP",code,m);}
1134  void opError(int code, const char *m=0) const
1135  { UTaddError("OP", code, m);}
1136  void opFatal(int code, const char *m=0) const
1137  { UTaddFatal("OP", code, m);}
1138 
1139  void opLocalError(int code, const char *m=0)
1140  {
1141  OP_Lock::Scope lock(myErrorManagerLock);
1142  myErrorManager.addError("OP", code, m);
1143  }
1144  void opLocalWarning(int code, const char *m=0)
1145  {
1146  OP_Lock::Scope lock(myErrorManagerLock);
1147  myErrorManager.addWarning("OP",code,m);
1148  }
1150  {
1151  OP_Lock::Scope lock(myErrorManagerLock);
1152  myErrorManager.addDeadlockError();
1153  }
1154 
1155  /// appendError() adds a generic error *directly* to this node's error
1156  /// manager.
1157  void appendError(const char *type,
1158  int code, const char *m,
1159  UT_ErrorSeverity sev)
1160  {
1161  if (!UTgetErrorManager()->isDisabled())
1162  {
1163  OP_Lock::Scope lock(myErrorManagerLock);
1164  myErrorManager.addGeneric(type, code, m, sev);
1165  }
1166  }
1167 
1168  void clearErrors() // use error(OP_Context&) to avoid querying the current thread id
1169  {
1171  OP_Lock::Scope lock(myErrorManagerLock);
1172  myErrorManager.clearAndDestroyErrors();
1173  }
1174 
1175  void clearErrors(OP_Context &context)
1176  {
1177  UTgetErrorManager(context.getThread())->clearAndDestroyErrors();
1178  OP_Lock::Scope lock(myErrorManagerLock);
1179  myErrorManager.clearAndDestroyErrors();
1180  }
1181 
1182  virtual OP_ERROR getErrorSeverity();
1183 
1184  bool hasDeadlockError() const
1185  {
1186  // We intentionally do NOT lock in this case
1187  return myErrorManager.hasDeadlockError();
1188  }
1189 
1190  virtual OP_ERROR error(OP_Context &context)
1191  {
1192  ensureErrorsAreUpdatedSubclass();
1193 
1194  UT_ErrorManager &mgr = *UTgetErrorManager(context.getThread());
1195  if (mgr.getNumErrors() > 0)
1196  {
1197  stealGlobalErrors();
1198  }
1199  else
1200  {
1201  // Even if we have no errors, we still need to
1202  // update the severity because error logging
1203  // might be disabled.
1204  myErrorManager.updateSeverity(
1205  mgr.getSeverity());
1206  }
1207  return myErrorManager.getSeverity();
1208  }
1209  virtual OP_ERROR error() // use error(OP_Context&) to avoid querying the current thread id
1210  {
1211  ensureErrorsAreUpdatedSubclass();
1212 
1214  if (mgr.getNumErrors() > 0)
1215  {
1216  stealGlobalErrors();
1217  }
1218  else
1219  {
1220  // Even if we have no errors, we still need to
1221  // update the severity because error logging
1222  // might be disabled.
1223  myErrorManager.updateSeverity(
1224  mgr.getSeverity());
1225  }
1226  return myErrorManager.getSeverity();
1227  }
1228  void stealErrors(UT_ErrorManager &src,
1229  bool borrow_only = false);
1230  OP_ERROR getSaveError();
1231  bool isGettingSaveError() const
1232  { return myIsGettingSaveError; }
1233 
1234  // This method should only be called from OP_Channels.
1235  void addChannelError(const char *type, int code,
1236  const char *msg = 0);
1237 
1238  void chChanged(CH_Channel *ch, CH_CHANGE_TYPE reason);
1239 
1240  virtual void saveParmsForUndo(bool scopedOnly = false,
1241  CH_Collection *collection = NULL);
1242  void saveSingleParmForUndo(PRM_Parm *parm);
1243  void saveParmForUndo(PRM_Parm *);
1244  virtual void saveKeyFrameForUndo(CH_Channel *chp, fpreal gtime);
1245 
1246  // Clear any undo flags for the node in question
1247  virtual void clearUndoFlags();
1248  virtual void setAnyUndoFlag();
1249  int getAnyUndoPending() const { return myAnyUndoFlagSet; }
1250 
1251  int canAccess(unsigned mask) const;
1252  bool canAccess(unsigned mask, const PRM_Parm *parm) const;
1253  bool canAccessChannel(uint mask,
1254  const CH_Channel *chp) const;
1255  void updateUserMask();
1256 
1257  bool canModifyFromUI(const PRM_Parm *parm, int vi) const;
1258 
1259  // If an OP references external files, this method should be implemented to
1260  // reload new data which is out of date with the external file. If data
1261  // was re-loaded, then the method should return 1 (otherwise 0).
1262  virtual int reloadNewFiles(fpreal time_now);
1263 
1264  void triggerOPChanged(OP_EventType reason, int index);
1265 
1266  void parmChanged( int parm_index );
1267  void parmExprChanged(int parm_index);
1268 
1269  // This is called when our OP_Operator is deleted before we are.
1270  void operatorDeleted();
1271 
1272  // These functions deal with the opparm command.
1273  void saveParmCommand(std::ostream &os, int values = 0,
1274  int defaultstoo = 1,
1275  bool spareparms = true) const;
1276  int loadParmCommand(int argc, const char *const argv[],
1277  int docallbacks, void *data,
1278  fpreal now, bool followchrefs,
1279  CMD_Args *args);
1280  void commandParmCallback(void *data, fpreal now,
1281  int argc, char *argv[],
1282  CMD_Args *args);
1283  void saveMultiParmInstanceCommand(
1284  std::ostream &os,
1285  const char *opname,
1286  bool spareparms) const;
1287 
1288  // Run the callback function for a particular parm, and the callbacks
1289  // of any parms linked to this parm. This function is implemented in
1290  // OP_Node.
1291  virtual bool triggerParmCallback(PRM_Parm *parmptr, fpreal now,
1292  int value, void *data,
1293  const UT_Options *options = 0) = 0;
1294 
1295  int64 getMemoryUsage(bool inclusive) const override;
1296 
1297  void bumpTakeReference(int dir)
1298  { myTakeReferences += dir; }
1299  int getTakeReferences() const
1300  { return myTakeReferences; }
1301 
1302 
1303  /// This method will create channel groups and populate them with
1304  /// channels from this operator. The channel groups created will
1305  /// correspond to the folders in this operator's parameters.
1306  /// Unless only_channels is specified, all auto-scoped parms will get
1307  /// included.
1308  void createChannelGroupsFromFolders(CH_Group &parent_group,
1309  bool only_channels,
1310  bool leaf_channels_only = false,
1311  bool only_unlocked = true);
1312 
1313  /// Returns a list of the autoscopeable channels for this node.
1314  /// if follow_layer_overrides is true, the channel references are followed but only for animation layers.
1315  /// if include_animated is true, channels without the auto scope flag but with animation will also be returned.
1316  void getAutoScopedChannels(CH_ChannelRefList &chlist,
1317  bool follow_layer_overrides=true,
1318  bool include_animated=false,
1319  bool follow_channel_refs=true,
1320  bool include_autoscope=true
1321  );
1322 
1323  // Returns command to chopscope CHOPed channels for this node.
1324  void getChopScopeChannels(UT_WorkBuffer &chopscope_cmd);
1325 
1326  // Returns true if the specified parameter is visible in the interface
1327  // templates. This accounts for visiblity of containing parm pages
1328  // as well as the parm itself.
1329  bool getParmIsVisible(const char *parmname);
1330 
1331  // Returns a pointer to the templates used in constructing dialogs for
1332  // this node.
1333  const PRM_Template *getInterfaceParmTemplates() const;
1334 
1335  const PRM_Template *getSpareParmTemplates() const;
1336  const PRM_ScriptImports *getSpareParmTemplateImports() const;
1337  const PRM_Template *getSpareParmLayoutTemplates() const;
1338  const PRM_ScriptImports *getSpareParmLayoutTemplateImports() const;
1339  int getSpareParmTemplatesId() const;
1340 
1341  /// The number of potential spare inputs created by spare
1342  /// parameters. These are spare_input0 and onwards. There may be holes.
1343  int numSpareInputs() const;
1344 
1345  // Get our multiparm instance info used by initMultiparmInstance.
1346  bool hasMultiparmInfo() const;
1347  OP_MultiparmInfo &getMultiparmInfo();
1348 
1349  // This function is caled when any multiparm has a new instance added.
1350  // It gives the parm owner a chance to initialize the multiparm values.
1351  void initMultiparmInstance(UT_ValArray<PRM_Parm *> &parms) override;
1352  // This function sends an opChanged notification of our multiparm change.
1353  void addOrRemoveMultiparmInstance() override;
1354 
1355  bool savePresetContents(std::ostream &os) override;
1356  bool loadPresetContents(const char *tok, UT_IStream &is) override;
1357 
1358  static void buildMParmInst(const PRM_Template *templates,
1359  UT_StringArray &mparm_inst,
1360  UT_IntArray &mparm_lvl,
1361  int level);
1362  static bool isMParmInstance(const char *chname,
1363  const UT_StringArray &mparm_inst,
1364  const UT_IntArray &mparm_lvl);
1365 
1366  // Retrieve Animation Layers from a Scoped Channel List
1367  static void getLayersFromScopedChannels(
1368  const CH_ChannelRefList &ori_refs,
1369  CH_ChannelRefList &layer_refs );
1370 
1371 protected:
1372  virtual void doGetFullPath(UT_WorkBuffer &str) const override;
1373 
1374  // Uses the specified conditional stored on the PRM_Template for the
1375  // specified parameter to check whether the specified parm should
1376  // be updated based on the conditional. Returns false if the parm state
1377  // doesn't change.
1378  bool updateParmDisableConditional(
1379  PRM_Parm &parm,
1380  bool force,
1381  const UT_StringArray *skip = 0);
1382 
1383  bool updateParmHideConditional(
1384  PRM_Parm &parm,
1385  const UT_StringArray *skip = 0);
1386 
1387 
1388  // Returns zero if no change was made. This function is overridden
1389  // by subclasses to disable parms specific to those nodes.
1390  // NOTE: Superseded by the updateParmsFlags() function.
1391  SYS_DEPRECATED(12.0)
1392  virtual unsigned disableParms();
1393 
1394  // This function is overridden by subclasses to update parm flags specific
1395  // to those nodes.
1396  // Returns false if no change was made.
1397  virtual bool updateParmsFlags() { return false; }
1398 
1399 
1400  void saveMultiParmForUndo(int index);
1401 
1402  void stealGlobalErrors();
1403  void stealErrors(OP_Parameters &src);
1404 
1405  // NOTE: Do not hold onto the ptr object longer than necessary!
1408  {
1410  myErrorManager, myErrorManagerLock);
1411  }
1412 
1413  virtual void permissionError(const char *chname = 0);
1414 
1415  // checkExpressionError() is split up into a checking part and an actual
1416  // error handling part, evaluationError() so that the checking part can
1417  // be inlined.
1419  const PRM_Parm *parm, int thread) const
1420  {
1421  int err = ev_GetErrNo(thread);
1422  if (err == EV_NOERROR)
1423  return false;
1424  evaluationError(parm, err, thread);
1425  return true;
1426  }
1427 
1428  void resetParmEventHandler();
1429 
1430  int *allocIndirect(int size=64);
1431 
1432  OP_Parameters(const char *name, OP_Operator *entry);
1433  OP_Parameters(const OP_Parameters &source, const char *name);
1434  virtual ~OP_Parameters();
1435 
1436  //
1437  // The "initializeParms" method must be called to provide the channel
1438  // collection and build the parameter list.
1439  //
1440  void initializeParms(OP_Channels *channels);
1441 
1442  // op dependencies
1443  virtual void buildOpDependencies()
1444  { }
1445  virtual void checkChannelDependencies(CH_Channel * /*ch*/,
1446  CH_CHANGE_TYPE /*reason*/)
1447  { }
1448 
1449  static bool isReservedOpName(const char *name);
1450 
1451  int rename(const char *newname);
1452  virtual bool createSpareParameterFromChannel(const char *chname);
1453  virtual bool createSpareParametersFromChannels(
1454  UT_BitArray &selection,
1455  const CH_ChannelList &channels);
1456 
1457  CH_LocalVariable *getVariable(int i) const;
1458  CH_LocalVariable *getVariable(const char *name) const;
1459 
1460  //
1461  //
1462  OP_ERROR saveChannels(std::ostream &os, int binary,
1463  bool compiled, int selected);
1464  OP_ERROR saveParmChannels(int parm_index, std::ostream &os,
1465  int binary, bool compiled);
1466  OP_ERROR saveParameters(std::ostream &os, int binary,
1467  bool compiled);
1468  OP_ERROR saveChannelAliases(std::ostream &os, int binary);
1469 
1470  bool loadChannels(UT_IStream &is, const char *path,
1471  CH_Collection *obsolete_channels);
1472  bool loadParameters(UT_IStream &is, const char *path,
1473  PRM_ParmList *obsolete_parms);
1474  bool loadChannelAliases(UT_IStream &is, const char *path=0);
1475  bool loadOldSpareParms(UT_IStream &is);
1476 
1477  // Allow our sub-class to be notified when something gets changed
1478  // Since the parameter only holds the name & the parameters, there
1479  // are only two types of events generated here...
1480  virtual void opChanged(OP_EventType type, void *dataptr = 0) = 0;
1481 
1482  /// This is a helper method to the setChannelScope method. It traverses
1483  /// the node's parameters and sets the scope on them according to the
1484  /// given pattern.
1485  virtual void traverseScope(const char *pattern, OP_ScopeOp scope_op,
1486  const OP_ScopeOptions &scope_options);
1487 
1488  // A virtual method to get access to the associated node flag. This would
1489  // probably be unnecessary if myTakeReferences were used.
1490  virtual int getHasTakeData() const { return 0 ;}
1491 
1492  /// Ensure that the node errors are up-to-date.
1493  /// This method gives our subclass a chance to insert any errors on-demand.
1495 
1496  /// Ensure that the spare parameter templates are up-to-date.
1497  /// This method gives our subclass a chance to update the spare parameters
1498  /// on-the-fly before returning them.
1500 
1503 
1504 private:
1505  // evaluationError() generates the appropriate call to opError() and then
1506  // clears the expression error state.
1507  void evaluationError(const PRM_Parm *parm, int err,
1508  int thread) const;
1509 
1510  // these methods are the actual instantiation of the set... and
1511  // setSilent... methods.
1512  void setFullInt(int parmi, int vectori, fpreal t,
1513  exint value, bool p);
1514  void setFullInt(const char *parmname, int vectori, fpreal t,
1515  exint value, bool p);
1516  void setFullInt(const char *parmname, int &parmi,
1517  int vectori, fpreal t, exint value, bool p);
1518 
1519 
1520  void setFullFloat(int pi, int vi, fpreal t, fpreal val,
1521  bool set_key, bool propagate);
1522  void setFullFloat(const char *pn, int vi, fpreal t,
1523  fpreal val, bool set_key, bool propagate);
1524  void setFullFloat(const char *pn, int &pi, int vi,
1525  fpreal t, fpreal val,
1526  bool set_key, bool propagate);
1527 
1528  void setFullString(const UT_String &val,
1529  CH_StringMeaning meaning, int pi, int vi,
1530  fpreal t, bool ppropagate);
1531  void setFullString(const UT_String &val,
1532  CH_StringMeaning meaning,
1533  const char *pn,
1534  int vi, fpreal t, bool propagate);
1535  void setFullString(const UT_String &val,
1536  CH_StringMeaning meaning,
1537  const char *pn,
1538  int &pi, int vi, fpreal t,
1539  bool propagate);
1540 
1541  void setFullData(int pi, int vi, fpreal t,
1542  const PRM_DataItemHandle &val, bool p);
1543  void setFullData(const char *pn, int vi, fpreal t,
1544  const PRM_DataItemHandle &val, bool p);
1545  void setFullData(const char *pn, int &pi, int vi, fpreal t,
1546  const PRM_DataItemHandle &val, bool p);
1547 
1548  void setFullIntInst(exint value, const char *parmname,
1549  const int *inst, int vectori, fpreal t,
1550  int nestlevel, bool propagate);
1551  void setFullFloatInst(fpreal val, const char *name,
1552  const int *inst, int vi, fpreal t,
1553  int nestlevel, bool propagate);
1554  void setFullStringInst(const UT_String &val,
1555  CH_StringMeaning meaning,
1556  const char *name,
1557  const int *inst, int vi, fpreal t,
1558  int nestlevel, bool propagate);
1559  void setFullDataInst(const PRM_DataItemHandle &val,
1560  const char *name, const int *inst,
1561  int vi, fpreal t, int nestlevel,
1562  bool propagate);
1563 
1564  // Set values given a parameter pointer (rather than a lookup index).
1565  // These all take set_key and propagate parameters.
1566  bool setFull(PRM_Parm &parm, int vectori, fpreal now,
1567  exint value, bool set_key, bool propgate);
1568  bool setFull(PRM_Parm &parm, int vectori, fpreal now,
1569  fpreal val, bool set_key, bool propgate);
1570  bool setFull(PRM_Parm &parm, int vectori, fpreal now,
1571  const char *value,
1572  CH_StringMeaning meaning,
1573  bool set_key, bool propgate);
1574  bool setFull(PRM_Parm &parm, int vectori, fpreal now,
1575  const PRM_DataItemHandle &val, bool set_key,
1576  bool propgate);
1577 
1578  bool determineParmVisibility(const char *parmname,
1579  const PRM_Template *prm,
1580  bool &visible);
1581 
1582  // Event handler
1583  static void changeEvent(void *, CH_CHANGE_TYPE, int);
1584 
1585  static void addLayerFromScopedChannels(
1586  const UT_String &path,
1587  CH_ChannelRefList &chanrefs,
1588  UT_StringSet &scoped_layers);
1589 
1590  mutable OP_Lock myErrorManagerLock;
1591  UT_ErrorManager myErrorManager;
1592 
1593  UT_String myName;
1594  OP_Operator *myTableEntry;
1595  uint myTakeReferences;
1596 
1597  unsigned myUndoAllParmSavedFlag:1,
1598  myUndoScopedSavedFlag:1,
1599  myAnyUndoFlagSet:1,
1600  myIsGettingSaveError:1;
1601 
1602  OP_ParmCache *myParmCache;
1603 
1604  OP_SpareParms *mySpareParms;
1605  bool myChangingSpareParms;
1606 
1607  OP_MultiparmInfo *myMultiparmInfo;
1608 
1609  friend class OP_TakeParm;
1610  friend class OP_UndoParm;
1611  friend class OP_UndoSpareParm;
1612 };
1613 
1614 // helper functions
1615 
1616 OP_API PRM_Parm *OPgetParameterFromChannel( CH_Channel *chp, int *vecidx );
1618 OP_API void OPsaveChannelsForUndo( const CH_ChannelList &channels );
1620 
1621 #endif
OP_API void OPtakeAutoActivateChannel(CH_Channel *chp)
UT_ErrorSeverity getSeverity()
#define EV_NOERROR
Definition: EX_Error.h:18
void evalFloats(const char *pn, int *pi, fpreal64 *v, fpreal t) const
void evalJSONMapRaw(UT_JSONValueMap &val, int pi, int vi, fpreal t) const
UT_JSONValueMap stores a map/dictionary of UT_JSONValue objects.
void takeDeactivateParm(PRM_Parm *parm)
#define SYS_DEPRECATED(__V__)
virtual OP_ERROR error()
virtual int64 getMemoryUsage(bool inclusive) const
virtual void checkChannelDependencies(CH_Channel *, CH_CHANGE_TYPE)
const UT_String & getName() const
CH_ExprLanguage
fpreal evalFloatInst(const char *name, const int *inst, int vi, fpreal t, int nestlevel=1) const
void opWarning(int code, const char *m=0) const
void skip(T &in, int n)
Definition: ImfXdr.h:885
CH_StringMeaning
void evalStringRaw(UT_String &val, const char *pn, int vi, fpreal t) const
bool evalVectorProperty(const char *parm_name, fpreal now, fpreal *values, int vec_size, PRM_Parm **parmptr=NULL) const
const GLdouble * v
Definition: glcorearb.h:836
int getAnyUndoPending() const
IMF_EXPORT IMATH_NAMESPACE::V3f direction(const IMATH_NAMESPACE::Box2i &dataWindow, const IMATH_NAMESPACE::V2f &pixelPosition)
void evalJSONMapRaw(UT_JSONValueMap &val, const char *pn, int *pi, int vi, fpreal t) const
UT_API UT_ErrorSeverity UTaddFatal(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
void evalJSONMap(UT_JSONValueMap &val, const PRM_Parm *parm, int vi, fpreal t) const
const GLuint GLenum const void * binary
Definition: glcorearb.h:1923
GLsizei const GLchar *const * path
Definition: glcorearb.h:3340
GLint level
Definition: glcorearb.h:107
fpreal evalFloat(int pi, int vi, fpreal t) const
GLint GLuint mask
Definition: glcorearb.h:123
UT_ErrorSeverity
Definition: UT_Error.h:25
SYS_FORCE_INLINE bool checkExpressionError(const PRM_Parm *parm, int thread) const
UT_API UT_ErrorManager * UTgetErrorManager()
void evalJSONMapRaw(UT_JSONValueMap &val, const PRM_Parm *parm, int vi, fpreal t) const
void evalJSONMap(UT_JSONValueMap &val, const char *pn, int vi, fpreal t) const
exint evalInt(const char *pn, int *pi, int vi, fpreal t) const
void opLocalDeadlockError()
void appendError(const char *type, int code, const char *m, UT_ErrorSeverity sev)
bool evalParameterOrProperty(const char *parm_name, int vec_index, fpreal now, UT_String &value, PRM_Parm **parmptr=NULL) const
UT_API UT_ErrorSeverity UTaddMessage(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
bool isGettingSaveError() const
PRM_DataItemHandle evalData(const char *pn, int *pi, int vi, fpreal t) const
void takeDeactivateParm(const char *name)
void clearErrors(OP_Context &context)
png_uint_32 i
Definition: png.h:2877
void bumpTakeReference(int dir)
OP_Channels * getChannels(void) const
exint evalInt(const char *pn, int vi, fpreal t) const
GLsizeiptr size
Definition: glcorearb.h:663
void setChRefString(const char *pn, int vi, fpreal t, const UT_String &val, CH_StringMeaning meaning, bool set_key=false, bool propagate=true)
virtual void takeAutoActivateParm(PRM_Parm *)=0
void clearDuplicateErrors()
virtual OP_ERROR error(OP_Context &context)
exint evalInt(const PRM_Parm *parm, int vi, fpreal t) const
void evalJSONMap(UT_JSONValueMap &val, const char *pn, int *pi, int vi, fpreal t) const
PRM_DataItemHandle evalData(const PRM_Parm *parm, int vi, fpreal t) const
PRM_Parm & getParm(int i)
long long int64
Definition: SYS_Types.h:100
PRM_DataItemHandle evalDataInst(const char *name, const int *inst, int vi, fpreal t, int nestlevel=1) const
virtual bool savePresetContents(std::ostream &os)=0
GLdouble n
Definition: glcorearb.h:2007
fpreal evalFloat(const PRM_Parm *parm, int vi, fpreal t) const
void opLocalError(int code, const char *m=0)
CH_CHANGE_TYPE
void evalFloatsInst(const char *name, const int *inst, fpreal64 *v, fpreal t, int nestlevel=1) const
void evalString(UT_String &val, const PRM_Parm *parm, int vi, fpreal t) const
GLint ref
Definition: glcorearb.h:123
PRM_Parm * getParmPtr(const UT_StringRef &name)
int64 exint
Definition: SYS_Types.h:109
void evalString(UT_String &val, int pi, int vi, fpreal t) const
void evalFloats(int pi, fpreal64 *v, fpreal t) const
PRM_ChanState
Definition: PRM_ChanState.h:14
double fpreal64
Definition: SYS_Types.h:185
const PRM_Parm & getParm(int i) const
bool getParameterOrPropertyConst(const char *name, fpreal now, OP_Node *&op, PRM_Parm *&parm, PRM_ParmList *obsolete) const
bool myScopedRelatedLayers
Definition: OP_Parameters.h:93
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
void evalJSONMap(UT_JSONValueMap &val, int pi, int vi, fpreal t) const
GLsizei GLsizei GLchar * source
Definition: glcorearb.h:802
bool hasParm(const char *name) const
virtual void resolveAndDeleteObsoleteParmList(PRM_ParmList *&obsolete_parms)=0
bool hasDeadlockError() const
OP_Channels * myChannels
GLenum GLsizei GLsizei GLint * values
Definition: glcorearb.h:1601
GLenum GLenum severity
Definition: glcorearb.h:2538
GLboolean * data
Definition: glcorearb.h:130
virtual CH_ExprLanguage getExprLanguage() const =0
void evalStringInst(const char *name, const int *inst, UT_String &val, int vi, fpreal t, int nestlevel=1) const
GLuint const GLchar * name
Definition: glcorearb.h:785
virtual void buildOpDependencies()
int int32
Definition: SYS_Types.h:28
bool myIncludeOnlyNonIntKeys
Definition: OP_Parameters.h:92
bool getIsChangingSpareParms() const
PRM_DataItemHandle evalData(int pi, int vi, fpreal t) const
virtual void addOrRemoveMultiparmInstance()=0
int removeError(int idx)
unsigned int uint
Definition: SYS_Types.h:33
void evalStringRaw(UT_String &val, int pi, int vi, fpreal t) const
int findError(const char *type, int code) const
OP_FollowChanRefsOptions(fpreal t)
Definition: OP_Parameters.h:99
PRM_ChanState isAtKey(fpreal t) const
virtual void ensureErrorsAreUpdatedSubclass()
static void followChannelReferences(const OP_FollowChanRefsOptions &opt, OP_Node *&newop, PRM_Parm *&newparm, int &newvecidx)
bool evalParameterOrPropertyRaw(const char *parm_name, int vec_index, fpreal now, UT_String &value, PRM_Parm **parmptr=NULL) const
virtual void ensureSpareParmsAreUpdatedSubclass()
PRM_DataItemHandle evalData(const char *pn, int vi, fpreal t) const
fpreal evalFloat(const char *pn, int *pi, int vi, fpreal t) const
void evalStringRaw(UT_String &val, const PRM_Parm *parm, int vi, fpreal t) const
void clearAndDestroyErrors()
GLfloat GLfloat GLfloat GLfloat h
Definition: glcorearb.h:2001
PRM_Parm & getParm(const char *name)
GLsizei const GLfloat * value
Definition: glcorearb.h:823
double fpreal
Definition: SYS_Types.h:263
A map of string to various well defined value types.
Definition: UT_Options.h:42
void opLocalWarning(int code, const char *m=0)
SYS_API int SYSgetSTID()
void evalStringInstRaw(const char *name, const int *inst, UT_String &val, int vi, fpreal t, int nestlevel=1) const
virtual void resolveObsoleteParms(PRM_ParmList *)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
#define OP_API
Definition: OP_API.h:10
GLuint index
Definition: glcorearb.h:785
const PRM_Parm & getParm(const char *name) const
void evalFloats(const char *pn, fpreal64 *v, fpreal t) const
OP_ScopeOptions(bool allow_nonchannels, bool exclude_animated, bool exclude_constant, bool include_only_nonint_keys, bool scoped_related_layers)
Definition: OP_Parameters.h:80
OP_API void OPsaveChannelForUndo(CH_Channel *chp)
void evalString(UT_String &val, const char *pn, int *pi, int vi, fpreal t) const
OP_API PRM_Parm * OPgetParameterFromChannel(CH_Channel *chp, int *vecidx)
void setChRefString(int pi, int vi, fpreal t, const UT_String &val, CH_StringMeaning meaning, bool set_key=false, bool propagate=true)
void evalFloats(const PRM_Parm *parm, fpreal64 *v, fpreal t) const
UT_API UT_ErrorSeverity UTaddWarning(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
virtual bool loadPresetContents(const char *token, UT_IStream &is)=0
GLuint GLfloat * val
Definition: glcorearb.h:1607
virtual void initMultiparmInstance(UT_ValArray< PRM_Parm * > &p)=0
void opMessage(int code, const char *m=0) const
OP_EventType
Definition: OP_Value.h:22
A global error manager scope.
const OP_Stat & getStat() const
static bool followChannelReferencesOneStep(const OP_FollowChanRefsOptions &opt, OP_Node *&newop, PRM_Parm *&newparm, int &newvecidx)
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
void takeDeactivateParm(uint idx)
int getErrorMessages(UT_String &messages, UT_ErrorSeverity severity=UT_ERROR_NONE)
bool evalParameterOrPropertyExpr(const char *parm_name, int vec_index, fpreal now, UT_String &value, PRM_Parm **parmptr=NULL) const
void evalString(UT_String &val, const char *pn, int vi, fpreal t) const
exint evalInt(int pi, int vi, fpreal t) const
bool evalParameterOrProperty(const char *parm_name, int vec_index, fpreal now, fpreal &values, PRM_Parm **parmptr=NULL) const
OP_API void OPsaveChannelsForUndo(const CH_ChannelList &channels)
virtual void syncNodeVersion(const char *old_version, const char *current_version, bool *node_deleted)
virtual void doGetFullPath(UT_WorkBuffer &buf) const =0
Compute the full path of the node.
OP_Operator * getOperator() const
void opError(int code, const char *m=0) const
const PRM_Parm * getParmPtr(const UT_StringRef &name) const
void evalStringRaw(UT_String &val, const char *pn, int *pi, int vi, fpreal t) const
OP_ScopeOp
Definition: OP_Parameters.h:56
int getThread() const
Definition: OP_Context.h:50
exint evalIntInst(const char *name, const int *inst, int vi, fpreal t, int nestlevel=1) const
float fpreal32
Definition: SYS_Types.h:184
UT_LockedRawPtr< UT_ErrorManager, OP_Lock > getLockedErrorManager()
int getNumErrors() const
void evalJSONMapRaw(UT_JSONValueMap &val, const char *pn, int vi, fpreal t) const
bool evalVectorProperty(const char *parm_name, fpreal now, int *values, int vec_size, PRM_Parm **parmptr=NULL) const
int getTakeReferences() const
static void followChannelReferences(const OP_FollowChanRefsOptions &opt, CH_ChannelRef &ref)
virtual int getHasTakeData() const
Definition: OP_PostIt.h:34
UT_API UT_ErrorSeverity UTaddError(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
void opFatal(int code, const char *m=0) const
virtual PRM_ParmList * createObsoleteParmList()=0
fpreal evalFloat(const char *pn, int vi, fpreal t) const
GLenum src
Definition: glcorearb.h:1792
bool evalParameterOrProperty(const char *parm_name, int vec_index, fpreal now, int &value, PRM_Parm **parmptr=NULL) const
OP_Stat & getStat()