Open MoisMoshev opened 3 years ago
I did some more digging, and found that the context is available before the menu opens, and not available afterwards. (which I should probably have expected).
Would you be interested in a PR that remembers the current bpy.context
before opening the menu? i.e. as a property on the engine or so. Then it will be cleared when the menu/windows close.
Currently I see no better alternative.
Have you find a way around this ? It's proving to be a problem when trying to do the following: bpy.ops.sequencer.image_strip_add()
When operating from a Qt window, it seems that
bpy.context
does not know the current area, camera, etc.To Reproduce Steps to reproduce the behavior:
bpy.context.area
,bpy.context.camera
etc. are empty, although the currently selected area in blender is the correct view.I wonder whether there is a canonical way to get to the original context.