New dialog box layout with a large alert icon
for the Python script execution warning popup.
Details
- Reviewers
Julian Eisel (Severin) Hans Goudey (HooglyBoogly) - Group Reviewers
User Interface - Commits
- rB2e5d9a73f7b9: UI: Improved Script Execution Warning
Diff Detail
- Repository
- rB Blender
Event Timeline
At this point there are a lot of blocks with the icon on the left and the text on the right. It would be good to abstract this into a separate function so this functionality isn't duplicated everywhere.
There could be a function called something like the following that could do all the sizing,
uiBlock *wm_popup_with_icon_create(bContext *C, ARegion *region, const char *block_name, const eAlertIcon icon, const int dialog width);
That wouldn't necessarily have to be a prerequisite for this patch, but I don't like the idea of duplicating this logic in multiple places.
@Hans Goudey (HooglyBoogly) - ...It would be good to abstract this into a separate function so this functionality isn't duplicated everywhere.
uiBlock *wm_popup_with_icon_create(bContext *C, ARegion *region, const char *block_name, const eAlertIcon icon, const int dialog width);
That would be nice if we could also pass a desired display width for the icon. That way it would also apply to the "About" dialog too. There might also be a future case where we might show these alert icons a bit smaller as well, used on a replacement for our current "confirm operator" dialogs (the ones that have the "OK?" title).
This looks better to me. I never noticed the "Text" there in front of the file name, that looks a bit silly. The only alternative is "Driver". Maybe it would make more sense after the file name in parentheses. But I'm definitely happy with this patch how it is.
This means a Text data-block, it can be "Script" as and alternative.
BLI_snprintf(G.autoexec_fail, sizeof(G.autoexec_fail), "Text '%s'", text->id.name + 2); printf("scripts disabled for \"%s\", skipping '%s'\n", BKE_main_blendfile_path(bmain), text->id.name + 2);
The "Driver" is used in other cases.
BLI_snprintf(G.autoexec_fail, sizeof(G.autoexec_fail), "Driver '%s'", expr); printf("skipping driver '%s', automatic scripts are disabled\n", expr);
But this is definitely for a different patch.
