From 4e01b1e56162c3ce61b12abc388c1511b6bd3fdd Mon Sep 17 00:00:00 2001 From: Joseph Mirabel <jmirabel@laas.fr> Date: Mon, 5 Mar 2018 14:33:38 +0100 Subject: [PATCH] Do not add mainWindow and osg variable to Python --- src/gui/mainwindow.cc | 3 --- src/gui/pythonwidget.cc | 3 --- 2 files changed, 6 deletions(-) diff --git a/src/gui/mainwindow.cc b/src/gui/mainwindow.cc index 4ab77ca..6c4a1ee 100644 --- a/src/gui/mainwindow.cc +++ b/src/gui/mainwindow.cc @@ -257,9 +257,6 @@ namespace gepetto { if (osgWindows_.empty()) { // This OSGWidget should be the central view centralWidget_ = osgWidget; -#if GEPETTO_GUI_HAS_PYTHONQT - pythonWidget_->addToContext("osg", centralWidget_); -#endif connect(ui_->actionHome, SIGNAL (triggered()), centralWidget_, SLOT (onHome())); ui_->osgToolBar->show(); diff --git a/src/gui/pythonwidget.cc b/src/gui/pythonwidget.cc index 8cc57ae..7e67d33 100644 --- a/src/gui/pythonwidget.cc +++ b/src/gui/pythonwidget.cc @@ -57,13 +57,10 @@ namespace gepetto { PythonQt::self()->registerCPPClass ("MainWindow", "QMainWindow", "gepetto"); PythonQt::self()->registerCPPClass ("OSGWidget" , "QWidget" , "gepetto"); - mainContext.addObject("mainWindow", MainWindow::instance()); - mainContext.addObject("windowsManager", MainWindow::instance()->osg().get()); console_->QTextEdit::clear(); console_->consoleMessage( "PythonQt command prompt\n" "Use Shift+Enter for multiline code.\n" - "Variable mainWindow and osg are available.\n" ); console_->appendCommandPrompt(); -- GitLab