Browse Source

Removed *.uuid.

Mr.doob 12 years ago
parent
commit
0b62713ccc

+ 55 - 75
editor/js/Editor.js

@@ -368,14 +368,12 @@ Editor.prototype = {
 
 
     for ( var i in list ) {
     for ( var i in list ) {
 
 
-      if ( !list[ i ].uuid ) list[ i ].uuid = this.uuid();
-      this.objects[ list[ i ].uuid ] = list[ i ];
+      this.objects[ list[ i ].id ] = list[ i ];
       this.addHelper( list[ i ] );
       this.addHelper( list[ i ] );
 
 
       if ( list[ i ].target ) {
       if ( list[ i ].target ) {
 
 
-        if ( !list[ i ].target.uuid ) list[ i ].target.uuid = this.uuid();
-        this.objects[ list[ i ].target.uuid ] = list[ i ].target;
+        this.objects[ list[ i ].target.id ] = list[ i ].target;
 
 
       }
       }
 
 
@@ -412,27 +410,27 @@ Editor.prototype = {
 
 
     if ( object instanceof THREE.PointLight ) {
     if ( object instanceof THREE.PointLight ) {
 
 
-      this.helpers[ object.uuid ] = new THREE.PointLightHelper( object, 10 );
-      this.sceneHelpers.add( this.helpers[ object.uuid ] );
-      this.helpers[ object.uuid ].lightSphere.uuid = object.uuid;
+      this.helpers[ object.id ] = new THREE.PointLightHelper( object, 10 );
+      this.sceneHelpers.add( this.helpers[ object.id ] );
+      this.helpers[ object.id ].lightSphere.id = object.id;
 
 
     } else if ( object instanceof THREE.DirectionalLight ) {
     } else if ( object instanceof THREE.DirectionalLight ) {
 
 
-      this.helpers[ object.uuid ] = new THREE.DirectionalLightHelper( object, 10 );
-      this.sceneHelpers.add( this.helpers[ object.uuid ] );
-      this.helpers[ object.uuid ].lightSphere.uuid = object.uuid;
+      this.helpers[ object.id ] = new THREE.DirectionalLightHelper( object, 10 );
+      this.sceneHelpers.add( this.helpers[ object.id ] );
+      this.helpers[ object.id ].lightSphere.id = object.id;
 
 
     } else if ( object instanceof THREE.SpotLight ) {
     } else if ( object instanceof THREE.SpotLight ) {
 
 
-      this.helpers[ object.uuid ] = new THREE.SpotLightHelper( object, 10 );
-      this.sceneHelpers.add( this.helpers[ object.uuid ] );
-      this.helpers[ object.uuid ].lightSphere.uuid = object.uuid;
+      this.helpers[ object.id ] = new THREE.SpotLightHelper( object, 10 );
+      this.sceneHelpers.add( this.helpers[ object.id ] );
+      this.helpers[ object.id ].lightSphere.id = object.id;
 
 
     } else if ( object instanceof THREE.HemisphereLight ) {
     } else if ( object instanceof THREE.HemisphereLight ) {
 
 
-      this.helpers[ object.uuid ] = new THREE.HemisphereLightHelper( object, 10 );
-      this.sceneHelpers.add( this.helpers[ object.uuid ] );
-      this.helpers[ object.uuid ].lightSphere.uuid = object.uuid;
+      this.helpers[ object.id ] = new THREE.HemisphereLightHelper( object, 10 );
+      this.sceneHelpers.add( this.helpers[ object.id ] );
+      this.helpers[ object.id ].lightSphere.id = object.id;
 
 
     }
     }
 
 
@@ -440,10 +438,10 @@ Editor.prototype = {
 
 
   deleteHelper: function( object ) {
   deleteHelper: function( object ) {
 
 
-    if ( this.helpers[ object.uuid ] ) {
+    if ( this.helpers[ object.id ] ) {
 
 
-      this.helpers[ object.uuid ].parent.remove( this.helpers[ object.uuid ] );
-      delete this.helpers[ object.uuid ];
+      this.helpers[ object.id ].parent.remove( this.helpers[ object.id ] );
+      delete this.helpers[ object.id ];
 
 
     }
     }
 
 
@@ -451,9 +449,7 @@ Editor.prototype = {
 
 
   addGeometry: function( geometry ) {
   addGeometry: function( geometry ) {
 
 
-    if (!geometry.uuid) geometry.uuid = this.uuid();
-    this.geometries[ geometry.uuid ] = geometry;
-
+    this.geometries[ geometry.id ] = geometry;
     signals.geometryAdded.dispatch( geometry );
     signals.geometryAdded.dispatch( geometry );
 
 
   },
   },
@@ -465,18 +461,14 @@ Editor.prototype = {
       this.defaultMaterial = material;
       this.defaultMaterial = material;
     }
     }
 
 
-    if (!material.uuid) material.uuid = this.uuid();
-    this.materials[ material.uuid ] = material;
-
+    this.materials[ material.id ] = material;
     signals.materialAdded.dispatch( material );
     signals.materialAdded.dispatch( material );
 
 
   },
   },
 
 
   addTexture: function( texture ) {
   addTexture: function( texture ) {
 
 
-    if (!texture.uuid) texture.uuid = this.uuid();
-    this.textures[ texture.uuid ] = texture;
-
+    this.textures[ texture.id ] = texture;
     signals.textureAdded.dispatch( texture );
     signals.textureAdded.dispatch( texture );
 
 
   },
   },
@@ -493,7 +485,7 @@ Editor.prototype = {
 
 
     for ( var i in list ) {
     for ( var i in list ) {
 
 
-      this.selected[ list[ i ].uuid ] = list[ i ];
+      this.selected[ list[ i ].id ] = list[ i ];
 
 
     }
     }
 
 
@@ -501,7 +493,7 @@ Editor.prototype = {
 
 
   },
   },
 
 
-  selectByUuid: function( uuid, additive ) {
+  selectById: function( id, additive ) {
 
 
     var list = this.list();
     var list = this.list();
 
 
@@ -509,7 +501,7 @@ Editor.prototype = {
 
 
     for ( var i in list ) {
     for ( var i in list ) {
 
 
-      if ( list[ i ].uuid == uuid ) this.select( list[ i ], true );
+      if ( list[ i ].id == id ) this.select( list[ i ], true );
 
 
     }
     }
 
 
@@ -537,7 +529,7 @@ Editor.prototype = {
 
 
     for ( var i in list ) {
     for ( var i in list ) {
 
 
-      if ( this.selected[ list[ i ].uuid ] ) delete this.selected[ list[ i ].uuid ];
+      if ( this.selected[ list[ i ].id ] ) delete this.selected[ list[ i ].id ];
 
 
     }
     }
 
 
@@ -545,9 +537,9 @@ Editor.prototype = {
 
 
   },
   },
 
 
-  deselectByUuid: function( uuid ) {
+  deselectById: function( id ) {
 
 
-    if ( this.selected[ uuid ] ) delete this.selected[ uuid ];
+    if ( this.selected[ id ] ) delete this.selected[ id ];
 
 
   },
   },
 
 
@@ -672,11 +664,11 @@ Editor.prototype = {
 
 
     function listFromMap( map, name ) {
     function listFromMap( map, name ) {
 
 
-      for ( var uuid in map ) {
+      for ( var id in map ) {
 
 
-        if ( scope.regexMatch( map[ uuid ].name, name ) ) {
+        if ( scope.regexMatch( map[ id ].name, name ) ) {
 
 
-          list.push( map[ uuid ] );
+          list.push( map[ id ] );
 
 
         }
         }
 
 
@@ -733,12 +725,12 @@ Editor.prototype = {
 
 
     for ( var i in list ) {
     for ( var i in list ) {
       
       
-      if ( this.objects[ list[ i ].uuid ] && list[ i ] != this.scene ) {
+      if ( this.objects[ list[ i ].id ] && list[ i ] != this.scene ) {
 
 
-        delete this.objects[ list[ i ].uuid ];
+        delete this.objects[ list[ i ].id ];
         this.deleteHelper( list[ i ] );
         this.deleteHelper( list[ i ] );
 
 
-        deletedObjects[ list[ i ].uuid ] = list[ i ];
+        deletedObjects[ list[ i ].id ] = list[ i ];
 
 
         if ( list[ i ] instanceof THREE.Light ) this.updateMaterials();
         if ( list[ i ] instanceof THREE.Light ) this.updateMaterials();
 
 
@@ -748,23 +740,23 @@ Editor.prototype = {
       
       
       }
       }
 
 
-      if ( this.geometries[ list[ i ].uuid ] ) {
+      if ( this.geometries[ list[ i ].id ] ) {
 
 
-        delete this.geometries[ list[ i ].uuid ];
+        delete this.geometries[ list[ i ].id ];
         signals.objectDeleted.dispatch();
         signals.objectDeleted.dispatch();
 
 
       } 
       } 
 
 
-      if ( this.materials[ list[ i ].uuid ] ) {
+      if ( this.materials[ list[ i ].id ] ) {
       
       
-        delete this.materials[ list[ i ].uuid ];
+        delete this.materials[ list[ i ].id ];
         signals.materialDeleted.dispatch();
         signals.materialDeleted.dispatch();
       
       
       }
       }
 
 
-      if ( this.textures[ list[ i ].uuid ] ) {
+      if ( this.textures[ list[ i ].id ] ) {
 
 
-        delete this.textures[ list[ i ].uuid ];
+        delete this.textures[ list[ i ].id ];
         signals.textureDeleted.dispatch();
         signals.textureDeleted.dispatch();
 
 
       }
       }
@@ -813,19 +805,19 @@ Editor.prototype = {
 
 
     this.scene.traverse( function( object ) {
     this.scene.traverse( function( object ) {
 
 
-      used[ object.uuid ] = object; 
+      used[ object.id ] = object; 
 
 
-      if ( object.geometry ) used[ object.geometry.uuid ] = object.geometry; 
+      if ( object.geometry ) used[ object.geometry.id ] = object.geometry; 
 
 
       if ( object.material ) {
       if ( object.material ) {
 
 
-        used[ object.material.uuid ] = object.material;
+        used[ object.material.id ] = object.material;
 
 
         for ( var i in object.material ){
         for ( var i in object.material ){
 
 
           if ( object.material[ i ] instanceof THREE.Texture ) {
           if ( object.material[ i ] instanceof THREE.Texture ) {
 
 
-            used[ object.material[ i ].uuid ] = object.material[ i ];
+            used[ object.material[ i ].id ] = object.material[ i ];
 
 
           }
           }
 
 
@@ -836,26 +828,26 @@ Editor.prototype = {
     } );
     } );
 
 
     if ( !type || type == 'object' ) {
     if ( !type || type == 'object' ) {
-      for ( var uuid in this.objects ) {
-        if ( !used[ uuid ] ) this.delete( this.objects[ uuid ] );
+      for ( var id in this.objects ) {
+        if ( !used[ id ] ) this.delete( this.objects[ id ] );
       }
       }
     }
     }
 
 
     if ( !type || type == 'geometry' ) {
     if ( !type || type == 'geometry' ) {
-      for ( var uuid in this.geometries ) {
-        if ( !used[ uuid ] ) this.delete( this.geometries[ uuid ] );
+      for ( var id in this.geometries ) {
+        if ( !used[ id ] ) this.delete( this.geometries[ id ] );
       }
       }
     }
     }
 
 
     if ( !type || type == 'material' ) {
     if ( !type || type == 'material' ) {
-      for ( var uuid in this.materials ) {
-        if ( !used[ uuid ] ) this.delete( this.materials[ uuid ] );
+      for ( var id in this.materials ) {
+        if ( !used[ id ] ) this.delete( this.materials[ id ] );
       }
       }
     }
     }
 
 
     if ( !type || type == 'texture' ) {
     if ( !type || type == 'texture' ) {
-      for ( var uuid in this.textures ) {
-        if ( !used[ uuid ] ) this.delete( this.textures[ uuid ] );
+      for ( var id in this.textures ) {
+        if ( !used[ id ] ) this.delete( this.textures[ id ] );
       }
       }
     }
     }
 
 
@@ -881,7 +873,7 @@ Editor.prototype = {
 
 
       if ( this.objects[ i ] ) {
       if ( this.objects[ i ] ) {
 
 
-        var clonedObject = this.objects[assets[ i ].uuid ].clone();
+        var clonedObject = this.objects[assets[ i ].id ].clone();
 
 
         clonedObject.traverse( function( child ) {
         clonedObject.traverse( function( child ) {
 
 
@@ -890,7 +882,7 @@ Editor.prototype = {
         } );
         } );
 
 
         this.addObject( clonedObject, assets[ i ].parent );
         this.addObject( clonedObject, assets[ i ].parent );
-        clones[ clonedObject.uuid ] = clonedObject;
+        clones[ clonedObject.id ] = clonedObject;
 
 
       }
       }
 
 
@@ -1033,7 +1025,7 @@ Editor.prototype = {
 
 
     parameters = parameters ? parameters : {};
     parameters = parameters ? parameters : {};
 
 
-    var uuid = geometry.uuid;
+    var id = geometry.id;
     var name = geometry.name;
     var name = geometry.name;
 
 
     if ( geometry instanceof THREE.PlaneGeometry )
     if ( geometry instanceof THREE.PlaneGeometry )
@@ -1058,14 +1050,14 @@ Editor.prototype = {
       geometry = this.createGeometry( 'torusknot', parameters );
       geometry = this.createGeometry( 'torusknot', parameters );
 
 
     geometry.computeBoundingSphere();
     geometry.computeBoundingSphere();
-    geometry.uuid = uuid;
+    geometry.id = id;
     geometry.name = name;
     geometry.name = name;
 
 
     for ( var i in editor.objects ) {
     for ( var i in editor.objects ) {
 
 
       var object = editor.objects[i];
       var object = editor.objects[i];
 
 
-      if ( object.geometry && object.geometry.uuid == uuid ) {
+      if ( object.geometry && object.geometry.id == id ) {
 
 
         delete object.__webglInit; // TODO: Remove hack (WebGLRenderer refactoring)
         delete object.__webglInit; // TODO: Remove hack (WebGLRenderer refactoring)
         object.geometry.dispose();
         object.geometry.dispose();
@@ -1121,18 +1113,6 @@ Editor.prototype = {
     var regex = new RegExp(filter);
     var regex = new RegExp(filter);
     return regex.test( name );
     return regex.test( name );
 
 
-  },
-
-  uuid: function() {
-
-    // http://note19.com/2007/05/27/javascript-guid-generator/
-
-    function s4() {
-      return Math.floor( ( 1 + Math.random() ) * 0x10000 ).toString( 16 ).substring( 1 );
-    };
-
-    return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
-
   }
   }
 
 
 }
 }

+ 2 - 2
editor/js/Menubar.File.js

@@ -120,7 +120,7 @@ Menubar.File = function ( signals ) {
 		var selected;
 		var selected;
 		// TODO: handle multiple selection
 		// TODO: handle multiple selection
 		for ( var i in editor.selected ) {
 		for ( var i in editor.selected ) {
-			if ( editor.objects[ editor.selected[ i ].uuid ] ) selected = editor.selected[ i ];
+			if ( editor.objects[ editor.selected[ i ].id ] ) selected = editor.selected[ i ];
 		}
 		}
 		if ( !selected ) return;
 		if ( !selected ) return;
 
 
@@ -159,7 +159,7 @@ Menubar.File = function ( signals ) {
 		var selected;
 		var selected;
 		// TODO: handle multiple selection
 		// TODO: handle multiple selection
 		for ( var i in editor.selected ) {
 		for ( var i in editor.selected ) {
-			if ( editor.objects[ editor.selected[ i ].uuid ] ) selected = editor.selected[ i ];
+			if ( editor.objects[ editor.selected[ i ].id ] ) selected = editor.selected[ i ];
 		}
 		}
 		if ( !selected ) return;
 		if ( !selected ) return;
 
 

+ 9 - 9
editor/js/Sidebar.Attributes.js

@@ -196,23 +196,23 @@ Sidebar.Attributes = function ( signals ) {
         else if ( object[ key ] && key === 'parent' ) {
         else if ( object[ key ] && key === 'parent' ) {
 
 
           var options = {};
           var options = {};
-          for ( var uuid in editor.objects ) if ( object.uuid != uuid ) options[ uuid ] = editor.objects[ uuid ].name;
+          for ( var id in editor.objects ) if ( object.id != id ) options[ id ] = editor.objects[ id ].name;
           param[ key ].setOptions( options );
           param[ key ].setOptions( options );
-          if ( object.parent !== undefined ) param[ key ].setValue( object.parent.uuid );
+          if ( object.parent !== undefined ) param[ key ].setValue( object.parent.id );
 
 
         } else if ( object[ key ] && key === 'geometry' ) {
         } else if ( object[ key ] && key === 'geometry' ) {
 
 
           var options = {};
           var options = {};
-          for ( var uuid in editor.geometries ) if ( object.uuid != uuid ) options[ uuid ] = editor.geometries[ uuid ].name;
+          for ( var id in editor.geometries ) if ( object.id != id ) options[ id ] = editor.geometries[ id ].name;
           param[ key ].setOptions( options );
           param[ key ].setOptions( options );
-          if ( object.geometry !== undefined ) param[ key ].setValue( object.geometry.uuid );
+          if ( object.geometry !== undefined ) param[ key ].setValue( object.geometry.id );
 
 
         } else if ( object[ key ] && key === 'material' ) {
         } else if ( object[ key ] && key === 'material' ) {
 
 
           var options = {};
           var options = {};
-          for ( var uuid in editor.materials ) if ( object.uuid != uuid ) options[ uuid ] = editor.materials[ uuid ].name;
+          for ( var id in editor.materials ) if ( object.id != id ) options[ id ] = editor.materials[ id ].name;
           param[ key ].setOptions( options );
           param[ key ].setOptions( options );
-          if ( object.material !== undefined ) param[ key ].setValue( object.material.uuid );
+          if ( object.material !== undefined ) param[ key ].setValue( object.material.id );
 
 
         } else if ( key == 'userData' ) {
         } else if ( key == 'userData' ) {
 
 
@@ -250,17 +250,17 @@ Sidebar.Attributes = function ( signals ) {
 
 
     else if ( key === 'parent' ) {
     else if ( key === 'parent' ) {
 
 
-      if ( param[ key ].getValue() != object.uuid )
+      if ( param[ key ].getValue() != object.id )
         editor.parent( object, editor.objects[ param[ key ].getValue() ] );
         editor.parent( object, editor.objects[ param[ key ].getValue() ] );
 
 
     } else if ( key === 'geometry' ) {
     } else if ( key === 'geometry' ) {
 
 
-      if ( param[ key ].getValue() != object.geometry.uuid )
+      if ( param[ key ].getValue() != object.geometry.id )
         object.geometry = editor.geometries[ param[ key ].getValue() ];
         object.geometry = editor.geometries[ param[ key ].getValue() ];
 
 
     } else if ( key === 'material' ) {
     } else if ( key === 'material' ) {
 
 
-      if ( param[ key ].getValue() != object.material.uuid )
+      if ( param[ key ].getValue() != object.material.id )
         object.material = editor.materials[ param[ key ].getValue() ];
         object.material = editor.materials[ param[ key ].getValue() ];
 
 
     } else if ( key === 'userData' ) {
     } else if ( key === 'userData' ) {

+ 6 - 6
editor/js/Sidebar.Outliner.Geometries.js

@@ -30,24 +30,24 @@ Sidebar.Outliner.Geometries = function ( signals ) {
 
 
   function getSelected() {
   function getSelected() {
 
 
-    var selectedUuids = [];
+    var selectedIds = [];
 
 
-    for ( var uuid in editor.selected ) {
+    for ( var id in editor.selected ) {
 
 
-      if ( editor.geometries[uuid] ) selectedUuids.push(uuid);
+      if ( editor.geometries[ id ] ) selectedIds.push( id );
 
 
     }
     }
 
 
     // TODO: implement multiple selection
     // TODO: implement multiple selection
-    outliner.setValue( selectedUuids.length ? selectedUuids[0] : null );
+    outliner.setValue( selectedIds.length ? selectedIds[0] : null );
 
 
   }
   }
 
 
 	function selectFromOutliner() {
 	function selectFromOutliner() {
 
 
-		var uuid = outliner.getValue();
+		var id = outliner.getValue();
 
 
-		editor.select( editor.geometries[uuid] );
+		editor.select( editor.geometries[ id ] );
 
 
 	}
 	}
 
 

+ 6 - 6
editor/js/Sidebar.Outliner.Materials.js

@@ -30,24 +30,24 @@ Sidebar.Outliner.Materials = function ( signals ) {
 
 
   function getSelected() {
   function getSelected() {
 
 
-    var selectedUuids = [];
+    var selectedIds = [];
 
 
-    for ( var uuid in editor.selected ) {
+    for ( var id in editor.selected ) {
 
 
-      if ( editor.materials[uuid] ) selectedUuids.push(uuid);
+      if ( editor.materials[ id ] ) selectedIds.push( id );
 
 
     }
     }
 
 
     // TODO: implement multiple selection
     // TODO: implement multiple selection
-    outliner.setValue( selectedUuids.length ? selectedUuids[0] : null );
+    outliner.setValue( selectedIds.length ? selectedIds[0] : null );
 
 
   }
   }
 
 
 	function selectFromOutliner() {
 	function selectFromOutliner() {
 
 
-		var uuid = outliner.getValue();
+		var id = outliner.getValue();
 
 
-		editor.select( editor.materials[uuid] );
+		editor.select( editor.materials[ id ] );
 
 
 	}
 	}
 
 

+ 8 - 8
editor/js/Sidebar.Outliner.Scene.js

@@ -90,9 +90,9 @@ Sidebar.Outliner.Scene = function ( signals ) {
 
 
 	function selectFromOutliner() {
 	function selectFromOutliner() {
 
 
-		var uuid = outliner.getValue();
+		var id = outliner.getValue();
 
 
-		editor.select( editor.objects[ uuid ] );
+		editor.select( editor.objects[ id ] );
 
 
 	}
 	}
 
 
@@ -102,7 +102,7 @@ Sidebar.Outliner.Scene = function ( signals ) {
 
 
 		var scene = editor.scene;
 		var scene = editor.scene;
 
 
-		options[ scene.uuid ] = scene.name + ' <span style="color: #aaa">- ' + getObjectType( scene ) + '</span>';
+		options[ scene.id ] = scene.name + ' <span style="color: #aaa">- ' + getObjectType( scene ) + '</span>';
 
 
 		( function addObjects( objects, pad ) {
 		( function addObjects( objects, pad ) {
 
 
@@ -110,7 +110,7 @@ Sidebar.Outliner.Scene = function ( signals ) {
 
 
 				var object = objects[ i ];
 				var object = objects[ i ];
 
 
-				options[ object.uuid ] = pad + object.name + ' <span style="color: #aaa">- ' + getObjectType( object ) + '</span>';
+				options[ object.id ] = pad + object.name + ' <span style="color: #aaa">- ' + getObjectType( object ) + '</span>';
 
 
 				addObjects( object.children, pad + '&nbsp;&nbsp;&nbsp;' );
 				addObjects( object.children, pad + '&nbsp;&nbsp;&nbsp;' );
 
 
@@ -126,15 +126,15 @@ Sidebar.Outliner.Scene = function ( signals ) {
 
 
   function getSelected() {
   function getSelected() {
 
 
-    var selectedUuids = [];
+    var selectedIds = [];
 
 
-    for ( var uuid in editor.selected ) {
+    for ( var id in editor.selected ) {
 
 
-      if ( editor.objects[uuid] ) selectedUuids.push(uuid);
+      if ( editor.objects[ id ] ) selectedIds.push( id );
 
 
     }
     }
 
 
-    outliner.setValue( selectedUuids.length ? selectedUuids : null );
+    outliner.setValue( selectedIds.length ? selectedIds : null );
 
 
   }
   }
 
 

+ 7 - 7
editor/js/Sidebar.Outliner.Textures.js

@@ -30,24 +30,24 @@ Sidebar.Outliner.Textures = function ( signals ) {
 
 
 	function selectFromOutliner() {
 	function selectFromOutliner() {
 
 
-    var uuid = outliner.getValue();
-
-		editor.select( editor.textures[uuid] );
+    var id = outliner.getValue();
+    
+		editor.select( editor.textures[ id ] );
 
 
 	}
 	}
 
 
   function getSelected() {
   function getSelected() {
 
 
-    var selectedUuids = [];
+    var selectedIds = [];
 
 
-    for ( var uuid in editor.selected ) {
+    for ( var id in editor.selected ) {
 
 
-      if ( editor.textures[uuid] ) selectedUuids.push(uuid);
+      if ( editor.textures[ id ] ) selectedIds.push( id );
 
 
     }
     }
 
 
     // TODO: implement multiple selection
     // TODO: implement multiple selection
-    outliner.setValue( selectedUuids.length ? selectedUuids[0] : null );
+    outliner.setValue( selectedIds.length ? selectedIds[0] : null );
 
 
   }
   }
 
 

+ 6 - 7
editor/js/Viewport.js

@@ -25,7 +25,6 @@ var Viewport = function ( editor, signals ) {
 	var camera = new THREE.PerspectiveCamera( 50, container.dom.offsetWidth / container.dom.offsetHeight, 1, 5000 );
 	var camera = new THREE.PerspectiveCamera( 50, container.dom.offsetWidth / container.dom.offsetHeight, 1, 5000 );
 	camera.position.set( 500, 250, 500 );
 	camera.position.set( 500, 250, 500 );
 	camera.lookAt( scene.position );
 	camera.lookAt( scene.position );
-	camera.uuid = "persp";
 
 
 	editor.select( camera );
 	editor.select( camera );
 
 
@@ -111,9 +110,9 @@ var Viewport = function ( editor, signals ) {
 
 
 			for ( var i in intersect ) {
 			for ( var i in intersect ) {
 
 
-				if ( editor.objects[ intersect[i].object.uuid ] ) {
+				if ( editor.objects[ intersect[i].object.id ] ) {
 
 
-					editor.selectByUuid( intersect[i].object.uuid );
+					editor.selectById( intersect[i].object.id );
 					hit = true;
 					hit = true;
 					break;
 					break;
 
 
@@ -137,11 +136,11 @@ var Viewport = function ( editor, signals ) {
 
 
 			for ( var i in intersect ) {
 			for ( var i in intersect ) {
 
 
-				if ( editor.objects[ intersect[i].object.uuid ] ) {
+				if ( editor.objects[ intersect[i].object.id ] ) {
 
 
-					editor.selectByUuid( intersect[i].object.uuid );
+					editor.selectById( intersect[i].object.id );
 
 
-					controls.focus( editor.objects[ intersect[i].object.uuid ] );
+					controls.focus( editor.objects[ intersect[i].object.id ] );
 
 
 					break;
 					break;
 
 
@@ -177,7 +176,7 @@ var Viewport = function ( editor, signals ) {
 
 
 		}
 		}
 
 
-		if ( editor.helpers[ object.uuid ] ) editor.helpers[ object.uuid ].update();
+		if ( editor.helpers[ object.id ] ) editor.helpers[ object.id ].update();
 
 
 	} 
 	} 
 
 

+ 0 - 1
examples/js/exporters/MaterialExporter.js

@@ -19,7 +19,6 @@ THREE.MaterialExporter.prototype = {
 		};
 		};
 
 
 		if ( material.name !== "" ) output.name = material.name;
 		if ( material.name !== "" ) output.name = material.name;
-        if ( material.uuid !== "" ) output.uuid = material.uuid;
 
 
 		if ( material instanceof THREE.MeshBasicMaterial ) {
 		if ( material instanceof THREE.MeshBasicMaterial ) {
 
 

+ 0 - 1
examples/js/exporters/ObjectExporter.js

@@ -40,7 +40,6 @@ THREE.ObjectExporter.prototype = {
 				var data = {};
 				var data = {};
 
 
 				if ( geometry.name !== "" ) data.name = geometry.name;
 				if ( geometry.name !== "" ) data.name = geometry.name;
-        if ( geometry.uuid !== "" ) data.uuid = geometry.uuid;
 
 
 				if ( geometry instanceof THREE.PlaneGeometry ) {
 				if ( geometry instanceof THREE.PlaneGeometry ) {
 
 

+ 1 - 3
examples/js/loaders/ObjectLoader.js

@@ -165,7 +165,7 @@ THREE.ObjectLoader.prototype = {
 				}
 				}
 
 
 				if ( data.name !== undefined ) geometry.name = data.name;
 				if ( data.name !== undefined ) geometry.name = data.name;
-				if ( data.uuid !== undefined ) geometry.uuid = data.uuid;
+
 				geometries.push( geometry );
 				geometries.push( geometry );
 
 
 			}
 			}
@@ -190,7 +190,6 @@ THREE.ObjectLoader.prototype = {
 				var material = loader.parse( data );
 				var material = loader.parse( data );
 
 
 				if ( data.name !== undefined ) material.name = data.name;
 				if ( data.name !== undefined ) material.name = data.name;
-				if ( data.uuid !== undefined ) material.uuid = data.uuid;
 
 
 				materials.push( material );
 				materials.push( material );
 
 
@@ -283,7 +282,6 @@ THREE.ObjectLoader.prototype = {
 		}
 		}
 
 
 		if ( data.name !== undefined ) object.name = data.name;
 		if ( data.name !== undefined ) object.name = data.name;
-	  if ( data.uuid !== undefined ) object.uuid = data.uuid;
 		if ( data.visible !== undefined ) object.visible = data.visible;
 		if ( data.visible !== undefined ) object.visible = data.visible;
 		if ( data.userData !== undefined ) object.userData = data.userData;
 		if ( data.userData !== undefined ) object.userData = data.userData;
 
 

+ 0 - 1
src/core/Geometry.js

@@ -12,7 +12,6 @@ THREE.Geometry = function () {
 	this.id = THREE.Math.generateUUID();
 	this.id = THREE.Math.generateUUID();
 
 
 	this.name = '';
 	this.name = '';
-	this.uuid = '';
 
 
 	this.vertices = [];
 	this.vertices = [];
 	this.colors = [];  // one-to-one vertex colors, used in ParticleSystem, Line and Ribbon
 	this.colors = [];  // one-to-one vertex colors, used in ParticleSystem, Line and Ribbon

+ 0 - 1
src/core/Object3D.js

@@ -10,7 +10,6 @@ THREE.Object3D = function () {
 	this.id = THREE.Math.generateUUID();
 	this.id = THREE.Math.generateUUID();
 
 
 	this.name = '';
 	this.name = '';
-	this.uuid = '';
 
 
 	this.parent = undefined;
 	this.parent = undefined;
 	this.children = [];
 	this.children = [];

+ 0 - 1
src/materials/Material.js

@@ -8,7 +8,6 @@ THREE.Material = function () {
 	this.id = THREE.Math.generateUUID();
 	this.id = THREE.Math.generateUUID();
 
 
 	this.name = '';
 	this.name = '';
-	this.uuid = '';
 
 
 	this.side = THREE.FrontSide;
 	this.side = THREE.FrontSide;
 
 

+ 0 - 1
src/scenes/Fog.js

@@ -6,7 +6,6 @@
 THREE.Fog = function ( hex, near, far ) {
 THREE.Fog = function ( hex, near, far ) {
 
 
 	this.name = '';
 	this.name = '';
-  this.uuid = '';
   
   
 	this.color = new THREE.Color( hex );
 	this.color = new THREE.Color( hex );
 
 

+ 0 - 1
src/scenes/FogExp2.js

@@ -6,7 +6,6 @@
 THREE.FogExp2 = function ( hex, density ) {
 THREE.FogExp2 = function ( hex, density ) {
 
 
 	this.name = '';
 	this.name = '';
-  this.uuid = '';
   
   
 	this.color = new THREE.Color( hex );
 	this.color = new THREE.Color( hex );
 	this.density = ( density !== undefined ) ? density : 0.00025;
 	this.density = ( density !== undefined ) ? density : 0.00025;

+ 0 - 1
src/textures/Texture.js

@@ -9,7 +9,6 @@ THREE.Texture = function ( image, mapping, wrapS, wrapT, magFilter, minFilter, f
 	this.id = THREE.Math.generateUUID();
 	this.id = THREE.Math.generateUUID();
 
 
 	this.name = '';
 	this.name = '';
-	this.uuid = '';
 
 
 	this.image = image;
 	this.image = image;
 	this.mipmaps = [];
 	this.mipmaps = [];