Fix T82624: Skin modifiers root bone cannot be moved

When creating an armature from the skin modifier, resulting bones would
always be flagged BONE_CONNECTED.
Those bones cannot be transformed (just rotated).

Now only flag bones that really have a parent BONE_CONNECTED.

Maniphest Tasks: T82624

Differential Revision: https://developer.blender.org/D9534
This commit is contained in:
Philipp Oeser 2020-11-11 18:07:53 +01:00
parent c08827e659
commit eaf9ae643b
Notes: blender-bot 2023-02-14 05:52:32 +01:00
Referenced by issue #82624, Skin Modifier:Root bone in the armature generated by skin modifier can't be moved
1 changed files with 3 additions and 1 deletions

View File

@ -2308,7 +2308,9 @@ static void skin_armature_bone_create(Object *skin_ob,
EditBone *bone = ED_armature_ebone_add(arm, "Bone");
bone->parent = parent_bone;
bone->flag |= BONE_CONNECTED;
if (parent_bone != NULL) {
bone->flag |= BONE_CONNECTED;
}
copy_v3_v3(bone->head, mvert[parent_v].co);
copy_v3_v3(bone->tail, mvert[v].co);