0

I had a short, but quick question. I was posting this as a bug by going to "Report a Bug" within Blender. It's version 2.79. But when something exceeds 100m or 100', it won't show any decimal digits at all.

So, I was wondering, is it possible to get the decimals back by simply using the Python Console within Blender?

Skull Kid
  • 147
  • 1
  • 1
  • 10

1 Answers1

1

When you set blender to show units, it doesn't display zero only fractional values. Values that have a fractional component will display as you expect.

object transforms

You can get the values via python, see the object api reference for property names.

>>> bpy.context.object.location
Vector((1.2345000505447388, 0.0, 0.0))

>>> bpy.context.object.dimensions
Vector((100.12300109863281, 2.0, 2.0))

As you can see, you also get floating point binary storage issues.

sambler
  • 55,387
  • 3
  • 59
  • 192
  • That's a good solution. Actually, it was just what I was looking for. I know 3ds Max had this feature, in Maxscript, so I thought Python must be having something similar. But I found out that, by reporting this issue, they will be reverting back to more decimal digits. Say, 102m will be 102.06m again. – Skull Kid Sep 19 '17 at 12:36
  • Also, what version of Blender did you use in that screenshot? – Skull Kid Sep 19 '17 at 20:03
  • A daily build from a few weeks ago. Just looking through versions, 2.77 shows more places, 2.79 shows less. Seems it is something that keeps getting messed with. – sambler Sep 20 '17 at 10:03