What Are Variables
A variable can be seen as container to store a value. There are variable types for single values:
...
- Vectors contain three values. Typical examples are position, velocity, or rotation.
- Lists can store huge amounts of data like a domain's particles, a project's objects, or all density values of a particle simulation.
Assigning Variables
Assigning a value to a variable is easy:
...
- Always use meaningful variable names to avoid confusion and keep your scripts readable.
- When a name is used again its original value will be overwritten.
- Only use the following characters for variable names: A-Z, a-z, 0-9, and the underscore
- Lists can contain different variable types, even other lists or variables, e.g.
mixedValues = ["Cube01", 3.14, 200, ["DY_Emitter01", "DY_Emitter02"]]
Working with Variables
With variables it is possible to perform all kinds of calculations, but the data type (integer, float, vector) has to be exactly the same. Otherwise you will get errors or false results:
...