Skip to content
Snippets Groups Projects
Commit 4e01b1e5 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Do not add mainWindow and osg variable to Python

parent fd94519f
No related branches found
No related tags found
No related merge requests found
...@@ -257,9 +257,6 @@ namespace gepetto { ...@@ -257,9 +257,6 @@ namespace gepetto {
if (osgWindows_.empty()) { if (osgWindows_.empty()) {
// This OSGWidget should be the central view // This OSGWidget should be the central view
centralWidget_ = osgWidget; centralWidget_ = osgWidget;
#if GEPETTO_GUI_HAS_PYTHONQT
pythonWidget_->addToContext("osg", centralWidget_);
#endif
connect(ui_->actionHome, SIGNAL (triggered()), centralWidget_, SLOT (onHome())); connect(ui_->actionHome, SIGNAL (triggered()), centralWidget_, SLOT (onHome()));
ui_->osgToolBar->show(); ui_->osgToolBar->show();
......
...@@ -57,13 +57,10 @@ namespace gepetto { ...@@ -57,13 +57,10 @@ namespace gepetto {
PythonQt::self()->registerCPPClass ("MainWindow", "QMainWindow", "gepetto"); PythonQt::self()->registerCPPClass ("MainWindow", "QMainWindow", "gepetto");
PythonQt::self()->registerCPPClass ("OSGWidget" , "QWidget" , "gepetto"); PythonQt::self()->registerCPPClass ("OSGWidget" , "QWidget" , "gepetto");
mainContext.addObject("mainWindow", MainWindow::instance());
mainContext.addObject("windowsManager", MainWindow::instance()->osg().get());
console_->QTextEdit::clear(); console_->QTextEdit::clear();
console_->consoleMessage( console_->consoleMessage(
"PythonQt command prompt\n" "PythonQt command prompt\n"
"Use Shift+Enter for multiline code.\n" "Use Shift+Enter for multiline code.\n"
"Variable mainWindow and osg are available.\n"
); );
console_->appendCommandPrompt(); console_->appendCommandPrompt();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment