浏览代码

Merge pull request #11892 from manthrax/editor-multimaterial

Fix hardcoded reference to material[ 0 ] with currentMaterialSlot
Mr.doob 8 年之前
父节点
当前提交
beb64e6afa
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      editor/js/Sidebar.Material.js

+ 3 - 1
editor/js/Sidebar.Material.js

@@ -1011,7 +1011,9 @@ Sidebar.Material = function ( editor ) {
 
 			if ( material.length === 0 ) return;
 
-			material = material[ 0 ];
+			if( material.length == 0 ) return;
+			
+			material = material[ currentMaterialSlot ]
 
 		} else {