nortikin / sverchok

Sverchok
http://nortikin.github.io/sverchok/
GNU General Public License v3.0
2.25k stars 233 forks source link

Real world units (cm, mm) instead of generic ones [Proposal] #4769

Open chiboreache opened 1 year ago

chiboreache commented 1 year ago

would be really helpful

2022-11-21x10:08:32-1

satabol commented 1 year ago

Very convenient. https://docs.blender.org/api/current/bpy.props.html#bpy.props.FloatProperty (param [unit='Length'] ) but need be append into every length/size property.

Durman commented 1 year ago

Implement this is problematic.

We have two ways to store socket properties:

There is poorly documented feature - Property manager which can change some option of properties but as far as I know it neither works with node system nor it has the unit option.

chiboreache commented 1 year ago

@Durman when job have to be done in certain way - there is no question for efficiency - you will do it in any case (btw you can always buy 5950X with 64Gb of RAM)

so my point - there is should be the choice.

rendetto commented 1 year ago

If such a feature adds performance overhead it must have the option to be switched off. I'd always prefer performance before convenience :)

Isn't it easier to just add a calibration (scale) node before export, matching the target units?

Just my two cents :)

Durman commented 1 year ago

(btw you can always buy 5950X with 64Gb of RAM)

Are you seriously think that everyone can always do this? 😄

Though O(n) is not so bad performance, I did not mention that it's becoming worse with displaying first type of properties. To display them it takes $O(len(tree.nodes)^2)$. So it can be a problem just to display a node tree. And computer characteristics won't make great difference.

Also it's not simple to replace socket property types. As far as I can see we have to create new version for every node which properties should be replaced, for backward compatibility.

satabol commented 1 year ago

I try a view of another control:

image

It is not convenient to change units on fly. If a user expect mm and you will change it to another units this may be embarrassed.