소스 검색

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 {