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:
authorCampbell Barton <ideasman42@gmail.com>2018-09-07 23:23:25 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-09-07 23:23:25 +0300
commitf23319d0958bdfc860f884dd261c652b158d587f (patch)
tree442b64ec044aa8e21b83eb5604aa4a015cecbaae
parent9c7195789d4f6c1a4c10cf4cfea96fcd75b703e6 (diff)
RNA: Area.header_text_set text is now required
-rw-r--r--release/scripts/startup/bl_operators/wm.py6
-rw-r--r--release/scripts/templates_py/gizmo_custom_geometry.py2
-rw-r--r--release/scripts/templates_py/operator_modal_view3d.py4
-rw-r--r--source/blender/makesrna/intern/rna_screen.c4
4 files changed, 9 insertions, 7 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index b84710a0de0..168873ce565 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -831,17 +831,17 @@ class WM_OT_context_modal_mouse(Operator):
header_text = header_text % eval("item.%s" % self.data_path_item)
else:
header_text = (self.header_text % delta) + " (delta)"
- context.area.header_text_set(text=header_text)
+ context.area.header_text_set(header_text)
elif 'LEFTMOUSE' == event_type:
item = next(iter(self._values.keys()))
self._values_clear()
- context.area.header_text_set()
+ context.area.header_text_set("")
return operator_value_undo_return(item)
elif event_type in {'RIGHTMOUSE', 'ESC'}:
self._values_restore()
- context.area.header_text_set()
+ context.area.header_text_set("")
return {'CANCELLED'}
return {'RUNNING_MODAL'}
diff --git a/release/scripts/templates_py/gizmo_custom_geometry.py b/release/scripts/templates_py/gizmo_custom_geometry.py
index 8125498fa85..071af9a660d 100644
--- a/release/scripts/templates_py/gizmo_custom_geometry.py
+++ b/release/scripts/templates_py/gizmo_custom_geometry.py
@@ -96,7 +96,7 @@ class MyCustomShapeWidget(Gizmo):
return {'RUNNING_MODAL'}
def exit(self, context, cancel):
- context.area.header_text_set()
+ context.area.header_text_set("")
if cancel:
self.target_set_value("offset", self.init_value)
diff --git a/release/scripts/templates_py/operator_modal_view3d.py b/release/scripts/templates_py/operator_modal_view3d.py
index 9d371446829..1b94a5fd308 100644
--- a/release/scripts/templates_py/operator_modal_view3d.py
+++ b/release/scripts/templates_py/operator_modal_view3d.py
@@ -29,12 +29,12 @@ class ViewOperator(bpy.types.Operator):
context.area.header_text_set("Offset %.4f %.4f %.4f" % tuple(self.offset))
elif event.type == 'LEFTMOUSE':
- context.area.header_text_set()
+ context.area.header_text_set("")
return {'FINISHED'}
elif event.type in {'RIGHTMOUSE', 'ESC'}:
rv3d.view_location = self._initial_location
- context.area.header_text_set()
+ context.area.header_text_set("")
return {'CANCELLED'}
return {'RUNNING_MODAL'}
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index 72514984188..f9dedc73280 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -325,12 +325,14 @@ static void rna_def_area_spaces(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_area_api(StructRNA *srna)
{
FunctionRNA *func;
+ PropertyRNA *parm;
RNA_def_function(srna, "tag_redraw", "ED_area_tag_redraw");
func = RNA_def_function(srna, "header_text_set", "ED_area_status_text");
RNA_def_function_ui_description(func, "Set the header status text");
- RNA_def_string(func, "text", NULL, 0, "Text", "New string for the header, no argument clears the text");
+ parm = RNA_def_string(func, "text", NULL, 0, "Text", "New string for the header, no argument clears the text");
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
}
static void rna_def_area(BlenderRNA *brna)