Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2018-03-19 18:23:36 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-03-19 18:23:36 +0300
commit0f1b2e7ea7a5b957f39fd5e41ae96ae288323b25 (patch)
treeff6b04408f1fd4eefa6978cc115efd78c0611d15 /io_scene_fbx/import_fbx.py
parentfbc03fdd10836f79c509e5d8c19514bc5f983253 (diff)
Fix T54354: FBX addon fails on "blen_read_shape" for fome fbx files.
Code would break on empty shapekey names, and was actually broken in all cases where Blender would have to alter the shapekey name when creating it.
Diffstat (limited to 'io_scene_fbx/import_fbx.py')
-rw-r--r--io_scene_fbx/import_fbx.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py
index c0d7b758..446be0ff 100644
--- a/io_scene_fbx/import_fbx.py
+++ b/io_scene_fbx/import_fbx.py
@@ -1298,18 +1298,17 @@ def blen_read_shape(fbx_tmpl, fbx_sdata, fbx_bcdata, meshes, scene):
if me.shape_keys is None:
objects[0].shape_key_add(name="Basis", from_mix=False)
- objects[0].shape_key_add(name=elem_name_utf8, from_mix=False)
+ kb = objects[0].shape_key_add(name=elem_name_utf8, from_mix=False)
me.shape_keys.use_relative = True # Should already be set as such.
- kb = me.shape_keys.key_blocks[elem_name_utf8]
for idx, co in vcos:
kb.data[idx].co[:] = co
kb.value = weight
# Add vgroup if necessary.
if create_vg:
- add_vgroup_to_objects(indices, vgweights, elem_name_utf8, objects)
- kb.vertex_group = elem_name_utf8
+ vgoups = add_vgroup_to_objects(indices, vgweights, kb.name, objects)
+ kb.vertex_group = kb.name
keyblocks.append(kb)