Fix T74009: `bpy.ops.outliner.orphans_purge()` poll being too restrictive.
There is no reason to even require an editor at all here, for now just kept the 'orphan view needed' condition for the outliner case only.
This commit is contained in:
parent
1c0230b573
commit
d772c6ea31
Notes:
blender-bot
2023-02-14 11:28:39 +01:00
Referenced by issue #74009, Adding bpy.ops.outliner.orphans_purge() to the QuickMenu leaves it inaccessible, because poll() prevents it from being run
|
@ -2177,17 +2177,11 @@ void OUTLINER_OT_keyingset_remove_selected(wmOperatorType *ot)
|
|||
static bool ed_operator_outliner_id_orphans_active(bContext *C)
|
||||
{
|
||||
ScrArea *sa = CTX_wm_area(C);
|
||||
if (sa != NULL) {
|
||||
if (sa->spacetype == SPACE_TOPBAR) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (sa->spacetype == SPACE_OUTLINER) {
|
||||
SpaceOutliner *so = CTX_wm_space_outliner(C);
|
||||
return (so->outlinevis == SO_ID_ORPHANS);
|
||||
}
|
||||
if (sa != NULL && sa->spacetype == SPACE_OUTLINER) {
|
||||
SpaceOutliner *so = CTX_wm_space_outliner(C);
|
||||
return (so->outlinevis == SO_ID_ORPHANS);
|
||||
}
|
||||
return 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Purge Orphans Operator --------------------------------------- */
|
||||
|
|
Loading…
Reference in New Issue