Kaynağa Gözat

Editor: Set viewport shading to solid when clearing.

Mr.doob 1 yıl önce
ebeveyn
işleme
85cd3cb6ca
2 değiştirilmiş dosya ile 11 ekleme ve 0 silme
  1. 4 0
      editor/js/Editor.js
  2. 7 0
      editor/js/Viewport.Controls.js

+ 4 - 0
editor/js/Editor.js

@@ -624,12 +624,16 @@ Editor.prototype = {
 
 		var objects = this.scene.children;
 
+		this.signals.sceneGraphChanged.active = false;
+
 		while ( objects.length > 0 ) {
 
 			this.removeObject( objects[ 0 ] );
 
 		}
 
+		this.signals.sceneGraphChanged.active = true;
+
 		this.geometries = {};
 		this.materials = {};
 		this.textures = {};

+ 7 - 0
editor/js/Viewport.Controls.js

@@ -59,6 +59,13 @@ function ViewportControls( editor ) {
 	} );
 	container.add( shadingSelect );
 
+	signals.editorCleared.add( function () {
+
+		shadingSelect.setValue( 'solid' );
+		editor.setViewportShading( shadingSelect.getValue() );
+
+	} );
+
 	update();
 
 	//