From 4c39d08358cfc152258d96b33fadf99de0f40549 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Mon, 11 Jun 2018 11:02:25 -0700 Subject: [PATCH] Remove "Draw Collision Shapes" option from developer physics menu --- interface/src/Application.cpp | 3 --- interface/src/Application_render.cpp | 4 ---- interface/src/Menu.cpp | 1 - interface/src/Menu.h | 1 - libraries/entities-renderer/src/RenderableModelEntityItem.cpp | 1 + 5 files changed, 1 insertion(+), 9 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index c5857dac53..ab494a2f93 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2250,9 +2250,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo DependencyManager::get()->setSetPrecisionPickingOperator([&](unsigned int rayPickID, bool value) { DependencyManager::get()->setPrecisionPicking(rayPickID, value); }); - EntityTreeRenderer::setRenderDebugHullsOperator([] { - return Menu::getInstance()->isOptionChecked(MenuOption::PhysicsShowHulls); - }); // Preload Tablet sounds DependencyManager::get()->preloadSounds(); diff --git a/interface/src/Application_render.cpp b/interface/src/Application_render.cpp index 2208b3187c..2daa49dcf7 100644 --- a/interface/src/Application_render.cpp +++ b/interface/src/Application_render.cpp @@ -205,10 +205,6 @@ void Application::runRenderFrame(RenderArgs* renderArgs) { RenderArgs::DebugFlags renderDebugFlags = RenderArgs::RENDER_DEBUG_NONE; - if (Menu::getInstance()->isOptionChecked(MenuOption::PhysicsShowHulls)) { - renderDebugFlags = static_cast(renderDebugFlags | - static_cast(RenderArgs::RENDER_DEBUG_HULLS)); - } renderArgs->_debugFlags = renderDebugFlags; } diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index 6f4300862d..20aefbe7e0 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -725,7 +725,6 @@ Menu::Menu() { addCheckableActionToQMenuAndActionHash(physicsOptionsMenu, MenuOption::PhysicsShowOwned, 0, false, drawStatusConfig, SLOT(setShowNetwork(bool))); } - addCheckableActionToQMenuAndActionHash(physicsOptionsMenu, MenuOption::PhysicsShowHulls, 0, false, qApp->getEntities().data(), SIGNAL(setRenderDebugHulls())); addCheckableActionToQMenuAndActionHash(physicsOptionsMenu, MenuOption::PhysicsShowBulletWireframe, 0, false, qApp, SLOT(setShowBulletWireframe(bool))); addCheckableActionToQMenuAndActionHash(physicsOptionsMenu, MenuOption::PhysicsShowBulletAABBs, 0, false, qApp, SLOT(setShowBulletAABBs(bool))); diff --git a/interface/src/Menu.h b/interface/src/Menu.h index 6fb089acd8..1ab7faa82b 100644 --- a/interface/src/Menu.h +++ b/interface/src/Menu.h @@ -141,7 +141,6 @@ namespace MenuOption { const QString Overlays = "Show Overlays"; const QString PackageModel = "Package Model as .fst..."; const QString Pair = "Pair"; - const QString PhysicsShowHulls = "Draw Collision Shapes"; const QString PhysicsShowOwned = "Highlight Simulation Ownership"; const QString VerboseLogging = "Verbose Logging"; const QString PhysicsShowBulletWireframe = "Show Bullet Collision"; diff --git a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp index e0039082fa..f12d2dc180 100644 --- a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp @@ -1052,6 +1052,7 @@ using namespace render; using namespace render::entities; ModelEntityRenderer::ModelEntityRenderer(const EntityItemPointer& entity) : Parent(entity) { + // TODO: Re-add menu item in Menu.ccp/Menu.h when collision model updates in doRenderUpdateSynchronousTyped(...) are re-implemented connect(DependencyManager::get().data(), &EntityTreeRenderer::setRenderDebugHulls, this, [&] { _needsCollisionGeometryUpdate = true; emit requestRenderUpdate();