Python Beginer - Scale An Object Via Python Code

Hi All,
I have looked and looked and can find no information on how to scale the cube via python code.

import Blender as B
NAME = 'Cube'      # Name of object to process.
ob = B.Object.Get( NAME )

To position the cube, all I need to do is this.


But to scale the cube I don’t know what the syntax is to scale?
I tried the obvious.


But that didn’t work.

Why is this basic information so incredibly hidden an not documented? You’d think it would be listed as a property of Object.

Can anyone help with this?

Is it even possible to scale a cube via python?:confused:

Use the setSize(x, y, z) method of the Object class.

It is only recently that what was formerly named ‘Size’ has become ‘Scale’. The former name left it imprint on some Python functions to this day.


All right, I found a clue in another post.

It seems the property name for scaling is actually “size”

ob.SizeX = 2.0
ob.SizeY = 1.5

Thanks for the doc link, IamInnocent (are you…?)