소스 검색

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;