瀏覽代碼

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 年之前
父節點
當前提交
473c56a430
共有 1 個文件被更改,包括 1 次插入6 次删除
  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;