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
2021-12-08Cleanup: Clang-Tidy modernize-redundant-void-argAaron Carlisle
2021-12-02UI: Expand tree-view items (e.g. asset catalogs) on click to activateJulian Eisel
This actually gives a quite nice behavior in my opinion, especially for asset catalogs, where activating a catalog makes all assets inside it or its (grand-)child catalogs visible, so showing the child catalogs then adds useful information. Maybe this should become a feature for asset catalogs only, to be evaluated once the tree-view API is used in more cases. Only asset catalogs are affected by this change right now. Part of T93582.
2021-12-02Fix T93410: Crash hiding a region from Python used by a popoverCampbell Barton
Close all active buttons when hiding a region as this can be called from Python a popover is open from that region. Failure to do this causes the popover to read from the freed button. Also rename UI_screen_free_active_but to UI_screen_free_active_but_highlight since it only frees highlighted buttons.
2021-12-02UI: Fix scaling of HSV cursor when zoomingLeon Leno
The small circle used to choose the hue/saturation and value in the color widget was drawn with a fixed screen space size. Now scale the circle used as cursor in the color widget based on the zoom. This could have been part of a9642f8d6130 but the implementation is different. Based on a fix provided by Erik Abrahamsson Differential Revision: https://developer.blender.org/D13444
2021-11-30Cleanup: clang-format, trailing spaceCampbell Barton
2021-11-30Cleanup: spelling in comments & stringsCampbell Barton
2021-11-26Cleanup: Silence clang-tidy warnings.Jeroen Bakker
2021-11-25Merge branch 'blender-v3.0-release'Julian Eisel
2021-11-25Fix missing margin below panelsJulian Eisel
A minor cosmetic fix. When the view was scrolled all the way to the bottom, the lowest panel would end right on the view edge. The scrollable view should get the same margin at the bottom as used at the top.
2021-11-25Fix T92313: Heading of redo panel is not aligned properlyJulian Eisel
This corrects some alignments issues through new margins introduced in 93544b641bd6. Basic idea of this fix is to only add the new margins when drawing a panel with background. These margins were added specifically for the background boxes, so that makes sense. Alternative fix to D13199. This also fixes some margings added unintentionally in mentioned commit. There is a little jump of the toolbar and the tabs in the Properties when comparing the UI without this fix to 2.93: {F12158085} {F12158039} The jump is gone with this fix applied (compare to the 2.93 screenshot): {F12158064} While not a serious issue, this confirms that this fix actually tackles the root of the issue.
2021-11-25Fix T92278: Small size of previews in the shading popoverJulian Eisel
Don't use the side padding for menu item contents when displaying previews or icons in a row or grid layout. This can cause problems for the preview drawing and doesn't make sense to draw there anyway. This not only fixes the mentioned issue, but also too small heighlight for the collection color tag in the Outliner context menu. Alternative to and similar to D13125.
2021-11-25Merge remote-tracking branch 'origin/blender-v3.0-release'Sybren A. Stüvel
2021-11-25Fix T93274: Assigning asset catalog doesn't mark file as modifiedSybren A. Stüvel
Assigning a catalog to an asset via drag-and-drop in the asset browser now creates an undo step. Not only does this allow undoing the action, it also tags the blend file as modified. Reviewed by: Severin Differential Revision: https://developer.blender.org/D13370
2021-11-25Merge branch 'blender-v3.0-release'Bastien Montagne
Conflicts: source/blender/windowmanager/intern/wm_files_link.c
2021-11-25Fix T89996, T90063: bugs with multi-button reset and entering values in popupsBrecht Van Lommel
This reverts the changes to fix T87448, where entering the same value in number buttons causes an unnecessary update. This is not stable enough for 3.0 and so is being reverted, better to have an unnecessary update than no update in other cases. This effectively reverts the changes from rBeb06ccc32462 and follow up fixes rBe1a9ba94c599, rBbbb52a462ef9, rBec30cf0b742f, and rB071799d4fc44. The code is disabled with a comment on how it could be implemented better.
2021-11-24Merge branch 'blender-v3.0-release'Julian Eisel
2021-11-24UI: Improve scaling of widgets when zoomingLeon Leno
This commit improves the scaling of some ui widgets when zooming by making the radius of the rounded corners dependent on the element's zoom level. Needed to fix T92278 without padding issues, see D13125. Reviewed By: Hans Goudey, Julian Eisel Differential Revision: https://developer.blender.org/D12842
2021-11-24Merge branch 'blender-v3.0-release'Julian Eisel
2021-11-24Asset Browser: Activate a catalog when draggingJulian Eisel
Without this it's easy to loose track of which catalog you are dragging. Things feel generally quite jumpy/disconnected, activating the catalog makes things feel far less like that. I consider this an important usability fix, therefore I'm adding it to the release branch.
2021-11-24Context: add accessors returning selected actions for animation editors.Alexander Gavrilov
Add a new 'selected_visible_actions' property to allow querying actions that are selected in animation related editors for use in UI and operators. The 'selected_editable_actions' variant excludes linked actions (the only reason an action can be read-only). In the Action and Shape Key editors there is only one action that is specified by the field at the top of the editor. In Dope Sheet it scans the channel rows and returns all actions related to the selected items. This includes summary items for actions and groups. In Graph Editor, it lists actions associated with selected curves. The new property is also used for Copy To Selected and Alt-Click. Ref D11803
2021-11-24Assets: Sanitize threaded preview creation with undoJulian Eisel
Basically, this fixes disappearing previews when editing asset metadata or performing undo/redo actions. The preview generation in a background job will eventually modify ID data, but the undo push was done prior to that. So obviously, an undo then would mean the preview is lost. This patch makes it so undo/redo will regenerate the preview, if the preview rendering was invoked but not finished in the undone/redone state. The preview flag PRV_UNFINISHED wasn't entirely what we needed. So I had to change it to a slightly different flag, with different semantics.
2021-11-24Assets: Sanitize threaded preview creation with undoJulian Eisel
Basically, this fixes disappearing previews when editing asset metadata or performing undo/redo actions. The preview generation in a background job will eventually modify ID data, but the undo push was done prior to that. So obviously, an undo then would mean the preview is lost. This patch makes it so undo/redo will regenerate the preview, if the preview rendering was invoked but not finished in the undone/redone state. The preview flag PRV_UNFINISHED wasn't entirely what we needed. So I had to change it to a slightly different flag, with different semantics.
2021-11-23Asset: Merge asset library/list refresh operatorsJulian Eisel
In rBdcdbaf89bd11, I introduced a new operator (`file.asset_library_refresh()`) to handle Asset Browser refreshing more separate from File Browser refreshing. However, there already was `asset.asset_list_refresh()`, which at this point only works for asset view templates, but was intended to cover the Asset Browser case in future too. This would happen once the Asset Browser uses the asset list design of the asset view template. So rather than having two operators for refreshing asset library data, have one that just handles both cases, until they converge into one. This avoids changes to the Python API in future (deprecating/changing operators). Differential Revision: https://developer.blender.org/D13239
2021-11-23Asset: Merge asset library/list refresh operatorsJulian Eisel
In rBdcdbaf89bd11, I introduced a new operator (`file.asset_library_refresh()`) to handle Asset Browser refreshing more separate from File Browser refreshing. However, there already was `asset.asset_list_refresh()`, which at this point only works for asset view templates, but was intended to cover the Asset Browser case in future too. This would happen once the Asset Browser uses the asset list design of the asset view template. So rather than having two operators for refreshing asset library data, have one that just handles both cases, until they converge into one. This avoids changes to the Python API in future (deprecating/changing operators). Differential Revision: https://developer.blender.org/D13239
2021-11-23Merge branch 'blender-v3.0-release'Julian Eisel
2021-11-23Fix broken handling of constraints reordering with library overridesJulian Eisel
Alternative to D13291 (description partially copied from there). New drag & drop reordering code would call constraints reordering operator with the generic context, and not the one from the panel's layout. missing the "constraint" member which is mandatory for poll function to properly deal with override vs. local constraints. For this to work in a decent way, there needs to be some panel-wide context that we can restore when executing callbacks outside of the normal draw context. So similar to uiLayoutSetContextPointer() to set context on a layout level, this introduces UI_panel_context_pointer_set() for panel level context (this calls the former for the current panel root layout as well). Differential Revision: https://developer.blender.org/D13308
2021-11-23Cleanup: silent clang-tidy warning NULL vs nullptr.Jeroen Bakker
2021-11-22Merge branch 'blender-v3.0-release'Julian Eisel
2021-11-22Assets: Generate light preview when making light object an assetJulian Eisel
We already supported previews for lights, just didn't actually use them when making a light object an asset. They were only used when making the light data itself an asset.
2021-11-22Fix grayed out preview generation button for light objectsJulian Eisel
Mistake in e7bea3fb6ed0. We should only skip preview generation for objects that don't support preview rendering, not completely forbid accessing preview data of such IDs.
2021-11-22UI: Use a map for block name lookupsErik
Use a map to speed up search for UI block names. Time to redraw the node editor was decreased from around 75-120ms to 40-70ms in a tree with many Geometry Nodes. Differential Revision: https://developer.blender.org/D13225
2021-11-22Fix T93250: Crash in spreadsheet tree view after recent commitHans Goudey
It seems that update_from_old assumed there would be an old tree view available in the old block. This works for the asset browser because the tree is always drawn, but for the spreadsheet that depends on having an active object, which isn't necessarily always true. Differential Revision: https://developer.blender.org/D13301
2021-11-22Merge branch 'blender-v3.0-release'Philipp Oeser
2021-11-22Revert "Fix (unreported) broken handling of constraints reordering with ↵Bastien Montagne
liboverride." This reverts commit 6eaa69c66c98d291b80331330391664415f759a4. Committed by nistake, sorry for the noise.
2021-11-22Merge branch 'blender-v3.0-release'Bastien Montagne
2021-11-22Fix (unreported) broken handling of constraints reordering with liboverride.Bastien Montagne
New drag&drop reordering code would call constraints reordering operator with the generic context, and not the one from the panel's layout. missing the "constraint" member which is mandatory for poll function to properly deal with override vs. local constraints. This commit fixes it by generating a temp bContextStore in the panel re-ordering callback. NOTE: this fix will have to be extended to modifiers (which happen to work currently because they have an 'active' status), and gpencil modifiers (which are also broken currently). Differential Revision: https://developer.blender.org/D13291
2021-11-21Cleanup: Move menu search template to C++Hans Goudey
This allows the use of better/more readable data structures, and will also make some refactors to the search button easier. The build completed on the buildbot for all platforms.
2021-11-20Refactor: Port spreadsheet data set to UI tree viewHans Goudey
This patch removes a bunch of specific code for drawing the spreadsheet data set region, which was an overly specific solution for a generic UI. Nowadays, the UI tree view API used for asset browser catalogs is a much better way to implement this behavior. To make this possible, the tree view API is extended in a few ways. Collapsibility can now be turned off, and whether an item should be active is moved to a separate virtual function. The only visual change is that the items are now drawn in a box, just like the asset catalog. Differential Revision: https://developer.blender.org/D13198
2021-11-20Fix: Exception in tree view code in new caseHans Goudey
This isn't a problem in 3.0 or master, but I'm porting the spreadsheet data set region to a tree view and ran into this. This line needs to whether the function is empty before calling it. Differential Revision: https://developer.blender.org/D13197
2021-11-20Cleanup: Use canonical variable nameHans Goudey
All `ARegion` variables should be called `region` unless there is a good reason not to, since that is the convention.
2021-11-18Merge branch 'blender-v3.0-release'Julian Eisel
2021-11-18Fix asset preview not showing up for current file data-blocksJulian Eisel
For data-blocks from the current file, the image-buffer for dragging wasn't set at all. This wasn't intentional, dragging things in the Asset Browser should just always show the preview.
2021-11-17Merge branch 'blender-v3.0-release'Aaron Carlisle
2021-11-17Cleanup: Correct copy paste error in commentAaron Carlisle
Mistake from rB2743d746ea4f38c098512f6dd6fc33d5a62429d3
2021-11-13BLF: Use Floats for Font Point SizesHarley Acheson
Allow the use of floating-point values for font point sizes, which allows greater precision and flexibility for text output. See D8960 for more information, details, and justification. Differential Revision: https://developer.blender.org/D8960 Reviewed by Campbell Barton
2021-11-13Cleanup: clang-formatCampbell Barton
2021-11-12Merge remote-tracking branch 'origin/blender-v3.0-release'Julian Eisel
2021-11-12UI: (Performance) Avoid drawing buttons out of viewJulian Eisel
The UI was always drawing all buttons in a layout, no matter if they were scrolled out of view (as in, outside of the visible part of the region) or not. This means it's doing quite some work that can be avoided. UI drawing generally isn't a big bottleneck in Blender, so I don't expect huge speedups from this. But while playing back animation, we do redraw a fair bit of the UI, so in cases where there are many buttons out of view, it may bring a little FPS boost. E.g. say in complex node trees (the node editor is redrawn on animation playback in case there are animated values that need updated UI feedback). This also mitigates the issue in T92922 significantly. Differential Revision: https://developer.blender.org/T92922 Reviewed by: Brecht Van Lommel
2021-11-12UI: Do not shade alpha when blending colorsYevgeny Makarov
UI_GetThemeColorBlendShade4fv incorrectly changing alpha by the amount of the shading offset. See D9944 for more details. Differential Revision: https://developer.blender.org/D9944 Reviewed by Hans Goudey
2021-11-12UI: Do not shade alpha when blending colorsYevgeny Makarov
UI_GetThemeColorBlendShade4fv incorrectly changing alpha by the amount of the shading offset. See D9944 for more details. Differential Revision: https://developer.blender.org/D9944 Reviewed by Hans Goudey