Skip to content

Commit

Permalink
Editor: Set viewport shading to solid when clearing.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Jan 30, 2024
1 parent 70fb9ca commit 85cd3cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions editor/js/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {};
Expand Down
7 changes: 7 additions & 0 deletions editor/js/Viewport.Controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ function ViewportControls( editor ) {
} );
container.add( shadingSelect );

signals.editorCleared.add( function () {

shadingSelect.setValue( 'solid' );
editor.setViewportShading( shadingSelect.getValue() );

} );

update();

//
Expand Down

0 comments on commit 85cd3cb

Please sign in to comment.