Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-06-23 04:19:10 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-06-23 04:19:10 +0400
commit272fac8fd6e8c64472c856b85994f841678f172c (patch)
treea6155319c56cc9a179a2c3c1f3eaf33e0b5d8f2d /source/blender/makesrna/intern/rna_ui_api.c
parent333e231fa6c8e44582d94fedd2dda958e5131316 (diff)
UI: some API functions don't require explicit context passing anymore.
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index d06d4d4406d..c1c2f9a100a 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -189,8 +189,7 @@ void RNA_api_ui_layout(StructRNA *srna)
api_ui_item_common(func);
func= RNA_def_function(srna, "itemM", "uiItemM");
- parm= RNA_def_pointer(func, "context", "Context", "", "Current context.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT);
api_ui_item_common(func);
parm= RNA_def_string(func, "menu", "", 0, "", "Identifier of the menu.");
RNA_def_property_flag(parm, PROP_REQUIRED);
@@ -206,12 +205,10 @@ void RNA_api_ui_layout(StructRNA *srna)
/* templates */
func= RNA_def_function(srna, "template_header", "uiTemplateHeader");
- parm= RNA_def_pointer(func, "context", "Context", "", "Current context.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT);
func= RNA_def_function(srna, "template_ID", "uiTemplateID");
- parm= RNA_def_pointer(func, "context", "Context", "", "Current context.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT);
api_ui_item_rna_common(func);
RNA_def_string(func, "new", "", 0, "", "Operator identifier to create a new ID block.");
RNA_def_string(func, "open", "", 0, "", "Operator identifier to open a new ID block.");