Browse Source

SourceFile-Name is stored with the map in CmdSetMaterialMap

Daniel 9 years ago
parent
commit
ff3596620f
1 changed files with 3 additions and 0 deletions
  1. 3 0
      editor/js/CmdSetMaterialMap.js

+ 3 - 0
editor/js/CmdSetMaterialMap.js

@@ -32,6 +32,7 @@ CmdSetMaterialMap = function ( object, mapName, newMap ) {
 			url: this.getDataURL( newMap.image )
 			url: this.getDataURL( newMap.image )
 
 
 		} );
 		} );
+		this.newMapJSON.sourceFile = newMap.sourceFile;
 
 
 	}
 	}
 
 
@@ -53,6 +54,7 @@ CmdSetMaterialMap = function ( object, mapName, newMap ) {
 			url: this.getDataURL( this.oldMap.image )
 			url: this.getDataURL( this.oldMap.image )
 
 
 		} );
 		} );
+		this.oldMapJSON.sourceFile = this.oldMap.sourceFile;
 
 
 	}
 	}
 
 
@@ -116,6 +118,7 @@ CmdSetMaterialMap.prototype = {
 			var images = loader.parseImages( json.images );
 			var images = loader.parseImages( json.images );
 			var textures  = loader.parseTextures( [ json ], images );
 			var textures  = loader.parseTextures( [ json ], images );
 			map = textures[ json.uuid ];
 			map = textures[ json.uuid ];
+			map.sourceFile = json.sourceFile;
 
 
 		}
 		}
 		return map;
 		return map;