diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index 1eceaaca40e..b78c366498f 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -1028,6 +1028,7 @@ context_type_map = { "particle_system": ("ParticleSystem", False), "particle_system_editable": ("ParticleSystem", False), "pose_bone": ("PoseBone", False), + "pose_object": ("Object", False), "scene": ("Scene", False), "sculpt_object": ("Object", False), "selectable_bases": ("ObjectBase", True), diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c index 31b1be2d8b3..b16d7f68976 100644 --- a/source/blender/editors/screen/screen_context.c +++ b/source/blender/editors/screen/screen_context.c @@ -76,7 +76,7 @@ const char *screen_context_dir[] = { "active_bone", "active_pose_bone", "active_base", "active_object", "object", "edit_object", "sculpt_object", "vertex_paint_object", "weight_paint_object", - "image_paint_object", "particle_edit_object", "uv_sculpt_object", + "image_paint_object", "particle_edit_object", "uv_sculpt_object", "pose_object", "sequences", "selected_sequences", "selected_editable_sequences", /* sequencer */ "gpencil_data", "gpencil_data_owner", /* grease pencil data */ "visible_gpencil_layers", "editable_gpencil_layers", "editable_gpencil_strokes", @@ -477,6 +477,13 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult } return 1; } + else if (CTX_data_equals(member, "pose_object")) { + Object *obpose = BKE_object_pose_armature_get(obact); + if (obpose) { + CTX_data_id_pointer_set(result, &obpose->id); + } + return 1; + } else if (CTX_data_equals(member, "sequences")) { Editing *ed = BKE_sequencer_editing_get(scene, false); if (ed) {