Browse Source

Fix material and material selector filterObj

clementlandrin 8 months ago
parent
commit
6ed7b90b86
2 changed files with 2 additions and 2 deletions
  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();
 			mats = local3d.getMaterials();
 		else {
 		else {
 			function recObj(o : h3d.scene.Object) {
 			function recObj(o : h3d.scene.Object) {
-				mats.concat(o.getMaterials(false));
+				mats = mats.concat(o.getMaterials(false));
 				for ( c in @:privateAccess o.children ) {
 				for ( c in @:privateAccess o.children ) {
 					if ( !filterObj(c) )
 					if ( !filterObj(c) )
 						continue;
 						continue;

+ 1 - 1
hrt/prefab/MaterialSelector.hx

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