Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/armature/armature_relations.c
| Show First 20 Lines • Show All 426 Lines • ▼ Show 20 Lines | int join_armature_exec(bContext *C, wmOperator *op) | ||||
| } | } | ||||
| CTX_DATA_END; | CTX_DATA_END; | ||||
| DEG_relations_tag_update(bmain); /* because we removed object(s) */ | DEG_relations_tag_update(bmain); /* because we removed object(s) */ | ||||
| ED_armature_from_edit(bmain, arm); | ED_armature_from_edit(bmain, arm); | ||||
| ED_armature_edit_free(arm); | ED_armature_edit_free(arm); | ||||
| BKE_armature_refresh_layer_used(arm); | |||||
| DEG_id_tag_update(&scene->id, ID_RECALC_SELECT); | DEG_id_tag_update(&scene->id, ID_RECALC_SELECT); | ||||
| WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene); | WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene); | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||
| ▲ Show 20 Lines • Show All 240 Lines • ▼ Show 20 Lines | for (uint base_index = 0; base_index < bases_len; base_index++) { | ||||
| /* 4) fix links before depsgraph flushes */ // err... or after? | /* 4) fix links before depsgraph flushes */ // err... or after? | ||||
| separated_armature_fix_links(bmain, ob_old, ob_new); | separated_armature_fix_links(bmain, ob_old, ob_new); | ||||
| DEG_id_tag_update(&ob_old->id, ID_RECALC_GEOMETRY); /* this is the original one */ | DEG_id_tag_update(&ob_old->id, ID_RECALC_GEOMETRY); /* this is the original one */ | ||||
| DEG_id_tag_update(&ob_new->id, ID_RECALC_GEOMETRY); /* this is the separated one */ | DEG_id_tag_update(&ob_new->id, ID_RECALC_GEOMETRY); /* this is the separated one */ | ||||
| /* 5) restore original conditions */ | /* 5) restore original conditions */ | ||||
| ED_armature_to_edit(ob_old->data); | ED_armature_to_edit(ob_old->data); | ||||
| ED_armature_edit_refresh_layer_used(ob_old->data); | ED_armature_edit_refresh_layer_used(ob_old->data); | ||||
| BKE_armature_refresh_layer_used(ob_new->data); | |||||
| /* parents tips remain selected when connected children are removed. */ | /* parents tips remain selected when connected children are removed. */ | ||||
| ED_armature_edit_deselect_all(ob_old); | ED_armature_edit_deselect_all(ob_old); | ||||
| ok = true; | ok = true; | ||||
| /* note, notifier might evolve */ | /* note, notifier might evolve */ | ||||
| WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob_old); | WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob_old); | ||||
| ▲ Show 20 Lines • Show All 332 Lines • Show Last 20 Lines | |||||