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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2015-02-27 13:39:03 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-02-27 13:46:55 +0300
commita7e80a94708408d99d9c1674ce0738bc60411981 (patch)
treed2cf8d5e3d9d86994913991aa050c6fe14a685eb /source/blender/editors/armature
parentaf032873a21f19007bc1a629a33e293c7864048b (diff)
Fix T43814: Skinning : set parent with automatic weights doesn't take into account locked vertex groups.
Simply skip a bone's vgroup when it already exists and is locked.
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r--source/blender/editors/armature/armature_skinning.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/armature/armature_skinning.c b/source/blender/editors/armature/armature_skinning.c
index 3126cca7457..ea1a94fbba6 100644
--- a/source/blender/editors/armature/armature_skinning.c
+++ b/source/blender/editors/armature/armature_skinning.c
@@ -166,9 +166,15 @@ static int dgroup_skinnable_cb(Object *ob, Bone *bone, void *datap)
else
segments = 1;
- if (!wpmode || ((arm->layer & bone->layer) && (bone->flag & BONE_SELECTED)))
- if (!(defgroup = defgroup_find_name(ob, bone->name)))
+ if (!wpmode || ((arm->layer & bone->layer) && (bone->flag & BONE_SELECTED))) {
+ if (!(defgroup = defgroup_find_name(ob, bone->name))) {
defgroup = BKE_object_defgroup_add_name(ob, bone->name);
+ }
+ else if (defgroup->flag & DG_LOCK_WEIGHT) {
+ /* In case vgroup already exists and is locked, do not modify it here. See T43814. */
+ defgroup = NULL;
+ }
+ }
if (data->list != NULL) {
hgroup = (bDeformGroup ***) &data->list;