From ee8f69c96cba62b083fb089432cddd0bce5d08e1 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Tue, 3 Sep 2019 15:43:38 +0200 Subject: UI: File Browser Design Overhaul MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a general redesign of the File Browser GUI and interaction methods. For screenshots, check patch D5601. Main changes in short: * File Browser as floating window * New layout of regions * Popovers for view and filter options * Vertical list view with interactive column header * New and updated icons * Keymap consistency fixes * Many tweaks and fixes to the drawing of views ---- General: * The file browser now opens as temporary floating window. It closes on Esc. The header is hidden then. * When the file browser is opened as regular editor, the header remains visible. * All file browser regions are now defined in Python (the button layout). * Adjusted related operator UI names. Keymap: Keymap is now consistent with other list-based views in Blender, such as the Outliner. * Left click to select, double-click to open * Right-click context menus * Shift-click to fill selection * Ctrl-click to extend selection Operator options: These previously overlapped with the source list, which caused numerous issues with resizing and presenting many settings in a small panel area. It was also generally inconsistent with Blender. * Moved to new sidebar, which can easily be shown or hidden using a prominent Options toggle. * IO operators have new layouts to match this new sidebar, using sub-panels. This will have to be committed separately (Add-on repository). * If operators want to show the options by default, they have the option to do so (see `WM_FILESEL_SHOW_PROPS`, `hide_props_region`), otherwise they are hidden by default. General Layout: The layout has been changed to be simpler, more standard, and fits better in with Blender 2.8. * More conventional layout (file path at top, file name at the bottom, execute/cancel buttons in bottom right). * Use of popovers to group controls, and allow for more descriptive naming. * Search box is always live now, just like Outliner. Views: * Date Modified column combines both date and time, also uses user friendly strings for recent dates (i.e. "Yesterday", "Today"). * Details columns (file size, modification date/time) are now toggleable for all display types, they are not hardcoded per display type. * File sizes now show as B, KB, MB, ... rather than B, KiB, MiB, … They are now also calculated using base 10 of course. * Option to sort in inverse order. Vertical List View: * This view now used a much simpler single vertical list with columns for information. * Users can click on the headers of these columns to order by that category, and click again to reverse the ordering. Icons: * Updated icons by Jendrzych, with better centering. * Files and folders have new icons in Icon view. * Both files and folders have reworked superimposed icons that show users the file/folder type. * 3D file documents correctly use the 3d file icon, which was unused previously. * Workspaces now show their icon on Link/Append - also when listed in the Outliner. Minor Python-API breakage: * `bpy.types.FileSelectParams.display_type`: `LIST_SHORT` and `LIST_LONG` are replaced by `LIST_VERTICAL` and `LIST_HORIZONTAL`. Removes the feature where directories would automatically be created if they are entered into the file path text button, but don't exist. We were not sure if users use it enough to keep it. We can definitely bring it back. ---- //Combined effort by @billreynish, @harley, @jendrzych, my university colleague Brian Meisenheimer and myself.// Differential Revision: https://developer.blender.org/D5601 Reviewers: Brecht, Bastien --- source/blender/windowmanager/WM_api.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/windowmanager/WM_api.h') diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 13be8701c27..c7b18adf9b1 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -159,7 +159,7 @@ enum { WM_WINDOW_USERPREFS, WM_WINDOW_DRIVERS, WM_WINDOW_INFO, - // WM_WINDOW_FILESEL // UNUSED + WM_WINDOW_FILESEL, }; struct wmWindow *WM_window_open(struct bContext *C, const struct rcti *rect); @@ -493,6 +493,8 @@ bool WM_operator_properties_checker_interval_test(const struct CheckerIntervalPa #define WM_FILESEL_FILENAME (1 << 2) #define WM_FILESEL_FILEPATH (1 << 3) #define WM_FILESEL_FILES (1 << 4) +/* Show the properties sidebar by default. */ +#define WM_FILESEL_SHOW_PROPS (1 << 5) /* operator as a python command (resultuing string must be freed) */ char *WM_operator_pystring_ex(struct bContext *C, -- cgit v1.2.3 From 9ecbd67dfb672cd13f021c82d83aeb7ae8a8cf10 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Fri, 6 Sep 2019 16:26:10 +0300 Subject: Python API: implement an Operator callback for dynamic description. Blender UI Layout API allows supplying parameters to operators via button definitions. If an operator behavior strongly depends on its parameters, it may be difficult to write a tooltip that covers all of its operation modes. Thus it is useful to provide a way for the operator to produce different descriptions based on the input info. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D5709 --- source/blender/windowmanager/WM_api.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/windowmanager/WM_api.h') diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index c7b18adf9b1..b933448d0bd 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -547,6 +547,9 @@ struct wmOperatorTypeMacro *WM_operatortype_macro_define(struct wmOperatorType * const char *idname); const char *WM_operatortype_name(struct wmOperatorType *ot, struct PointerRNA *properties); +char *WM_operatortype_description(struct bContext *C, + struct wmOperatorType *ot, + struct PointerRNA *properties); /* wm_uilist_type.c */ void WM_uilisttype_init(void); -- cgit v1.2.3 From 57e55906f04a48a951fbbcfd7c197eef35ad4387 Mon Sep 17 00:00:00 2001 From: Sebastian Parborg Date: Mon, 26 Aug 2019 18:34:11 +0200 Subject: Add QuadriFlow remesher --- source/blender/windowmanager/WM_api.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/windowmanager/WM_api.h') diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index b933448d0bd..455a30b6ff5 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -686,6 +686,7 @@ enum { WM_JOB_TYPE_STUDIOLIGHT, WM_JOB_TYPE_LIGHT_BAKE, WM_JOB_TYPE_FSMENU_BOOKMARK_VALIDATE, + WM_JOB_TYPE_QUADRIFLOW_REMESH, /* add as needed, bake, seq proxy build * if having hard coded values is a problem */ }; -- cgit v1.2.3 From 95373e274908615df2e5dbf6243b055ff2c39518 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Wed, 18 Sep 2019 14:21:32 +0200 Subject: Refactor temp-space opening for optional fullscreen mode Will be put to use in followup commits. --- source/blender/windowmanager/WM_api.h | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'source/blender/windowmanager/WM_api.h') diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 455a30b6ff5..568b904dcb7 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -153,18 +153,9 @@ void WM_opengl_context_dispose(void *context); void WM_opengl_context_activate(void *context); void WM_opengl_context_release(void *context); -/* defines for 'type' WM_window_open_temp */ -enum { - WM_WINDOW_RENDER = 1, - WM_WINDOW_USERPREFS, - WM_WINDOW_DRIVERS, - WM_WINDOW_INFO, - WM_WINDOW_FILESEL, -}; - struct wmWindow *WM_window_open(struct bContext *C, const struct rcti *rect); struct wmWindow *WM_window_open_temp( - struct bContext *C, int x, int y, int sizex, int sizey, int type); + struct bContext *C, const char *title, int x, int y, int sizex, int sizey, int space_type); void WM_window_set_dpi(wmWindow *win); bool WM_stereo3d_enabled(struct wmWindow *win, bool only_fullscreen_test); -- cgit v1.2.3 From 5940f6b3d9cfa99a1b893b6149d36ee0a8c51584 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 1 Oct 2019 01:59:31 +1000 Subject: Fix T58683: Reload Scripts breaks toolbar button formatting Add a function which clears internal cached operator pointers, run before reloading scripts. --- source/blender/windowmanager/WM_api.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/windowmanager/WM_api.h') diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 568b904dcb7..2d9fa9e5ab6 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -102,6 +102,8 @@ void WM_init_opengl(struct Main *bmain); void WM_check(struct bContext *C); void WM_reinit_gizmomap_all(struct Main *bmain); +void WM_script_tag_reload(void); + uint *WM_window_pixels_read(struct wmWindowManager *wm, struct wmWindow *win, int r_size[2]); int WM_window_pixels_x(const struct wmWindow *win); -- cgit v1.2.3