- download (or copy contents of) link_script.txt
- open Blender and switch to scripting layout
- open the link_script.txt file in the text editor (or paste the contents in a new file)
- change the strings in the filename to point towards a python file, e.g.
filename = os.path.join("DRIVE:/folder/path", "HelloBlender.py")
- while in the Blender text editor hit the key combo alt+p to run the script
- use an IDE / text editor of choice to edit the python file, save, and re-run the link script in Blender
- That's it :)
Notes
- in Blender print output is send to system console, not to the python console. Go to 'Window' -> 'Toggle System Console' to open it.
The current project structure is not well suited yet to accommodate this. However the general gist of it is as follows.
- download
__init__.py
andBAT4Blender.py
- put the two in a folder, and zip said folder.
- open Blender and go to 'Edit' -> 'Preferences' -> 'Add-ons' -> 'Install..'
- navigate to the zip file created in step 2
- select 'Install Add-on from File..'
- the Add-on is now installed and available in the output context menu.
Notes
- the render path is currently not set and consequently rendering the camera views will fail.
- no checks yet to see if sun / cameras are already present
- i.e. hitting the buttons more than once will result in multiple objects added to scene
- disabling / enabling the Add-on only reloads code from
__init__.py
- i.e. changes made to
BAT4Blender.py
will only take effect after a full restart of Blender.
- i.e. changes made to