Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/armature/pose_edit.c
| Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | Object *ED_pose_object_from_context(bContext *C) | ||||
| return ob; | return ob; | ||||
| } | } | ||||
| /* This function is used to process the necessary updates for */ | /* This function is used to process the necessary updates for */ | ||||
| bool ED_object_posemode_enter_ex(struct Main *bmain, Object *ob) | bool ED_object_posemode_enter_ex(struct Main *bmain, Object *ob) | ||||
| { | { | ||||
| BLI_assert(!ID_IS_LINKED(ob)); | BLI_assert(!ID_IS_LINKED(ob)); | ||||
| bool ok = false; | bool ok = false; | ||||
| switch (ob->type) { | switch (ob->type) { | ||||
| case OB_ARMATURE: | case OB_ARMATURE: | ||||
| ob->restore_mode = ob->mode; | ob->restore_mode = ob->mode; | ||||
| ob->mode |= OB_MODE_POSE; | ob->mode |= OB_MODE_POSE; | ||||
| /* Inform all CoW versions that we changed the mode. */ | /* Inform all CoW versions that we changed the mode. */ | ||||
| DEG_id_tag_update_ex(bmain, &ob->id, DEG_TAG_COPY_ON_WRITE); | DEG_id_tag_update_ex(bmain, &ob->id, DEG_TAG_COPY_ON_WRITE); | ||||
| ok = true; | ok = true; | ||||
| break; | break; | ||||
| default: | default: | ||||
| break; | break; | ||||
| } | } | ||||
| return ok; | return ok; | ||||
| } | } | ||||
| bool ED_object_posemode_enter(bContext *C, Object *ob) | bool ED_object_posemode_enter(bContext *C, Object *ob) | ||||
| ▲ Show 20 Lines • Show All 1,119 Lines • Show Last 20 Lines | |||||