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