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