[Bf-blender-cvs] [5bf42ce0220] blender2.8: RNA: use required args for internal popup end API
Campbell Barton
noreply at git.blender.org
Tue Aug 28 05:48:46 CEST 2018
Commit: 5bf42ce022048b4945d5bdd69fe3dbd9bbccfb92
Author: Campbell Barton
Date: Tue Aug 28 13:48:01 2018 +1000
Branches: blender2.8
https://developer.blender.org/rB5bf42ce022048b4945d5bdd69fe3dbd9bbccfb92
RNA: use required args for internal popup end API
===================================================================
M release/scripts/modules/bpy_types.py
M source/blender/makesrna/intern/rna_wm_api.c
===================================================================
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
index 453c0d0cbe5..fd5dd884b44 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -157,11 +157,11 @@ class WindowManager(bpy_types.ID):
try:
draw_func(popup, bpy.context)
finally:
- self.popover_end__internal(popup, keymap)
+ self.popover_end__internal(popup, keymap=keymap)
def popup_menu_pie(self, event, draw_func, title="", icon='NONE'):
import bpy
- pie = self.piemenu_begin__internal(title, icon, event)
+ pie = self.piemenu_begin__internal(title, icon=icon, event=event)
if pie:
try:
diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c
index a1780b45aed..f235c170165 100644
--- a/source/blender/makesrna/intern/rna_wm_api.c
+++ b/source/blender/makesrna/intern/rna_wm_api.c
@@ -596,8 +596,7 @@ void RNA_api_wm(StructRNA *srna)
func = RNA_def_function(srna, "popmenu_end__internal", "rna_PopMenuEnd");
RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_CONTEXT);
parm = RNA_def_pointer(func, "menu", "UIPopupMenu", "", "");
- RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_RNAPTR);
-
+ RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_RNAPTR | PARM_REQUIRED);
/* wrap UI_popover_begin */
func = RNA_def_function(srna, "popover_begin__internal", "rna_PopoverBegin");
@@ -612,7 +611,7 @@ void RNA_api_wm(StructRNA *srna)
func = RNA_def_function(srna, "popover_end__internal", "rna_PopoverEnd");
RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_CONTEXT);
parm = RNA_def_pointer(func, "menu", "UIPopover", "", "");
- RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_RNAPTR);
+ RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_RNAPTR | PARM_REQUIRED);
RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "Active key map");
@@ -634,7 +633,7 @@ void RNA_api_wm(StructRNA *srna)
func = RNA_def_function(srna, "piemenu_end__internal", "rna_PieMenuEnd");
RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_CONTEXT);
parm = RNA_def_pointer(func, "menu", "UIPieMenu", "", "");
- RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_RNAPTR);
+ RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_RNAPTR | PARM_REQUIRED);
/* access last operator options (optionally create). */
func = RNA_def_function(srna, "operator_properties_last", "rna_WindoManager_operator_properties_last");
More information about the Bf-blender-cvs
mailing list