diff --git a/editor/js/Editor.js b/editor/js/Editor.js index 05e031fa6e4533e5fe5572630214b57a7b7b090c..1056745d49aedf505779abed7e81b18a176a742b 100644 --- a/editor/js/Editor.js +++ b/editor/js/Editor.js @@ -45,6 +45,8 @@ var Editor = function () { this.loader = new Loader( this ); this.scene = new THREE.Scene(); + this.scene.name = 'Scene'; + this.sceneHelpers = new THREE.Scene(); this.object = {}; diff --git a/editor/js/Sidebar.Object3D.js b/editor/js/Sidebar.Object3D.js index e68cf975eb86730dcb095e02bea1516fa0ef3557..fcf91fde775f19594ea0941c5683779240b8584f 100644 --- a/editor/js/Sidebar.Object3D.js +++ b/editor/js/Sidebar.Object3D.js @@ -434,24 +434,13 @@ Sidebar.Object3D = function ( editor ) { signals.sceneGraphChanged.add( function () { var scene = editor.scene; - var options = {}; - options[ scene.id ] = 'Scene'; - - ( function addObjects( objects ) { - - for ( var i = 0, l = objects.length; i < l; i ++ ) { - - var object = objects[ i ]; + scene.traverse( function ( object ) { - options[ object.id ] = object.name; - - addObjects( object.children ); - - } + options[ object.id ] = object.name; - } )( scene.children ); + } ); objectParent.setOptions( options ); diff --git a/editor/js/Viewport.js b/editor/js/Viewport.js index 5113e6244b6210bf9f0d1e4faf2fbded77d9c686..78375440d58513dca44c947f08e6fcef279794d0 100644 --- a/editor/js/Viewport.js +++ b/editor/js/Viewport.js @@ -591,8 +591,6 @@ var Viewport = function ( editor ) { function render() { - console.trace(); - sceneHelpers.updateMatrixWorld(); scene.updateMatrixWorld(); diff --git a/editor/js/libs/ui.js b/editor/js/libs/ui.js index 07dc54dbf7721d48dfbb9ae600ee21530a1b82f9..b12379e5866804694f368f1ad8c1273ef3a6d11b 100644 --- a/editor/js/libs/ui.js +++ b/editor/js/libs/ui.js @@ -480,7 +480,13 @@ UI.Select.prototype.getValue = function () { UI.Select.prototype.setValue = function ( value ) { - this.dom.value = value; + value = String( value ); + + if ( this.dom.value !== value ) { + + this.dom.value = value; + + } return this;