Fix for the is_registered_optional property of RNA functions, now only returns true...
authorLukas Toenne <lukas.toenne@googlemail.com>
Mon, 28 Jan 2013 12:34:18 +0000 (12:34 +0000)
committerLukas Toenne <lukas.toenne@googlemail.com>
Mon, 28 Jan 2013 12:34:18 +0000 (12:34 +0000)
source/blender/makesrna/intern/rna_rna.c

index b5b3897ed46c40e218f1a60b5b1e52ef35ba294d..9bd20d854e732251efd778c5394861a68a45563c 100644 (file)
@@ -946,7 +946,7 @@ static int rna_Function_registered_get(PointerRNA *ptr)
 static int rna_Function_registered_optional_get(PointerRNA *ptr)
 {
        FunctionRNA *func = (FunctionRNA *)ptr->data;
 static int rna_Function_registered_optional_get(PointerRNA *ptr)
 {
        FunctionRNA *func = (FunctionRNA *)ptr->data;
-       return func->flag & FUNC_REGISTER_OPTIONAL;
+       return func->flag & (FUNC_REGISTER_OPTIONAL & ~FUNC_REGISTER);
 }
 
 static int rna_Function_no_self_get(PointerRNA *ptr)
 }
 
 static int rna_Function_no_self_get(PointerRNA *ptr)