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 void saveAsBackup() = 0;
37 
38  virtual std::string basename() = 0;
39 
40  virtual std::string name() = 0;
41 
42  virtual std::string path() = 0;
43 
44  virtual void setName(const char *file_name) = 0;
45 
46  virtual HOM_EnumValue &saveMode() = 0;
47  virtual void setSaveMode(HOM_EnumValue &savemode) = 0;
48 
49  SWIGOUT(%kwargs clear;)
50  virtual void clear(bool suppress_save_prompt=false) = 0;
51 
52  SWIGOUT(%kwargs load;)
53  virtual void load(const char *file_name,
54  bool suppress_save_prompt=false,
55  bool ignore_load_warnings=false) = 0;
56 
57  SWIGOUT(%kwargs merge;)
58  virtual void merge(const char *file_name,
59  const char *node_pattern="*",
60  bool overwrite_on_conflict=false,
61  bool ignore_load_warnings=false) = 0;
62 
63  SWIGOUT(%kwargs collisionNodesIfMerged;)
64  virtual std::vector<HOM_ElemPtr<HOM_Node> > collisionNodesIfMerged(
65  const char *file_name, const char *node_pattern="*") = 0;
66 
67  virtual bool isLoadingHipFile() = 0;
68 
69  virtual bool isShuttingDown() = 0;
70 
71  virtual bool hasUnsavedChanges() = 0;
72 
73 
74  virtual std::map<std::string, HOM_Color> groupColorTable() = 0;
75  virtual void setGroupColorTable(
76  const std::map<std::string, HOM_Color> &color_table) = 0;
77 
78  SWIGOUT(%kwargs importFBX;)
79  virtual std::pair<HOM_ElemPtr<HOM_Node>, std::string>
80  importFBX(
81  const char *file_name,
82  bool suppress_save_prompt=false,
83  bool merge_into_scene=true,
84  bool import_cameras=true,
85  bool import_joints_and_skin=true,
86  bool import_geometry=true,
87  bool import_lights=true,
88  bool import_animation=true,
89  bool import_materials=true,
90  bool resample_animation=false,
91  double resample_interval=1.0,
92  bool override_framerate=false,
93  int framerate=-1,
94  bool hide_joints_attached_to_skin=true,
95  bool convert_joints_to_zyx_rotation_order=false,
96  HOM_EnumValue &material_mode=HOM_fbxMaterialMode::FBXShaderNodes,
97  HOM_EnumValue &compatibility_mode=HOM_fbxCompatibilityMode::Maya,
98  bool single_precision_vertex_caches=false,
99  bool triangulate_nurbs=false,
100  bool triangulate_patches=false,
101  bool import_global_ambient_light=false,
102  bool import_blend_deformers_as_blend_sops=false,
103  bool segment_scale_already_baked_in=true,
104  bool convert_file_paths_to_relative=true,
105  bool unlock_geometry=false,
106  bool unlock_deformations=false,
107  bool import_nulls_as_subnets=false,
108  bool import_into_object_subnet=true,
109  bool convert_into_y_up_coordinate_system=false) = 0;
110 
111  SWIGOUT(%ignore addOpaqueEventCallback;)
112  virtual void addOpaqueEventCallback(void *callback) = 0;
113  SWIGOUT(%ignore removeOpaqueEventCallback;)
114  virtual void removeOpaqueEventCallback(void *callback) = 0;
115  SWIGOUT(%ignore opaqueEventCallbacks;)
116  virtual std::vector<void *> opaqueEventCallbacks() = 0;
117  SWIGOUT(%ignore clearOpaqueEventCallbacks;)
118  virtual void clearOpaqueEventCallbacks() = 0;
119 
120 #ifdef SWIG
121 %extend
122 {
123  void addEventCallback(InterpreterObject callback)
124  { self->addOpaqueEventCallback(callback); }
125 
126  void removeEventCallback(InterpreterObject callback)
127  { self->removeOpaqueEventCallback(callback); }
128 
129  void clearEventCallbacks()
130  { self->clearOpaqueEventCallbacks(); }
131 
132  // Note that we return a vector of borrowed references because swig
133  // will increment the reference counts.
134  std::vector<InterpreterObject> eventCallbacks()
135  {
136  std::vector<void *> opaque_callbacks(self->opaqueEventCallbacks());
137 
138  std::vector<InterpreterObject> callbacks;
139  for (int i=0; i< opaque_callbacks.size(); ++i)
140  callbacks.push_back((InterpreterObject)opaque_callbacks[i]);
141  return callbacks;
142  }
143 }
144 #endif
145 
146 };
147 
148 #endif
virtual ~HOM_hipFile()
Definition: HOM_hipFile.h:25
GLsizei const GLchar *const * string
Definition: glcorearb.h:813
GLsizei const GLchar *const * path
Definition: glcorearb.h:3340
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:344
png_uint_32 i
Definition: png.h:2877
#define HOM_API
Definition: HOM_API.h:13
GLuint const GLchar * name
Definition: glcorearb.h:785
virtual void save(const std::string &file_name, HOM_Node *template_node=NULL, HOM_HDAOptions *options=NULL, bool compile_contents=false, bool black_box=false, bool create_backup=true)=0