HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_ViewerStateTemplate.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_ViewerStateTemplate_h
10 #define HOM_ViewerStateTemplate_h
11 
12 #include "HOM_API.h"
13 #include "HOM_Module.h"
14 #include "HOM_EnumValue.h"
15 #include "HOM_Defines.h"
16 #include "HOM_ViewerStateMenu.h"
17 #include "HOM_NodeTypeCategory.h"
18 
19 #include <string>
20 #include <vector>
21 #include <utility>
22 
23 SWIGOUT(%rename(ViewerStateTemplate) HOM_ViewerStateTemplate;)
24 SWIGOUT(%feature("notabstract") HOM_ViewerStateTemplate;)
25 
27 {
28 public:
29  typedef std::vector< std::pair<std::string, std::string> > Bindings;
30  typedef std::vector< std::string > HandleParmNames;
31  typedef std::vector< std::vector<std::string> > MenuItemParms;
32 
33 #ifdef SWIG
34 %extend
35 {
37  HOM_ViewerStateTemplate(
38  std::string const & type_name,
39  std::string const & label,
40  HOM_NodeTypeCategory const & category,
41  std::vector<HOM_NodeTypeCategory*> const& contexts =
42  std::vector<HOM_NodeTypeCategory*>())
43  {
44  return HOM().newViewerStateTemplate(type_name, label, category, contexts);
45  }
46 }
47 #else
49  { HOM_CONSTRUCT_OBJECT(this) }
50 #endif
51 
53  { HOM_DESTRUCT_OBJECT(this) }
54 
55  virtual std::string __repr__() = 0;
56 
57  virtual std::string typeName() const = 0;
58 
59  virtual std::string categoryName() const = 0;
60 
61  virtual std::vector<HOM_NodeTypeCategory*> contexts() const = 0;
62 
63  SWIGOUT(%ignore bindFactory_internal;)
64  virtual void bindFactory_internal(void *callback) = 0;
65 
66  SWIGOUT(%kwargs bindParameter;)
67  virtual void bindParameter(
68  HOM_EnumValue const& param_type,
69  std::string const& name=std::string(),
70  std::string const& label=std::string(),
71  MenuItemParms const & menu_items=MenuItemParms(),
72  bool menu_as_button_strip=false,
73  hboost::any default_value=hboost::any(),
74  int num_components=1,
75  double min_limit=0,
76  double max_limit=1,
77  bool align=false,
78  bool toolbox=true) = 0;
79 
80  SWIGOUT(%kwargs bindHandle;)
81  virtual void bindHandle(
82  std::string const& handle_type,
83  std::string const& name,
84  std::string const& settings=std::string(),
85  bool cache_previous_parms = false,
86  HandleParmNames const& handle_parms = HandleParmNames()) = 0;
87 
88  SWIGOUT(%kwargs bindHandleStatic;)
89  virtual void bindHandleStatic(
90  std::string const& handle_type,
91  std::string const& name,
92  Bindings const & bindings,
93  std::string const& settings=std::string() ) = 0;
94 
95  SWIGOUT(%kwargs bindGadget;)
96  virtual void bindGadget(HOM_EnumValue const & drawable_type, std::string const & name,
97  std::string const & label=std::string()) = 0;
98 
99  SWIGOUT(%kwargs bindGeometrySelector;)
100  virtual void bindGeometrySelector(
101  std::string const& prompt,
102  bool allow_drag=false,
103  bool quick_select=true,
104  bool auto_start=true,
105  bool use_existing_selection=true,
106  std::string const& initial_selection=std::string(),
107  HOM_EnumValue * initial_selection_type=nullptr,
108  bool ordered=false,
109  std::vector<HOM_EnumValue *> const& geometry_types=std::vector<HOM_EnumValue *>(),
110  std::vector<HOM_EnumValue *> const& primitive_types=std::vector<HOM_EnumValue *>(),
111  bool allow_other_sops=true,
112  bool consume_selection=true,
113  HOM_EnumValue const& secure_selection = HOM_secureSelectionOption::Obey,
114  std::string const& hotkey=std::string(),
115  std::string const& name=std::string()) = 0;
116 
117  SWIGOUT(%kwargs bindObjectSelector;)
118  virtual void bindObjectSelector(
119  std::string const& prompt,
120  bool quick_select=true,
121  bool auto_start=true,
122  bool use_existing_selection=true,
123  bool allow_multisel = true,
124  HOM_EnumValue const& secure_selection = HOM_secureSelectionOption::Obey,
125  std::vector<std::string> const & allowed_types = std::vector<std::string>(1, "*"),
126  std::string const& hotkey=std::string(),
127  std::string const& name=std::string()) = 0;
128 
129  SWIGOUT(%kwargs bindSceneGraphSelector;)
130  virtual void bindSceneGraphSelector(
131  std::string const& prompt,
132  bool allow_drag = true,
133  bool quick_select = true,
134  bool auto_start=true,
135  bool use_existing_selection = true,
136  bool allow_multisel = true,
137  bool consume_selection = false,
138  HOM_EnumValue const& secure_selection = HOM_secureSelectionOption::Obey,
139  std::vector<std::string> const& prior_selection_paths = std::vector<std::string>(),
140  HOM_EnumValue const& prim_mask = HOM_scenePrimMask::ViewerSetting,
141  std::string const& path_prefix_mask = std::string(),
142  std::string const& prim_kind = std::string(),
143  std::string const& hotkey = std::string(),
144  std::string const& name = std::string()) = 0;
145 
146  SWIGOUT(%kwargs bindDynamicsSelector;)
147  virtual void bindDynamicsSelector(
148  std::string const& prompt,
149  bool auto_start=true,
150  bool allow_objects = true,
151  bool allow_modifiers = false,
152  bool quick_select = false,
153  bool use_existing_selection = true,
154  bool allow_multisel = true,
155  HOM_EnumValue const& secure_selection = HOM_secureSelectionOption::Obey,
156  std::string const& hotkey=std::string(),
157  std::string const& name=std::string()) = 0;
158 
159  SWIGOUT(%kwargs bindDynamicsPointSelector;)
160  virtual void bindDynamicsPointSelector(
161  std::string const& prompt,
162  bool auto_start=true,
163  bool allow_objects = true,
164  bool allow_modifiers = false,
165  bool quick_select = false,
166  bool use_existing_selection = true,
167  bool allow_multisel = true,
168  bool only_select_points = true,
169  bool object_based_point_selection = false,
170  bool use_last_selected_object = false,
171  HOM_EnumValue const& secure_selection = HOM_secureSelectionOption::Obey,
172  std::string const& hotkey=std::string(),
173  std::string const& name=std::string()) = 0;
174 
175  SWIGOUT(%kwargs bindDynamicsPolygonSelector;)
176  virtual void bindDynamicsPolygonSelector(
177  std::string const& prompt,
178  bool auto_start=true,
179  bool quick_select = false,
180  bool use_existing_selection = true,
181  bool object_based_point_selection = false,
182  bool use_last_selected_object = false,
183  HOM_EnumValue const& secure_selection = HOM_secureSelectionOption::Obey,
184  std::string const& hotkey=std::string(),
185  std::string const& name=std::string()) = 0;
186 
187  SWIGOUT(%kwargs bindSelector;)
188  virtual void bindSelector(
189  std::string const& name,
190  std::string const& selector_type,
191  std::string const& prompt,
192  std::vector<HOM_EnumValue *> primitive_types = std::vector<HOM_EnumValue *>(),
193  std::string const& group_parm_name = std::string(),
194  int input_index = 0,
195  bool input_required = true,
196  bool allow_dragging = true ) = 0;
197 
198  virtual void bindMenu( HOM_ViewerStateMenu const & menu ) = 0;
199 
200  virtual void bindIcon( std::string const & name ) = 0;
201 
202  #ifdef SWIG
203 %extend
204 {
205  virtual void bindFactory(InterpreterObject callback)
206  {
207  self->bindFactory_internal(callback);
208  }
209 }
210 #endif // SWIG
211 };
212 
213 #endif // HOM_ViewerStateTemplate_h
214 
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1210
GLuint const GLchar * name
Definition: glew.h:1814
OIIO_API bool rename(string_view from, string_view to, std::string &err)
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:349
virtual HOM_ViewerStateTemplate * newViewerStateTemplate(std::string const &type_name, std::string const &label, HOM_NodeTypeCategory const &category, std::vector< HOM_NodeTypeCategory * > const &contexts)=0
bool any(const vbool4 &v)
Definition: simd.h:3372
#define HOM_API
Definition: HOM_API.h:13
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1209
GLuint GLsizei GLsizei GLchar * label
Definition: glew.h:8986
GLsizei const GLchar *const * string
Definition: glew.h:1844
std::vector< std::pair< std::string, std::string > > Bindings
std::vector< std::string > HandleParmNames
HOM_API HOM_Module & HOM()
std::vector< std::vector< std::string > > MenuItemParms