Age | Commit message (Collapse) | Author |
|
This adds per-platform change so Windows users will see file sizes calculated with a base of 1024.
Differential Revision: https://developer.blender.org/D5714
Reviewed by Brecht Van Lommel
|
|
Brings back + and - icons to the file name button, but now as
superimposed icons.
|
|
|
|
Makes the numpad + and - type of shortcuts to increase/decrease the file
number suffix work in the upper and lower bar of the file browser.
Had to add keymap handlers to the execute region for this to work.
|
|
When the result isn't used, prefer post increment/decrement
(already used nearly everywhere in Blender).
|
|
File Browser image thumbnails get just a contrasting outline and no shadow.
Differential Revision: https://developer.blender.org/D5708
Reviewed by Brecht Van Lommel
|
|
Replaces the large icons used in the File Browser with updated versions by Andrzej Ambroz (jendrzych).
Differential Revision: https://developer.blender.org/D5698
Reviewed by Brecht Van Lommel
|
|
The failing assert was there before the recent file browser design
overhaul. Might have been in there for quite a while in fact.
Auto-creation in this case means that the file path would be created if
a non-existent path was entered in the file browser path button.
|
|
This confirmation prompt was there earlier, we removed the prompts for
creating new directories all together, but in this case it's reasonable.
Without it, it's simply too easy to create new directories by accident.
|
|
Adds back auto-completion and auto-creation (inserting a non-existing
file-path would create it) for the file path button. The second feature
was left out knowingly, but seems there are reasonable use cases for it.
We can't add these features to the button in the Python script, we have
to call into C. So using a template to do that.
Note that this is based on the old file browser code, I've copied over
the TODO comment.
|
|
Differential Revision: https://developer.blender.org/D5683
Reviewers: Brecht
|
|
We moved this to Python too quickly, causing the following regressions:
* No auto completion for file names
* Additional handling not applied on changes, like automatic extension
appending (see file_filename_enter_handle)
* Red highlight missing when the file name already exists
Note that earlier (before the file browser redesign), this didn't use
the panel and layout code at all. So even if it's still not in Python,
at least it's integrated into regular panel management now.
OS-specific ordering of the open and cancel button is kept.
Fixes T69457.
|
|
E.g. box selecting wouldn't allow selecting the first file.
Work selection and shift/ctrl selection had similar issues.
Code assumed that the first item was the '..' parent item and manually
removed it from the selection. I could just remove this special
handling, but instead I made the behavior more dynamic. So the file list
checks if the '..' item is there and only then applies special
treatment.
That way we can easily bring the '..' item back or make it optional if
wanted.
|
|
Code assumed the '..' was there, which isn't the case any more. Just
early exiting for empty directories is fine.
|
|
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
|
|
|
|
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5219
|
|
T68035 by @luzpaz
|
|
We cannot reliably use translations API from non-main threads.
Now storing translated strings in a static cache, with basic mechanism
to update it on language change.
Reviewers: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D5350
|
|
|
|
Add common select options (toggle/invert etc).
|
|
Initial trigger to this work was T65782, requesting faster autoscroll
when current folder contains thousands of items. That was a fairly
simple change, just needed to make scrolling steps variable based on
'distance' between current position and desired one.
But several other issues showed up while working on this, among the most
annoying ones, the scrolltimer could keep running forever in some cases,
failing to detect properly an 'end condition', we could even get some
'bouncing' in extreme corner cases, edited item was not always properly
visible in the end, etc.
So as usual with UI, this ended up in a frustrating equilibrium game of
finding the optimal solution among several tradeof, taking unexpected
large amount of time... At least new code seems to work OK in
all possible (reasonable) cases, that will do for now.
|
|
The new icons were colliding in the corners. This moves the ID type icon inside the file box to avoid this clash.
|
|
|
|
|
|
|
|
|
|
|
|
This isn't used for looping.
|
|
Both windows.h and wm_types.h define HKEY, moving wm_types after windows.h
sidesteps the issue, since HKEY isn't used in fsmenu.c it doesn't cause
problems.
|
|
We need to make those paths validation async, since some infamous OS is
unable to provide a quick way to check whether a path is valid or not...
Not much to say here, this is basic wmJob stuff really... We don’t even
need complex threaded coordination locks or atomics, given how simple
the changes are here.
Fake-tested with some `sleep()` calls to add atificial delay, seems to
work as expected.
|
|
This makes the properties editor navigation bar less saturated. Internally
the icon theme coloring was refactored a bit to move more towards the button
drawing code.
|
|
|
|
This breaks the user interface of exporters, so revert for now until there
is a solution for this.
This reverts commit ee0d8426ab6d301c0296496c25f9511b9a9768e9.
|
|
Makes the file browser operator property region (lower left) dynamically
sized to content. Previously, the default size would work really badly
for file browsers opened in small windows, e.g. to install Add-ons from
the preferences window. It would be mostly empty but use lots of space
then.
|
|
Prepare for enabling ReflowComments.
|
|
This is a continuation of rB7fdffd735ff24, where I separated the
e.g. frame number drawing from scrollers internally.
This patch changes the API, so that space draw handlers
have to draw these numbers explicitely.
This greatly simplifies the scrollers API for all spaces
that just need scrollers without any frame numbers.
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D4747
|
|
|
|
|
|
Previously only a fixed bounding box could be used.
This was not flexible enough.
T63193 will benefit from this refactor.
Reviewers: brecht, campbellbarton
|
|
|
|
|
|
|
|
|
|
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
See also T57688.
Differential Revision: https://developer.blender.org/D4479
|
|
No functional change, this adds LIB definition and args to cmake files.
Without this it's difficult to migrate away from 'BLENDER_SORTED_LIBS'
since there are many platforms/configurations that could break when
changing linking order.
Manually add and enable WITHOUT_SORTED_LIBS to try building
without sorted libs (currently fails since all variables are empty).
This check will eventually be removed.
See T46725.
|
|
|
|
|