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  const char *getChildType() const override;
153  const char *getOpType() const override;
154 
155  OP_OpTypeId getChildTypeID() const override;
156  OP_OpTypeId getOpTypeID() const override;
157  static const char *theChildTableName;
158 
159  OP_DataType getCookedDataType() const override;
160  static void buildOperatorTable(OP_OperatorTable &table);
161 
164  static PRM_Template myTemplateList[];
165  static CH_LocalVariable myVariableList[];
166 
167  bool getAudio() const override;
168  bool getExport() const override;
169  bool setAudio(bool on_off) override;
170  bool setExport(bool on_off) override;
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  const CL_Clip *getClip(OP_Context *context = 0) override;
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  int64 getMemoryUsage(bool inclusive) const override;
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  CH_Channel *getTrackChannel(const char *name) override;
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();
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  void setFlag(char flag, int8 val) override;
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  void opChanged(OP_EventType reason, void *data=0) override;
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  void setMapping(int idx, int type,
348  const char *label = 0) override;
349  int getMapping(int idx, const char *&label) const override;
350 
352  OP_NodeInfoParms &iparms) override;
354  const OP_NodeInfoTreeParms &parms) override;
355  void saveMapping( UT_OStream &os ) const;
356  bool loadMapping( UT_IStream &is );
357 
358  ///Get absolute width
359  fpreal getW() const override;
360  ///Get absolute height
361  fpreal getH() const override;
362 
363  // Force matching of our exports to nodes and do any necessary
364  // exports. This method is called whenever a new node is added
365  // or a node is renamed and there might be a new export.
366  virtual void updateExports();
367 
368  // Generic implementation to return a parameter representing a track.
369  // It simply calls the first input to do it.
371  const char *trackname,
372  OP_NodeParmRefCycle &cycle,
373  OP_Node *&node, PRM_Parm *&parm,
374  int &vecidx) override;
375 
376  int bumpSourceCount(int d) override;
377 
378  // evaluates transform tracks
379 
383 
384  bool hasTransformTracks() const override { return false; }
385 
386 protected:
387  CHOP_Node(OP_Network *parent, const char *name, OP_Operator *entry);
388  ~CHOP_Node() override;
389 
390  void inputConnectChanged(int which_input) override;
391 
392  // notifier when this node is unlocked
393  void nodeUnlocked() override;
394 
395  // All external references must be removed by the time this function
396  // returns!
397  void clearAndDestroy() override;
398 
399  virtual OP_ERROR preCook(OP_Context &context);
400  virtual void postCook();
401 
402  OP_ERROR cookMe(OP_Context &context) override;
403  OP_ERROR bypassMe(OP_Context &context, int &) override;
404  bool updateParmsFlags() override;
405 
406  void initCommonBaseParm();
407 
408  void buildOpDependencies() override;
409 
410  // this method is called to alert this op that its dependency has
411  // changed. if it's a name interest, then the old full path is given
412  void handleOpDependency(int referenced_op_id,
413  const OP_Dependency &op_dep,
414  OP_InterestType interest_type,
415  bool &need_cook,
416  const char *old_fullpath,
417  const char *old_cwd,
418  const char *old_chan_name) override;
419 
420  // This method is called when a channel that we reference has changed
421  // the way it is referenced.
422  virtual void handleChanNameDependency(const UT_String &chan_token,
423  const UT_String &chan_alias,
424  const char *old_chan_name,
425  bool &need_cook);
426 
427  // This method takes an expand array with a pattern of channels and
428  // generates a new pattern based on the renaming of a channel that was
429  // guaranteed to be in the pattern (old_chan_name should be matched by
430  // chan_array). chan_token and chan_alias are the two new ways of
431  // of accessing the old channel name. If either of the new names can
432  // be matched by the existing pattern in chan_array, then new_pattern
433  // will not contain a valid string (that is !new_pattern.isstring()).
434  static void renameChanReference(UT_ExpandArray &chan_array,
435  const UT_String &chan_token,
436  const UT_String &chan_alias,
437  const char *old_chan_name,
438  bool &need_cook,
439  UT_String &new_pattern);
440 
441  // Adds dependencies to the parms/channels found in the supplied lists.
442  void addParmReferences(
443  const UT_Array<opParmData> *plist,
444  const CH_ChannelList *clist);
445 
446  //
447  // Override these methods to enable/disable the common parameters
448  //
449 
450  virtual int usesScope() const;
451  virtual int usesSampleMatch() const;
452  virtual int usesUnits();
453 
454  //
455  // Input scoping methods
456  //
457 
458  void getScopedTracks(const CL_Clip *, CL_TrackListC &);
459  int isScoped(const UT_StringRef &name);
460  int allScoped();
461 
462  //
463  // reset methods
464 
465  void destroyClip();
466  void destroyHandles();
467 
468  //
469  // reset the data and set the correct sample rate
470 
471  const CL_Clip *copyInputAttributes(OP_Context &context,
472  int destroy = 1);
473 
474  //
475  // copy us exactly from the input, tracks and all
476  // options to copy data samples and slerp info as well
477  //
478 
479  const CL_Clip *copyInput(OP_Context &context, int idx,
480  int data, int slerps);
481 
482 
483  //
484  // Conversion methods
485  //
486 
487  fpreal toSampleLength(fpreal len,
489  int end_width = 0) const;
490  fpreal toSample(fpreal val,
492  int end_width = 0) const;
493  fpreal toUnitLength(fpreal len,
495  int end_width = 0) const;
496  fpreal toUnit(fpreal index,
498  int end_width = 0) const;
499 
500 
501  //
502  // toStandard take (s,e) and converts it to absolute indices
503  // fromStandard does the opposite
504 
505  fpreal toStandardStart(fpreal is, OP_Context context,
506  int relative, int ref_input = 1);
507 
508  fpreal toStandardEnd(fpreal is, OP_Context context,
509  int relative, int ref_input = 1);
510 
511  fpreal fromStandardStart(fpreal os, OP_Context context,
512  int relative, int ref_input,
514 
515  fpreal fromStandardEnd(fpreal oe, OP_Context context,
516  int relative, int ref_input,
518 
519 
520  //
521  // I/O methods
522  //
523 
524  int saveCookedData(const char *, OP_Context &) override;
525  int saveCookedData(std::ostream &os, OP_Context &,
526  int binary) override;
527  bool loadCookedData(UT_IStream &is, const char*) override;
528  const char *getFileExtension(int binary) const override;
529  void deleteCookedData() override;
530 
531  OP_ERROR save(std::ostream &os, const OP_SaveFlags &flags,
532  const char *pathPrefix,
533  const UT_String &name_override = UT_String()
534  ) override;
535  bool load(UT_IStream &is, const char *extension,
536  const char *path=0) override;
537 
538  /// @brief Mark all inputs as dirty so that useInputSource() will return
539  /// true upon its next call. This is the default.
540  void resetChangedSourceFlags();
541 
542  /// @brief Mark the given input as used for cooking by this node.
543  ///
544  /// This updates source flags to mark the input as now clean, returning
545  /// whether the input has changed since the last time this function was
546  /// called. If @c force is true, then we treat the input as always dirty.
547  /// Returns @c false if the input has errors.
548  bool useInputSource(unsigned idx, bool &changed, bool force)
549  {
550  return myInputChangeHelper.useInput(
551  *this, idx, changed, force);
552  }
553 
554  //
555  // Common page parameter access
556  //
557 
559  { if(myScopeStringDirty)
560  {
561  evalString(myScopeString,ARG_CHOP_SCOPE, 0, 0);
562  myScopeStringDirty = false;
563  }
564  return myScopeString;}
565 
567  { return (CHOP_SampleMatch)
568  evalInt(ARG_CHOP_MATCH, 0, 0); }
569 
570  CL_Unit UNITS() const
571  { return (CL_Unit)
572  evalInt(ARG_CHOP_UNITS, 0, 0); }
573 
574  int REALTIME() const
575  { return evalInt(ARG_CHOP_REALTIME,0,0); }
576 
577  int UNLOAD() const
578  { return evalInt(ARG_CHOP_UNLOAD,0,0); }
579  int UNLOAD(int thread) const
580  { return evalIntT(ARG_CHOP_UNLOAD,0,0,thread); }
581 
582  void EXPORT_PATH(UT_String &str) const
583  { evalString(str, ARG_CHOP_EXPORT_PATH, 0, 0); }
584 
585  short myParmBase; // parameter offsets
587 
588  CL_Clip *myClip; // chop data..
591 
592 
593  /// Retrieve the animation range (in samples) from a (range, start, end)
594  /// parm triplet. If they are NULL, then we use the standard
595  /// CHOP_RangeName, CHOP_StartName, CHOP_EndName parms. It assumes that
596  /// these parameters exist on the current node in the correct types.
597  void getParmIntervalInSamples(
599  const char *range_parm = 0,
600  const char *start_parm = 0,
601  const char *end_parm = 0);
602 
603  void upgradeRangeParm(
604  const char *old_version,
605  const char *cur_version,
606  const char *range_parm = 0);
607 
608  //
609  // method to retrieve a valid index interval, or the
610  // current unprocessed index interval
611 
612  static void getStaticInterval(fpreal t, int &istart, int &iend,
613  int &last_iend, fpreal start,
614  fpreal end, int current,
615  const CL_Clip *clip);
616 
617  int getNetOverviewColor( UT_Color &color ) override;
618 
619  static void buildScopeMenu(
620  void *data, PRM_Name *menuEntries, int thelistsize,
621  const PRM_SpareData *spare, const PRM_Parm *);
622 
623  //
624  // Override this method if this chop exports in a specific manner
625  //
626 
627  virtual const orUnitList *getOverrideUnits() const
628  { return 0; }
629  // stealOverrideUnits() will steal the allocated data from units
630  virtual void stealOverrideUnits(orUnitList & /*units*/)
631  { }
632 
633  //
634  // Menu handling routines
635  //
636 
637  void getMenuPath(UT_String &base,
638  const UT_String &edit,
639  const UT_String &net,
640  const UT_String &node,
641  int add_inputs = 1);
642 
643  virtual void EDITOR_PATH(UT_String &str);
644  virtual void NET_PATH(UT_String &str);
645 
646 public:
647  int getFirstScopedTrack(const CL_Clip *, const CL_Track **track);
648 
649  /// Retrieve the animation range (in samples) from a (range, start, end)
650  /// parm triplet. If they are NULL, then we use the standard
651  /// CHOP_RangeName, CHOP_StartName, CHOP_EndName parms. It assumes that
652  /// these parameters exist on the current node in the correct types.
653  /// This methods also doesn't set flags().setTimeDep() if the range mode is CURRENT_FRAME.
654  /// It returns the timedep as an argument.
655  void getParmIntervalInSamples(
656  fpreal t, fpreal &start, fpreal &end, bool &timedep,
657  const char *range_parm = 0,
658  const char *start_parm = 0,
659  const char *end_parm = 0
660  );
661 
662  const CL_Clip *inputClip(int idx, OP_Context &context, bool add_extrainput );
663  const CL_Clip *inputClip(int idx, OP_Context &context, bool add_extrainput, bool force_recook_timedep);
664  const CL_Clip *inputClip(int idx, OP_Context &context, bool add_extrainput, bool force_recook_timedep, CHOP_Node **out_chop);
665 
666 private: // methods
667 
668  // This method is called whenever a cook is called causing a
669  // cookMyChop or the context.myCookOverride is set to 1
670  // on a getClip() which may also call cook.
671 
672  void updateOverrides();
673  static void updateConflicts(void *data, int replace);
674 
675  void saveOverrideUnits(UT_OStream &os);
676  bool loadOverrideUnits(UT_IStream &is);
677 
678  void destroyScopePatterns();
679 
680  fpreal getInputRate(int input_idx);
681  static void initializeExpressions();
682  void notifyOverrides(const OP_NodeList &list,
683  const UT_IntArray &indices);
684  void getFitInterval(int &istart, int &iend);
685 
686  OP_ERROR doCook(OP_Context &context, int bypass);
687 
688  void buildChannelMenu(PRM_Name *menuEntries,
689  int themenusize);
690 
691  bool loadFitData(UT_IStream &is, const char *path);
692  void destroyAllFitData();
693  void createFitCollection();
694  void destroyFitCollection();
695 
696  bool haveSeenModification( long counter );
697 
698 
699 private: // data
700 
701  bool myRequireUnload;
702 
703  // These parameters reduce the number of times a scope
704  // string must be parsed to traverse arrays
705 
706  UT_ExpandArray myScopePatterns;
707  char myScopeAll;
708 
709  bool myScopeStringDirty;
710  UT_String myScopeString;
711 
712  static PRM_ChoiceList scopeMenu;
713  CHOP_Notes myNotes;
714 
715  OP_Channels *myFitCollection;
716  CL_Clip *myFitClip;
717  CL_FitParms *myFitParms;
718  fpreal myFitError2;
719  int myFitDirty;
720  CHOP_Fitter *myFitter;
721  orPath *myOrPathParms;
722  int myRealtimeCookState;
723 
724  static fpreal myMaxRealtimeSlice;
725  static int myTimeSliceDefault;
726  static int mySmartCookFlag;
727 
728  static bool myLimitInfo;
729 
730  OP_VERSION myHandleVersionParms;
731 
732  static CHOP_ConflictCallback theConflictCallback;
733  static void *theConflictData;
734  static UT_StringHolder theConflictResolvePattern;
735 
736  char myConflictPending;
737 
738  OR_Mapping *myMapping;
739 
740  long myLastModification;
741 
742  OP_InputChangeHelper myInputChangeHelper;
743 
744  // Undo classes should have access to everything so that they can undo
745  friend class CHOP_UndoFitDestroy;
746 };
747 
748 #undef FLT_PARM
749 #undef INT_PARM
750 #undef STR_PARM
751 #undef FLT_SET
752 
753 #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:582
virtual bool updateParmsFlags()
static void setMaxSliceSize(fpreal size)
Definition: CHOP_Node.h:314
CL_Clip * myClip
Definition: CHOP_Node.h:588
PRM_Match
fpreal getH() const override
Node position/scale is used by the UI.
GLsizeiptr size
Definition: glew.h:1681
fpreal getW() const override
Node position/scale is used by the UI.
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
#define SYS_VISIBILITY_EXPORT
const Args & args
Definition: printf.h:628
GLuint index
Definition: glew.h:1814
virtual void setFlag(char tag, int8 val)
static OP_TemplatePair myTemplatePair
Definition: CHOP_Node.h:162
GLuint const GLfloat * val
Definition: glew.h:2794
virtual OP_OpTypeId getOpTypeID() const =0
virtual bool getAudio() const
Definition: OP_Node.h:1345
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:570
static void setTimeSliceDefault(int state)
Definition: CHOP_Node.h:316
CHOP_SampleMatch SAMPLE_MATCH() const
Definition: CHOP_Node.h:566
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:590
#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:548
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:627
static int getTimeSliceDefault()
Definition: CHOP_Node.h:317
short myParmBase
Definition: CHOP_Node.h:585
virtual OP_ERROR cookMe(OP_Context &context)=0
int REALTIME() const
Definition: CHOP_Node.h:574
#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)
SYS_VISIBILITY_EXPORT void newChopOperator(OP_OperatorTable *table)
Definition: CHOP_Blend.C:439
virtual bool evaluateTransformTracks(OP_Context &context, OP_EvaluateTransformTracksArgs &args)
Definition: OP_Node.h:3132
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:579
OP_InterestType
Definition: OP_DataTypes.h:44
virtual CH_Channel * getTrackChannel(const char *name)
GLclampf f
Definition: glew.h:3499
virtual bool setAudio(bool on_off)
Definition: OP_Node.h:1301
void buildOpDependencies() override
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
void opChanged(OP_EventType reason, void *data=0) override
int64 getMemoryUsage(bool inclusive) const override
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:589
virtual bool findParmFromTrack(const OP_FollowChanRefsOptions &opt, const char *trackname, OP_NodeParmRefCycle &cycle, OP_Node *&node, PRM_Parm *&parm, int &vecidx)
long long int64
Definition: SYS_Types.h:116
void nodeUnlocked() override
virtual const CL_Clip * getClip(OP_Context *context=0)
png_const_structrp png_const_inforp int * unit
Definition: png.h:2161
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
signed char int8
Definition: SYS_Types.h:35
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 bool getExport() const
Definition: OP_Node.h:1347
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
GLsizei const GLchar *const * path
Definition: glew.h:6461
virtual const char * getChildType() const
virtual const char * getFileExtension(int binary) const =0
const UT_String & SCOPE_STRING()
Definition: CHOP_Node.h:558
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)
bool hasTransformTracks() const override
Definition: CHOP_Node.h:384
GLuint counter
Definition: glew.h:2740
short myParmCommonBase
Definition: CHOP_Node.h:586
void clearAndDestroy() override
fpreal64 fpreal
Definition: SYS_Types.h:277
exint evalIntT(int pi, int vi, fpreal t, int thread) const
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:577
OP_EventType
Definition: OP_Value.h:22
OP_DataType
Definition: OP_DataTypes.h:28
virtual OP_OpTypeId getChildTypeID() const =0
virtual bool setExport(bool on_off)
Definition: OP_Node.h:1303
static void addError(int code, const char *msg=0)
Definition: CHOP_Node.h:256
int getGlobalRate() override
bool load(UT_IStream &is, const char *ext="", const char *path=0) override
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())
exint evalInt(int pi, int vi, fpreal t) const
void inputConnectChanged(int which) override
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:630
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