Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_relations.c
| Show First 20 Lines • Show All 564 Lines • ▼ Show 20 Lines | case PAR_PATH_CONST: { | ||||
| } | } | ||||
| break; | break; | ||||
| } | } | ||||
| case PAR_BONE: | case PAR_BONE: | ||||
| case PAR_BONE_RELATIVE: | case PAR_BONE_RELATIVE: | ||||
| pchan = BKE_pose_channel_active_if_layer_visible(par); | pchan = BKE_pose_channel_active_if_layer_visible(par); | ||||
| pchan_eval = BKE_pose_channel_active_if_layer_visible(parent_eval); | pchan_eval = BKE_pose_channel_active_if_layer_visible(parent_eval); | ||||
| if (pchan == NULL) { | if (pchan == NULL || pchan_eval == NULL) { | ||||
| /* If pchan_eval is NULL, pchan should also be NULL. */ | |||||
| BLI_assert_msg(pchan == NULL, "Missing evaluated bone data"); | |||||
| BKE_report(reports, RPT_ERROR, "No active bone"); | BKE_report(reports, RPT_ERROR, "No active bone"); | ||||
| return false; | return false; | ||||
| } | } | ||||
| } | } | ||||
| Object workob; | Object workob; | ||||
| /* Apply transformation of previous parenting. */ | /* Apply transformation of previous parenting. */ | ||||
| ▲ Show 20 Lines • Show All 1,627 Lines • ▼ Show 20 Lines | CTX_DATA_BEGIN (C, Object *, ob, selected_objects) { | ||||
| ID *ob_data = ob->data; | ID *ob_data = ob->data; | ||||
| ob_data->tag &= ~LIB_TAG_PRE_EXISTING; | ob_data->tag &= ~LIB_TAG_PRE_EXISTING; | ||||
| make_local_animdata_tag(BKE_animdata_from_id(ob_data)); | make_local_animdata_tag(BKE_animdata_from_id(ob_data)); | ||||
| } | } | ||||
| } | } | ||||
| CTX_DATA_END; | CTX_DATA_END; | ||||
| } | } | ||||
| BKE_library_make_local(bmain, NULL, NULL, true, false); /* NULL is all libs */ | BKE_library_make_local(bmain, NULL, NULL, true, false); /* NULL is all libraries. */ | ||||
| WM_event_add_notifier(C, NC_WINDOW, NULL); | WM_event_add_notifier(C, NC_WINDOW, NULL); | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| void OBJECT_OT_make_local(wmOperatorType *ot) | void OBJECT_OT_make_local(wmOperatorType *ot) | ||||
| { | { | ||||
| static const EnumPropertyItem type_items[] = { | static const EnumPropertyItem type_items[] = { | ||||
| ▲ Show 20 Lines • Show All 682 Lines • Show Last 20 Lines | |||||