
Welcome to this class on using python script in Blender. This is the second in our python series. In this lecture we introduce the main topics of the class, who this class is designed for and also what the prerequisites are before taking this class.
In this video we cover the main topics of the previous class in the series, reviewing the fundamentals of python script and the basic syntax and requirements to successfully run scripts in Blender.
In this video we will learn about an important part to any beginners coding workflow. A habit we should all be adopting early on is testing individual lines of code independently before applying them to our script. The best way to do this in Blender is with console, which allows us to run code aware from the main script to see if it works by itself.
In this video we highlight a very useful resource for beginner and expert coders alike. The API documentations features details on 100's of different lines of code used in Blender and the different attributes associated with them that allow users for more control over how their code functions.
Variables are commonplace in the world of programming. In this video we learn about what variables are in python and how we can use variables to control the parameters of our code, such as changing the scale of the cube when it is created.
Now for a bit of fun, at least in a coding sense. Their will be many times when rather than using a 'hard' value to define a parameter we may want to randomize that value instead.
The first of the two main topics of this class was the introduction of variables, the second main topic is that of loops. In this video we will be learning about how for loops are constructed and how they work by using one to delete all the objects in our scene.
In this video we combine for loops and variables to create a script that will allow us to a) delete all of the objects in our scene and b) add a series of cube objects in random locations.
A direct follow up to the previous lecture, here we address the two main issues with our code. The first being the lack of variety between the scales of our cubes, and the second issue getting them to sit on a ground plane.
Congratulations on finishing the class. We will now be testing our skills by improving upon the cityscape that we have generated using our python code in this final challenge.
Welcome to the second class in our Blender python series. This is where we learn about using python code to control what happens in Blender, automate tasks and create add ons to expand Blenders already incredibly versatile range of tools. In this volume our focus will be on learning about two of the cornerstones of any programming language, variables and for loops. By learning about these topics, we will be able to automate an entire scene using a single A4 page worth of code and our trusty run script button.
We will learn about how variables can help control the parameters in our lines of code and how we can use for loops to iterate and control all of the objects in our scene.
When we have built up our confidence in using loops and variables we will challenge ourselves by creating a script that allows us to generate a city landscape. Randomizing the landscape every time the script is run.
As this is still classed as a beginner course we also cover some useful tips on improving your workflow as a programmer in Blender. Covering how to utilize the python interactive console as well as the online API documentation.
We hope that you enjoy this class on using python script in Blender.