Pārlūkot izejas kodu

Editor: changed selection to stay on after changing camera in viewport.

This is how it works in Blender. This allows you to keep working with selected object while looking at it from different angles.

Downside is you can't clear selection anymore just by clicking into empty space. This btw is the same in Blender, though maybe we could have some solution comparing state at mousedown and mouseup.
alteredq 13 gadi atpakaļ
vecāks
revīzija
473c56a430
1 mainītis faili ar 1 papildinājumiem un 6 dzēšanām
  1. 1 6
      editor/js/ui/Viewport.js

+ 1 - 6
editor/js/ui/Viewport.js

@@ -181,15 +181,10 @@ var Viewport = function ( signals ) {
 			if ( intersects.length > 0 ) {
 
 				selected = intersects[ 0 ].object;
-
-			} else {
-
-				selected = null;
+				signals.objectSelected.dispatch( selected );
 
 			}
 
-			signals.objectSelected.dispatch( selected );
-
 		}
 
 		controls.enabled = true;