浏览代码

SourceFile-Name is stored with the map in CmdSetMaterialMap

Daniel 9 年之前
父节点
当前提交
ff3596620f
共有 1 个文件被更改,包括 3 次插入0 次删除
  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 )
 
 		} );
+		this.newMapJSON.sourceFile = newMap.sourceFile;
 
 	}
 
@@ -53,6 +54,7 @@ CmdSetMaterialMap = function ( object, mapName, newMap ) {
 			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 textures  = loader.parseTextures( [ json ], images );
 			map = textures[ json.uuid ];
+			map.sourceFile = json.sourceFile;
 
 		}
 		return map;