HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_hipFile.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_hipFile_h__
10 #define __HOM_hipFile_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_Color.h"
14 #include "HOM_Defines.h"
15 #include "HOM_EnumModules.h"
16 #include "HOM_Errors.h"
17 #include "HOM_Node.h"
18 #include <utility>
19 #include <vector>
20 
21 SWIGOUT(%rename(hipFile) HOM_hipFile;)
23 {
24 public:
25  virtual ~HOM_hipFile()
26  {}
27 
28  virtual std::string __repr__() = 0;
29 
30  SWIGOUT(%kwargs save;)
31  virtual void save(
32  const char *file_name=NULL, bool save_to_recent_files=true) = 0;
33 
34  virtual void saveAndIncrementFileName() = 0;
35 
36  virtual std::string saveAndBackup() = 0;
37  virtual std::string saveAsBackup() = 0;
38 
39  virtual std::string basename() = 0;
40 
41  virtual std::string name() = 0;
42 
43  virtual std::string path() = 0;
44 
45  virtual void setName(const char *file_name) = 0;
46 
47  virtual HOM_EnumValue &saveMode() = 0;
48  virtual void setSaveMode(HOM_EnumValue &savemode) = 0;
49 
50  SWIGOUT(%kwargs clear;)
51  virtual void clear(bool suppress_save_prompt=false) = 0;
52 
53  SWIGOUT(%kwargs load;)
54  virtual void load(const char *file_name,
55  bool suppress_save_prompt=false,
56  bool ignore_load_warnings=false) = 0;
57 
58  SWIGOUT(%kwargs merge;)
59  virtual void merge(const char *file_name,
60  const char *node_pattern="*",
61  bool overwrite_on_conflict=false,
62  bool ignore_load_warnings=false) = 0;
63 
64  SWIGOUT(%kwargs collisionNodesIfMerged;)
65  virtual std::vector<HOM_ElemPtr<HOM_Node> > collisionNodesIfMerged(
66  const char *file_name, const char *node_pattern="*") = 0;
67 
68  virtual bool isLoadingHipFile() = 0;
69 
70  virtual bool isShuttingDown() = 0;
71 
72  virtual bool isNewFile() = 0;
73 
74  virtual bool hasUnsavedChanges() = 0;
75 
76 
77  virtual std::map<std::string, HOM_Color> groupColorTable() = 0;
78  virtual void setGroupColorTable(
79  const std::map<std::string, HOM_Color> &color_table) = 0;
80 
81  SWIGOUT(%kwargs importFBX;)
82  virtual std::pair<HOM_ElemPtr<HOM_Node>, std::string>
83  importFBX(
84  const char *file_name,
85  bool suppress_save_prompt=false,
86  bool merge_into_scene=true,
87  bool import_cameras=true,
88  bool import_joints_and_skin=true,
89  bool import_geometry=true,
90  bool import_lights=true,
91  bool import_animation=true,
92  bool import_materials=true,
93  bool resample_animation=false,
94  double resample_interval=1.0,
95  bool override_framerate=false,
96  int framerate=-1,
97  bool hide_joints_attached_to_skin=true,
98  bool convert_joints_to_zyx_rotation_order=false,
99  HOM_EnumValue &material_mode=HOM_fbxMaterialMode::PrincipledShaders,
100  HOM_EnumValue &compatibility_mode=HOM_fbxCompatibilityMode::Maya,
101  bool single_precision_vertex_caches=false,
102  bool triangulate_nurbs=false,
103  bool triangulate_patches=false,
104  bool import_global_ambient_light=false,
105  bool import_blend_deformers_as_blend_sops=false,
106  bool segment_scale_already_baked_in=true,
107  bool convert_file_paths_to_relative=true,
108  bool unlock_geometry=false,
109  bool unlock_deformations=false,
110  bool import_nulls_as_subnets=false,
111  bool import_into_object_subnet=true,
112  bool convert_into_y_up_coordinate_system=false,
113  bool create_sibling_bones = true,
114  bool override_scene_frame_range = false,
115  bool convert_units = false) = 0;
116 
117  SWIGOUT(%ignore addOpaqueEventCallback;)
118  virtual void addOpaqueEventCallback(void *callback) = 0;
119  SWIGOUT(%ignore removeOpaqueEventCallback;)
120  virtual void removeOpaqueEventCallback(void *callback) = 0;
121  SWIGOUT(%ignore opaqueEventCallbacks;)
122  virtual std::vector<void *> opaqueEventCallbacks() = 0;
123  SWIGOUT(%ignore clearOpaqueEventCallbacks;)
124  virtual void clearOpaqueEventCallbacks() = 0;
125 
126 #ifdef SWIG
127 %extend
128 {
129  void addEventCallback(InterpreterObject callback)
130  { self->addOpaqueEventCallback(callback); }
131 
132  void removeEventCallback(InterpreterObject callback)
133  { self->removeOpaqueEventCallback(callback); }
134 
135  void clearEventCallbacks()
136  { self->clearOpaqueEventCallbacks(); }
137 
138  // Note that we return a vector of borrowed references because swig
139  // will increment the reference counts.
140  std::vector<InterpreterObject> eventCallbacks()
141  {
142  std::vector<void *> opaque_callbacks(self->opaqueEventCallbacks());
143 
144  std::vector<InterpreterObject> callbacks;
145  for (int i=0; i< opaque_callbacks.size(); ++i)
146  callbacks.push_back((InterpreterObject)opaque_callbacks[i]);
147  return callbacks;
148  }
149 }
150 #endif
151 
152 };
153 
154 #endif
virtual ~HOM_hipFile()
Definition: HOM_hipFile.h:25
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
GLsizei const GLchar *const * path
Definition: glcorearb.h:3341
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:349
#define HOM_API
Definition: HOM_API.h:13
void ignore(T const &) VULKAN_HPP_NOEXCEPT
Definition: vulkan.hpp:6508
GLuint const GLchar * name
Definition: glcorearb.h:786
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)