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-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-04UI: Fix UIList item using "regular" widget colors while editedPablo Vazquez
Simply removing the check for `UI_STATE_TEXT_INPUT` makes it inherit the "List Item" User Interface theme settings. This patch changes the default theme to match the colors of text input fields. #### Master {F11680556, size=full} #### This patch {F11680557, size=full} All the included commmunity themes seem to work well (only Deep Grey might need more contrast but that's a different patch). Related reports: T92720 Reviewed By: #user_interface, Severin Maniphest Tasks: T92720 Differential Revision: https://developer.blender.org/D13073
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-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-02Fix lots of missing messages i18n handling in `uiItemL` calls.Bastien Montagne
Also fix several wrong usages of `IFACE_` (as a reminder, error/info messages should use `TIP_`, not `IFACE_`).
2021-11-01Fix T91507: Crash when calling context menu from confirmation popupJulian Eisel
A typical issue with popup handling: We have to respect the menu-region and give it priority over the regular region for handling. In this case there isn't a regular region in context even.
2021-10-28Fix: Improve node socket icon scaling group input/output listLeon Leno
This patch makes `widget_nodesocket` base the size of the drawn socket icon on the rectangle that’s passed in to allow it to scale with the rest of the interface. Differential Revision: https://developer.blender.org/D11734
2021-10-27UI: Theme refresh for Blender v3.0Pablo Vazquez
{F11548100, size=full} To celebrate the beginning of a new series, it feels like the right time to give the theme a fresh look while improving on what already works. The aim of this refresh is to keep a familiar look but with polishing touches here and there. Like new paint on the walls of your well known house. The theme for Blender 2.8 was well received but presented a few flaws. * Transparency on menus and tooltips reduce readability * Mismatch on certain colors, especially outlines of connected widgets * Active/open menus highlight was not prominent enough * Header background mismatch in some editors At the same time we can make use of new features in 3.0: * Make panels look like panels again (like in v2.3!) * Make use of roundness in more widgets * Since nodes are no longer hard-coded to be transparent, tweak opacity and saturation * Tweak colors for the new dot grid This update does not include: * Meshes in edit mode to match greenish object-data color. This needs tweaks in the code to improve contrast. * A copy of the Blender 2.8x legacy theme. This could be added to the community themes (shouldn't cost much maintenance, I hope) There will be certainly small tweaks to do here and there, I've been working using this theme for months but there can be areas that are missing update. The overall style is presented here. This commit bumps the file subversion. Reviewed By: #user_interface, Severin Differential Revision: https://developer.blender.org/D13008
2021-10-27Revert "Asset Browser: Ensure parent catalogs are expanded when adding child"Julian Eisel
This reverts commit 487faed6d0a1170a2f098552f794280fabe82186. I changed my mind on how to implement this feature. Adding a catalog should also activate it, like we do it for adding other data in Blender. The activation will automatically make it visible then. See the following commit.
2021-10-27Asset Browser: Ensure parent catalogs are expanded when adding childJulian Eisel
When pressing the '+' icon to add a new child catalog, or when adding it through the context menu, the new catalog should be visible. So the this change makes sure the parent is uncollapsed if needed.
2021-10-27Fix: Show "new" attribute name typed in nodes modifier input searchHans Goudey
Previously it wouldn't be displayed at all for inputs, now just display it without an "add" icon.
2021-10-27UI: Support dragging tree-view itemsJulian Eisel
Adds the needed bits to the UI tree-view API to support dragging tree-view items. This isn't used yet, but will be in the following commit for asset catalogs. There will probably be some further tweaks to the design at some point, for now this should work well enough for our use-cases.
2021-10-27UI: Add padding to the left of tree-rows labels without iconJulian Eisel
The label was placed right at the left border of the row highlight, which looked weird. So add some padding to tree-row labels without icon or collapse chevron, which makes it look more polished. As additional benefit, it alignes the labels better with icons of other rows on the same tree level. And the padding makes it more clear that a child is indeed a child, not just a sibling without icon.
2021-10-27Fix T92427: Adding new nodes does no edge-panningPhilipp Oeser
Unlike translating existing nodes [which disables cursor wrapping and enables edge-panning instead since rBSa1cc7042a74], adding new nodes would still show the old behavior of cursor wrapping. This has been disabled for the case when the node whould be added outside (due to menus overlapping other editors). Now enable edge-panning for adding new nodes as well and make sure this only starts once the mouse has returned into the inside rect once. Maniphest Tasks: T92427 Differential Revision: https://developer.blender.org/D13005
2021-10-27Fix T92494: Node Editor dot grid not respecting display resolution scalePhilipp Oeser
This seems wrong and was especially noticeable since transform snapping does account for it (which was reported in T92494). Now divide the `DotGridLevelInfo` `step_factor` by the default of 20 for `U.widget_unit` and scale it later by the actual interface scale. note: when zooming, this will still always snap to the smallest dot level (not sure, with a bit more work it could be possible to only snap to the lowest visible level after fading?) Maniphest Tasks: T92494 Differential Revision: https://developer.blender.org/D13002
2021-10-27Docs: add docstring for wmWindowManger.winactiveCampbell Barton
Also justify rounding up font width.
2021-10-26UI: Support disabled-hint for dropping in the tree-view APIJulian Eisel
A tree-view item's drop controller can now return a message for the user explaining why dropping isn't possible with the dropped data. This is then displayed in red text next to the cursor. This isn't actually used yet, the follow up commit will do that.
2021-10-26UI: Improve node editor breadcrumbs displayHans Goudey
This patch upgrades node editor breadcrumbs to have slightly more visual weight, to including the base path of object/modifier/world, etc, have more visually pleasing spacing, and contain icons. In the code, a generic "context path" is added to interface code. The idea is that this could be used to draw other breadcrumbs in areas like the property editor or the spreadsheet, and features could be added to all of those areas at the same time. Ideally we would be able to control the color of the breadcrumbs with a specific theme color, but since they are drawn with the regular layout system, that is not easily possible. Thanks to @fabian_schempp for the original patch. Differential Revision: https://developer.blender.org/D10413
2021-10-26UI: Use text highlight theme color for active tabPablo Vazquez
Currently, both inactive and active tabs are using the `Region Text` theme property. This patch makes it so active tabs use `Region Text Highlight`. Since this check is done in other places already but was simply missing in this case, I believe this was just an oversight and not a design decision. Top is master, bottom is this patch: {F11520838, size=full} This allows this kind of tab highlight, not possible before since all tabs would have white text. {F11520873, size=full} Reviewed By: #user_interface, Severin Differential Revision: https://developer.blender.org/D13003
2021-10-26Cleanup: spelling in commentsCampbell Barton
2021-10-26UI: Change node editor grid into a dot gridHans Goudey
This patch makes the background grid of the node editor a grid of dots instead of lines. This makes the background look a bit more subtle and reduces visual complexity. The dots are meant to provide a reference when panning and zooming. Based on the design of @pablovazquez, and a patch originally authored by @fabian_schempp. The "Grid Levels" controls how many levels of dots are drawn. As the editor zooms in, the higher levels of dots fade in, making them closer together visually. The zoom factor at which each grid starts and ends fading in is controllable in the code, and could be tweaked further in the future. The new default value is 7, out of a range from 0 to 9. Differential Revision: https://developer.blender.org/D10345
2021-10-26Cleanup: Clang formatAaron Carlisle
2021-10-25Cleanup: Remove unused functions, make functions staticHans Goudey
2021-10-25Assets: Snapping with visual feedback while draggingGermano Cavalcante
The drag and drop feature of objects in 3D View has been modified to include: - Snap the object being dragged. - Visual feedback through a box and the placement tool grid. Maniphest Tasks: T90198 Differential Revision: https://developer.blender.org/D12912
2021-10-25UI Drag Drop: allow customizable drawingGermano Cavalcante
No functional changes. This commit adds 3 callbacks for `wmDropBox` which allow custom drawing without affecting the internal dropbox API. Differential Revision: https://developer.blender.org/D12948
2021-10-25Fix T92361: Zooming nodes clips text labelsCampbell Barton
While c7d94a7827a5be9343eea22a9638bb059f185206 exposed this bug, this was caused by text widths being calculated without taking the zoom level into account since drawing at a smaller size is often wider than the width of the larger text scaled by the zoom.
2021-10-25Fix T92293: Clipped labels for graph editor modifiersCampbell Barton
While c7d94a7827a5be9343eea22a9638bb059f185206 exposed this bug, this was caused by a discrepancy in padding where labels would have additional padding when drawing without emboss. The padding made widget drawing behave as if the text took up more room causing it to be clipped. Now labels are considered the same width with/without emboss.
2021-10-25Cleanup: clang-tidy, spellingCampbell Barton
2021-10-25UI: Refactor dropping support for the tree-view APIJulian Eisel
Introduces a dropping-controller API for the tree-view items, `AbstractTreeViewItemDropController`. This reduces responsibilities of the main tree-view item classes, which are already getting quite big. As I expect even more functionality to be needed for it (e.g. drag support), it's better to start introducing such controller types already.
2021-10-23Cleanup: Remove unused functionHans Goudey
2021-10-22Fix panel pinning showing for instanced panels (e.g. FCurve modifiers)Philipp Oeser
This was reported for FCurve modifiers, but was also true (in theory) for other instanced panels (regular modifiers, spreadsheet filters, ...), these would not show pinning for other reasons (no caterories). So in the case of the Graph Editor the follwing happens: `graph_buttons_register` only registers `GRAPH_PT_modifiers`, the panel itself has no header (PANEL_TYPE_NO_HEADER), further panels for individual modifiers are added dynamically in `graph_panel_modifiers`. So when pinning a particular modifier, we would pin e.g. `GRAPH_PT_noise` (not `GRAPH_PT_modifiers`). ED_region_panels_layout_ex would only collect panels known to `graph_buttons_register` (so is not aware of the specific panels of modifiers). So while I think it should be possible to pin `GRAPH_PT_modifiers` on top of an individual modifier's panel this would result in all modifiers being shown in other categories [which would also be weird]. Panel header layout was also not correct (drawing the pin icon over the modifier delete icon). So to resolve this, just dont use pinning for these type of panels. part of T92293. Maniphest Tasks: T92293 Differential Revision: https://developer.blender.org/D12965
2021-10-22Cleanup: Compile warningsAaron Carlisle
2021-10-21Assets: Allow specific data-block types to be enabled by defaultJulian Eisel
Updates UI code so that we can enable the asset UI for specific data-block types by default, i.e. irrespective of the "Extended Asset Browser" experimental feature. "Mark as Asset" and "Clear Asset" are always visible in the Outliner context menu now, but are grayed out if not applicable and show a disabled hint in the tooltip. A known side-effect of this: The "Mark as Asset" and "Clear Asset" operators are enabled for action data-blocks now, even though only pose actions created through the Pose Libraries add-on are supported. If this is something worth addressing is being discussed still. Differential Revision: https://developer.blender.org/D12955 Reviewed by: Sybren Stüvel
2021-10-21Cleanup: unused codePablo Vazquez
Also fixes incompatible types.
2021-10-21Cleanup: Use array utility for cursor eventsAaron Carlisle
2021-10-21Node Editor: Introduce color overlay and dashed wires theme settingPablo Vazquez
This patch includes code from D9891 and D12754, so credit goes to Juanfran and Dalai. I updated the patches to work with `master` and with the new overlay toggle. The reason to include both changes as part of one patch is that the dimmed dashed lines work much better together with colored wires. Theme setting for dash opacity: {F11370574, size=full} {F11286177, size=full, autoplay, loop} {F11149912, size=full} For adding the overlay I used `SpaceImageOverlay` as reference, although I'm not familiar with this code so there might be mistakes. Reviewed By: #user_interface, HooglyBoogly Differential Revision: https://developer.blender.org/D12886
2021-10-21Geometry Nodes: Attribute search in the modifierHans Goudey
This adds attribute search to the geometry nodes modifier for the input and output attributes. The "New" search item is only shown for the output attributes. Some of the attribute search code is extracted to a new file in the interface code, to avoid some code duplication. The UI code required two fixes so that the search would work for dynamic length strings (IDProperties do not have a fixed size). Since this does changes to the UI layout of the modifier, I also addressed T91485 here. Differential Revisiion: https://developer.blender.org/D12788
2021-10-21Cleanup: Use common define for menu separator arrowHans Goudey
2021-10-21Fix tooltip disabled hint not using correct context from the buttonJulian Eisel
To display the "disabled hint" (text explaining why a button is disabled) in a tooltip, it would run the operator poll callback, which could then set a poll message. But the context for the poll check wasn't the one from the button, so the poll may give a different result (and disabled hint) than the check of the button itself did. Make sure it uses the exact context from the button.
2021-10-21Cleanup: clang-formatCampbell Barton
2021-10-21Cleanup: Use array as a parameter for event x/y functionsCampbell Barton
This change simplifies the parameter list for these functions and reduces the chance of typos mixing up array indices. Missed in rB69102786047dccdcbaee0df6307a8c3364d28fe0.
2021-10-21Fix type error in 5297bf318e6f18c9165c9968728e6c9d27f8ae3cCampbell Barton
2021-10-21Cleanup: Remove dead codeAaron Carlisle
2021-10-21Cleanup: Use array as a parameter for event x/y functionsAaron Carlisle
This change simplifies the parameter list for these functions and reduces the chance of typos mixing up array indices. Missed in rB69102786047dccdcbaee0df6307a8c3364d28fe0
2021-10-21Cleanup: use underscore separators for event struct membersCampbell Barton
Improve readability using underscores for separators, e.g. prev_click_time instead of prevclicktime.
2021-10-21Cleanup: Use array as a parameter for event x/y functionsAaron Carlisle
This change simplifies the parameter list for these functions and reduces the chance of typos mixing up array indices. Reviewed By: campbellbarton Ref D12950
2021-10-20Cleanup: use an array for wmEvent cursor position variablesAaron Carlisle
Use arrays for wmEvent coordinates, this quiets warnings with GCC11. - `x, y` -> `xy`. - `prevx, prevy` -> `prev_xy`. - `prevclickx, prevclicky` -> `prev_click_xy`. There is still some cleanup such as using `copy_v2_v2_int()`, this can be done separately. Reviewed By: campbellbarton, Severin Ref D12901
2021-10-20Asset Browser: Show current file assets in other asset libraries if containedJulian Eisel
If the current file is saved within an asset library, showing that asset library in the Asset Browser will also display the assets from this current file now. In fact, it's the latest state of the open file, including all unsaved modifications. These assets will show a little Blender icon in the preview image, which is our usual icon for current file data. Note that this means an important design change: The "Current File" asset library isn't the only place to edit assets from anymore. From now on assets from the current file can also be edited in the context of the full asset library. See T90193 for more info. Technical info: Besides just including the assets from the current `Main`, this requires partial clearing and reading of file-lists, so that asset operations (e.g. removing an asset data-block) doesn't require a full reload of the asset library. Maniphest Task: https://developer.blender.org/T90193
2021-10-20UI: Activate parent when active child is collapsedJulian Eisel
Previously, when an item was active and its parent (or grand parent, etc.) was collapsed, the active item would simply not be visible anymore. It seemed like there was no active item. So instead, change the just collapsed parent to be the active item then, so the active item stays visible.
2021-10-20Tracking: support editing all selected tracksPhilipp Oeser
This patch adds a "selected_movieclip_tracks" context member and enables editing properties of multiple selected tracks via the usual Alt-click editing (as well as the "Copy To Selected" operator). Both use UI_context_copy_to_selected_list() to gather a list of other selected items [which are now taken via said new context member]. Strictly speaking, this could be done without the context member as well [just gathering other selected tracks in UI_context_copy_to_selected_list() without relying on a context member], but this might come in handy in other places (e.g. Addons). note: some could be desired for markers (e.g. editing pattern/search areas of all selected track markers, but since this is burried in a uiTemplate, this is a bit more work for another patch). Differential Revision: https://developer.blender.org/D12923