Commit: 16135990cd92a4042413a06f8c65948540b7d598
Author: Bastien Montagne
Date:   Fri Sep 9 11:58:18 2016 +0200
Branches: blender-v2.78-release
https://developer.blender.org/rB16135990cd92a4042413a06f8c65948540b7d598

Fix missing 'prop_required' flags in some ID RNA funcs.

Not critical, but would rather have this in 2.78 (for API doc reasons mostly).

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

M       source/blender/makesrna/intern/rna_ID.c

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

diff --git a/source/blender/makesrna/intern/rna_ID.c 
b/source/blender/makesrna/intern/rna_ID.c
index ab124b3..eb9320b 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -997,12 +997,12 @@ static void rna_def_ID(BlenderRNA *brna)
        RNA_def_function_ui_description(func, "Replace all usage in the .blend 
file of this ID by new given one");
        RNA_def_function_flag(func, FUNC_USE_MAIN);
        parm = RNA_def_pointer(func, "new_id", "ID", "", "New ID to use");
-       RNA_def_property_flag(parm, PROP_NEVER_NULL);
+       RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
 
        func = RNA_def_function(srna, "user_of_id", "BKE_library_ID_use_ID");
        RNA_def_function_ui_description(func, "Count the number of times that 
ID uses/references given one");
        parm = RNA_def_pointer(func, "id", "ID", "", "ID to count usages");
-       RNA_def_property_flag(parm, PROP_NEVER_NULL);
+       RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
        parm = RNA_def_int(func, "count", 0, 0, INT_MAX,
                           "", "Number of usages/references of given id by 
current datablock", 0, INT_MAX);
        RNA_def_function_return(func, parm);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to