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-06-30Cleanup: spellingCampbell Barton
2020-06-29UI: Add shortcuts for modifier panelsHans Goudey
The shortcuts act on the modifier with its panel under the mouse. The following shortcuts are enabled by default: - Remove modifier: X, Delete - Apply modifier: Ctrl A - Duplicate modifier: Shift D More shortcuts can be added in the keymap. Each panel can now store a custom data RNA pointer, and a new function is added to get the custom data for the panel under the cursor. This custom data could be used to refactor the "List Panel System" to generalize it and integrate it further with RNA. The same functionality will be added in further commits where it applies to constraints, grease pencil modifiers, and effects. Differential Revision: https://developer.blender.org/D8031
2020-06-25UI: Slightly simplify box style panel margin offsetHans Goudey
A small cleanup to use fewer if statements.
2020-06-25Cleanup: spellingCampbell Barton
2020-06-21UI: Fix view reset when toggling subpanel expansionHans Goudey
The view should only reset for the ctrl-click mode that collapses all other panels.
2020-06-19UI: Drag and Drop Constraints, Layout UpdatesHans Goudey
This patch implements the list panel system D7490 for constraints. In this case the panels are still defined in Python. The layouts are also updated to use subpanels and the a more organized single column layout. There may be more tweaks necessary for the layouts. Reviewed By: Severin, billreynish, Mets Differential Revision: https://developer.blender.org/D7499
2020-06-18Cleanup: redundant parenthesisCampbell Barton
2020-06-17UI: Ctrl-click on panel header expands & collapses subpanelsHans Goudey
If the panel is already open and you ctrl click on its header, its sub-panels are now expanded / collapsed instead of toggling the expansion for all other panels. If you're toggling a panel's expansion it's already in view anyway, so there is no need to collapse the other panels. Differential Revision: https://developer.blender.org/D8042
2020-06-16Cleanup: Use LISTBASE_FOREACH in interface_panel.cHans Goudey
2020-06-15Fix T77541: Unregistering DATA_PT_modifiers doesn't remove modifier panelsHans Goudey
This is a pretty quick fix; the solution is just removing all the instanced panels whena panel is unregistered. This also necessitates adding the option to call UI_panels_free_instanced with NULL context. Differential Revision: https://developer.blender.org/D7977
2020-06-10UI: Only set panel data expand flag for active panelsHans Goudey
This solves a crash when switching from the modifiers tab to an armature object and expanding a panel. Thanks to Alexander Gavrilov for mentioning the problem.
2020-06-10Fix T77694: Start panel animation when expansion data changesHans Goudey
During normal drawing there is a rather complicated method to check whether the panels should be animating. It's not set up to deal with the panel expansion changing from outside the UI, which is now possible with the panel expansion connected to the modifier's show_expanded property. The solution is to activate panel animation if setting the expansion property has changed.
2020-06-05UI: Pan 2D Region When Dragging to BoundaryHans Goudey
This adds a modal operator called Edge Pan, which is meant to run invisibly while something inside a region is being dragged. This patch applies this to dragging panels, but it can be used elsewhere too. The speed (which is defined relative to how far the mouse is beyond the boundary) and delay are easily adjustible. and the speed also increases smoothly from a start value to a max to make it feel more interactive and less robotic. Differential Revision: https://developer.blender.org/D7465
2020-05-28Cleanup: spellingCampbell Barton
2020-05-26UI: List Panel SystemHans Goudey
This implements a general system to implement drag and drop, subpanels, and UI animation for the stack UIs in Blender. There are NO functional changes in this patch, but it makes it relatively trivial to implement these features for stacks. The biggest complication to using panels to implement the UI for lists is that there can be multiple modifiers of the same type. Currently there is an assumed 1 to 1 relationship between every panel and its type, but there can be multiple list items of the same type, so we have to break this relationship. The mapping between panels and their data is stored with an index in the panel's runtime struct. To make use the system for a list like modifiers, four components must be added: 1. A panel type defined and registered for each list data type, with a known mapping between list data types and panel idnames. 1. A function called by interface code to build the add the panel layouts with the provided helper functions. - UI_panel_list_matches_data will check if the panel list needs to be rebuilt. - UI_panels_free_instanced will remove the existing list panels - UI_panel_add_instanced adds a list panel of a given type. 3. An expand flag for the list data and implementations of get_list_data_expand_flag and set_list_data_expand_flag. 4. For reordering, the panel type's reorder callback. This is called when the instanced panels are drag-dropped. This requires implementing a "move to index" operator for the list data. Reviewed By: Severin, brecht Differential Revision: https://developer.blender.org/D7490
2020-05-20UI: Remove Panel Grid Snapping While DraggingHans Goudey
The reason to have this isn't quite clear, but it looks like a vestige of the 2.5 transition. Removing this makes dragging panels feel much more responsive. Thanks to Julian Eisel @Severin for the original change. Differential Revision: https://developer.blender.org/D7803
2020-04-30UI: Fix animating panels after drag changing region sizeHans Goudey
The previous commit for this issue, 8e08d80e52d6, missed the case where the panel animates to its aligned position when the mouse is released.
2020-04-30Fix dragging panels changing region sizeJulian Eisel
While dragging panels, the region size would change which would feel glitchy. See D7462 for a demo of the issue.
2020-04-19Fix T74809: Use after free when merging specific areasJulian Eisel
Was incorrectly triggering animation for panels which would be free'd before the animation ended.
2020-04-15UI: Draw subpanels on top while draggingHans Goudey
Currently the background of a panel is drawn on top of its subpanels when it is dragged. The solution is to also "select" the subpanels so they are drawn on top in UI_panels_draw. Differential Revision: https://developer.blender.org/D7440
2020-04-07UI: Don't collapse all panels for subpanelsHans Goudey
The behavior for subpanels was incorrect, and the ideal behavior isn't even clear. This disables the "collapse all" ctrl click feature for panels that have parents. Differential Revision: https://developer.blender.org/D7355
2020-04-06GPU: Panel Drag Widget Drawing PerformanceJeroen Bakker
The 10g Intel/Win driver doesn't work well with our emulated intermediate mode. This patch alters the drawing of the drag widget of the panels to reduce unneeded drawing. The previous method would draw 16 boxes per widget. This new way would cache this drawing in a GPU batch and just move the matrix around. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D7345
2020-04-04Cleanup: Rename Panel * variables from pa to panelHans Goudey
2020-04-03Code Quality: Replace for loops with LISTBASE_FOREACHDalai Felinto
Note this only changes cases where the variable was declared inside the for loop. To handle it outside as well is a different challenge. Differential Revision: https://developer.blender.org/D7320
2020-04-03Cleanup: Rename ScrArea variables from sa to areaJulian Eisel
Follow up of b2ee1770d4c3 and 10c2254d412d, part of T74432. Now the area and region naming conventions should be less confusing. Mostly a careful batch rename but had to do few smaller fixes. Also ran clang-format on affected files.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-18Cleanup: Resolve HKEY conflictRay Molenkamp
Both the MS headers and blender headers define the HKEY which gives all kind of inclusion order issues. This diff renames all *KEY constants to EVT_*KEY to resolve this conflict. Reviewed By: brecht , dfelinto Differential Revision: http://developer.blender.org/D7164
2020-03-15Cleanup: use 'const' style argumentCampbell Barton
2020-03-06Cleanup: Rename ARegion variables from ar to regionJulian Eisel
The old convention was easy to confuse with ScrArea. Part of https://developer.blender.org/T74432. This is mostly a batch rename with some manual fixing. Only single word variable names are changed, no prefixed/suffixed names. Brecht van Lommel and Campbell Barton both gave me a green light for this convention change. Also ran clan clang format on affected files.
2020-02-28Fix T73587: Wrong sub-panel animation on double-clickTobias Langen
Under the special circumstance of double clicking and then opening a panel with sub-panels again, the parent panel's offset in y-direction was added twice to the child panels: once inside "get_panel_real_ofsy" and once within "align_sub_panels". This introduced a visible glitch. Reviewed by: Julian Eisel Differential Revision: https://developer.blender.org/D6942
2020-01-21Fix T71810: Flipping Sidebar with tabs breaks alignmentJulian Eisel
Panel alignment was only updated when panel size changed. Now we can also recognize changes in the category tabs offset and tag panels for alignment updates.
2020-01-16Fix wrong usages of region align enumerationsJulian Eisel
`ARegion.alignment` unfortunately is a mixture of value and bitflag enumerations. When checking for left/right/top/bottom region alignment, the flags have to be masked out usually. Most of the fixed cases here probably didn't cause issues in practice, but could in fact break at any point when surrounding logic changes. In fact the assert in #region_visible_rect_calc() failed in an older file from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=949035. This fixes it.
2019-08-05Cleanup: use unsigned char for theme colorsCampbell Barton
Nearly all byte-color functions use 'uchar' causing casts when then colors were passed in. Declare as uchar to remove the need for casts.
2019-06-22Fix sub-panel UI offsetCampbell Barton
The offset for check-boxes in sub-panels wasn't being scaled correctly.
2019-05-22Sequencer: ensure Strip is the default active panelBrecht Van Lommel
2019-05-22UI: allow shrinking panel height to zero when open.Alexander Gavrilov
Currently if a panel becomes empty (draw simply returns), it stays at the last non-empty height. This seems to be caused by some legacy checks that may be completely obsolete, but the safest fix is to at least allow resetting height when the panel is open.
2019-05-16UI: Draw background for headerless panels with region-overlapCampbell Barton
These were drawing without a backdrop.
2019-05-16Cleanup: remove 2.4x panel tabsCampbell Barton
This makes the code confusing since we now have two other kinds of tabs (navigation bar and panel categories).
2019-05-13Fix T64461: Sub-panels allow pinningCampbell Barton
2019-05-10UI: expose tool settings in the 3D view side-barCampbell Barton
Internally tool settings have been moved to the 3D view. Added the ability for to draw panels from another space/region so they can be mirrored in the properties editor.
2019-05-09Cleanup: avoid some floating point divisions in drawing codeBrecht Van Lommel
2019-05-09UI: dim icons in inactive tabs, similar to textBrecht Van Lommel
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.
2019-05-09Cleanup: reduce number of UI_icon_draw variationsBrecht Van Lommel
2019-05-01ClangFormat: run with ReflowComments on source/Campbell Barton
Prepare for enabling ReflowComments.
2019-04-24Fix T63822: Sidebar tabs active area dead-zone #2Campbell Barton
Take the entire gutter used for panel tabs into account. Introduced in recent fix for T61554
2019-04-18Cleanup: comment blocksCampbell Barton
2019-04-17Cleanup: comment length in interfaceCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
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
2019-04-16Cleanup: trailing commasCampbell Barton
2019-03-25Cleanup: return argument namingCampbell Barton