Merge branch 'blender-v2.93-release'
This commit is contained in:
commit
5a40c79520
|
@ -304,6 +304,7 @@ void ED_operatortypes_workspace(void);
|
|||
|
||||
/* operators; context poll callbacks */
|
||||
bool ED_operator_screenactive(struct bContext *C);
|
||||
bool ED_operator_screenactive_nobackground(struct bContext *C);
|
||||
bool ED_operator_screen_mainwinactive(struct bContext *C);
|
||||
bool ED_operator_areaactive(struct bContext *C);
|
||||
bool ED_operator_regionactive(struct bContext *C);
|
||||
|
|
|
@ -141,6 +141,14 @@ bool ED_operator_screenactive(bContext *C)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ED_operator_screenactive_nobackground(bContext *C)
|
||||
{
|
||||
if (G.background) {
|
||||
return false;
|
||||
}
|
||||
return ED_operator_screenactive(C);
|
||||
}
|
||||
|
||||
/* XXX added this to prevent anim state to change during renders */
|
||||
static bool ED_operator_screenactive_norender(bContext *C)
|
||||
{
|
||||
|
@ -4959,7 +4967,7 @@ static void SCREEN_OT_userpref_show(struct wmOperatorType *ot)
|
|||
|
||||
/* api callbacks */
|
||||
ot->exec = userpref_show_exec;
|
||||
ot->poll = ED_operator_screenactive;
|
||||
ot->poll = ED_operator_screenactive_nobackground; /* Not in background as this opens a window. */
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
@ -5036,7 +5044,7 @@ static void SCREEN_OT_drivers_editor_show(struct wmOperatorType *ot)
|
|||
|
||||
/* api callbacks */
|
||||
ot->exec = drivers_editor_show_exec;
|
||||
ot->poll = ED_operator_screenactive;
|
||||
ot->poll = ED_operator_screenactive_nobackground; /* Not in background as this opens a window. */
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
@ -5080,7 +5088,7 @@ static void SCREEN_OT_info_log_show(struct wmOperatorType *ot)
|
|||
|
||||
/* api callbacks */
|
||||
ot->exec = info_log_show_exec;
|
||||
ot->poll = ED_operator_screenactive;
|
||||
ot->poll = ED_operator_screenactive_nobackground;
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
|
|
@ -1911,6 +1911,9 @@ static bool wm_operator_winactive_normal(bContext *C)
|
|||
if (!((screen = WM_window_get_active_screen(win)) && (screen->state == SCREENNORMAL))) {
|
||||
return 0;
|
||||
}
|
||||
if (G.background) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue