Browse Source

fix for Houdini fbx (close #641)

Nicolas Cannasse 6 năm trước cách đây
mục cha
commit
2394523b72
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      hxd/fmt/fbx/Geometry.hx

+ 4 - 1
hxd/fmt/fbx/Geometry.hx

@@ -203,7 +203,10 @@ class Geometry {
 
 	public function getColors() {
 		var color = root.get("LayerElementColor",true);
-		return color == null ? null : { values : color.get("Colors").getFloats(), index : color.get("ColorIndex").getInts() };
+		if( color == null ) return null;
+		var index = color.get("ColorIndex", true);
+		if( index == null ) return null;
+		return { values : color.get("Colors").getFloats(), index : index.getInts() };
 	}
 
 	public function getUVs() {