Browse Source

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 12 years ago
parent
commit
473c56a430
1 changed files with 1 additions and 6 deletions
  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;