Is there a way to show a simple message box with a text from a blender script? For example if i'm having an error during execution.
1 Answers
Update: The link does not exist officially any longer and I stopped developing for Blender. The old 2.5 cookbook is still available in the internet archive at:
https://web.archive.org/web/20120824033549/http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Cookbook/Code_snippets/Interface#A_popup_dialog
Have a look at this code snippet for an error dialog / message window. After selecting, a (text) file a message pops up when the word return is read. It works basically but I had to hit escape to make the box disappearing (on Mac OSX) because there was no reaction on mouse input.
Seems to me that there is no generally recommended way for displaying message boxes in Blender 2.5. Maybe the designers want to encourage the add-on programmers to use the self.report for messages and the tool shelf for getting operator's input instead. But this is just an assumption, I am still a beginner.

- 12,918
- 4
- 55
- 77
-
5Yep, `self.report({'ERROR'}, "My message")` works for me and also displays a small message window at mouse cursor position. I guess that's how the developers wanted us to use it. – Val Oct 24 '14 at 08:17
-
2The link to that snippet is broken. Linking and pasting the text in your answer would have been a big help. – A.R. Jan 07 '19 at 03:50
-
The link is no longer available, so the answer is of no much help, unfortunately. – Marat Talipov Feb 07 '19 at 17:43
-
You are right, I am sorry. Maybe the archive link can be helpful for someone. I totally forgot everything from 2011 and Python so that even copying it into the answer would be unsafe. Maybe someone else is able to provide an update – Kay Feb 08 '19 at 11:30