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-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-11-30Cleanup: spelling in comments & stringsCampbell Barton
2021-11-25Merge branch 'blender-v3.0-release'Julian Eisel
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-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-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-24Animation: allow manually setting the intended playback range for actions.Alexander Gavrilov
Some operations, e.g. adding a new action strip to NLA, require knowing the active frame range of an action. However, currently it can only be deduced by scanning the keyframes of the curves within it. This is not ideal if e.g. curves are staggered for overlap. As suggested by Nathan Vegdahl in comments to T54724, this patch adds Action properties that allow manually specifying its active frame range. The settings are exposed via a panel in the Dopesheet and Action Editor. When enabled, the range is highlighted in the background using a striped fill to distinguish it from the solid filled regular playback range. When set, the frame range is used when adding or updating NLA tracks, and by add-ons using `Action.frame_range`, e.g. FBX exporter. Differential Revision: https://developer.blender.org/D11803
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-24T91406: Asset Library IndexingJeroen Bakker
Asset library indexing would store indexes of asset files to speed up asset library browsing. * Indexes are read when they are up to date ** Index should exist ** Index last modify data should be later than the file it indexes ** Index version should match * The index of a file containing no assets can be load without opening the index file. The size of the file should be below a 32 bytes. * Indexes are stored on a persistent cache folder. * Unused index files are automatically removed. The structure of the index files contains all data needed for browsing assets: ``` { "version": <file version number>, "entries": [{ "name": "<asset name>", "catalog_id": "<catalog_id>", "catalog_name": "<catalog_name>", "description": "<description>", "author": "<author>", "tags": ["<tag>"] }] } ``` Reviewed By: sybren, Severin Maniphest Tasks: T91406 Differential Revision: https://developer.blender.org/D12693
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-23Merge branch 'blender-v3.0-release'Bastien Montagne
2021-11-23Icons: Replace .blend file icons, add "Current File" iconJulian Eisel
The Blender icon must not be used to refer to anything that is not Blender itself. Using the Blender icon on its own to refer to .blend files or the currently open file is a no-go, which was brought up by Ton. This does the following changes to the icon file: * Add new "Current File" icon * Change the .blend file icon to contain a file icon with the Blender logo, but not merely the Blender logo. * Change the backup .blend file icon accordingly. The new "Current File" icon is used in the Asset Browser, but could/should be used in the Outliner as well. That needs more design discussion though.
2021-11-23Merge remote-tracking branch 'origin/blender-v3.0-release'Sybren A. Stüvel
2021-11-23Asset Browser: add operator for installing asset bundlesSybren A. Stüvel
Add an operator "Copy to Asset Library" for installing asset bundles into already-existing asset libraries. The operator is shown when: - the "Current File" library is selected, - the blend file name matches `*_bundle.blend`, and - the file is not already located in an asset library. The user can select a target asset library, then gets a "Save As" dialogue box to select where in that library the file should be saved. This allows for renaming, saving in a subdirectory, etc. The Asset Catalogs from the asset bundle are merged into the target asset library. The operator will refuse to run when external files are referenced. This is not done in its poll function, as it's quite an extensive operator (it loops over all ID datablocks). Reviewed by: Severin Differential Revision: https://developer.blender.org/D13312
2021-11-22Merge branch 'blender-v3.0-release'Julian Eisel
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-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-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-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-12Cleanup: move 'imm_drawcircball' to 'gpu_immediate_util.c'Germano Cavalcante
2021-11-11Merge branch 'blender-v3.0-release'Campbell Barton
2021-11-11Fix T92954: Loop Cut Tool preview line visible during operationCampbell Barton
Apply a local-workaround instead of adding support for this use-case since pre-selection isn't the intended purpose of gizmos. This also resolves a glitch where poly-build and loop cut would briefly show loop-cut or poly-build pre-selection after transforming. See gizmo_preselect_poll_for_draw note for more details.
2021-11-09Merge branch 'blender-v3.0-release'Pablo Vazquez
2021-11-09Cleanup: Remove `SMALL_TRI_RIGHT_VEC` iconPablo Vazquez
Since the recent change to context paths to use the arrow icon instead of the triangle (D13106), the `SMALL_TRI_RIGHT_VEC`is no longer used. This patch removes the icon and all references. - Replace `SMALL_TRI_RIGHT_VEC` with `RIGHTARROW` in Freestyle UI - Remove references to `SMALL_TRI_RIGHT_VEC` and `ICON_SMALL_TRI_RIGHT_VEC`. Fix for built-in add-ons has been done in rBAcc2f71bfe9b0/rBAa84028f8a89a. This will be added to the list of breaking changes [[ https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Python_API#Breaking_Changes | in the Wiki ]]. Reviewed By: Severin Differential Revision: https://developer.blender.org/D13130
2021-11-09Merge branch 'blender-v3.0-release'Philipp Oeser
2021-11-09Fix T92318: adding layers (UVs, ...) doesn't notify about limitPhilipp Oeser
When adding certain customdata layers (namely UVs, vertex colors and sculpt vertex colors), the user does not get notified the specific limit has been hit (blender just silently does nothing). Now inform the user [decided to not do this in poll() since it could get messy once operators are extended to operate on all selected objects, so left this as a visible error in execute() -- or from python]. Maniphest Tasks: T92318 Differential Revision: https://developer.blender.org/D13147
2021-11-08Merge branch 'blender-v3.0-release'Germano Cavalcante
2021-11-08Fix snap cursor not active even if gizmo is availableGermano Cavalcante
Error introduced in rB69d6222481b4 and partially fixed in rB24310441ddc8. When gizmo was turned on but the scene has more than one 3D viewport, one of them the snap cursor did not appear.
2021-11-05Merge branch 'blender-v3.0-release'Pablo Vazquez
2021-11-05UI: Use arrow icon on context pathsPablo Vazquez
The current `ICON_SMALL_TRI_RIGHT_VEC` uses dark hard-coded colors ([`0.2`, `0.2`, `0.2`]) which makes it impossible to theme and hard to see in dark contexts. Use `ICON_RIGHTARROW` to match the Outliner's breadcrumbs. This icon uses `TH_TEXT` so it's visible as long as the rest of the text is. ##### Master (Properties editor background made red on purpose to be able to see the triangle icon) {F11713038, size=full} #### This patch {F11713039, size=full} Reviewed By: #user_interface, Severin, HooglyBoogly Maniphest Tasks: T92771 Differential Revision: https://developer.blender.org/D13106
2021-11-05Cleanup (UI): Add/use type for operator context enumJulian Eisel
Adds a `wmOperatorCallContext` typedef for the existing `WM_OP_XXX` operator context enum. This adds type safety, allows the compiler to produce better warnings and helps understanding what a variable is for. Differential Revision: https://developer.blender.org/D13113 Reviewed by: Campbell Barton
2021-11-04GPencil: New option to Merge All layers in active oneAntonio Vazquez
This new option allows to combine all layers in the active one. Also the merge down option has been improved. Reviewed By: mendio, pablo vazquez (UI) Differential Revision: https://developer.blender.org/D13054
2021-11-04Merge remote-tracking branch 'origin/blender-v3.0-release'Julian Eisel
2021-11-04Fix T92501: Crash when dragging material assets over 3D View regionsJulian Eisel
Issue was that the context used for dropbox handling and polling didn't match the one used for drawing the dropbox and generating the tooltip text (which would determine the material slot under the cursor, requiring context). The mismatch would happen with overlapping regions. Actually, this patch includes two fixes, each fixing the crash itself: * Store the context from handling & polling and restore it for drawing. * Correct the hovered region lookup for drawing to account for overlayed regions. Note that to properly set up context for drawing, we should also account for the operator context, which isn't done here, see https://developer.blender.org/T92501#1247581.
2021-11-03GPencil and Annotation: Use cached depth to perform depth testing operationsGermano Cavalcante
Operations such as erasing with occlusion and drawing on the surface require reading the depth buffer. However, this is being done with minimal efficiency. Currently, to read the depth corresponding to each point of the new stroke, a ReadPixel is called to send a message to the GPU and read the depth of the corresponding pixel in the VRAM. The communication between GPU and CPU is known to be a slow operation so it is good to be avoided. Therefore, save the entire depth buffer in a cache to be read directly from the RAM. (Also the `ED_view3d_autodist_depth` and `ED_view3d_autodist_depth_seg` have been removed since they are no longer used). Reviewed By: antoniov, fclem Differential Revision: https://developer.blender.org/D10894
2021-11-03UI: Refactor how dragging onto text buttons works, fixing issuesJulian Eisel
There was a bunch of special handling to support dropping data-blocks onto string or search-menu buttons, to change the value of these. This refactor makes that case use the normal drop-box design, where an operator is executed on drop that gets input properties set by the drop-box. This should also make it easier to add support for dragging assets into these buttons. In addition this fixes an issue: Two tooltips were shown when dragging assets over text buttons. None should be shown, because this isn't supported.
2021-11-02Merge branch 'blender-v3.0-release'Germano Cavalcante
2021-11-02Fix snap cursor still active even when gizmo is not availableGermano Cavalcante
The snap cursor continued to appear even when the workspace is changed for example. So add the region to check in the cursor pool.
2021-11-01Merge branch 'blender-v3.0-release'Germano Cavalcante
2021-11-01Fix T92605: Snapping not aligning to face extensionGermano Cavalcante
Regression indroduced in rB69d6222481b4342dc2a153e62752145aa37ea101
2021-11-01Fix scale cage gizmo in pose-modeCampbell Barton
The active objects matrix was ignored when calculating the cage.
2021-11-01Fix scale cage gizmo in pose-modeCampbell Barton
The active objects matrix was ignored when calculating the cage.