0
$\begingroup$

I am entering vertex coordinates into Blender using a script. In my case I am using the method

mesh.from_pydata(vertices, edges, faces)

and data comes through just fine. However, irregardless of the settings Scene/Units/Unit System or Unit Scale the vertex coordinates will always be interpreted as unit meters.

For example if I define vertices like this

vertices = [(10, 10, 0),(10, 0, 0),(0, 10, 0),]

the vertices will be placed 10 meters apart, even if I specify e.g. Unit Scale 1000 or whatever.

So my question is: Does Blender always internally work in meters, such that whatever Scene/Units/Unit System or Unit Scale I choose, the vertex coordinates will always follow the script numerical values in meters?

I apologize if this is a stupid question, but I could not find a plain answer anywhere. The question is asked because I am writing an importer, and want to ensure that correct data comes through for any Blender user, irregardless of their Blender setting.

$\endgroup$

1 Answer 1

0
$\begingroup$

The answer is version dependent. Prior to version 2.9 Blender operated internally in 'Blender' units. They had no intrinsic relationship to real world measuring systems. Units then were simply a convenience for data entry.

Starting in 2.9 Blender operates internally in metric and does unit conversion to correspond to the system units settings.

This is a 'mostly true' answer, because prior to 2.9, Blender's unit handling was subject to a wide variety of bugs. Most of those were fixed in the original 2.90 release, but I don't know that all were.

$\endgroup$
1
  • $\begingroup$ I use Blender 3.0.0 under Windows 10. A vertex put at say (10,0,0) falls at 10 meter distance from the origin no matter what Blender setting I am using. Blender converts to whatever unit I use when measuring, but (if using Imperial and Feet) 32.8084' is still equivalent to 10 meters. Am I correct to have understood that inputting (10,0,0) via the API will result in a distance equivalent to 10 meters for any user, such that I do not need to care about Unit settings for someone using my importer? Sorry to state my question once more, but I feel I need to be quite certain about this. $\endgroup$
    – JoNoS
    Commented Dec 26, 2021 at 21:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .