|
@@ -62,12 +62,6 @@ void GridMapEditor::_menu_option(int p_option) {
|
|
|
floor->set_value(floor->get_value() + 1);
|
|
|
} break;
|
|
|
|
|
|
- case MENU_OPTION_LOCK_VIEW: {
|
|
|
- int index = options->get_popup()->get_item_index(MENU_OPTION_LOCK_VIEW);
|
|
|
- lock_view = !options->get_popup()->is_item_checked(index);
|
|
|
-
|
|
|
- options->get_popup()->set_item_checked(index, lock_view);
|
|
|
- } break;
|
|
|
case MENU_OPTION_CLIP_DISABLED:
|
|
|
case MENU_OPTION_CLIP_ABOVE:
|
|
|
case MENU_OPTION_CLIP_BELOW: {
|
|
@@ -1080,20 +1074,6 @@ void GridMapEditor::_notification(int p_what) {
|
|
|
if (cgmt.operator->() != last_mesh_library) {
|
|
|
update_palette();
|
|
|
}
|
|
|
-
|
|
|
- if (lock_view) {
|
|
|
- EditorNode *editor = Object::cast_to<EditorNode>(get_tree()->get_root()->get_child(0));
|
|
|
-
|
|
|
- Plane p;
|
|
|
- p.normal[edit_axis] = 1.0;
|
|
|
- p.d = edit_floor[edit_axis] * node->get_cell_size()[edit_axis];
|
|
|
- p = node->get_transform().xform(p); // plane to snap
|
|
|
-
|
|
|
- Node3DEditorPlugin *sep = Object::cast_to<Node3DEditorPlugin>(editor->get_editor_plugin_screen());
|
|
|
- if (sep) {
|
|
|
- sep->snap_cursor_to_plane(p);
|
|
|
- }
|
|
|
- }
|
|
|
} break;
|
|
|
|
|
|
case NOTIFICATION_THEME_CHANGED: {
|
|
@@ -1187,8 +1167,6 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
|
|
|
spatial_editor_hb->hide();
|
|
|
|
|
|
options->set_text(TTR("Grid Map"));
|
|
|
- options->get_popup()->add_check_item(TTR("Snap View"), MENU_OPTION_LOCK_VIEW);
|
|
|
- options->get_popup()->add_separator();
|
|
|
options->get_popup()->add_item(TTR("Previous Floor"), MENU_OPTION_PREV_LEVEL, KEY_Q);
|
|
|
options->get_popup()->add_item(TTR("Next Floor"), MENU_OPTION_NEXT_LEVEL, KEY_E);
|
|
|
options->get_popup()->add_separator();
|