Info regarding the use of pybind11 for python bindings generation

I wanted to know how Open3d utilises pybind11 to generate it’s python bindings from the C++ header files. There isn’t much documentation about the same.

More precisely, I wanted to know how a particular interface file like camera.cpp is generated (in the camera module, in open3d_pybind): how the header of the C++ API is parsed and how the code for the interface file is generated (using scripts or manually, or something else).
Any 3rd party tools that are being used?
(Basically the whole pipeline of the pybind11 binding code generation :stuck_out_tongue_winking_eye:)

I am trying to make python bindings for a C++ library and I really liked the code organisation and how the bindings part is handled in Open3D and I would love to learn more about the same.

Please feel free to add any tips or any other stuff that you may think will help.

Unfortunately, these files are handwritten…:joy:
But you are right, codegen should be an ideal way for this task. Since we are pushing the GPU branch, codegen for advanced pybind seems inevitable. At a certain stage, we may switch to codegen and will keep you informed!

Thanks for the info :+1: