Prechádzať zdrojové kódy

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 rokov pred
rodič
commit
473c56a430
1 zmenil súbory, kde vykonal 1 pridanie a 6 odobranie
  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;