Explorar o código

Fix material and material selector filterObj

clementlandrin hai 8 meses
pai
achega
6ed7b90b86
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      hrt/prefab/Material.hx
  2. 1 1
      hrt/prefab/MaterialSelector.hx

+ 1 - 1
hrt/prefab/Material.hx

@@ -73,7 +73,7 @@ class Material extends Prefab {
 			mats = local3d.getMaterials();
 		else {
 			function recObj(o : h3d.scene.Object) {
-				mats.concat(o.getMaterials(false));
+				mats = mats.concat(o.getMaterials(false));
 				for ( c in @:privateAccess o.children ) {
 					if ( !filterObj(c) )
 						continue;

+ 1 - 1
hrt/prefab/MaterialSelector.hx

@@ -24,7 +24,7 @@ class MaterialSelector extends hrt.prefab.Prefab {
 			mats = local3d.getMaterials();
 		else {
 			function recObj(o : h3d.scene.Object) {
-				mats.concat(o.getMaterials(false));
+				mats = mats.concat(o.getMaterials(false));
 				for ( c in @:privateAccess o.children ) {
 					if ( !filterObj(c) )
 						continue;