Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Plugin-ViewControl
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenFlipper-Free
Plugin-ViewControl
Commits
22b1b28b
Commit
22b1b28b
authored
Feb 01, 2019
by
Jan Möbius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement python interface
parent
6c7be838
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
PythonInterface/Python.cc
PythonInterface/Python.cc
+3
-2
ViewControlPlugin.hh
ViewControlPlugin.hh
+3
-1
No files found.
PythonInterface/Python.cc
View file @
22b1b28b
...
...
@@ -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 obje
c
t 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
)
);
}
ViewControlPlugin.hh
View file @
22b1b28b
...
...
@@ -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"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment