Fix #112618: many Outliner operators crash running without a region #119696

Merged
Philipp Oeser merged 2 commits from lichtwerk/blender:112618 into main 2024-03-26 09:31:03 +01:00

2 Commits

Author SHA1 Message Date
Philipp Oeser 956ae7b311 Capitalize poll messages 2024-03-21 14:01:17 +01:00
Philipp Oeser bd481dfd3b Fix #112618: many Outliner operators crash running without a region
This could happen when e.g. overriding context with just the area.

Now add poll functions that check for an active region when running
operators that require a region.

The fix is similar to 72688791dc

Alternatively, we could have a fix similar to a8892c7264 (getting the
correct region from the area), this would require less setup by
scripters, however for some operators the usage of the region is a
little further down the line, so implementation would be a bit more
involved. Also: for some of the operators, this would have to be done in
both `invoke` and `exec` (so would be more duplicate code changes).
2024-03-20 13:23:47 +01:00