diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-08-12 09:20:16 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-08-12 09:20:16 +0400 |
commit | 23e057185370f1aaccf13f86062f3622d25e950a (patch) | |
tree | 902cfbc0ec43aae4e1571fe80e028090f0ccb06c /source/blender/makesrna | |
parent | c77e556b23e8df10a829bdeebe86d718bd5e5ca6 (diff) |
added time units, currently only used when metric or imperial are enabled.
long/short units...
day,d, hour,hr,h, minute,min,m, second,sec,s, millisecond,ms, microsecond,us
Also may fix some bugs that were reported.
Note, to convert fps to time evil_C needs to be used to get the scene.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/RNA_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h index 4833640a04b..72ecf0e7a93 100644 --- a/source/blender/makesrna/RNA_types.h +++ b/source/blender/makesrna/RNA_types.h @@ -80,6 +80,7 @@ typedef enum PropertyUnit { } PropertyUnit; #define RNA_SUBTYPE_UNIT(subtype) (subtype & 0x00FF0000) +#define RNA_SUBTYPE_UNIT_VALUE(subtype) (subtype>>16) /* also update rna_property_subtypename when you change this */ typedef enum PropertySubType { diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 69ff1300f83..165bd0ddd5b 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -1733,7 +1733,7 @@ static void rna_def_userdef_edit(BlenderRNA *brna) {BEZT_IPO_BEZ, "BEZIER", 0, "Bezier", ""}, {0, NULL, 0, NULL, NULL}}; - static EnumPropertyItem unit_types[] = { + static EnumPropertyItem unit_systems[] = { {USER_UNIT_NONE, "NONE", 0, "None", ""}, {USER_UNIT_METRIC, "METRIC", 0, "Metric", ""}, {USER_UNIT_IMPERIAL, "IMPERIAL", 0, "Imperial", ""}, @@ -1780,9 +1780,9 @@ static void rna_def_userdef_edit(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Global Undo", "Global undo works by keeping a full copy of the file itself in memory, so takes extra memory."); /* Units */ - prop= RNA_def_property(srna, "unit_type", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, unit_types); - RNA_def_property_ui_text(prop, "Unit Type", "The unit system to use for button display."); + prop= RNA_def_property(srna, "unit_system", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, unit_systems); + RNA_def_property_ui_text(prop, "Unit System", "The unit system to use for button display."); RNA_def_property_update(prop, NC_WINDOW, NULL); prop= RNA_def_property(srna, "unit_scale_length", PROP_FLOAT, PROP_UNSIGNED); |