Skip to main content
14 events
when toggle format what by license comment
Nov 15, 2016 at 9:28 comment added Monster The add-ons bind the start-up blend with the blender player forming a separate application file. This file and the necessary libraries are copied. As far as I know nothing else. Therefore you need to copy all other files (blend files, textures etc.) manually. Finally you get your current directory plus the application file (which makes the start-up blend obsolete).
Nov 14, 2016 at 12:03 comment added Nicola Masotti Thank you. I already knew about this other method, my investigation was mostly for better understanding. Last question: when you export for Windows OS is the script folder exported as well or you need to copy it manually?
Nov 11, 2016 at 6:54 comment added Monster I did my investigations on WinOS. That folders of linked blend files are added to the Python Search path might be a side effect of linking which does not work at other platforms. An alternative way is blenderartists.org/forum/showthread.php?196543.
Nov 10, 2016 at 12:43 comment added Nicola Masotti Either you include the LinkedPythonFolder.blend or not the game will only work if the scripts reside in the Resources folder or any subfolder.
Nov 10, 2016 at 12:43 comment added Nicola Masotti I think I understand how the LinkedPythonFolder.blend works. And it works like a charme as far as the game is not exported. However, when I export the game my scripts are not included, ad I have to include them manually. The only folder which seems to be included in the python search path seems to be te Resources folder. I don't really care about other system folders which are not inside the .app file. In this sense, the LinkedPythonFolder.blend becomes useless.
Nov 10, 2016 at 12:29 history edited Nicola Masotti CC BY-SA 3.0
added 125 characters in body
Nov 4, 2016 at 5:22 comment added Monster import sys;[print(p) for p in sys.path]
Nov 4, 2016 at 5:19 comment added Monster From my experience folders with linked blend files are added to the Python search path. That is what LinkedPythonFolder.blend is doing. When you link anything from it (it does not matter what) the folder it resides in gets included. But I have WinOS only. So I can't tell the structure on MacOS. I suggest to print the Python search path to the console for investigation.
Nov 3, 2016 at 14:51 comment added Nicola Masotti The location of my start-up .blend file is the "Resources" folder within the generated .app package. The scripts reside inside a "scripts" folder within the same location (e.g.: //game.app/Contents/Resources/scripts/script.py). Like this, the game works. Does this mean that the subfolders included in the location of my start-up .blend file (like the "scripts" folder) are in the Python search path as well?
Oct 7, 2016 at 5:15 comment added Monster The start-up blend file is the blend file that gets loaded at game start. It can refer to any other blend file. These references are either absolute (good for development) or relative (good for publishing). Python modules are expected within the Python search path. The Python search path of your game includes your default Python search path (Python installation), the location of your start-up blend file and the location of referred blend files. It the referred blend file is not found - the python search path can't include them.
Oct 1, 2016 at 16:46 comment added Nicola Masotti What do you mean by start-up blend file? If you mean the .app generated by the exporter, placing the "scripts" folder in the same directory won't work. In this sense, the LinkedPythonFolder technique becomes useless. The only thing that works is placing the "scripts" folder inside the "Resources" within the generated .app package. And in case you do that, you don't need the LinkedPythonFolder anymore.
Sep 19, 2016 at 4:40 comment added Monster I can't help on MacOS directly. But I guess the files should be relative to the start-up blend file. As "save as runtime" binds the blend file to the blenderplayer I think it should be relative to the app file. This might be different in MacOS than in WinOS and Linux. I really do not know.
Sep 16, 2016 at 15:29 history edited Nicola Masotti CC BY-SA 3.0
added 331 characters in body
Sep 16, 2016 at 15:02 history asked Nicola Masotti CC BY-SA 3.0