[Bf-blender-cvs] [a8a567d] master: RNA: add flag to be used for changing numbers proportionally

Campbell Barton noreply at git.blender.org
Sat Feb 8 23:18:07 CET 2014


Commit: a8a567d28eb67f4b8403be4f4959e07d1dd8628e
Author: Campbell Barton
Date:   Sun Feb 9 06:30:48 2014 +1100
https://developer.blender.org/rBa8a567d28eb67f4b8403be4f4959e07d1dd8628e

RNA: add flag to be used for changing numbers proportionally

===================================================================

M	source/blender/makesrna/RNA_types.h
M	source/blender/python/intern/bpy_props.c

===================================================================

diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index 26b107b..4bf0719 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -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),
 
diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c
index 3fbb5b0..3888e1b 100644
--- a/source/blender/python/intern/bpy_props.c
+++ b/source/blender/python/intern/bpy_props.c
@@ -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[] = {




More information about the Bf-blender-cvs mailing list