File tree 2 files changed +4
-8
lines changed
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 {
810
810
Vector<Node3D *> nodes_with_gizmos = Node3DEditor::get_singleton ()->gizmo_bvh_ray_query (pos, pos + ray * camera->get_far ());
811
811
812
812
for (Node3D *spat : nodes_with_gizmos) {
813
- if (!spat) {
813
+ if (!spat || _is_node_locked (spat) ) {
814
814
continue ;
815
815
}
816
816
@@ -1557,7 +1557,7 @@ void Node3DEditorViewport::_surface_focus_exit() {
1557
1557
view_menu->set_disable_shortcuts (true );
1558
1558
}
1559
1559
1560
- bool Node3DEditorViewport ::_is_node_locked (const Node *p_node) {
1560
+ bool Node3DEditorViewport::_is_node_locked (const Node *p_node) const {
1561
1561
return p_node->get_meta (" _edit_lock_" , false );
1562
1562
}
1563
1563
@@ -1935,11 +1935,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
1935
1935
1936
1936
if (after != EditorPlugin::AFTER_GUI_INPUT_CUSTOM) {
1937
1937
// 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 ());
1943
1939
1944
1940
selection_in_progress = true ;
1945
1941
Original file line number Diff line number Diff line change @@ -460,7 +460,7 @@ class Node3DEditorViewport : public Control {
460
460
461
461
bool previewing_camera = false ;
462
462
bool previewing_cinema = false ;
463
- bool _is_node_locked (const Node *p_node);
463
+ bool _is_node_locked (const Node *p_node) const ;
464
464
void _preview_exited_scene ();
465
465
void _toggle_camera_preview (bool );
466
466
void _toggle_cinema_preview (bool );
You can’t perform that action at this time.
0 commit comments