diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2021-06-08 12:50:19 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2021-06-10 13:15:59 +0300 |
commit | 5fa6cdb77a9860ce673f685fd29e11b1c3ee8ad8 (patch) | |
tree | 9f5fcc26cf0f1893054183db59bf7e5379450b02 /source/blender/makesrna/intern/makesrna.c | |
parent | 5304c6ed7d6288ac40bbc79391668c397e30afb8 (diff) |
Add unit for time stored in seconds
Allows to define properties which will have proper units displayed
in the interface. The internal storage is expected to be seconds
(which matches how other times are stored in Blender).
Is not immediately used in Blender, but is required for the upcoming
feature in Cycles X (D11526)
The naming does not sound very exciting, but can't think of anything
better either.
For test it probably easiest to define FloatProperty with subdtype
of TIME_ABSOLUTE.
Differential Revision: https://developer.blender.org/D11532
Diffstat (limited to 'source/blender/makesrna/intern/makesrna.c')
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index efe12114d55..7a9cfa79324 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -3201,6 +3201,8 @@ static const char *rna_property_subtypename(PropertySubType type) return "PROP_ANGLE"; case PROP_TIME: return "PROP_TIME"; + case PROP_TIME_ABSOLUTE: + return "PROP_TIME_ABSOLUTE"; case PROP_DISTANCE: return "PROP_DISTANCE"; case PROP_DISTANCE_CAMERA: @@ -3266,6 +3268,8 @@ static const char *rna_property_subtype_unit(PropertySubType type) return "PROP_UNIT_ROTATION"; case PROP_UNIT_TIME: return "PROP_UNIT_TIME"; + case PROP_UNIT_TIME_ABSOLUTE: + return "PROP_UNIT_TIME_ABSOLUTE"; case PROP_UNIT_VELOCITY: return "PROP_UNIT_VELOCITY"; case PROP_UNIT_ACCELERATION: |