summaryrefslogtreecommitdiff
path: root/tools/editor/plugins
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-09-18 00:18:57 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-09-18 00:18:57 -0300
commit7d6b160a444079fd6856b648ed077bf698b3b70c (patch)
tree8553b7174ffdc9f5ca4c0bc780ee04a12f96a72c /tools/editor/plugins
parente0ce701c8c5216fa95d0931927e3e1570c40f3ae (diff)
fix skeleton AABB computation, addeded shadeless view mode
Diffstat (limited to 'tools/editor/plugins')
-rw-r--r--tools/editor/plugins/spatial_editor_plugin.cpp13
-rw-r--r--tools/editor/plugins/spatial_editor_plugin.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp
index 78df6ffa0c..95622f72f3 100644
--- a/tools/editor/plugins/spatial_editor_plugin.cpp
+++ b/tools/editor/plugins/spatial_editor_plugin.cpp
@@ -2662,6 +2662,7 @@ void SpatialEditor::_menu_item_pressed(int p_option) {
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_DISPLAY_NORMAL), true );
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_DISPLAY_WIREFRAME), false );
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_DISPLAY_OVERDRAW), false );
+ view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_DISPLAY_SHADELESS), false );
} break;
case MENU_VIEW_DISPLAY_WIREFRAME: {
@@ -2670,6 +2671,7 @@ void SpatialEditor::_menu_item_pressed(int p_option) {
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_DISPLAY_NORMAL), false );
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_DISPLAY_WIREFRAME), true );
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_DISPLAY_OVERDRAW), false );
+ view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_DISPLAY_SHADELESS), false );
} break;
case MENU_VIEW_DISPLAY_OVERDRAW: {
@@ -2678,6 +2680,16 @@ void SpatialEditor::_menu_item_pressed(int p_option) {
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_DISPLAY_NORMAL), false );
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_DISPLAY_WIREFRAME), false );
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_DISPLAY_OVERDRAW), true );
+ view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_DISPLAY_SHADELESS), false );
+
+ } break;
+ case MENU_VIEW_DISPLAY_SHADELESS: {
+
+ VisualServer::get_singleton()->scenario_set_debug( get_scene()->get_root()->get_world()->get_scenario(), VisualServer::SCENARIO_DEBUG_SHADELESS );
+ view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_DISPLAY_NORMAL), false );
+ view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_DISPLAY_WIREFRAME), false );
+ view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_DISPLAY_OVERDRAW), false );
+ view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_DISPLAY_SHADELESS), true );
} break;
case MENU_VIEW_ORIGIN: {
@@ -3366,6 +3378,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
p->add_check_item("Display Normal",MENU_VIEW_DISPLAY_NORMAL);
p->add_check_item("Display Wireframe",MENU_VIEW_DISPLAY_WIREFRAME);
p->add_check_item("Display Overdraw",MENU_VIEW_DISPLAY_OVERDRAW);
+ p->add_check_item("Display Shadeless",MENU_VIEW_DISPLAY_SHADELESS);
p->add_separator();
p->add_check_item("View Origin",MENU_VIEW_ORIGIN);
p->add_check_item("View Grid",MENU_VIEW_GRID);
diff --git a/tools/editor/plugins/spatial_editor_plugin.h b/tools/editor/plugins/spatial_editor_plugin.h
index 29719cb80c..bdeac2e4ef 100644
--- a/tools/editor/plugins/spatial_editor_plugin.h
+++ b/tools/editor/plugins/spatial_editor_plugin.h
@@ -348,6 +348,7 @@ private:
MENU_VIEW_DISPLAY_NORMAL,
MENU_VIEW_DISPLAY_WIREFRAME,
MENU_VIEW_DISPLAY_OVERDRAW,
+ MENU_VIEW_DISPLAY_SHADELESS,
MENU_VIEW_ORIGIN,
MENU_VIEW_GRID,
MENU_VIEW_CAMERA_SETTINGS,