HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CHOP_Node.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: CHOP Library (C++)
7  *
8  * COMMENTS: The base class for all Channel Operators
9  *
10  */
11 
12 #ifndef __CHOP_Node_h__
13 #define __CHOP_Node_h__
14 
15 #include "CHOP_API.h"
16 #include "CHOP_Error.h"
17 #include "CHOP_Notes.h"
18 #include "CHOP_Types.h"
19 #include "PRM_ChopShared.h"
20 
22 #include <OP/OP_Network.h>
23 #include <OP/OP_Node.h>
24 #include <PRM/PRM_Parm.h>
25 
26 #include <CL/CL_Clip.h>
27 #include <CL/CL_Defines.h>
28 
29 #include <UT/UT_Array.h>
30 #include <UT/UT_ExpandArray.h>
31 #include <UT/UT_NTStreamUtil.h>
32 #include <UT/UT_StringHolder.h>
33 #include <UT/UT_ValArray.h>
34 
35 
36 #define CHOP_AUDIO_FLAG 'a'
37 #define CHOP_EXPORT_FLAG 'o'
38 
39 class OP_OperatorTable;
40 class OP_TemplatePair;
41 class OP_VariablePair;
42 class OP_OutputCodeParms;
43 class CHOP_Handle;
44 class CHOP_HandleData;
45 class CHOP_Fitter;
46 class CL_FitParms;
47 class OR_Mapping;
48 class orPath;
49 class UT_OStream;
50 
51 typedef void (*CHOP_ReplaceCallback)(void *data, int replace);
52 
53 typedef void (*CHOP_ConflictCallback)(void *data,
54  void *ldata, CHOP_ReplaceCallback func,
55  const char *source, const char *dest);
56 
57 extern "C" {
59 };
60 
61 #define CHOP_PARM_COUNT (8)
62 #define CHOP_TAB "Common"
63 #define NONE_TOKEN "none"
64 
65 #define CHOP_OUT_CFUNC "_updateCParam"
66 #define CHOP_OUT_IFUNC "_updateIParam"
67 
68 #define CHOP_OUT_CPARAM "params.cUpdate"
69 #define CHOP_OUT_IPARAM "params.iUpdate"
70 
71 
72 #define CHOP_SWITCHER(cnt, nm) \
73  static PRM_Default switcher[2] = \
74  { \
75  PRM_Default(cnt, nm), \
76  PRM_Default(CHOP_PARM_COUNT, CHOP_TAB), \
77  }
78 
79 #define CHOP_SWITCHER2(cnt1,nm1,cnt2, nm2) \
80  static PRM_Default switcher[3] = \
81  { \
82  PRM_Default(cnt1, nm1), \
83  PRM_Default(cnt2, nm2), \
84  PRM_Default(CHOP_PARM_COUNT, CHOP_TAB), \
85  }
86 
87 #define CHOP_SWITCHER3(cnt1,nm1,cnt2, nm2,cnt3,nm3) \
88  static PRM_Default switcher[4] = \
89  { \
90  PRM_Default(cnt1, nm1), \
91  PRM_Default(cnt2, nm2), \
92  PRM_Default(cnt3, nm3), \
93  PRM_Default(CHOP_PARM_COUNT, CHOP_TAB), \
94  }
95 
96 #define CHOP_SWITCHER4(cnt1,nm1,cnt2, nm2,cnt3,nm3,cnt4,nm4) \
97  static PRM_Default switcher[5] = \
98  { \
99  PRM_Default(cnt1, nm1), \
100  PRM_Default(cnt2, nm2), \
101  PRM_Default(cnt3, nm3), \
102  PRM_Default(cnt4, nm4), \
103  PRM_Default(CHOP_PARM_COUNT, CHOP_TAB), \
104  }
105 
106 #define CHOP_SWITCHER5(cnt1,nm1,cnt2, nm2,cnt3,nm3,cnt4,nm4,cnt5,nm5) \
107  static PRM_Default switcher[6] = \
108  { \
109  PRM_Default(cnt1, nm1), \
110  PRM_Default(cnt2, nm2), \
111  PRM_Default(cnt3, nm3), \
112  PRM_Default(cnt4, nm4), \
113  PRM_Default(cnt5, nm5), \
114  PRM_Default(CHOP_PARM_COUNT, CHOP_TAB), \
115  }
116 
117 #define CHOP_SWITCHER6(cnt1,nm1,cnt2, nm2,cnt3,nm3,cnt4,nm4,cnt5,nm5,cnt6,nm6) \
118  static PRM_Default switcher[7] = \
119  { \
120  PRM_Default(cnt1, nm1), \
121  PRM_Default(cnt2, nm2), \
122  PRM_Default(cnt3, nm3), \
123  PRM_Default(cnt4, nm4), \
124  PRM_Default(cnt5, nm5), \
125  PRM_Default(cnt6, nm6), \
126  PRM_Default(CHOP_PARM_COUNT, CHOP_TAB), \
127  }
128 
133 
134 #define ARG_CHOP_SCOPE (myParmCommonBase + 0)
135 #define ARG_CHOP_MATCH (myParmCommonBase + 1)
136 #define ARG_CHOP_UNITS (myParmCommonBase + 2)
137 #define ARG_CHOP_REALTIME (myParmCommonBase + 3)
138 #define ARG_CHOP_UNLOAD (myParmCommonBase + 4)
139 #define ARG_CHOP_EXPORT_PATH (myParmCommonBase + 5)
140 #define ARG_CHOP_DCOLOR (myParmCommonBase + 6)
141 #define ARG_CHOP_COLSTEP (myParmCommonBase + 7)
142 
143 //___________________________________________________________________________
144 
146 {
147 public:
148 
149  virtual const char *getChildType() const;
150  virtual const char *getOpType() const;
151 
152  virtual OP_OpTypeId getChildTypeID() const;
153  virtual OP_OpTypeId getOpTypeID() const;
154  static const char *theChildTableName;
155 
156  virtual OP_DataType getCookedDataType() const;
157  static void buildOperatorTable(OP_OperatorTable &table);
158 
161  static PRM_Template myTemplateList[];
162  static CH_LocalVariable myVariableList[];
163 
164  virtual int getAudio() const;
165  virtual int getExport() const;
166  virtual int setAudio(int on_off);
167  virtual int setExport(int on_off);
168 
169  // CHOP networks need some logic to switch between using
170  // output nodes, output flag nodes nodes. This function can
171  // also be used to just return the Output CHOPs by passing false to
172  // "fallback_to_flag".
173  CHOP_Node *getOutputChop(int outputidx,
174  bool fallback_to_flag = true);
175 
176  //
177  // cooking methods
178  //
179 
180  virtual OP_ERROR cookMyChop(OP_Context &context) = 0;
181  virtual void cookMyHandles(OP_Context &context);
182  CHOP_HandleList *getHandles(OP_Context &context);
183 
184  // cooked data access
185  virtual const CL_Clip *getClip(OP_Context *context = 0);
186  virtual const CL_Clip *getClipOutput(int outputidx, OP_Context *context = 0, OP_Node *add_interest=0);
187 
188  // Sets the CL_Clip instance. Should only be done on locked nodes.
189  void setClip(CL_Clip *clip);
190 
191  virtual int64 getMemoryUsage(bool inclusive) const;
192  const CL_Clip *inputClip(int idx, OP_Context &context);
193  CL_Track *getTrack(const char *name); // doesn't cook
194  CL_Track *getTrack(int idx); // doesn't cook
195  fpreal getSampleRate();
196 
197  UT_Color getChopColor(unsigned int index = 0, const CL_Clip *clip=nullptr ) const;
198 
199  virtual CH_Channel *getTrackChannel(const char *name);
200 
201  // Do global expansion on a pattern, and get a track list, and
202  // corresponding node list of track owners.
203  // If dependent given, addExtraInputs.
204  void globTracks(const char *pattern,
205  CL_TrackListC *tlist,
206  UT_ValArray<OP_Node *> *olist = 0,
207  OP_GlobContext *context = 0,
208  int do_cook = 0,
209  fpreal t = 0,
210  OP_Node *dependent = 0);
211 
212  //
213  // return the application frame rate
214  //
215 
216  static fpreal getGlobalRate(void);
217 
218  static fpreal getGlobalStart();
219  static fpreal getGlobalEnd();
220 
221  static fpreal getGlobalSampleStep();
222 
223 
224  //
225  // This method is called whenever a guide handle has been dragged
226  virtual fpreal handleChanged(CHOP_Handle *handle,
228 
229  //
230  // Notes interface
231  int putNote(fpreal t, const char *);
232  int putNote(fpreal t, int index);
233  int putNote(int index, const char *);
234 
235  const char *getNote(fpreal t0) const;
236  const char *getNote(int index) const;
237  int getNotes(fpreal t0, fpreal t1,
238  CHOP_NoteList &clist,
239  CHOP_TimeList &tlist) const;
240 
241  // Edit interface
242  OP_Channels *getFitData();
243  void resampleFromFit();
244  void setFitParms(const CL_FitParms &parms);
245  void getFitParms(CL_FitParms &parms) const;
246 
247  // This function will copy the fit channels to the
248  // destination node channels
249  int copyFitChannels();
250 
251 
252  // Error & Warning reporting
253  static void addError(int code, const char *msg = 0)
254  { UTaddError("CHOP", code, msg);}
255 
256  static void addWarning(int code, const char *msg=0)
257  { UTaddWarning("CHOP", code, msg);}
258 
259  // Returns true if matching condition is not met for source1
260  // and false otherwise
261  static bool hasChannelMatchFailure(PRM_Match match_by,
262  PRM_MatchFailure match_failure, const CL_Clip * source1,
263  const char *name1, const CL_Clip * source2, const char *name2);
264 
265  // An external hook to notify the user of export conflicts
267  void *data)
268  {
269  theConflictCallback = func;
270  theConflictData = data;
271  }
272 
273  // Set a string pattern for conflict resolution
275  {
276  pattern = theConflictResolvePattern;
277  }
278 
279  // Set a string pattern for conflict resolution
280  static void setConflictResolvePattern(const char *pattern)
281  {
282  theConflictResolvePattern = pattern;
283  }
284 
285  // Extra flags
286  virtual int setFlag(char flag, int onoff);
287 
288  // method to direct-manip the start of an ancestor from
289  // a descendants handle
290  virtual fpreal shiftStart(fpreal new_offset, fpreal t);
291 
292  //
293  // must maintain overriding whether or not its being displayed
294  // or referenced
295  virtual void opChanged(OP_EventType reason, void *data=0);
296 
297  // Overriden by the Realtime CHOPs.
298  virtual int usesRealtime() { return 0; }
299  virtual int isRealtimeCook() { return 0; }
300  virtual OP_ERROR doCookRealtime(OP_Context &context);
301 
302  virtual void realtimeInit(fpreal t);
303  virtual void realtimeCleanup();
304 
305  // returns true if a range has been modified, plus that range.
306  virtual int getModifiedRange(int &first,int &last,int clear=1);
307 
308  static void installCommands();
309 
310  // For realtime: only called by the maxslice command.
311  static void setMaxSliceSize(fpreal size) { myMaxRealtimeSlice = size; }
312  static fpreal getMaxSliceSize() { return myMaxRealtimeSlice; }
313  static void setTimeSliceDefault(int state) { myTimeSliceDefault = state; }
314  static int getTimeSliceDefault() { return myTimeSliceDefault; }
315 
316  static void setSmartCook(int f) { mySmartCookFlag = f; }
317  static int getSmartCook() { return mySmartCookFlag; }
318 
319  //
320  // Menu building routines
321  //
322 
323  static void buildEditorMenu(
324  void *, PRM_Name *, int,
325  const PRM_SpareData *, const PRM_Parm *);
326  static void buildNetMenu(
327  void *, PRM_Name *, int,
328  const PRM_SpareData *, const PRM_Parm *);
329  static void buildNodeMenu(
330  void *, PRM_Name *, int,
331  const PRM_SpareData *, const PRM_Parm *);
332 
333  //
334  // Limit the number of lines generated in our info methods.
335  //
336 
337  bool limitInfo() const
338  { return myLimitInfo; }
339  void setLimitInfo(bool limit_info)
340  { myLimitInfo = limit_info; }
341 
342  // export mapping techniques
343  //
344  virtual void setMapping(int idx, int type, const char *label = 0);
345  virtual int getMapping(int idx, const char *&label) const;
346 
347  virtual void getNodeSpecificInfoText(OP_Context &context,
348  OP_NodeInfoParms &iparms);
349  virtual void fillInfoTreeNodeSpecific(UT_InfoTree &tree,
350  const OP_NodeInfoTreeParms &parms);
351  void saveMapping( UT_OStream &os ) const;
352  bool loadMapping( UT_IStream &is );
353 
354  ///Get absolute width
355  virtual fpreal getW() const;
356  ///Get absolute height
357  virtual fpreal getH() const;
358 
359  // Force matching of our exports to nodes and do any necessary
360  // exports. This method is called whenever a new node is added
361  // or a node is renamed and there might be a new export.
362  virtual void updateExports();
363 
364  // Generic implementation to return a parameter representing a track.
365  // It simply calls the first input to do it.
366  virtual bool findParmFromTrack(const OP_FollowChanRefsOptions& opt,
367  const char *trackname,
368  OP_NodeParmRefCycle &cycle,
369  OP_Node *&node, PRM_Parm *&parm,
370  int &vecidx);
371 
372  virtual int bumpSourceCount(int d);
373 
374  // evaluates transform tracks
375  bool evaluateTransformTracks( OP_Context &context, UT_Matrix4D &m, const UT_StringHolder &trackname="", int *timedep=0 );
376 
377 protected:
378  CHOP_Node(OP_Network *parent, const char *name, OP_Operator *entry);
379  virtual ~CHOP_Node();
380 
381  virtual void inputConnectChanged(int which_input);
382 
383  // notifier when this node is unlocked
384  virtual void nodeUnlocked();
385 
386  // All external references must be removed by the time this function
387  // returns!
388  virtual void clearAndDestroy(void);
389 
390  virtual OP_ERROR preCook(OP_Context &context);
391  virtual void postCook();
392 
393  virtual OP_ERROR cookMe(OP_Context &context);
394  virtual OP_ERROR bypassMe (OP_Context &context, int &);
395  virtual bool updateParmsFlags();
396 
397  void initCommonBaseParm();
398 
399  virtual void buildOpDependencies();
400 
401  // this method is called to alert this op that its dependency has
402  // changed. if it's a name interest, then the old full path is given
403  virtual void handleOpDependency( int referenced_op_id,
404  const OP_Dependency &op_dep,
405  OP_InterestType interest_type,
406  bool &need_cook,
407  const char *old_fullpath,
408  const char *old_cwd,
409  const char *old_chan_name);
410 
411  // This method is called when a channel that we reference has changed
412  // the way it is referenced.
413  virtual void handleChanNameDependency(const UT_String &chan_token,
414  const UT_String &chan_alias,
415  const char *old_chan_name,
416  bool &need_cook);
417 
418  // This method takes an expand array with a pattern of channels and
419  // generates a new pattern based on the renaming of a channel that was
420  // guaranteed to be in the pattern (old_chan_name should be matched by
421  // chan_array). chan_token and chan_alias are the two new ways of
422  // of accessing the old channel name. If either of the new names can
423  // be matched by the existing pattern in chan_array, then new_pattern
424  // will not contain a valid string (that is !new_pattern.isstring()).
425  static void renameChanReference(UT_ExpandArray &chan_array,
426  const UT_String &chan_token,
427  const UT_String &chan_alias,
428  const char *old_chan_name,
429  bool &need_cook,
430  UT_String &new_pattern);
431 
432  // Adds dependencies to the parms/channels found in the supplied lists.
433  void addParmReferences(
434  const UT_Array<opParmData> *plist,
435  const CH_ChannelList *clist);
436 
437  //
438  // Override these methods to enable/disable the common parameters
439  //
440 
441  virtual int usesScope() const;
442  virtual int usesSampleMatch() const;
443  virtual int usesUnits();
444 
445  //
446  // Input scoping methods
447  //
448 
449  void getScopedTracks(const CL_Clip *, CL_TrackListC &);
450  int isScoped(const UT_StringRef &name);
451  int allScoped();
452 
453  //
454  // reset methods
455 
456  void destroyClip(void);
457  void destroyHandles(void);
458 
459  //
460  // reset the data and set the correct sample rate
461 
462  const CL_Clip *copyInputAttributes(OP_Context &context,
463  int destroy = 1);
464 
465  //
466  // copy us exactly from the input, tracks and all
467  // options to copy data samples and slerp info as well
468  //
469 
470  const CL_Clip *copyInput(OP_Context &context, int idx,
471  int data, int slerps);
472 
473 
474  //
475  // Conversion methods
476  //
477 
478  fpreal toSampleLength(fpreal len,
480  int end_width = 0) const;
481  fpreal toSample(fpreal val,
483  int end_width = 0) const;
484  fpreal toUnitLength(fpreal len,
486  int end_width = 0) const;
487  fpreal toUnit(fpreal index,
489  int end_width = 0) const;
490 
491 
492  //
493  // toStandard take (s,e) and converts it to absolute indices
494  // fromStandard does the opposite
495 
496  fpreal toStandardStart(fpreal is, OP_Context context,
497  int relative, int ref_input = 1);
498 
499  fpreal toStandardEnd(fpreal is, OP_Context context,
500  int relative, int ref_input = 1);
501 
502  fpreal fromStandardStart(fpreal os, OP_Context context,
503  int relative, int ref_input,
505 
506  fpreal fromStandardEnd(fpreal oe, OP_Context context,
507  int relative, int ref_input,
509 
510 
511  //
512  // I/O methods
513  //
514 
515  virtual int saveCookedData(const char *, OP_Context &);
516  virtual int saveCookedData(std::ostream &os, OP_Context &, int binary);
517  virtual bool loadCookedData(UT_IStream &is, const char*);
518  virtual const char *getFileExtension(int binary) const;
519  virtual void deleteCookedData();
520 
521  virtual OP_ERROR save(std::ostream &os, const OP_SaveFlags &flags,
522  const char *pathPrefix,
523  const UT_String &name_override = UT_String());
524  virtual bool load(UT_IStream &is, const char *extension,
525  const char *path=0);
526 
527  /// @brief Mark all inputs as dirty so that useInputSource() will return
528  /// true upon its next call. This is the default.
529  void resetChangedSourceFlags();
530 
531  /// @brief Mark the given input as used for cooking by this node.
532  ///
533  /// This updates source flags to mark the input as now clean, returning
534  /// whether the input has changed since the last time this function was
535  /// called. If @c force is true, then we treat the input as always dirty.
536  /// Returns @c false if the input has errors.
537  bool useInputSource(unsigned idx, bool &changed, bool force)
538  {
539  return myInputChangeHelper.useInput(
540  *this, idx, changed, force);
541  }
542 
543  //
544  // Common page parameter access
545  //
546 
548  { if(myScopeStringDirty)
549  {
550  evalString(myScopeString,ARG_CHOP_SCOPE, 0, 0);
551  myScopeStringDirty = false;
552  }
553  return myScopeString;}
554 
556  { return (CHOP_SampleMatch)
557  evalInt(ARG_CHOP_MATCH, 0, 0); }
558 
559  CL_Unit UNITS() const
560  { return (CL_Unit)
561  evalInt(ARG_CHOP_UNITS, 0, 0); }
562 
563  int REALTIME() const
564  { return evalInt(ARG_CHOP_REALTIME,0,0); }
565 
566  int UNLOAD() const
567  { return evalInt(ARG_CHOP_UNLOAD,0,0); }
568  int UNLOAD(int thread) const
569  { return evalIntT(ARG_CHOP_UNLOAD,0,0,thread); }
570 
571  void EXPORT_PATH(UT_String &str) const
572  { evalString(str, ARG_CHOP_EXPORT_PATH, 0, 0); }
573 
574  short myParmBase; // parameter offsets
576 
577  CL_Clip *myClip; // chop data..
580 
581 
582  /// Retrieve the animation range (in samples) from a (range, start, end)
583  /// parm triplet. If they are NULL, then we use the standard
584  /// CHOP_RangeName, CHOP_StartName, CHOP_EndName parms. It assumes that
585  /// these parameters exist on the current node in the correct types.
586  void getParmIntervalInSamples(
587  fpreal t, fpreal &start, fpreal &end,
588  const char *range_parm = 0,
589  const char *start_parm = 0,
590  const char *end_parm = 0);
591 
592  void upgradeRangeParm(
593  const char *old_version,
594  const char *cur_version,
595  const char *range_parm = 0);
596 
597  //
598  // method to retrieve a valid index interval, or the
599  // current unprocessed index interval
600 
601  static void getStaticInterval(fpreal t, int &istart, int &iend,
602  int &last_iend, fpreal start,
603  fpreal end, int current,
604  const CL_Clip *clip);
605 
606  virtual int getNetOverviewColor( UT_Color &color );
607 
608  static void buildScopeMenu(
609  void *data, PRM_Name *menuEntries, int thelistsize,
610  const PRM_SpareData *spare, const PRM_Parm *);
611 
612  //
613  // Override this method if this chop exports in a specific manner
614  //
615 
616  virtual const orUnitList *getOverrideUnits() const
617  { return 0; }
618  // stealOverrideUnits() will steal the allocated data from units
619  virtual void stealOverrideUnits(orUnitList & /*units*/)
620  { }
621 
622  //
623  // Menu handling routines
624  //
625 
626  void getMenuPath(UT_String &base,
627  const UT_String &edit,
628  const UT_String &net,
629  const UT_String &node,
630  int add_inputs = 1);
631 
632  virtual void EDITOR_PATH(UT_String &str);
633  virtual void NET_PATH(UT_String &str);
634 
635 public:
636  int getFirstScopedTrack(const CL_Clip *, const CL_Track **track);
637 
638  /// Retrieve the animation range (in samples) from a (range, start, end)
639  /// parm triplet. If they are NULL, then we use the standard
640  /// CHOP_RangeName, CHOP_StartName, CHOP_EndName parms. It assumes that
641  /// these parameters exist on the current node in the correct types.
642  /// This methods also doesn't set flags().setTimeDep() if the range mode is CURRENT_FRAME.
643  /// It returns the timedep as an argument.
644  void getParmIntervalInSamples(
645  fpreal t, fpreal &start, fpreal &end, bool &timedep,
646  const char *range_parm = 0,
647  const char *start_parm = 0,
648  const char *end_parm = 0
649  );
650 
651  const CL_Clip *inputClip(int idx, OP_Context &context, bool add_extrainput );
652  const CL_Clip *inputClip(int idx, OP_Context &context, bool add_extrainput, bool force_recook_timedep);
653  const CL_Clip *inputClip(int idx, OP_Context &context, bool add_extrainput, bool force_recook_timedep, CHOP_Node **out_chop);
654 
655  virtual bool isUsingCurrentFrameForVexTransformContext() const {return true;}
656 
657 private: // methods
658 
659  // This method is called whenever a cook is called causing a
660  // cookMyChop or the context.myCookOverride is set to 1
661  // on a getClip() which may also call cook.
662 
663  void updateOverrides();
664  static void updateConflicts(void *data, int replace);
665 
666  void saveOverrideUnits(UT_OStream &os);
667  bool loadOverrideUnits(UT_IStream &is);
668 
669  void destroyScopePatterns();
670 
671  fpreal getInputRate(int input_idx);
672  static void initializeExpressions();
673  void notifyOverrides(const OP_NodeList &list,
674  const UT_IntArray &indices);
675  void getFitInterval(int &istart, int &iend);
676 
677  OP_ERROR doCook(OP_Context &context, int bypass);
678 
679  void buildChannelMenu(PRM_Name *menuEntries,
680  int themenusize);
681 
682  bool loadFitData(UT_IStream &is, const char *path);
683  void destroyAllFitData();
684  void createFitCollection();
685  void destroyFitCollection();
686 
687  bool haveSeenModification( long counter );
688 
689 
690 private: // data
691 
692  bool myRequireUnload;
693 
694  // These parameters reduce the number of times a scope
695  // string must be parsed to traverse arrays
696 
697  UT_ExpandArray myScopePatterns;
698  char myScopeAll;
699 
700  bool myScopeStringDirty;
701  UT_String myScopeString;
702 
703  static PRM_ChoiceList scopeMenu;
704  CHOP_Notes myNotes;
705 
706  OP_Channels *myFitCollection;
707  CL_Clip *myFitClip;
708  CL_FitParms *myFitParms;
709  fpreal myFitError2;
710  int myFitDirty;
711  CHOP_Fitter *myFitter;
712  orPath *myOrPathParms;
713  int myRealtimeCookState;
714 
715  static fpreal myMaxRealtimeSlice;
716  static int myTimeSliceDefault;
717  static int mySmartCookFlag;
718 
719  static bool myLimitInfo;
720 
721  OP_VERSION myHandleVersionParms;
722 
723  static CHOP_ConflictCallback theConflictCallback;
724  static void *theConflictData;
725  static UT_StringHolder theConflictResolvePattern;
726 
727  char myConflictPending;
728 
729  OR_Mapping *myMapping;
730 
731  long myLastModification;
732 
733  OP_InputChangeHelper myInputChangeHelper;
734 
735  // Undo classes should have access to everything so that they can undo
736  friend class CHOP_UndoFitDestroy;
737 };
738 
739 #undef FLT_PARM
740 #undef INT_PARM
741 #undef STR_PARM
742 #undef FLT_SET
743 
744 #endif
virtual int saveCookedData(std::ostream &os, OP_Context &, int binary=0)=0
static const char * theChildTableName
Definition: CHOP_Node.h:154
static void setConflictCallback(CHOP_ConflictCallback func, void *data)
Definition: CHOP_Node.h:266
GLint first
Definition: glcorearb.h:404
void EXPORT_PATH(UT_String &str) const
Definition: CHOP_Node.h:571
virtual bool updateParmsFlags()
static void setMaxSliceSize(fpreal size)
Definition: CHOP_Node.h:311
CL_Clip * myClip
Definition: CHOP_Node.h:577
PRM_Match
GLsizei GLenum const void * indices
Definition: glcorearb.h:405
GLuint GLsizei const GLchar * label
Definition: glcorearb.h:2544
virtual void buildOpDependencies()
virtual void setMapping(int idx, int type, const char *label=0)
uint64 OP_VERSION
Definition: OP_Version.h:6
#define CHOP_API
Definition: CHOP_API.h:10
virtual int getNetOverviewColor(UT_Color &color)
static void addWarning(int code, const char *msg=0)
Definition: CHOP_Node.h:256
virtual fpreal getH() const
Node position/scale is used by the UI.
#define SYS_VISIBILITY_EXPORT
static OP_TemplatePair myTemplatePair
Definition: CHOP_Node.h:159
GLuint start
Definition: glcorearb.h:474
png_infop int * unit
Definition: png.h:2536
GLuint color
Definition: glcorearb.h:1260
virtual OP_OpTypeId getOpTypeID() const =0
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
const GLuint GLenum const void * binary
Definition: glcorearb.h:1923
GLsizei const GLchar *const * path
Definition: glcorearb.h:3340
void setLimitInfo(bool limit_info)
Definition: CHOP_Node.h:339
CL_Unit UNITS() const
Definition: CHOP_Node.h:559
static void setTimeSliceDefault(int state)
Definition: CHOP_Node.h:313
CHOP_SampleMatch SAMPLE_MATCH() const
Definition: CHOP_Node.h:555
virtual void handleOpDependency(int referenced_op_id, const OP_Dependency &op_dep, OP_InterestType interest_type, bool &need_cook, const char *old_fullpath, const char *old_cwd, const char *old_chan_name)
fpreal myHandleCookTime
Definition: CHOP_Node.h:579
#define ARG_CHOP_UNLOAD
Definition: CHOP_Node.h:138
UT_ErrorSeverity
Definition: UT_Error.h:25
GLbitfield flags
Definition: glcorearb.h:1595
Parameters for OP_Node::getInfoText()/OP_Node::getNodeSpecificInfoText()
virtual int isRealtimeCook()
Definition: CHOP_Node.h:299
bool useInputSource(unsigned idx, bool &changed, bool force)
Mark the given input as used for cooking by this node.
Definition: CHOP_Node.h:537
virtual int getMapping(int idx, const char *&label) const
static OP_VariablePair myVariablePair
Definition: CHOP_Node.h:160
virtual void getNodeSpecificInfoText(OP_Context &context, OP_NodeInfoParms &parms)
#define ARG_CHOP_MATCH
Definition: CHOP_Node.h:135
virtual const orUnitList * getOverrideUnits() const
Definition: CHOP_Node.h:616
static int getTimeSliceDefault()
Definition: CHOP_Node.h:314
short myParmBase
Definition: CHOP_Node.h:574
virtual OP_ERROR cookMe(OP_Context &context)=0
virtual bool load(UT_IStream &is, const char *ext="", const char *path=0)
GLsizeiptr size
Definition: glcorearb.h:663
virtual int getAudio() const
Definition: OP_Node.h:1299
int REALTIME() const
Definition: CHOP_Node.h:563
#define ARG_CHOP_EXPORT_PATH
Definition: CHOP_Node.h:139
static fpreal getMaxSliceSize()
Definition: CHOP_Node.h:312
virtual int usesRealtime()
Definition: CHOP_Node.h:298
virtual bool loadCookedData(UT_IStream &is, const char *path=0)
SYS_VISIBILITY_EXPORT void newChopOperator(OP_OperatorTable *table)
Definition: CHOP_Blend.C:439
virtual void opChanged(OP_EventType reason, void *data=0)
long long int64
Definition: SYS_Types.h:107
virtual int64 getMemoryUsage(bool inclusive) const
GLfloat f
Definition: glcorearb.h:1925
virtual const char * getOpType() const =0
virtual bool isUsingCurrentFrameForVexTransformContext() const
Definition: CHOP_Node.h:655
int UNLOAD(int thread) const
Definition: CHOP_Node.h:568
OP_InterestType
Definition: OP_DataTypes.h:45
virtual CH_Channel * getTrackChannel(const char *name)
virtual void nodeUnlocked()
PRM_MatchFailure
void evalString(UT_String &val, int pi, int vi, fpreal t) const
GLuint GLuint end
Definition: glcorearb.h:474
GLsizei GLsizei GLchar * source
Definition: glcorearb.h:802
virtual int bumpSourceCount(int d)
CHOP_SampleMatch
Definition: CHOP_Node.h:129
bool limitInfo() const
Definition: CHOP_Node.h:337
CHOP_HandleList myHandles
Definition: CHOP_Node.h:578
virtual bool findParmFromTrack(const OP_FollowChanRefsOptions &opt, const char *trackname, OP_NodeParmRefCycle &cycle, OP_Node *&node, PRM_Parm *&parm, int &vecidx)
virtual const CL_Clip * getClip(OP_Context *context=0)
virtual fpreal getW() const
Node position/scale is used by the UI.
OP_OpTypeId
Definition: OP_OpTypeId.h:15
static int getSmartCook()
Definition: CHOP_Node.h:317
GLboolean * data
Definition: glcorearb.h:130
GLuint const GLchar * name
Definition: glcorearb.h:785
static void getConflictResolvePattern(UT_StringHolder &pattern)
Definition: CHOP_Node.h:274
#define ARG_CHOP_UNITS
Definition: CHOP_Node.h:136
#define ARG_CHOP_REALTIME
Definition: CHOP_Node.h:137
virtual OP_DataType getCookedDataType() const =0
void(* CHOP_ReplaceCallback)(void *data, int replace)
Definition: CHOP_Node.h:51
virtual void clearAndDestroy(void)
virtual void inputConnectChanged(int which)
virtual const char * getChildType() const
double fpreal
Definition: SYS_Types.h:270
virtual const char * getFileExtension(int binary) const =0
const UT_String & SCOPE_STRING()
Definition: CHOP_Node.h:547
IMATH_INTERNAL_NAMESPACE_HEADER_ENTER T clip(const T &p, const Box< T > &box)
Definition: ImathBoxAlgo.h:89
GLenum func
Definition: glcorearb.h:782
Parameters for OP_Node::fillInfoTree()/OP_Node::fillInfoTreeNodeSpecific()
virtual void fillInfoTreeNodeSpecific(UT_InfoTree &tree, const OP_NodeInfoTreeParms &parms)
short myParmCommonBase
Definition: CHOP_Node.h:575
exint evalIntT(int pi, int vi, fpreal t, int thread) const
virtual int setFlag(char tag, int on_off)
GLuint index
Definition: glcorearb.h:785
virtual int getExport() const
Definition: OP_Node.h:1301
UT_API UT_ErrorSeverity UTaddWarning(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
GLuint GLfloat * val
Definition: glcorearb.h:1607
#define ARG_CHOP_SCOPE
Definition: CHOP_Node.h:134
int UNLOAD() const
Definition: CHOP_Node.h:566
OP_EventType
Definition: OP_Value.h:22
OP_DataType
Definition: OP_DataTypes.h:28
virtual OP_OpTypeId getChildTypeID() const =0
virtual int setAudio(int on_off)
Definition: OP_Node.h:1256
static void addError(int code, const char *msg=0)
Definition: CHOP_Node.h:253
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
virtual int setExport(int on_off)
Definition: OP_Node.h:1258
CL_Unit
Definition: CL_Defines.h:18
virtual OP_ERROR save(std::ostream &os, const OP_SaveFlags &flags, const char *path_prefix="", const UT_String &name_override=UT_String())
virtual int getGlobalRate()
exint evalInt(int pi, int vi, fpreal t) const
png_infop png_uint_32 flag
Definition: png.h:2242
virtual void stealOverrideUnits(orUnitList &)
Definition: CHOP_Node.h:619
virtual OP_ERROR bypassMe(OP_Context &context, int &copied_input)=0
static void setSmartCook(int f)
Definition: CHOP_Node.h:316
UT_API UT_ErrorSeverity UTaddError(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
virtual void deleteCookedData()=0
static void setConflictResolvePattern(const char *pattern)
Definition: CHOP_Node.h:280
void(* CHOP_ConflictCallback)(void *data, void *ldata, CHOP_ReplaceCallback func, const char *source, const char *dest)
Definition: CHOP_Node.h:53