Hello!
Please sorry for my very poor knowledge in this scripting area, this python is new for me:
So, i noticed that i need to put double point ‘’:’’ ( sorry, i don’t know the translation for this word ) at very end of the ‘‘if’’, ‘‘else’’, ‘‘while’’ etc. commands.
The problem is: i don’t know where the ‘‘while’’ command ends. ( In other languages i think it’s ‘’{’’ and ‘’}’’ )
Here is this very short script:
import bpy
from bpy import context
createNewCube = bpy.ops.mesh.primitive_cube_add
cursor = context.scene.cursor_location
xsize = 0.5
ysize = 0.5
zsize = 0.5
x = cursor.x
y = cursor.y
z = cursor.z
startV = 1.0
endV = 5.0
while startV < endV:
createNewCube(location=(x,y,z))
bpy.ops.transform.resize(value=(xsize, ysize, zsize))
startV += 1.0
I want to spawn cubes, until the ‘‘startV’’ reaches the value 5.0, but Blender crashes, because it spawns a lot of cubes.
The goal is to isolate those 2 rows i have under the ‘‘while startV < endV:’’ command from the ‘‘startV += 1.0’’
Thank you for reading this, sorry if i did any english grammar mistakes, it’s not my native language.