diff options
author | Jacques Lucke <mail@jlucke.com> | 2018-10-03 11:20:16 +0300 |
---|---|---|
committer | Jacques Lucke <mail@jlucke.com> | 2018-10-03 11:20:16 +0300 |
commit | 2d21eb79ad48485bc7b3385d6df5c2c25fd88ee0 (patch) | |
tree | 57d18e1020c8acc2d46110bd43c0721dc30b7d76 /source/blender/makesdna/DNA_scene_types.h | |
parent | 1c3411ac899d1ae8dfd790249a53054698bdd1e8 (diff) |
Units: Support for fixed units
Users can select the main unit they want to use now.
Previously the displayed unit always depended on the magnitude of the value.
The old behavior can be restored by switching to the "Adaptive" mode for length, mass and time units.
Meters, kilograms and seconds are the default units for new and old scenes.
The selected unit is also the default unit for user input.
E.g. if cm is selected, whenever the user inputs a unitless number into a field of type length, it will be interpreted as cm.
Reviewer: brecht
Differential: https://developer.blender.org/D3740
Diffstat (limited to 'source/blender/makesdna/DNA_scene_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 0bc0fb28d2f..15e8f950686 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1387,6 +1387,12 @@ typedef struct UnitSettings { char system; /* imperial, metric etc */ char system_rotation; /* not implemented as a proper unit system yet */ short flag; + + char length_unit; + char mass_unit; + char time_unit; + + char pad[5]; } UnitSettings; /* ------------------------------------------- */ @@ -2156,6 +2162,7 @@ typedef enum eGPencil_Selectmode_types { /* UnitSettings */ +#define USER_UNIT_ADAPTIVE 0xFF /* UnitSettings.system */ #define USER_UNIT_NONE 0 #define USER_UNIT_METRIC 1 |