HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_ChopNode.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  * COMMENTS:
7  */
8 
9 #ifndef __HOM_ChopNode_h__
10 #define __HOM_ChopNode_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_Defines.h"
14 #include "HOM_Errors.h"
15 #include "HOM_OpNode.h"
16 #include "HOM_Track.h"
17 
18 #include <utility> // for std::pair
19 
20 class HOM_Clip;
21 
22 SWIGOUT(%rename(ChopNode) HOM_ChopNode;)
23 
24 class HOM_API HOM_ChopNode : virtual public HOM_OpNode
25 {
26 public:
28  : HOM_NetworkMovableItem(HOM_networkItemType::Node)
29  { HOM_CONSTRUCT_OBJECT(this) }
30  HOM_ChopNode(const HOM_ChopNode &chop_node)
31  : HOM_OpNode(chop_node),
32  HOM_NetworkMovableItem(chop_node)
33  { HOM_CONSTRUCT_OBJECT(this) }
34  ~HOM_ChopNode() override
35  { HOM_DESTRUCT_OBJECT(this) }
36 
37  // Let swig know we're overriding __repr__ for this class so it doesn't
38  // provide its own __repr__.
39  SWIGOUT(virtual std::string __repr__() = 0;)
40 
41  virtual bool isBypassed() = 0;
42  virtual void bypass(bool on) = 0;
43  virtual bool isLocked() = 0;
44  virtual void setLocked(bool on) = 0;
45  virtual bool isDisplayFlagSet() = 0;
46  virtual void setDisplayFlag(bool on) = 0;
47  virtual bool isAudioFlagSet() = 0;
48  virtual void setAudioFlag(bool on) = 0;
49  virtual bool isExportFlagSet() = 0;
50  virtual void setExportFlag(bool on) = 0;
51  virtual bool isUnloadFlagSet() = 0;
52  virtual void setUnloadFlag(bool on) = 0;
53  virtual bool isCurrentFlagSet() = 0;
54  virtual void setCurrentFlag(bool on) = 0;
55 
56  virtual std::vector<HOM_ElemPtr<HOM_Track> > tracks(int output_index=0, bool cook=true) = 0;
57 
58  SWIGOUT(%newobject track;)
59  virtual HOM_Track *track(const char *track_name, int output_index=0, bool cook=true) = 0;
60 
61  SWIGOUT(%kwargs clip;)
62  SWIGOUT(%newobject clip;)
63  virtual HOM_Clip *clip(int output_index = 0) = 0;
64 
65  virtual double sampleRate()=0;
66  virtual std::pair<double, double> sampleRange()=0;
67 
68  virtual double frameToSamples(double frame)=0;
69  virtual double samplesToFrame(double samples)=0;
70 
71  virtual double timeToSamples(double time)=0;
72  virtual double samplesToTime(double samples)=0;
73 
74  virtual HOM_BinaryString clipData(bool binary)=0;
75  virtual HOM_BinaryString clipData(bool binary, std::vector<std::string> parms,
76  double start = -1, double end = -1)=0;
77  virtual void setClipData(HOM_BinaryString source, bool binary,
78  double offset = 0, const char* rename = 0)=0;
79 
80  virtual bool saveClip( const std::string &filename) = 0;
81  virtual bool saveClip(const std::string &filename, std::vector<std::string> parms,
82  double start, double end) = 0;
83 };
84 
85 #endif
virtual std::pair< double, double > sampleRange() const =0
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1291
GT_API const UT_StringHolder filename
Definition: Node.h:52
GT_API const UT_StringHolder time
GLuint start
Definition: glcorearb.h:475
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
virtual double timeToSamples(double time) const =0
const GLuint GLenum const void * binary
Definition: glcorearb.h:1924
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:352
~HOM_ChopNode() override
Definition: HOM_ChopNode.h:34
virtual double frameToSamples(double frame) const =0
GLintptr offset
Definition: glcorearb.h:665
HOM_ChopNode(const HOM_ChopNode &chop_node)
Definition: HOM_ChopNode.h:30
#define HOM_API
Definition: HOM_API.h:13
virtual double samplesToTime(double samples) const =0
virtual double samplesToFrame(double samples) const =0
GLuint GLuint end
Definition: glcorearb.h:475
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1290
GLsizei GLsizei GLchar * source
Definition: glcorearb.h:803
virtual double sampleRate() const =0
GLsizei samples
Definition: glcorearb.h:1298
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
virtual HOM_Track * track(const char *track_name) const =0
IMATH_INTERNAL_NAMESPACE_HEADER_ENTER IMATH_HOSTDEVICE IMATH_CONSTEXPR14 T clip(const T &p, const Box< T > &box) IMATH_NOEXCEPT
Definition: ImathBoxAlgo.h:29
virtual std::vector< HOM_ElemPtr< HOM_Track > > tracks() const =0