Manipulator: Expose Context.manipulator_group
Needed for operators run by the manipulator keymap so they can access their selected manipulators.
This commit is contained in:
@@ -153,6 +153,7 @@ struct SpaceLink *CTX_wm_space_data(const bContext *C);
|
||||
struct ARegion *CTX_wm_region(const bContext *C);
|
||||
void *CTX_wm_region_data(const bContext *C);
|
||||
struct ARegion *CTX_wm_menu(const bContext *C);
|
||||
struct wmManipulatorGroup *CTX_wm_manipulator_group(const bContext *C);
|
||||
struct ReportList *CTX_wm_reports(const bContext *C);
|
||||
|
||||
struct View3D *CTX_wm_view3d(const bContext *C);
|
||||
@@ -180,6 +181,7 @@ void CTX_wm_screen_set(bContext *C, struct bScreen *screen); /* to be removed */
|
||||
void CTX_wm_area_set(bContext *C, struct ScrArea *sa);
|
||||
void CTX_wm_region_set(bContext *C, struct ARegion *region);
|
||||
void CTX_wm_menu_set(bContext *C, struct ARegion *menu);
|
||||
void CTX_wm_manipulator_group_set(bContext *C, struct wmManipulatorGroup *mgroup);
|
||||
const char *CTX_wm_operator_poll_msg_get(struct bContext *C);
|
||||
void CTX_wm_operator_poll_msg_set(struct bContext *C, const char *msg);
|
||||
|
||||
|
||||
@@ -77,6 +77,7 @@ struct bContext {
|
||||
struct ScrArea *area;
|
||||
struct ARegion *region;
|
||||
struct ARegion *menu;
|
||||
struct wmManipulatorGroup *manipulator_group;
|
||||
struct bContextStore *store;
|
||||
const char *operator_poll_msg; /* reason for poll failing */
|
||||
} wm;
|
||||
@@ -671,6 +672,11 @@ struct ARegion *CTX_wm_menu(const bContext *C)
|
||||
return C->wm.menu;
|
||||
}
|
||||
|
||||
struct wmManipulatorGroup *CTX_wm_manipulator_group(const bContext *C)
|
||||
{
|
||||
return C->wm.manipulator_group;
|
||||
}
|
||||
|
||||
struct ReportList *CTX_wm_reports(const bContext *C)
|
||||
{
|
||||
if (C->wm.manager)
|
||||
@@ -870,6 +876,11 @@ void CTX_wm_menu_set(bContext *C, ARegion *menu)
|
||||
C->wm.menu = menu;
|
||||
}
|
||||
|
||||
void CTX_wm_manipulator_group_set(bContext *C, struct wmManipulatorGroup *mgroup)
|
||||
{
|
||||
C->wm.manipulator_group = mgroup;
|
||||
}
|
||||
|
||||
void CTX_wm_operator_poll_msg_set(bContext *C, const char *msg)
|
||||
{
|
||||
C->wm.operator_poll_msg = msg;
|
||||
|
||||
Reference in New Issue
Block a user