Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-12-16Assets: Add operator & button to regenerate the automatic previewJulian Eisel
This makes it possible to trigger a refresh of the data-block preview, available next to the preview in the Asset Browser sidebar. The previews get easily outdated and automatically refreshing it all the time is not an option because it would be a consistently running, quite expensive process. So a button to cause a refresh should be reasonable. This button can also be used to switch back from a custom preview to a generated one. Although that may not be clear, and we should probably think of a way to explain that better. Addresses T82719.
2020-12-15Fix various issues with temporary, maximized File BrowsersJulian Eisel
If Preferences > Interface > Temporary Editors > File Browser is set to "Maximized Area", opening a File Browser from a File or Asset Browser as regular editor would cause some issues. For example after closing the temporary File Browser, the regular browser would take over the file path and display settings from the temporary one. This is because they used to share the same area data. Some similar issues may have happend with temporary image editors. Now, this commit finally separates the space data of temporary maximized editors from the regular ones. So the editor data is entirely independent now, as it should be.
2020-12-15Fix crash opening maximized File Browser from Asset BrowserJulian Eisel
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.
2020-12-15Cleanup: unused variablesCampbell Barton
2020-12-15NLA: Fix context.selected_nla_strips PointerRNAWayde Moss
The strips were given the wrong owner ID. This only caused issues for python based UI as far as I know. Property changes would not properly update the viewport. Reviewed By: lichtwerk Differential Revision: https://developer.blender.org/D9685
2020-12-14UI/Assets: Operator to load custom preview images for data-blocksJulian Eisel
No automatic preview generation will ever be good enough to cover all cases well. So custom preview images are a must for a preview driven data-block selection - like for asset browsing. The operator simply allows selecting an image file, which will then be read and copied into the data-blocks preview (resized if necessary). There's no UI for this currently and the operator won't be available in the search menu yet. It will later once the Asset Browser UI is merged. Reviewed as part of https://developer.blender.org/D9719. Reviewed by: Bastien Montagne, Brecht Van Lommel
2020-12-11UI: Use 'and' Instead of '&' in DescriptionsYevgeny Makarov
Use 'and' instead of ampersand in descriptions and comments. Differential Revision: https://developer.blender.org/D9797 Reviewed by Aaron Carlisle
2020-12-03Fix T83315: Crash showing animation channel context menu after baking soundSybren A. Stüvel
Fix a crash when right-clicking in the Graph Editor animation channel list. The code for getting selected keyframes was not checking for baked curves.
2020-11-30Cleanup: Use "region" for ARegion variable namesHans Goudey
As proposed in T74432 and already implemented in several commits, "region" is the preferred name for `ARegion` variables, rather than any variant of "ar". This commit changes a few "ar" variables that have popped up over time and also adjusted names of variants like "arnew".
2020-11-17Merge branch 'blender-v2.91-release'Hans Goudey
2020-11-17Fix T82341: Warning in terminal during property searchHans Goudey
After recent changes to the context panel layout (rB187cc5e26d28b1a8), there has been an error printed when running propery search: > Error: separator_spacer() not supported in popups. The layout code thinks it's drawing in a menu because region->visible isn't properly set for the other tab searches. This patch sets that field for the temporary searching region, but it also disables searching in the context breadcrumbs panel, because at best this will just give results for the names of the active object, etc. This isn't helpful since those labels are mostly in every tab anyway. Differential Revision: https://developer.blender.org/D9425
2020-11-13GPencil: Merge GSoC curve edit modeFalk David
Differential Revision: https://developer.blender.org/D8660 This patch is the result of the GSoC 2020 "Editing Grease Pencil Strokes Using Curves" project. It adds a submode to greasepencil edit mode that allows for the transformation of greasepencil strokes using bezier curves. More information about the project can be found here: https://wiki.blender.org/wiki/User:Filedescriptor/GSoC_2020.
2020-11-13Cleanup: Make panel type flag names more clearHans Goudey
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.
2020-11-06Cleanup: use ELEM macroCampbell Barton
2020-11-06Cleanup: follow our code style for float literalsCampbell Barton
2020-11-03Fix C operators can't set default display or sort type for File BrowserJulian Eisel
`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
2020-11-01Rename BKE_sequencer.hRichard Antalik
Reviewed By: sergey Differential Revision: https://developer.blender.org/D9349
2020-10-28Outliner: Properties editor sync on selectionNathan Craddock
When outliner datablocks are selected, switch to the corresponding tab for that datablock in properties editors. Only properties editors that share an edge with the outliner will change tabs. Additionally, when modifiers, constraints, and shader effects are selected from the outliner, the panel will be expanded in all properties editors. Part of T77408 Manifest Task: https://developer.blender.org/T63991 Differential Revision: https://developer.blender.org/D8638
2020-10-27Cleanup: use over-line for doxy commentsCampbell Barton
Follow our code style for doxygen sections.
2020-10-24UI: Capitalization CorrectionsYevgeny Makarov
Approximately 141 changes of capitalization to conform to MLA title style. Differential Revision: https://developer.blender.org/D8392 Reviewed by Julian Eisel
2020-10-23Fix T81969 VSE: Wrong UI colorspace after scene strip updateClément Foucault
This regression was caused by rB57de5686048f which disabled srgb transform after the python callback. The right thing to do is to only rebind the framebuffer once to reset the no-srgb override.
2020-10-21WM: ensure is_repeat isn't copied from the last eventCampbell Barton
This means if a keymap item is set to ignore repeat events, it may do so accidentally from this setting being copied.
2020-10-21Cleanup: early return from animation step, reduce indentation levelCampbell Barton
2020-10-19Fix use of uninitialized variableHans Goudey
2020-10-19Fix ASAN warning after recent cleanupHans Goudey
rB78a5895c96 introduced a "use after scope" warning, where a buffer from a lower scope was used later. The solution is to only use one variable and store whether to use it more explicitely with a bool.
2020-10-17Cleanup: Reduce variable scope in screen directoryHans Goudey
Also return early and use LISTBASE_FOREACH in a few places
2020-10-17Cleanup: Reduce variable scope in area.cHans Goudey
2020-10-16Property Search: Reset panel expansion when exiting searchHans Goudey
This patch implements panel expansion saving and resetting for property search. While search is active, the panel expansion is based on whether or not it has a search result. When the search finishes, the panel expansion returns to its state before the search started. However, any panels interacted with during the search won't reset their expansion. This requires adding a new runtime flag for panels to store whether to use search result status as expansion. It also requires better handling for animation when panel expansion changes with another new runtime flag. `UI_panel_is_closed` gets the search-dependent expansion, but it is intentionally not used to access expansion in every case-- sometimes it's necessary to use `PNL_CLOSED` directly. Differential Revision: https://developer.blender.org/D8984
2020-10-15Fix T76597: Support Keyframe: Copy To SelectedWayde Moss
Reviewed By: Sybren, Luciano Muñoz Sessarego Differential Revision: https://developer.blender.org/D7783
2020-10-15Cleanup: Animation, simplify channel selection codeSybren A. Stüvel
Split up `ANIM_deselect_anim_channels()` into `ANIM_anim_channels_select_set()` and `ANIM_anim_channels_select_toggle()`. `ANIM_anim_channels_select_set()` is equivalent to the old `ANIM_deselect_anim_channels(..., false, ACHANNEL_SETFLAG_xxx)`. `ANIM_anim_channels_select_toggle()` is equivalent to the old `ANIM_deselect_anim_channels(..., true, ACHANNEL_SETFLAG_ADD)`. `ANIM_deselect_anim_channels(..., true, ACHANNEL_SETFLAG_CLEAR)` was also called once. The `true` parameter suggested the "toggle" behaviour was intended, but the `ACHANNEL_SETFLAG_CLEAR` argument prevented any toggling. This is now replaced with `ANIM_anim_channels_select_set(ac, ACHANNEL_SETFLAG_CLEAR)` to make this explicit. No functional changes, just a cleanup in order to better understand how the selection works.
2020-10-14Fix T81004 Python: Images drawn in the Sequence Editor have wrong colorsClément Foucault
This was caused by the sequencer using a sRGB buffer without using the sRGB transform. This patch make it so that the framebuffer is rebound using the sRGB transform before the python draw callbacks.
2020-10-14Cleanup: spellingCampbell Barton
2020-10-13Property Search: Find results in all tabsHans Goudey
This patch enables property search for all tabs in the property editor. To make interaction faster, if the editor's current tab doesn't have a result, the current tab changes to the next tab that has a match. This patch implements basic code that only searches panels. While we could run the existing "single tab" property search for every tab, that would also do everything else related to the layout pass, which would be less efficient, and maybe more complicated to maintain. The search match status for every current tab of the property editor is stored in a runtime bitfield and them displayed later by dimming icons in the tab selector panel to the left. Using `BLI_bitmap` properly in the runtime struct required moving it to `buttons_intern.h` and adding a small API to access the search filter instead. To make sure the editor isn't influenced by anything that happens while building the layout for other tabs, most of the context is duplicated and the new search is run in the duplicated editor. Note that the tool settings tab works slightly different than the other tabs, so I've disabled searching it for this commit. That would be a relatively simple improvement, but would just require a bit of refactoring of existing code. Differential Revision: https://developer.blender.org/D8859
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-10-07UI: Use property split in various pop-up dialogsYevgeny Makarov
The settings in these popups are not animateable, so also turn off property decorate. And also use better widths in order to fit the full text. Differential Revision: https://developer.blender.org/D9060
2020-10-05Move sequencer sources from blenkernelRichard Antalik
This is first step of refactoring task T77580. Next step will be breaking up files into smaller ones. Reviewed By: sergey, brecht Differential Revision: https://developer.blender.org/D8492
2020-10-05Fix T80282: Playback start delayed with AV syncRichard Antalik
If current frame is set to before start frame, with AV sync there is delay when playback is started. Tag scene with ID_RECALC_AUDIO_SEEK, so audio playback starts from correct position. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8809
2020-10-03Property Search: Set panel expansion when tab changesHans Goudey
This commit makes the panel expansion set based on the search results when the active tab in the properties editor changes. The multi-tab search patch (D8859) actually doesn't handle this because it uses a different code path. This feature uncovered a subtle but fairly significant issue with the implementation of property search (More details in T81113). Basically, the search needed multiple redraws to properly display the expansion of panels based on the search results. Because there is no animation of panel expansion when switching tabs, the problem was exposed only now. With this commit, hiding of "search only" buttons and panel size calculation happens in a single final step of the panel layout pass. The "search only" layout root flag is removed. Instead every button inside a panel header is in a single "uiButtonGroup" marked with a specific "in header" flag, an idea which could be generalized in the future. Differential Revision: https://developer.blender.org/D9006
2020-10-02Cleanup: Fix build error on windowsRay Molenkamp
int and eContextResult are different types to MSVC leading to a function signature mismatch.
2020-10-02Cleanup: Use enum for return values in context callbacksSybren A. Stüvel
Define enum `eContextResult` and use its values for returns, instead of just returning 1, 0, or -1 (and always having some comment that explains what -1 means). This also cleans up the mixup between returning `0` and `false`, and `1` and `true`. An inconsistency was discovered during this cleanup, and marked with `TODO(sybren)`. It's not fixed here, as it would consititute a functional change. The enum isn't used everywhere, as enums in C and C++ can have different storage sizes. To prevent issues, callback functions are still declared as returning`int`. To at least make things easier to understand for humans, I marked those with `int /*eContextResult*/`. This is a followup of D9090, and is intended to unify how context callbacks return values. This will make it easier to extend the approach in D9090 to those functions. No functional changes. Differential Revision: https://developer.blender.org/D9095
2020-10-02Cleanup: Refactor `ed_screen_context()` to use hash lookupsSybren A. Stüvel
Refactor `ed_screen_context()` to use `GHash` lookups instead of a sequence of string comparisons. This should provide a nice speedup, given that the hash for `member` only has to be computed once instead of matching it to each possible string. Reviwed by: brecht Differential Revision: https://developer.blender.org/D9090
2020-10-02Cleanup: split up `ed_screen_context()` into separate functionsSybren A. Stüvel
Refactor `ed_screen_context()` to call separate functions, instead of having the entire functionality in one function. Each function now only retrieves the data it needs from the context. Furthermore, some string comparisons are removed. No functional changes. Reviwed by: brecht Differential Revision: https://developer.blender.org/D9090
2020-10-02Fix (unreported) design flow in how workspace's relation data are read from ↵Bastien Montagne
.blend file. Relying on pointer addresses across different data-blocks is extremely not recommended (and should be strictly forbidden ideally), in particular in direct_link step of blend file reading. - It assumes a specific order in reading of data, which is not ensured in future, and is in any case a very bad, non explicit, hidden dependency on behaviors of other parts of the codebase. - It is intrinsically unsafe (as in, it makes writing bad code and making mistakes easy, see e.g. fix in rB84b3f6e049b35f9). - It makes advanced handling of data-blocks harder (thinking about partial undo code e.g., even though in this specific case it was not an issue as we do not re-read neither windowmanagers nor worspaces during undo). New code uses windows' `winid` instead as 'anchor' to find again proper workspace hook in windows at read time. As a bonus, it will also cleanup the list of relations from any invalid ones (afaict it was never done previously). Differential Revision: https://developer.blender.org/D9073
2020-09-30Cleanup: convert gforge task ID's to phabricator formatValentin
Cleanup old tracker task format to the new. e.g: [#34039] to T34039 Ref D8718
2020-09-28Fix T79275: Missing redraw for pinned active tool settings panelsDavid Friedli
In the 3D view sidebar, the active tool settings panel can be pinned to other categories, and in those other categories it doesn't redraw when the active tool changes. This commit checks for pinned panels from the "Tool" category when checking whether to redraw. Note that the relatively expensive string comparison is only done for currently visible pinned panels. Differential Revision: https://developer.blender.org/D9012
2020-09-24Cleanup: Remove unecessary storage of search filter in uiBlockHans Goudey
Since the search is applied all in one phase, there is no need to store a reference to the search filter in every uiBlock. Instead just pass it as an argument to UI_block_apply_search_filter.
2020-09-17UI: only draw a single header in the header regionCampbell Barton
While this isn't an issue with the default configuration it's possible to register extra header types for a single region. In this case the first header-type to successfully poll is drawn without drawing other header types. This issue was raised by T60195.
2020-09-16UI: Add grid-related theme optionsRed Mser
This commit makes grid theming more consistent and capable by adding some new theme colors related to grid rendering. - Add grid theme color for node editor. `UI_view2d_multi_grid_draw` is called with TH_GRID instead of a shaded `TH_BACK`. Also color-blend `TH_NODE_GROUP`. - Make the movie clip editor's clip preview grid respect grid theme color (`ED_region_grid_draw` uses color-blended `TH_GRID`). - Add versioning code to allow fixing existing themes (the resulting themes should visually look the same as before) These changes did cause some inconsistencies in the movie clip editor, even after adjusting the themes accordingly: 1. The alpha slider of the grid color affects the background and not the grid lines themselves. 2. The grids used by graph and dopesheet mode could already be themed in the past. Now that the clip preview's grid can also be themed, two different modes share the same theme color. Differential Revision: https://developer.blender.org/D8699
2020-09-15Property Search: Properly set expansion for instanced panelsHans Goudey
Stack panels (for modifiers, etc..) also get their expansion from their associated list data. This means that property search expansion needs to properly update the list data, which can be accomplished by calling `set_panels_list_data_expand_flag`. This commit also moves this logic to `UI_panels_end`, where it fits better.
2020-09-15UI: Single tab property searchHans Goudey
This adds a search bar to the properties editor. The full search for every tab isn't included in this patch, but the interaction with panels, searching behavior, UI, region level, and DNA changes are included here. The block-level search works by iterating over the block's button groups and checking whether they match the search. If they do, they are tagged with a flag, and the block's panel is tagged too. For every update (text edit), the panel's expansion is set to whether the panel has a result or not. The search also checks for matching strings inside enums and in panel labels. One complication to this that isn't immediately apparent is that closed panel's subpanels have to be searched too. This adds some complexity to the area-level panel layout code. Possible Future Improvements: - Use the new fuzzy search in BLI - Reset panels to their expansion before the search started if the user escape out of the text box. - Open all child panels of a panel with expansion. Differential Revision: https://developer.blender.org/D8856