Here is my first post and i hope i choose correct category for this thread
I am in Blender near 3 years I guess, and I get that it is one 3D love till the end of life))
But one question is always bothering me alot! Units!!
I hope you will agree with me that in blender it is realised in a bit weird way (For example in sketchup it is implemented much better and more logical)
Sometimes i need to enter dimensions in millimeter (which is pretty common and necessary thing for architect or engineer) But unfortunately i didn’t find any addon which solve this issue good enough (Default unit system is not quite good as i mentioned)
I am not programmer, just a common user so unfortunately i can’t evaluate how difficult is to create such addon, so forgive me if my ideas look stupid (but i very hope it has a bit of sense)
I want to share you of my vision of non existing addon (yet)
Easy Units Addon
Here it is!:
1)We don’t touch default Blender unit system (1 unit =1m, that’s fine)
Choose and create your own units (Will be helpful for non standard custom dimensions (π = 3.14159))
Choose and create your own precision (signs after comma)
So when we activate units and сhoose Millimeters happen this:
All data we entered divided by 1000 and we get correct size
For example we need to move one object (vertex) to 2550 mm (which is 2.55 m obviously)
So we just press G and type 2500 and finally have correct dimension
Also i hope that you agree with me that default information panel is not very informative, and it takes few seconds some time to find that you type correct data
So it will be great to create something more simple and more visible (which also will represent our custom units)
I don’t know if it possible or not to create such addon, but if my idea inspire someone desperate programmer to create this i’ll be more than happy, and i am sure a lot of guys
which have a deal with architecture or something precise will be happy too
Sorry for my terrible English and thank you for attention.
The model is not scaled, nothing is changed, the numerical part for the unit is the same. So if you have 1 cm edge, and change to inch, you will see 1 inch, which is not a 2.54 cm edge. The Blender Units are the same, so it’s something used only for display.
This is in fact good because affects to precision, so if you fix a blender unit to a dimension, let’s say a 1 Blender Unit = 1 m you could have problems if you want to work in large dimensions, or really small dimensions. Blender is limited in this way due to use of float precision for geometry.
So the best thing here should be to define a unit or units for work, and performs calcs according to scene units, so the values are always stored in scene units, so if you enter 1" and scene units are set to mm, the value stored is 25.4 mm, and displayed as 1", if later changed to cm you will see 2.54
When changed the units, the Blender Units always (values of mesh) remain the same, this is good as i’ve already explained.
What’s happening is that pressets changes the scale of units. What i described works for default presets (mm, inches, and so on). Changing from metric to imperial is “fine” (translated) is the scale is 1, if not you don’t get the expected results.
Thank you for involving in this tread
Ok maybe you’re right (even for sure, because you deeply learned this topic than me )
But please explain why this happen? If i have default cube in the scene 2x2 units and then i switch to Millimeters> Metric. This cube became 2mm x 2mm.
Also if i import such cube (2x2 unints) mesh in this scene it is also will be 2mm x 2mm. Isn’t it weird? Isn’t it scaling? On my opinion if i have a cube 2x2 units and i switch to mm i want to achieve value 2000mm x 2000mm and all imported models should safe thair real world proportion. So if i am working in mm and use my achitecture library, imported chair woudn’t be less than 1mm high (like now in blender). Isn’t it logical?
If you explain me how to achieve this kind of effect in blender i’ll be happy
The logical of blender units is the answer to this question:
How long is 1 unit in my scene ?
As pointed rombout this is a setting to be set at the beginning. In this way blender can be used with precision for someone working with the Univers, and other modeling atoms. This is the reason for which if you change the settings the object is “scaled”, because what was 1 X now is 1 Y.
So, this is good, and another setting should be added about how to represent the values maybe as object setting.
I think the problem is not that Blender doesn’t convert the actual length of the object when the scene’s scale changes…
The real problem is that depends on how any author writes a plugin that creates an object… The object created can have an absolute size, or the object can be created at a size relative to the user’s work space.
Even the ‘Extra Object’ addon, officially adopted by Blender into all blender releases, doesn’t do it right.
I prefer the ones with relative size. And only blender’s API can make it consistent once and for all.
For now I’m just injecting my own scaling/sizing code into all the plugins I use… and when they update, I have to inject my code into them again if necessary.
Current system seems quite logical to me. By setting units the precision is set, that’s why it’s not rescaling the existing objects to new units - in order not to lose data. That’s very logical. You can type in whatever units you want if you do it in a property number field. You can type 1m, or 1000mm, or 100cm, or 39.3701in, or 39.3701" and it will automatically input the same! That is just awesome. Of course this could work with all the modal operators… That would be even nicer, but some of them have functionality that requires letters(for example if you press ‘s’ while doing bevel, dragging starts to control number of segments instead of offset) so you cannot type letters while performing an operation with a modal operator like grab. It would be nice if one could type some letter and specify that the following is going to be units, but that would require changing a lot of operators… Even if I needed to use grab for some reason and enter units that I cannot calculate in my mind - say I work in meters and want to move a vertex in z direction of it’s normal by 4 inches multiplied by pi, there is quite a convenient way to do so - I can grab it, move it randomly, then press F6, constrain Z axis, choose Normal orientation and enter 4in*pi. That’s some functionality even most ‘industry standard’ software does not have. I’d say - quit complaining.
about number fields, the translation is done in the UI code.
When entering data, it should be done in operator scope. It should not be so hard to detect extra caracters if a numeric input has been started. If i remeber correctly a is_numeric_input func is called in event loop, so just return true if the character is expected to be a spec, store it, and return the correct value on a get_numeric_input func call. Also a check if you are on 3D view should be done.
this shoud work fine all places, if not going on paralel procedures doing same thing. At first, Not guaranted to work in addons.
About introducing formulas, the best thing here should be done enable python eval, as done for eg in drivers. Maybe some key should be introduced first to let the code know that should be considered an eval. Again, could be detected by is_numeric_input func to ensure it works in all places
the character to naturally specify a num input could be ‘+’ or ‘-’ do not know atm if there is collision with them with default shortcuts.
The solution about units, i’m pretty sure the best solution it is to define a unit spec in (each) object, and apply the transform matrix to it according to scene units. by default, this should be set to scene units.
PD: Functions names could not match the code, they are orientative.
I’ve implemented object units on mechanical blender. Setting the units in object (independent for each one) properties, it translates the scene units to this setting, and of course the input is also in the translated units.