提交 51d594d9 编写于 作者: M Mr.doob

Editor: Symbol when object has script.

上级 5fd1823e
......@@ -158,3 +158,9 @@ textarea, input { outline: none; } /* osx */
#outliner .MeshPhongMaterial {
color: #ffaa88;
}
/* */
#outliner .Script:after {
content: '{...}' /* ❮/❯ */
}
......@@ -458,10 +458,10 @@ Editor.prototype = {
var camera = loader.parse( json.camera );
this.camera.copy( camera );
this.history.fromJSON( json.history );
this.scripts = json.scripts;
this.setScene( loader.parse( json.scene ) );
this.scripts = json.scripts;
this.history.fromJSON( json.history );
},
......
......@@ -128,7 +128,19 @@ Sidebar.Scene = function ( editor ) {
var options = [];
options.push( { static: true, value: camera.id, html: '<span class="type ' + camera.type + '"></span> ' + camera.name } );
options.push( { static: true, value: scene.id, html: '<span class="type ' + scene.type + '"></span> ' + scene.name } );
options.push( { static: true, value: scene.id, html: '<span class="type ' + scene.type + '"></span> ' + scene.name + getScript( scene.uuid ) } );
function getScript( uuid ) {
if ( editor.scripts[ uuid ] !== undefined ) {
return ' <span class="type Script"></span>';
}
return '';
}
( function addObjects( objects, pad ) {
......@@ -148,6 +160,8 @@ Sidebar.Scene = function ( editor ) {
}
html += getScript( object.uuid );
options.push( { value: object.id, html: html } );
addObjects( object.children, pad + '&nbsp;&nbsp;&nbsp;' );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册