浏览代码

fix for Houdini fbx (close #641)

Nicolas Cannasse 6 年之前
父节点
当前提交
2394523b72
共有 1 个文件被更改,包括 4 次插入1 次删除
  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() {