forked from bartvdbraak/blender
Context: add pose_object
Needed for UI scripts to detect mixed weight paint + pose mode.
This commit is contained in:
parent
26216332b8
commit
a71891085d
@ -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),
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user