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_BinaryString.h"
14 #include "HOM_Defines.h"
15 #include "HOM_Errors.h"
16 #include "HOM_ElemPtr.h"
17 #include <SYS/SYS_Types.h>
18 #include <map>
19 #include <string>
20 #include <vector>
21 
22 class HOM_Bookmark;
23 class HOM_EnumValue;
24 class HOM_Geometry;
25 class HOM_Node;
26 
27 SWIGOUT(%rename(anim) HOM_anim;)
28 
30 {
31 public:
32  virtual ~HOM_anim()
33  {}
34 
35  virtual std::string __repr__() = 0;
36 
37  virtual std::vector<HOM_ElemPtr<HOM_Bookmark> > bookmarks() = 0;
38 
39  /// Saves the current list of bookmarks to a file, returning true on success
40  SWIGOUT(%kwargs saveBookmarks;)
41  virtual bool saveBookmarks(
42  const char *filename,
43  const std::vector<HOM_Bookmark *> &bookmarks = {},
44  bool include_temporary = false)
45  = 0;
46  /// Loads the current list of bookmarks from a file, returning true on
47  /// success
48  virtual bool loadBookmarks(
49  const char *filename,
50  bool remove_existing = true)
51  = 0;
52 
53  SWIGOUT(%kwargs saveBookmarksToString;)
54  virtual HOM_BinaryString saveBookmarksToString(
55  const std::vector<HOM_Bookmark *> &bookmarks = {},
56  bool include_temporary = false,
57  bool binary = true)
58  = 0;
59 
60  virtual bool loadBookmarksFromString(
62  bool remove_existing = true)
63  = 0;
64 
65  /// Deletes all bookmarks (note that this will invalidate any existing hom
66  /// Bookmark objects
67  virtual void clearBookmarks() = 0;
68 
69  SWIGOUT(%newobject newBookmark;)
70  SWIGOUT(%kwargs newBookmark;)
71  virtual HOM_Bookmark *newBookmark(const char *name, int start, int end) = 0;
72 
73  SWIGOUT(%newobject bookmark;)
74  SWIGOUT(%kwargs bookmark;)
75  virtual HOM_Bookmark *bookmark(int64 bookmark_id) = 0;
76 
77  // This method is deprecated in favor of bookmark
78  SWIGOUT(%newobject getBookmark;)
79  SWIGOUT(%kwargs getBookmark;)
80  virtual HOM_Bookmark *getBookmark(int64 bookmark_id)
81  { return bookmark(bookmark_id); }
82 
83  virtual void removeBookmarks(
84  const std::vector<HOM_Bookmark *> &bm) = 0;
85 
86  /// Write the scoped geometry channels back into the provided mutable
87  /// geometry. If the channel_names list is non-empty, only extract the
88  /// channels with those names. Otherwise, all channels in the collection
89  /// will be written into the geometry.
90  virtual void mergeGeometryChannels(
91  const std::string &collection_name,
92  HOM_Geometry &geometry,
93  const std::vector<std::string> &channel_names = {}) = 0;
94 
95  // This method is deprecated in favor of mergeGeometryChannels
96  virtual void getGeometryChannels(
97  const std::string &collection_name,
98  HOM_Geometry &geometry,
99  const std::vector<std::string> &channel_names = {})
100  { mergeGeometryChannels(collection_name, geometry, channel_names); }
101 
102  virtual void setGeometryChannels(
103  const std::string &collection_name,
104  HOM_Geometry &geometry,
105  const std::vector<std::string> &channel_names) = 0;
106 
107  virtual void setGeometryChannelsFromPattern(
108  const std::string &collection_name,
109  HOM_Geometry &geometry,
110  const std::string &pattern = "") = 0;
111 
112  /// Sets a pending key at the current frame for the specified geometry
113  /// channel
114  virtual void setGeometryChannelPending(
115  const std::string &collection_name,
116  const std::string &channel_name,
118 
119  virtual bool isGeometryChannelPending(
120  const std::string &collection_name,
121  const std::string &channel_name) = 0;
122 
123  /// Returns whether or not the given geometry channel is currently pinned
124  /// If the channel name is ommitted, returns whether or not the
125  /// entire collection is pinned instead.
126  virtual bool isGeometryChannelPinned(
127  const std::string &collection_name,
128  const std::string &channel_name = "") = 0;
129 
130  virtual std::vector<std::string> pinnedGeometryChannels(
131  const std::string &collection_name) = 0;
132  // This method is deprecated in favor of pinnedGeometryChannels
133  virtual std::vector<std::string> getPinnedGeometryChannels(
134  const std::string &collection_name)
135  { return pinnedGeometryChannels(collection_name); }
136 
137  virtual void lockGeometryChannelCollection(
138  const std::string &collection_name, bool lock) = 0;
139 
140  SWIGOUT(%ignore addOpaqueBookmarksChangedCallback;)
141  virtual void addOpaqueBookmarksChangedCallback(void *py_callback) = 0;
142  SWIGOUT(%ignore removeOpaqueBookmarksChangedCallback;)
143  virtual void removeOpaqueBookmarksChangedCallback(void *py_callback) = 0;
144 
145 
146  SWIGOUT(%ignore addOpaqueGeometryChannelsChangedCallback;)
147  virtual bool addOpaqueGeometryChannelsChangedCallback(const std::string &collection_name, void *callback, bool on_mouse_up) = 0;
148  SWIGOUT(%ignore removeOpaqueGeometryChannelsChangedCallback;)
149  virtual bool removeOpaqueGeometryChannelsChangedCallback(const std::string &collection_name, void *callback, bool on_mouse_up) = 0;
150 
151 #ifdef SWIG
152 %extend
153 {
154  void addBookmarksChangedCallback(InterpreterObject callback)
155  { self->addOpaqueBookmarksChangedCallback(callback); }
156 
157  void removeBookmarksChangedCallback(InterpreterObject callback)
158  { self->removeOpaqueBookmarksChangedCallback(callback); }
159 
160  virtual bool addGeometryChannelsChangedCallback(const std::string &collection_name, InterpreterObject callback, bool on_mouse_up = true)
161  { return self->addOpaqueGeometryChannelsChangedCallback(collection_name, callback, on_mouse_up); }
162 
163  virtual bool removeGeometryChannelsChangedCallback(const std::string &collection_name, InterpreterObject callback, bool on_mouse_up = true)
164  { return self->removeOpaqueGeometryChannelsChangedCallback(collection_name, callback, on_mouse_up); }
165 }
166 #endif
167 
168  virtual HOM_EnumValue &slopeMode() = 0;
169  virtual void setSlopeMode(HOM_EnumValue &mode) = 0;
170 };
171 
172 #endif
173 
GT_API const UT_StringHolder filename
GLuint start
Definition: glcorearb.h:475
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
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:349
virtual void getGeometryChannels(const std::string &collection_name, HOM_Geometry &geometry, const std::vector< std::string > &channel_names={})
Definition: HOM_anim.h:96
#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:32
virtual std::vector< std::string > getPinnedGeometryChannels(const std::string &collection_name)
Definition: HOM_anim.h:133
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
virtual HOM_Bookmark * getBookmark(int64 bookmark_id)
Definition: HOM_anim.h:80
Definition: format.h:895