HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_anim.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_anim_h__
10 #define __HOM_anim_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_Defines.h"
14 #include "HOM_Errors.h"
15 #include "HOM_ElemPtr.h"
16 #include <SYS/SYS_Types.h>
17 #include <map>
18 #include <string>
19 #include <vector>
20 
21 class HOM_Bookmark;
22 class HOM_EnumValue;
23 class HOM_Geometry;
24 class HOM_Node;
25 
26 SWIGOUT(%rename(anim) HOM_anim;)
27 
29 {
30 public:
31  virtual ~HOM_anim()
32  {}
33 
34  virtual std::string __repr__() = 0;
35 
36  virtual std::vector<HOM_ElemPtr<HOM_Bookmark> > bookmarks() = 0;
37 
38  /// Saves the current list of bookmarks to a file, returning true on success
39  virtual bool saveBookmarks(
40  const char *filename,
41  const std::vector<HOM_Bookmark *> &bookmarks = {})
42  = 0;
43  /// Loads the current list of bookmarks from a file, returning true on
44  /// success
45  virtual bool loadBookmarks(const char *filename) = 0;
46 
47  /// Deletes all bookmarks (note that this will invalidate any existing hom
48  /// Bookmark objects
49  virtual void clearBookmarks() = 0;
50 
51  SWIGOUT(%newobject newBookmark;)
52  SWIGOUT(%kwargs newBookmark;)
53  virtual HOM_Bookmark *newBookmark(const char *name, int start, int end) = 0;
54 
55  SWIGOUT(%newobject getBookmark;)
56  SWIGOUT(%kwargs getBookmark;)
57  virtual HOM_Bookmark *getBookmark(int64 bookmark_id) = 0;
58 
59  virtual void removeBookmarks(
60  const std::vector<HOM_Bookmark *> &bm) = 0;
61 
62  /// Write the scoped geometry channels back into the provided mutable
63  /// geometry. If the channel_names list is non-empty, only extract the
64  /// channels with those names. Otherwise, all channels in the collection
65  /// will be written into the geometry.
66  virtual void getGeometryChannels(
67  const std::string &collection_name,
68  HOM_Geometry &geometry,
69  const std::vector<std::string> &channel_names = {}) = 0;
70 
71  virtual void setGeometryChannels(
72  const std::string &collection_name,
73  HOM_Geometry &geometry,
74  const std::vector<std::string> &channel_names) = 0;
75 
76  virtual void setGeometryChannelsFromPattern(
77  const std::string &collection_name,
78  HOM_Geometry &geometry,
79  const std::string &pattern = "") = 0;
80 
81  /// Sets a pending key at the current frame for the specified geometry
82  /// channel
83  virtual void setGeometryChannelPending(
84  const std::string &collection_name,
85  const std::string &channel_name,
87 
88  virtual bool isGeometryChannelPending(
89  const std::string &collection_name,
90  const std::string &channel_name) = 0;
91 
92  /// Returns whether or not the given geometry channel is currently pinned
93  /// If the channel name is ommitted, returns whether or not the
94  /// entire collection is pinned instead.
95  virtual bool isGeometryChannelPinned(
96  const std::string &collection_name,
97  const std::string &channel_name = "") = 0;
98 
99  virtual std::vector<std::string> getPinnedGeometryChannels(
100  const std::string &collection_name) = 0;
101 
102  SWIGOUT(%ignore addOpaqueBookmarksChangedCallback;)
103  virtual void addOpaqueBookmarksChangedCallback(void *py_callback) = 0;
104  SWIGOUT(%ignore removeOpaqueBookmarksChangedCallback;)
105  virtual void removeOpaqueBookmarksChangedCallback(void *py_callback) = 0;
106 
107 
108  SWIGOUT(%ignore addOpaqueGeometryChannelsChangedCallback;)
109  virtual bool addOpaqueGeometryChannelsChangedCallback(const std::string &collection_name, void *callback, bool on_mouse_up) = 0;
110  SWIGOUT(%ignore removeOpaqueGeometryChannelsChangedCallback;)
111  virtual bool removeOpaqueGeometryChannelsChangedCallback(const std::string &collection_name, void *callback, bool on_mouse_up) = 0;
112 
113 #ifdef SWIG
114 %extend
115 {
116  void addBookmarksChangedCallback(InterpreterObject callback)
117  { self->addOpaqueBookmarksChangedCallback(callback); }
118 
119  void removeBookmarksChangedCallback(InterpreterObject callback)
120  { self->removeOpaqueBookmarksChangedCallback(callback); }
121 
122  virtual bool addGeometryChannelsChangedCallback(const std::string &collection_name, InterpreterObject callback, bool on_mouse_up = true)
123  { return self->addOpaqueGeometryChannelsChangedCallback(collection_name, callback, on_mouse_up); }
124 
125  virtual bool removeGeometryChannelsChangedCallback(const std::string &collection_name, InterpreterObject callback, bool on_mouse_up = true)
126  { return self->removeOpaqueGeometryChannelsChangedCallback(collection_name, callback, on_mouse_up); }
127 }
128 #endif
129 
130  virtual HOM_EnumValue &slopeMode() = 0;
131  virtual void setSlopeMode(HOM_EnumValue &mode) = 0;
132 };
133 
134 #endif
135 
GT_API const UT_StringHolder filename
GLuint start
Definition: glcorearb.h:475
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:352
#define HOM_API
Definition: HOM_API.h:13
void ignore(T const &) VULKAN_HPP_NOEXCEPT
Definition: vulkan.hpp:6508
GLuint GLuint end
Definition: glcorearb.h:475
long long int64
Definition: SYS_Types.h:116
GLuint const GLchar * name
Definition: glcorearb.h:786
GLushort pattern
Definition: glad.h:2583
GLenum mode
Definition: glcorearb.h:99
virtual ~HOM_anim()
Definition: HOM_anim.h:31
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
UT_Optional< double > HOM_OptionalDouble
Definition: HOM_Defines.h:45
Definition: core.h:1131