RNA: add flag to be used for changing numbers proportionally
authorCampbell Barton <ideasman42@gmail.com>
Sat, 8 Feb 2014 19:30:48 +0000 (06:30 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 8 Feb 2014 19:30:48 +0000 (06:30 +1100)
source/blender/makesrna/RNA_types.h
source/blender/python/intern/bpy_props.c

index 26b107bf610c9dfac4b0bee3acbeac9b7eebea07..4bf0719f5c073c5483468669f4c9a51fa3aef138 100644 (file)
@@ -187,6 +187,11 @@ typedef enum PropertyFlag {
        PROP_REGISTER                = (1 << 4),
        PROP_REGISTER_OPTIONAL       = PROP_REGISTER | (1 << 5),
 
+       /* numbers */
+
+       /* each value is related proportionally (object scale, image size) */
+       PROP_PROPORTIONAL            = (1 << 26),
+
        /* pointers */
        PROP_ID_REFCOUNT             = (1 << 6),
 
index 3fbb5b0a899a63d1ea44abbddb1fa763abb106d4..3888e1b7ecdb87967feed15e7cad280ed89d05b8 100644 (file)
@@ -63,10 +63,11 @@ static EnumPropertyItem property_flag_items[] = {
        {PROP_SKIP_SAVE, "SKIP_SAVE", 0, "Skip Save", ""},
        {PROP_ANIMATABLE, "ANIMATABLE", 0, "Animatable", ""},
        {PROP_LIB_EXCEPTION, "LIBRARY_EDITABLE", 0, "Library Editable", ""},
+       {PROP_PROPORTIONAL, "PROPORTIONAL", 0, "Adjust values proportionally to eachother", ""},
        {0, NULL, 0, NULL, NULL}};
 
 #define BPY_PROPDEF_OPTIONS_DOC \
-"   :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE'].\n" \
+"   :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE', 'PROPORTIONAL'].\n" \
 "   :type options: set\n" \
 
 static EnumPropertyItem property_flag_enum_items[] = {