diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-28 13:06:00 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-28 14:04:28 +0300 |
commit | 89e0d9848a0660c81e57f1e5e9778a2b920bd54a (patch) | |
tree | 9c72026a731d04c3663683e52f06f943e78a1a32 /release/scripts/templates_py | |
parent | af9fcb6a333b575e7f1c2ab1e3d8fbcf1a69b7e1 (diff) |
UI: keep some operator text in headers.
Key shortcuts and explanation about how to use the tool should go to the
status bar, but other info can in the header so it's near where the user
is working. This distinction has not been made yet for all operators.
Diffstat (limited to 'release/scripts/templates_py')
-rw-r--r-- | release/scripts/templates_py/manipulator_custom_geometry.py | 4 | ||||
-rw-r--r-- | release/scripts/templates_py/operator_modal_view3d.py | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/release/scripts/templates_py/manipulator_custom_geometry.py b/release/scripts/templates_py/manipulator_custom_geometry.py index 7ebd864e69f..48bb6956f85 100644 --- a/release/scripts/templates_py/manipulator_custom_geometry.py +++ b/release/scripts/templates_py/manipulator_custom_geometry.py @@ -96,7 +96,7 @@ class MyCustomShapeWidget(Manipulator): return {'RUNNING_MODAL'} def exit(self, context, cancel): - context.workspace.status_text_set() + context.area.header_text_set() if cancel: self.target_set_value("offset", self.init_value) @@ -108,7 +108,7 @@ class MyCustomShapeWidget(Manipulator): delta /= 10.0 value = self.init_value + delta self.target_set_value("offset", value) - context.workspace.status_text_set("My Manipulator: %.4f" % value) + context.area.header_text_set("My Manipulator: %.4f" % value) return {'RUNNING_MODAL'} diff --git a/release/scripts/templates_py/operator_modal_view3d.py b/release/scripts/templates_py/operator_modal_view3d.py index be41ea4d714..65bab3489b4 100644 --- a/release/scripts/templates_py/operator_modal_view3d.py +++ b/release/scripts/templates_py/operator_modal_view3d.py @@ -26,15 +26,15 @@ class ViewOperator(bpy.types.Operator): if event.type == 'MOUSEMOVE': self.offset = (self._initial_mouse - Vector((event.mouse_x, event.mouse_y, 0.0))) * 0.02 self.execute(context) - context.workspace.status_text_set("Offset %.4f %.4f %.4f" % tuple(self.offset)) + context.area.header_text_set("Offset %.4f %.4f %.4f" % tuple(self.offset)) elif event.type == 'LEFTMOUSE': - context.workspace.status_text_set() + context.area.header_text_set() return {'FINISHED'} elif event.type in {'RIGHTMOUSE', 'ESC'}: rv3d.view_location = self._initial_location - context.workspace.status_text_set() + context.area.header_text_set() return {'CANCELLED'} return {'RUNNING_MODAL'} |