A BPY plus module to simplify work with context.
Context class
override(area_type, context=bpy.context)
Return context from the required area for override. The required area must be opened.
Parameters:
area_type: the type of the required area to get the context for overide
context: context pointer
1 2 3 4 5 6 |
import bpy from bpy_plus.context import Context as Cntx override_context = Cntx.override(area_type='OUTLINER') bpy.ops.outliner.unhide_all(override_context) |