📋 Metadata
- Author: roaoao
- Date: 2018-04-26 02:47:56
- Type:
answer - Reply to: post_01344
💬 Content
Mighty Pea:
can I not force run the command regardless of location, or momentarily switch to the required mode, or trick it into thinking it is?
Yes, you can use some operators in any screen/area if you override the context.
For example:
bpy.ops.console.clear(override_context('CONSOLE', "Scripting"))
Where ‘CONSOLE’ is a type of the area and “Scripting” is a screen name with that area.
You can find more info about override_context() function in pie_menu_editor/scripts/autorun/functions.py.