UI: move modal operator text from headers to status bar.

Python API is context.workspace.status_text_set()
This commit is contained in:
Brecht Van Lommel
2018-06-26 17:19:25 +02:00
parent c817a89e73
commit df02675e21
40 changed files with 210 additions and 217 deletions

View File

@@ -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.area.header_text_set("Offset %.4f %.4f %.4f" % tuple(self.offset))
context.workspace.status_text_set("Offset %.4f %.4f %.4f" % tuple(self.offset))
elif event.type == 'LEFTMOUSE':
context.area.header_text_set()
context.workspace.status_text_set()
return {'FINISHED'}
elif event.type in {'RIGHTMOUSE', 'ESC'}:
rv3d.view_location = self._initial_location
context.area.header_text_set()
context.workspace.status_text_set()
return {'CANCELLED'}
return {'RUNNING_MODAL'}