Blender Git Loki

Git Commits -> Revision 36aeb0e

Revision 36aeb0e by Hans Goudey (master)
September 7, 2020, 19:59 (GMT)
UI: Add temperature units

Based on the original patch by Vaishnav S (@padthai), this adds
support for temperature units. Initially supported units are Celsius,
Kelvin, and Fahrenheit.

The units aren't used anywhere with this commit. Those changes should
happen in separate patches by adding PROP_TEMPERATURE to RNA property
definitions. But it should be ensured that the various solvers and
simulations actually properly use real units.

The complexity of some of the changes comes from the fact that these
units have offsets from each other as well as coefficients. This also
makes the implementation in the current unit system troublesome.
For example, entering 0C evaluates correctly to 273K, but 0C + 0C
doubles that result, because each unit value is evaluated separately.
This is quite hard to solve in the general case with Blender's current
unit system, though, so it is not handled in this commit.

Differential Revision: https://developer.blender.org/D4401

Commit Details:

Full Hash: 36aeb0ec1e2ec8cd6a3690ac11cd3c50f3851802
Parent Commit: d4cca7b
Lines Changed: +131, -14

11 Modified Paths:

/release/scripts/startup/bl_ui/properties_scene.py (+1, -0) (Diff)
/source/blender/blenkernel/BKE_unit.h (+4, -3) (Diff)
/source/blender/blenkernel/intern/scene.c (+2, -0) (Diff)
/source/blender/blenkernel/intern/unit.c (+95, -9) (Diff)
/source/blender/editors/util/numinput.c (+1, -1) (Diff)
/source/blender/makesdna/DNA_scene_types.h (+2, -1) (Diff)
/source/blender/makesrna/intern/makesrna.c (+4, -0) (Diff)
/source/blender/makesrna/intern/rna_rna.c (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_scene.c (+16, -0) (Diff)
/source/blender/makesrna/RNA_types.h (+4, -0) (Diff)
/source/blender/python/intern/bpy_props.c (+1, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021