I’m writing myself a plugin (learning purposes) and I’m using an external python editor, because Blender internal text editor is not really nice to work with. When I’m about to test the changes I made, I want to be able to synchronise all the updates I did externally to all my files with a in-memory script, because doing it individually becomes tedious, like so:
for t in bpy.data.texts: if t.is_modified and not t.is_in_memory: bpy.ops.text.resolve_conflict(resolution='RELOAD')
But when I run this script in Blender (click on the Run Script button) it gives me this error:
SystemError: Operator bpy.ops.text.resolve_conflict.poll() failed, context is incorrect
I don’t get it why it needs to be “in some context”, I want only to reload the text files programmatically.
It’s possible to do this with a script?