I want to open a file which is packed into the Blend-file with the open() function while the game is running.
Is it possible? And can I write files into it? Like open("Test.blend/Text.txt", "w") or something?.
I want to open a file which is packed into the Blend-file with the open() function while the game is running.
Is it possible? And can I write files into it? Like open("Test.blend/Text.txt", "w") or something?.
If you run the game by pressing P in Blender, you can simply use the bpy module and access Blender's data while the game is running.
If you don't want to depend on Blender, you're limited to the LibLoad function. However, this doesn't support text datablocks. Writing to blend files is also not possible in that case. IMO it'll be much easier to read and write directly to files on the filesystem, rather than packing them inside blend files.
Bpy module and functions do not work in standalone player mode. suggest using write()or open() methods.
bpyoperator, that the best way ,documentation is usefull for the operator :D https://docs.blender.org/api/current/index.html – Lagaffe91 Sep 01 '19 at 15:05