diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-10 12:33:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-10 12:33:30 +0400 |
commit | c4ce26c9061c2fcb231fe0570251c3b02d0caa5f (patch) | |
tree | 404d2dc3a657b69cf96305124ff0b8fd713f1549 /source/blender/makesrna/intern/rna_define.c | |
parent | 1f3e453509e6cb886d0fe5e4cbe1f266f21167ab (diff) |
Address [#30842] Blenders Measurement Units set to Metric, makes some Precision Flaws.
use the same precision for location all over (2-5 was used), use define as 5.
also disallow boolean to have any subtype besides PROP_LAYER_MEMBER, some booleans had TRANSLATION / XYZ subtypes which don't make sense.
Diffstat (limited to 'source/blender/makesrna/intern/rna_define.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_define.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index abaf598d4cc..4c2af854f67 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -911,6 +911,13 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier switch (type) { case PROP_BOOLEAN: + if (DefRNA.preprocess) { + if ((subtype & ~(PROP_LAYER_MEMBER)) != PROP_NONE) { + fprintf(stderr, "%s: subtype does not apply to 'PROP_BOOLEAN' \"%s.%s\"\n", __func__, + CONTAINER_RNA_ID(cont), identifier); + DefRNA.error = 1; + } + } break; case PROP_INT: { IntPropertyRNA *iprop = (IntPropertyRNA*)prop; |