How do I get the height of an object in Python?
I couldn’t find any clear info on this…
I’m trying to write a simple script which would position some objects for me.
The goal is for the objects to have their bottom left corner (in “numpad 1” view) to be aligned.
This is what I came up with so far:
#!BPY """ Name: 'Drop to ground and line up back' Blender: 245 Group: 'Object' Tooltip: 'Put some useful info here' """ import Blender from Blender import Window, sys import bpy objList = Blender.Object.GetSelected() for obj in objList : obj.LocZ = obj.DimZ/2 obj.LocX = obj.DimX/2 Blender.Redraw()
The error probably is situated at the obj.LocZ = obj.DimZ/2 lines. I couldn’t really find any clear info on how to get the sizes…
Any and all help and tips appreciated!