summaryrefslogtreecommitdiff
path: root/src/py
diff options
context:
space:
mode:
Diffstat (limited to 'src/py')
-rwxr-xr-xsrc/py/libcamera/gen-py-controls.py10
-rw-r--r--src/py/libcamera/py_controls_generated.cpp.in5
-rw-r--r--src/py/libcamera/py_properties_generated.cpp.in5
3 files changed, 4 insertions, 16 deletions
diff --git a/src/py/libcamera/gen-py-controls.py b/src/py/libcamera/gen-py-controls.py
index 8ae8d512..8efbf95b 100755
--- a/src/py/libcamera/gen-py-controls.py
+++ b/src/py/libcamera/gen-py-controls.py
@@ -32,14 +32,12 @@ def generate_py(controls, mode):
name, ctrl = ctrls.popitem()
if vendor not in vendors and vendor != 'libcamera':
- vendors_class_def.append('class Py{}Controls\n{{\n}};\n'.format(vendor))
- vendor_defs.append('\tauto {} = py::class_<Py{}Controls>(controls, \"{}\");'.format(vendor, vendor, vendor))
+ vendor_mode_str = f'{vendor.capitalize()}{mode.capitalize()}'
+ vendors_class_def.append('class Py{}\n{{\n}};\n'.format(vendor_mode_str))
+ vendor_defs.append('\tauto {} = py::class_<Py{}>(controls, \"{}\");'.format(vendor, vendor_mode_str, vendor))
vendors.append(vendor)
- if ctrl.get('draft'):
- ns = 'libcamera::{}::draft::'.format(mode)
- container = 'draft'
- elif vendor != 'libcamera':
+ if vendor != 'libcamera':
ns = 'libcamera::{}::{}::'.format(mode, vendor)
container = vendor
else:
diff --git a/src/py/libcamera/py_controls_generated.cpp.in b/src/py/libcamera/py_controls_generated.cpp.in
index ec4b55ef..8d282ce5 100644
--- a/src/py/libcamera/py_controls_generated.cpp.in
+++ b/src/py/libcamera/py_controls_generated.cpp.in
@@ -17,16 +17,11 @@ class PyControls
{
};
-class PyDraftControls
-{
-};
-
${vendors_class_def}
void init_py_controls_generated(py::module& m)
{
auto controls = py::class_<PyControls>(m, "controls");
- auto draft = py::class_<PyDraftControls>(controls, "draft");
${vendors_defs}
${controls}
diff --git a/src/py/libcamera/py_properties_generated.cpp.in b/src/py/libcamera/py_properties_generated.cpp.in
index f7b5ec8c..e3802b81 100644
--- a/src/py/libcamera/py_properties_generated.cpp.in
+++ b/src/py/libcamera/py_properties_generated.cpp.in
@@ -17,16 +17,11 @@ class PyProperties
{
};
-class PyDraftProperties
-{
-};
-
${vendors_class_def}
void init_py_properties_generated(py::module& m)
{
auto controls = py::class_<PyProperties>(m, "properties");
- auto draft = py::class_<PyDraftProperties>(controls, "draft");
${vendors_defs}
${controls}