Floats?

When I use the command:
ob.setLocation(10.0, 0.0, 0.0)

I’m getting the following error:

Attribute error: expected three float arguments

Do I have to cast these values explicitly to floats or something?

Hi,

the above call should work with the current implementation. I find it kinda strange you get the error message. Anyways, the current implementation is not correct for all Object functions that expect 3 values (getLocation, getEuler, getSize, setLocation, …). These will be fixed in the next version of blender (2.28a) which will be released in a week or so…
For now, I’d suggest you use the ob.LocX, ob.LocY and ob.LocZ variables. These are correctly implemented and will not change :slight_smile:

With regards,
Michel