1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 //    names, trademarks, service marks, or product names of the Licensor
11 //    and its affiliates, except as required to comply with Section 4(c) of
12 //    the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 //     http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 #include <boost/python/class.hpp>
25 #include <boost/python/def.hpp>
26 #include <boost/python/tuple.hpp>
27 #include <boost/python/converter/from_python.hpp>
28 
29 #include "pxr/usdImaging/usdImagingGL/engine.h"
30 
31 #include "pxr/imaging/hd/command.h"
32 
33 using namespace boost::python;
34 
35 PXR_NAMESPACE_USING_DIRECTIVE
36 
37 using UsdImagingGLRendererCommandArgDescriptor = HdCommandArgDescriptor;
38 
39 using UsdImagingGLRendererCommandDescriptor = HdCommandDescriptor;
40 
41 void
wrapRendererCommands()42 wrapRendererCommands()
43 {
44     // Wrap the UsdImagingGLRendererCommandArgDescriptor struct.
45     // Accessible as UsdImagingGL.RendererCommandArgDescriptor
46     class_<UsdImagingGLRendererCommandArgDescriptor>(
47             "RendererCommandArgDescriptor",
48             "Renderer Command Argument Metadata", no_init)
49         .add_property("argName",
50                 make_getter(
51                     &UsdImagingGLRendererCommandArgDescriptor::argName,
52                     return_value_policy<return_by_value>()))
53 
54         .def_readonly("defaultValue",
55                   &UsdImagingGLRendererCommandArgDescriptor::defaultValue)
56         ;
57 
58 
59 
60     // Wrap the UsdImagingGLRendererCommandDescriptor struct.
61     // Accessible as UsdImagingGL.RendererCommandDescriptor
62     class_<UsdImagingGLRendererCommandDescriptor>("RendererCommandDescriptor",
63             "Renderer Command Metadata", no_init)
64         .add_property("commandName",
65                 make_getter(
66                     &UsdImagingGLRendererCommandDescriptor::commandName,
67                     return_value_policy<return_by_value>()))
68 
69         .def_readonly("commandDescription",
70                   &UsdImagingGLRendererCommandDescriptor::commandDescription)
71 
72         .def_readonly("commandArgs",
73                   &UsdImagingGLRendererCommandDescriptor::commandArgs)
74         ;
75 }
76