From de973d40479200c0f0e9994e107da2a34e8adb1a Mon Sep 17 00:00:00 2001 From: Qing Shuai Date: Tue, 23 Aug 2022 21:05:35 +0800 Subject: [PATCH] fix read smpl bug --- scripts/postprocess/convert2bvh.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/postprocess/convert2bvh.py b/scripts/postprocess/convert2bvh.py index 04e30cd..70aae06 100644 --- a/scripts/postprocess/convert2bvh.py +++ b/scripts/postprocess/convert2bvh.py @@ -152,6 +152,8 @@ def read_smpl(outname): assert os.path.exists(outname), outname datas = read_json(outname) outputs = [] + if isinstace(datas, dict): + datas = datas['annots'] for data in datas: for key in ['Rh', 'Th', 'poses', 'shapes']: data[key] = np.array(data[key]) @@ -255,4 +257,4 @@ if __name__ == '__main__': # Only exit to OS when we are not running in Blender GUI if bpy.app.background: - sys.exit(exit_status) \ No newline at end of file + sys.exit(exit_status)