Hide the 3D editor selection box when View Gizmos is disabled
This commit is contained in:
parent
24a783afe3
commit
32cb88b410
|
@ -4637,7 +4637,9 @@ Object *Node3DEditor::_get_editor_data(Object *p_what) {
|
|||
RS::get_singleton()->instance_geometry_set_cast_shadows_setting(
|
||||
si->sbox_instance,
|
||||
RS::SHADOW_CASTING_SETTING_OFF);
|
||||
RS::get_singleton()->instance_set_layer_mask(si->sbox_instance, 1 << Node3DEditorViewport::MISC_TOOL_LAYER);
|
||||
// Use the Edit layer to hide the selection box when View Gizmos is disabled, since it is a bit distracting.
|
||||
// It's still possible to approximately guess what is selected by looking at the manipulation gizmo position.
|
||||
RS::get_singleton()->instance_set_layer_mask(si->sbox_instance, 1 << Node3DEditorViewport::GIZMO_EDIT_LAYER);
|
||||
RS::get_singleton()->instance_geometry_set_flag(si->sbox_instance, RS::INSTANCE_FLAG_IGNORE_OCCLUSION_CULLING, true);
|
||||
si->sbox_instance_xray = RenderingServer::get_singleton()->instance_create2(
|
||||
selection_box_xray->get_rid(),
|
||||
|
@ -4645,7 +4647,9 @@ Object *Node3DEditor::_get_editor_data(Object *p_what) {
|
|||
RS::get_singleton()->instance_geometry_set_cast_shadows_setting(
|
||||
si->sbox_instance_xray,
|
||||
RS::SHADOW_CASTING_SETTING_OFF);
|
||||
RS::get_singleton()->instance_set_layer_mask(si->sbox_instance_xray, 1 << Node3DEditorViewport::MISC_TOOL_LAYER);
|
||||
// Use the Edit layer to hide the selection box when View Gizmos is disabled, since it is a bit distracting.
|
||||
// It's still possible to approximately guess what is selected by looking at the manipulation gizmo position.
|
||||
RS::get_singleton()->instance_set_layer_mask(si->sbox_instance_xray, 1 << Node3DEditorViewport::GIZMO_EDIT_LAYER);
|
||||
RS::get_singleton()->instance_geometry_set_flag(si->sbox_instance, RS::INSTANCE_FLAG_IGNORE_OCCLUSION_CULLING, true);
|
||||
|
||||
return si;
|
||||
|
|
Loading…
Reference in New Issue