File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -810,7 +810,7 @@ ObjectID Node3DEditorViewport::_select_ray(const Point2 &p_pos) const {
810810 Vector<Node3D *> nodes_with_gizmos = Node3DEditor::get_singleton ()->gizmo_bvh_ray_query (pos, pos + ray * camera->get_far ());
811811
812812 for (Node3D *spat : nodes_with_gizmos) {
813- if (!spat) {
813+ if (!spat || _is_node_locked (spat) ) {
814814 continue ;
815815 }
816816
@@ -1557,7 +1557,7 @@ void Node3DEditorViewport::_surface_focus_exit() {
15571557 view_menu->set_disable_shortcuts (true );
15581558}
15591559
1560- bool Node3DEditorViewport ::_is_node_locked (const Node *p_node) {
1560+ bool Node3DEditorViewport::_is_node_locked (const Node *p_node) const {
15611561 return p_node->get_meta (" _edit_lock_" , false );
15621562}
15631563
@@ -1935,11 +1935,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
19351935
19361936 if (after != EditorPlugin::AFTER_GUI_INPUT_CUSTOM) {
19371937 // Single item selection.
1938- Vector<_RayResult> selection;
1939- _find_items_at_pos (b->get_position (), selection, false );
1940- if (!selection.is_empty ()) {
1941- clicked = selection[0 ].item ->get_instance_id ();
1942- }
1938+ clicked = _select_ray (b->get_position ());
19431939
19441940 selection_in_progress = true ;
19451941
Original file line number Diff line number Diff line change @@ -460,7 +460,7 @@ class Node3DEditorViewport : public Control {
460460
461461 bool previewing_camera = false ;
462462 bool previewing_cinema = false ;
463- bool _is_node_locked (const Node *p_node);
463+ bool _is_node_locked (const Node *p_node) const ;
464464 void _preview_exited_scene ();
465465 void _toggle_camera_preview (bool );
466466 void _toggle_cinema_preview (bool );
You can’t perform that action at this time.
0 commit comments