Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/armature/armature_relations.c
| Show First 20 Lines • Show All 633 Lines • ▼ Show 20 Lines | Object *ob_old = base_old->object; | ||||
| if (ebone->flag & BONE_SELECTED) { | if (ebone->flag & BONE_SELECTED) { | ||||
| has_selected_bone = true; | has_selected_bone = true; | ||||
| break; | break; | ||||
| } | } | ||||
| else if (ebone->flag & (BONE_TIPSEL | BONE_ROOTSEL)) { | else if (ebone->flag & (BONE_TIPSEL | BONE_ROOTSEL)) { | ||||
| has_selected_any = true; | has_selected_any = true; | ||||
| } | } | ||||
| } | } | ||||
| } | |||||
| if (has_selected_bone == false) { | if (has_selected_bone == false) { | ||||
| if (has_selected_any) { | if (has_selected_any) { | ||||
| /* Without this, we may leave head/tail selected | /* Without this, we may leave head/tail selected | ||||
| * which isn't expected after separating. */ | * which isn't expected after separating. */ | ||||
| ED_armature_edit_deselect_all(ob_old); | ED_armature_edit_deselect_all(ob_old); | ||||
| } | } | ||||
| continue; | continue; | ||||
| } | } | ||||
| } | } | ||||
| } | |||||
| /* We are going to do this as follows (unlike every other instance of separate): | /* We are going to do this as follows (unlike every other instance of separate): | ||||
| * 1. Exit editmode +posemode for active armature/base. Take note of what this is. | * 1. Exit editmode +posemode for active armature/base. Take note of what this is. | ||||
| * 2. Duplicate base - BASACT is the new one now | * 2. Duplicate base - BASACT is the new one now | ||||
| * 3. For each of the two armatures, | * 3. For each of the two armatures, | ||||
| * enter editmode -> remove appropriate bones -> exit editmode + recalc. | * enter editmode -> remove appropriate bones -> exit editmode + recalc. | ||||
| * 4. Fix constraint links | * 4. Fix constraint links | ||||
| * 5. Make original armature active and enter editmode | * 5. Make original armature active and enter editmode | ||||
| ▲ Show 20 Lines • Show All 370 Lines • Show Last 20 Lines | |||||