Run a script¶
Objectives¶
Now that you learned about the basic structure of a script, we will save, load and run the script to check if it does exactly what the programmer (i.e. you) has thought. |
Instructions¶
Tasks: |
---|
- Create a project folder for all scripts.
- Check and run the script discussed in the last station.
- Activate all functions from the template.
- Replace pass in function_1 with a print function.
- Add a fourth function that is creating a new sphere in the 3D World at location (1,1,3)
Load script ...
Run script...
Output...
Windows: output
Start with console on MacOS¶
If you start Blender with a double click, no output will be shown. As a workaround start Blender within a console. Everybody who is familiar with a terminal, moves to the folder of blender.app and starts the application in the background with the following command:
./blender.app/Contents/MacOS/blender &
A second way to start Blender, search Blender with Finder and open the package with a right mouse click:
move to the blender file and start it with a double click:
Blender is starting and a terminal window is opened. Do not close this window until you want to quit Blender. Errors and print output is now visible in the terminal window.