Browse Source

Editor: Support scenes without cameras.

Mr.doob 12 years ago
parent
commit
39648e3b35
1 changed files with 5 additions and 1 deletions
  1. 5 1
      editor/js/ui/Viewport.js

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

@@ -767,6 +767,10 @@ var Viewport = function ( signals ) {
 			controls.object = camera;
 			controls.update();
 
+		} else {
+
+			scene.add( camera );
+
 		}
 
 		if ( newClearColor ) {
@@ -806,7 +810,7 @@ var Viewport = function ( signals ) {
 		}
 
 		signals.sceneChanged.dispatch( scene );
-		signals.objectSelected.dispatch( null );
+		signals.objectSelected.dispatch( camera );
 
 	} );