diff options
Diffstat (limited to 'release/scripts/DirectX8Exporter.py')
-rw-r--r-- | release/scripts/DirectX8Exporter.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/release/scripts/DirectX8Exporter.py b/release/scripts/DirectX8Exporter.py index 0bb436ac86a..227d425820b 100644 --- a/release/scripts/DirectX8Exporter.py +++ b/release/scripts/DirectX8Exporter.py @@ -318,9 +318,14 @@ class xExport: vert_list = mesh.getVertsFromGroup(name,1) le = 0 for indx in vert_list: - ver_infl = v_dict[indx[0]] - len_infl = float(len(ver_infl)) - infl = 1 / len_infl + infl = 0.0 + if len(ver_infl) != 0: + sum = 0.0 + for bone_name, weight in ver_infl: + if bone_name == name: + infl = weight + sum += weight + infl/= sum i = -1 for el in index_list : i += 1 @@ -885,4 +890,4 @@ if arg == 'exportsel': else: fname = Blender.sys.makename(ext = ".x") Blender.Window.FileSelector(my_callback, "Export DirectX", fname) -
\ No newline at end of file + |