I want to run a python script in Blender via the console, but I split the script into multiple files. The folder consists of two files, "main.py" and "poser.py". I call the main script like this:
blender -b --python E:\Development\Python\BlenderPoser\main.py
But I get the following error when trying to import the "poser.py" file:
Error: Python: Traceback (most recent call last): File "<string>", line 1, in <module> File "E:\Development\Python\BlenderPoser\main.py", line 5, in <module> from . import poser ImportError: attempted relative import with no known parent package
What I get from this is that Blender only imports the main.py file, and ignores all of the rest. How can I tell Blender to also import the rest of the files?