Commit 22b1b28b authored by Jan Möbius's avatar Jan Möbius

Implement python interface

parent 6c7be838
......@@ -7,11 +7,11 @@
namespace py = pybind11;
PYBIND11_EMBEDDED_MODULE(viewControlPlugin, m) {
PYBIND11_EMBEDDED_MODULE(ViewControl, m) {
QObject* pluginPointer = getPluginPointer("ViewControl");
// Export our core. Make sure that the c++ worlds core objet is not deleted if
// Export our core. Make sure that the c++ worlds core object is not deleted if
// the python side gets deleted!!
py::class_< ViewControlPlugin,std::unique_ptr<ViewControlPlugin, py::nodelete> > view(m, "viewControl");
......@@ -27,3 +27,4 @@ PYBIND11_EMBEDDED_MODULE(viewControlPlugin, m) {
view.def("orthographicProjection", static_cast<void (ViewControlPlugin::*)(int)>(&ViewControlPlugin::orthographicProjection) );
}
......@@ -49,6 +49,7 @@
#include <OpenFlipper/BasePlugin/BaseInterface.hh>
#include <OpenFlipper/BasePlugin/LoggingInterface.hh>
#include <OpenFlipper/BasePlugin/PickingInterface.hh>
#include <OpenFlipper/BasePlugin/PythonInterface.hh>
#include <OpenFlipper/BasePlugin/ToolbarInterface.hh>
#include <OpenFlipper/BasePlugin/ContextMenuInterface.hh>
#include <OpenFlipper/common/Types.hh>
......@@ -79,7 +80,7 @@ struct ShaderInfo {
QStringList uniformsMin;
};
class ViewControlPlugin : public QObject, BaseInterface , PickingInterface, LoggingInterface, ToolbarInterface, ContextMenuInterface
class ViewControlPlugin : public QObject, BaseInterface , PickingInterface, LoggingInterface, ToolbarInterface, ContextMenuInterface, PythonInterface
{
Q_OBJECT
Q_INTERFACES(BaseInterface)
......@@ -87,6 +88,7 @@ class ViewControlPlugin : public QObject, BaseInterface , PickingInterface, Logg
Q_INTERFACES(LoggingInterface)
Q_INTERFACES(ToolbarInterface)
Q_INTERFACES(ContextMenuInterface)
Q_INTERFACES(PythonInterface)
Q_PLUGIN_METADATA(IID "org.OpenFlipper.Plugins.Plugin-ViewControl")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment