PyAPI: Use 'None' arg to clear header text
This commit is contained in:
@@ -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(None)
|
||||
if cancel:
|
||||
self.target_set_value("offset", self.init_value)
|
||||
|
||||
|
@@ -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(None)
|
||||
return {'FINISHED'}
|
||||
|
||||
elif event.type in {'RIGHTMOUSE', 'ESC'}:
|
||||
rv3d.view_location = self._initial_location
|
||||
context.area.header_text_set("")
|
||||
context.area.header_text_set(None)
|
||||
return {'CANCELLED'}
|
||||
|
||||
return {'RUNNING_MODAL'}
|
||||
|
Reference in New Issue
Block a user