operators cause tons of issues with bqt.
try avoid them where possible (it almost always is)
TODO: document this.
add utils to bqt
notes
when using operators from qt, i always use
window = bpy.context.window_manager.windows[0]
with bpy.context.temp_override(window=window):
mycode
because when querying current window. blender will say None since not compatible with current window (qt)
some operators need more context parameters, then just add them to the override. e.g.
window = bpy.context.window_manager.windows[0]
with bpy.context.temp_override(window=window, object=obj, active_object=obj):
mycode
but ideally avoid ever using operators. they suck and make hard bugs. almost anything can be done without operators with a bit more work from your side.
operators cause tons of issues with bqt. try avoid them where possible (it almost always is)
TODO: document this. add utils to bqt
notes
when using operators from qt, i always use
because when querying current window. blender will say None since not compatible with current window (qt)
some operators need more context parameters, then just add them to the override. e.g.
but ideally avoid ever using operators. they suck and make hard bugs. almost anything can be done without operators with a bit more work from your side.