Age | Commit message (Collapse) | Author |
|
Fixes a number of glitches, e.g. the sidebar disappearing when selecting an
asset or wrong AZones (the little chevrons to indicate a hidden region).
There were a couple of issues:
* Execution region was created, but not used.
* If an execution region already existed when refreshing the area, it was
tagged as hidden, not removed.
* The sidebar was always set to be hidden on refreshes.
* When toggling from Asset Browser to File Browser as regular editor (i.e. not
opened temporary via Ctrl+O or such), the sidebar region wasn't removed.
Adresses T83644.
|
|
Partially reverts 2250b5cefee7.
Removing the user count and fake user count icons was controversial (which was
expected) and there are a few further changes needed, that won't make it in
time for the release, see D9946.
While there is a design to bring back the user count and fake user indicators,
a new design idea was proposed that the UI team wants to follow. This came too
late for the 2.92 release, the new design is targeted at the 2.93 release now.
Meanwhile, UI team decision was to simply revert the design changes.
The new design is being worked on in https://developer.blender.org/T84669.
Note that this commit does not revert some internal changes done in
2250b5cefee7. Namely the introduction of `ed_util_ops.c` and data-block
operators in there. These will still be needed in the new design.
|
|
The Asset Browser will be disabled and not available for the 2.92 release. In
alpha/beta builds, there will be an "Asset Browser" option under Preferences >
Experimental, if the developer extras are enabled.
Note that this also disables related UI elements (e.g. "Mark Asset" buttons,
Preferences settings for asset libraries, etc.).
The code is still in master of course, development and testing will continue
there. But there simply needs to be too much polishing and fixing before the
2.92 release, plus there are some design decisions to be reevaluated.
Check the milestone 1 project to follow ongoing work:
https://developer.blender.org/project/view/124/
|
|
|
|
Approximately 138 changes in the spelling of compound words
and proper names like "Light Probe", "Shrink/Fatten", "Face Map".
In many cases, hyphens were used where they aren't correct, like
"re-fit". Other common changes include:
- "Datablock" -> "data-block"
- "Floating point" -> "floating-point"
- "Ngons" -> "n-gons"
These changes help give the language used in the interface
a consistent, more professional feel.
Differential Revision: https://developer.blender.org/D9923
|
|
Approximately 195 changes of capitalization to conform to MLA title style.
UI labels and property names should use MLA title case, while descriptions
should be capitalized like regular prose, generally with only the start of
a sentence capitalized.
Differential Revision: https://developer.blender.org/D9922
|
|
This seems to be a longer standing issue. Steps to reproduce were:
* With factory settings, Ctrl+O then F12
* Close the render window using the window close button
* Close the File Browser window using the window close button
This could be OS specific though, at least on macOS this caused a crash.
|
|
|
|
The previous design is rather old and has a couple of problems:
* Scalability: The current solution of adding little icon buttons next to the
data-block name field doesn't scale well. It only works if there's a small
number of operations. We need to be able to place more items there for better
data-block management. Especially with the introduction of library overrides.
* Discoverability: It's not obvious what some of the icons do. They appear and
disappear, but it's not obvious why some are available at times and others
not.
* Unclear Status: Currently their library status (linked, indirectly linked,
broken link, library override) isn't really clear.
* Unusual behavior: Some of the icon buttons allow Shift or Ctrl clicking to
invoke alternative behaviors. This is not a usual pattern in Blender.
This patch does the following changes:
* Adds a menu to the right of the name button to access all kinds of operations
(create, delete, unlink, user management, library overrides, etc).
* Make good use of the "disabled hint" for tooltips, to explain why buttons are
disabled. The UI team wants to establish this as a good practise.
* Use superimposed icons for duplicate and unlink, rather than extra buttons
(uses less space, looks less distracting and is a nice + consistent design
language).
* Remove fake user and user count button, they are available from the menu now.
* Support tooltips for superimposed icons (committed mouse hover feedback to
master already).
* Slightly increase size of the name button - it was already a bit small
before, and the move from real buttons to superimposed icons reduces usable
space for the name itself.
* More clearly differentiate between duplicate and creating a new data-block.
The latter is only available in the menu.
* Display library status icon on the left (linked, missing library, overridden,
asset)
* Disables "Make Single User" button - in review we weren't sure if there are
good use-cases for it, so better to see if we can remove it.
Note that I do expect some aspects of this design to change still. I think some
changes are problematic, but others disagreed. I will open a feedback thread on
devtalk to see what others think.
Differential Revision: https://developer.blender.org/D8554
Reviewed by: Bastien Montagne
Design discussed and agreed on with the UI team, also see T79959.
|
|
Expand abbreviations for words like "Bright" (instead of "Brightness"),
"Premul", "Lib", "Dir", etc.
Differential Revision: https://developer.blender.org/D9862
|
|
In case of being in Asset browsing mode, the search field is located in
the header (RGN_TYPE_HEADER not RGN_TYPE_UI as for file browsing mode).
To be future proof, now iterate all regions and act if the
"filter_search" can be activated.
Maniphest Tasks: T83888
Differential Revision: https://developer.blender.org/D9882
|
|
Data of the File Browser context callback needs to be validated and
return `CTX_RESULT_NO_DATA` if the context member is valid but not set
in the current context.
|
|
Otherwise it would just show empty space where the icon is supposed to
be.
Unfortunately this icon is upscaled quite a bit and doesn't look too
great. Would be good to improve but not a high priority.
|
|
No icon should be created if the preview doesn't exist.
|
|
This is the same name we use elsewhere for the focused/active ID context
member, so this should follow it.
|
|
|
|
|
|
|
|
If Preferences > Interface > Temporary Editors > File Browser is set to
"Maximized Area", opening a File Browser from an Asset Browser would
cause the new maximized editor to be an Asset Browser. Exiting it again
would crash.
This fixes the wrong behavior and the crash. There's still an issue with
exiting the editor again, it stays a File Browser then and doesn't go
back to being an Asset Browser. That's to be fixed separately.
|
|
Storing the asset library reference by name wasn't a good idea, I thought it
would work with a careful fallback, but it's easier to just use the index
instead. So change to using indices, make sure fallback methods work reliable
and make sure the file list is updated when asset libraries are removed.
I added a new notifier type for the latter, I prefer not using file notifiers
in asset-library/preferences code. We have more than enough values for
notifiers left.
|
|
When the Asset Browser was showing the "Current File" repository and the
sidebar was open, undoing could crash, because the context API returned freed
data.
Don't let context return anything if a refresh is pending due to data changes
like undo/redo.
|
|
This introduces the User Interface part of the Asset Browser, based on the
design in T54642.
Additions:
* New Asset Browser (internally a sub-editor of the File Browser).
* Navigation region showing asset categories.
* Main region showing the assets of the selected asset library with previews.
The assets may be stored over multiple .blends in the directory that's
"mounted" as asset library in the Preferences. They will all be shown in this
list.
* Header with an asset library dropdown, allowing to choose the active asset
library to show. Options are the "Current File" as asset library and all
custom libraries.
* Display popover, filter popover and search box (partially dummies, see
T82680).
* Sidebar showing the metadata of the currently active file (name, preview,
description and tags), which can be edited for assets in the "Current File"
asset library. (For others it will reset on reload.)
* The sidebar includes a button to load a custom preview image from a file.
* Make asset files draggable (with preview image).
* If a library with invalid path is selected, a message is drawn in the main
region to help the user understand what's wrong.
* Operators to add and remove asset tags. Exposed in the sidebar.
* "Only Assets" option for Link/Append.
* Internal utilities for asset UI scripts.
For screenshots or demo videos, please see D9725. Or the 2.92 release notes.
Note that there are many things to be tweaked and polished in the Asset Browser
UI still. For example, the filter and display popovers are mostly dummies. See
T82680.
Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1
project milestone on developer.blender.org.
Differential Revision: https://developer.blender.org/D9725
Reviewed by: Brecht Van Lommel, Hans Goudey
|
|
The Asset Browser will be a sub-editor of the File Browser. This prepares the
File Browser code for that.
**File-Lists**
* Support loading assets with metadata read from external files into the
file-list.
* New main based file-list type, for the "Current File" asset library.
* Refresh file-list when switching between browse modes or asset libraries.
* Support empty file-lists (asset library with no assets).
* Store file previews as icons, so scripts can reference them via icon-id. See
previous commit.
**Space Data**
* Introduce "browse mode" to differeniate between file and asset browsing.
* Add `FileAssetSelectParams` to `SpaceFile`, with `FileSelectParams` as base.
Makes sure data is separated between asset and file browsing when switching
between them. The active params can be obtained through
`ED_fileselect_get_active_params()`.
* `FileAssetSelectParams` stores the currently visible asset library ID.
* Introduce file history abstraction so file and asset browsing can keep a
separate history (previous and next directories).
**General**
* Option to only show asset data-blocks while file browsing (not exposed here).
* Add "active_file" context member, so scripts can get and display info about
the active file.
* Add "active_id" context member, so `ED_OT_lib_id_load_custom_preview` can set
a custom ID preview. (Only for "Current File" asset library)
* Expose some of `FileDirEntry` in RNA as (non-editable). That way scripts can
obtain name, preview icon and asset-data.
Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1
project milestone on developer.blender.org.
Differential Revision: https://developer.blender.org/D9724
Reviewed by: Bastien Montagne
|
|
|
|
When opening a temporary File Browser, we have to make sure the file selection
parameters are refreshed. When opening it in a new Window that would always be
the case, if the File Browser uses a maximized window (as set in the
Preferences), it might reuse space-data from a previous use. So we have to
force the refresh.
Also renamed the relevant function to be more clear about what it's doing.
Mistake in 95b3c4c966f9.
|
|
Didn't know this function existed, better to use it then to avoid verbosity.
|
|
* Avoid direct access to `SpaceFile.params`, use a getter instead. This matters
because once the asset-browser changes are in, there will be an alternative
selection parameter object. The getter can return the correct one.
* Rename the function to ensure the parameters. The old name
`ED_fileselect_get_params()` wasn't a mere getter, it would create the
parameters if necessary. Now we have an actual getter, so better be clear.
* In some instances, I replaced the old "get" function with the new mere
getter. So the ensure logic is called less often. However, in these cases we
should be able to assume the selection parameters were created already as
part of the editor creation routine.
The term "active" in the new function names may seem a bit odd in the current
context, but that is a preparation for the Asset Browser merge as well. Like
said, there will be two file selection parameter objects in the space.
|
|
Direcly using the C library allocator functions is usually avoided in favor of
our guarded allocator. It's more useful when debugging.
|
|
The overlap with the `Panel` flags that start with "PNL" was quite
confusing because wasn't clear which enum a flag was from. The
new names are a bit longer, but the clarity is worth it.
|
|
Move headers files from `render/extern/` to `render/`
Part of T73586
|
|
|
|
|
|
`WM_operator_properties_filesel()` allows C operators to set a display or sort
type for the File Browser to use. But the File Browser would always override
that because of an invalid `_is_set()` check. (The operators don't actually set
the value, they only set the property's default value.)
The only operator affected by this is "Recover Auto Save". It is supposed to
show a vertical list ordered chronologically. It used settings from the
previous File Browser usage before this patch.
Operators using the File Browser should generally use
`FILE_DEFAULTDISPLAY`/`FILE_SORT_DEFAULT` now, except if they have a reason not
to. See comments at their definition.
----
This makes it so operators that set a different display or sort type
don't change the sort or display type for the next File Browser operation.
So using "Recover Auto Save" entirely isolates display and sort type from other
operations.
Differential Revision: https://developer.blender.org/D8598
Reviewed by: Bastien Montagne
|
|
I think there wasn't actually any issue currently, but only by luck. We still
passed around and NULL-checked a pointer to freed memory (the file operator,
`SpaceFile.op`) which is easy to break and should be avoided.
Noticed while testing D8598.
|
|
|
|
|
|
Changing language could sometimes leave File Browser System list showing incorrect text until restart.
Differential Revision: https://developer.blender.org/D9323
Reviewed by Brecht Van Lommel
|
|
|
|
Swaps the order of the '+' and '-' button in the File Browser file name field,
so that '-' comes first.
For increasing or decreasing a value it makes more sense to have decreasing
first, increasing last. Consistent to how you press on the left side of a
number button for decrease, and right to increase.
However this is inconsistent in another way: Usually we have a '+' button
before a '-' button, but that refers to adding and removing items, not
increasing or decreasing. The icons are also placed in their own buttons then,
making them look more separate.
So the UI Team agreed on accepting that trade-off, see today's meeting notes:
https://devtalk.blender.org/t/2020-10-21-ui-team-upcoming/15849
|
|
Corrects 34 miscellaneous misspelled words.
Differential Revision: https://developer.blender.org/D9248
Reviewed by Campbell Barton
|
|
Corrects incorrect usages of the words 'then' and 'than'.
Differential Revision: https://developer.blender.org/D9246
Reviewed by Campbell Barton
|
|
While there are other bundles which show up as directories,
`.app` are the most common ones.
*Users should not be saving anything inside .app bundles, nor using
Blender to edit any of the files.
*This declutters the File Browser for say ~/Applications folder
or recursive search on a path with apps.
*Matches Finder's behavior of showing apps as files. (We don't have a
"right click > show package contents" button like Finder though)
This change shows `.app` files like incompatible files, or `.exe`s
on Windows.
{F8970986}
Reviewed By: #platform_macos, brecht, mont29
Differential Revision: https://developer.blender.org/D9162
|
|
Follow our code style guide by using C-comments for text descriptions.
|
|
`targetIsDirectory` slipped through the code review of
{D6679}/{rBafb1a64ccb81}.
`BLI_is_dir` exists to check for directory status of a file.
Remove some `else-after-return`s.
Use `r_` prefix for return value arguments, and move it to the end
in the list of arguments.
|
|
Cleanup old tracker task format to the new. e.g: [#34039] to T34039
Ref D8718
|
|
- UI_collection_color_icon_get -> UI_icon_color_from_collection
- UI_idcode_icon_get -> UI_icon_from_idcode
- UI_library_icon_get -> UI_icon_from_library
- UI_mode_icon_get -> UI_icon_from_object_mode
- UI_rnaptr_icon_get -> UI_icon_from_rnaptr
- UI_alert_image -> UI_icon_alert_imbuf_get
- UI_preview_render_size -> UI_icon_preview_to_render_size
- UI_id_icon_render -> UI_icon_render_id
|
|
|
|
|
|
Support setting bookmarks even when the file browser
isn't the active space.
|
|
|