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-09-02UI: Use instanced panel custom data instead of list indexHans Goudey
For modifier shortcuts we added a "custom_data" field to panels. This commit uses the same system for accessing the list data that corresponds to each panel. This way the context is only used once and the modifier for each panel can be accessed more easily later. This ends up being mostly a cleanup commit with a few small changes in interface_panel.c. The large changes in the UI functions are due to the fact that the panel custom data is now passed around as a single pointer instead of being created again for every panel. The list_index variable in Panel.runtime is removed as it's now unnecessary. Differential Revision: https://developer.blender.org/D8559
2020-08-19UI: Remove panel X axis closing codeHans Goudey
Horizontal panel alignment hasn't been used for years, and we have no plans to use it in the future. It adds a fair amount of complexity to the panel code which makes adding features take longer. This code removes the X closing flag, and all of the logic / variables unused without it. This commit includes a file subversion bump. Differential Revision: https://developer.blender.org/D8601
2020-08-19Fix T79816: Restore scene.statistics() BPY functionHans Goudey
This RNA/BPY function was removed in c08d84748804. For understandable reasons really-- getting scene statistics from a string displayed in the status bar is not exactly the best design. But we have committed to not changing the RNA API too much for the 2.90 release, so we would like to keep this functionality. Differential Revision: https://developer.blender.org/D8604 Reviewd by: Julian Eisel
2020-08-16Fix popups opening in the wrong direction over headersCampbell Barton
Checks for header alignment didn't account for tool-header & header having different alignment. There is no reason to use a lookup function on the area (ED_area_header_alignment) as we already have region. Check the regions alignment directly, remove access functions.
2020-08-16Fix T78426: Header flips when changing editorsCampbell Barton
The existing header flip detection didn't account for mixed tool-header and header flipping & visibility between space-types. Now alignment syncing handles any combination of header, tool-header & footer flipped state, in a way that can be extended to other region types in the future.
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-07-18UI: Status Bar Statistics and Other OptionsHarley Acheson
Status Bar can show scene statistics, memory usage, version, etc set by context menu. Part two of T75672. Differential Revision: https://developer.blender.org/D7557 Reviewed by Julian Eisel
2020-07-03Cleanup: Remove obsolete code in interface_panel.cHans Goudey
Some code delt with panel merging in earlier versions of Blender, which is no longer needed. Other code delt with controls that aren't used anymore, and in some cases have region-level equivalents. There's a surprising amount of this unused code in this file, so removing it will be helpful for the future. Differential Revision: https://developer.blender.org/D7938
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-23Cleanup: renamed `do_draw_overlay` to `do_draw_paintcursor`Jeroen Bakker
To make a better distinction with region overlay.
2020-06-19Cleanup: use bool and enums in `match_region_with_redraws`Jeroen Bakker
Function used int for everything.
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-04-24Cleanup: declare values for enum typesCampbell Barton
Avoids accidents when adding/removing items from an enum.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
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-25WM: move cursor refresh tag to the windowCampbell Barton
Avoids having to check the current area is NULL.
2020-02-21Fix T67805: Cursor doesn't update when switching tools via shortcutsCampbell Barton
2020-02-20Cleanup: unused enumsCampbell Barton
2020-02-14UI: Allow gizmo-only redraw taggingJulian Eisel
NOTE: This change shouldn't have any visible effect. It's just the first (easiest) step towards decoupling gizmo redraws from viewport redraws. We currently redraw the entire region whenever a gizmo needs redrawing, which would be nice to avoid in the future, see T73198. The first step towards this would be having a separate tag for them, which is what this patch implements. The term "editor-overlays" was chosen because for the forseeable future, we'll also have to redraw non-gizmo overlays in-between drawing 3D and 2D gizmos. Namely annotations. Reviewed By: brecht Differential Revision: https://developer.blender.org/D6838
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-10Cleanup: ARegion.sizex/y should not be used to access region sizeJulian Eisel
This should only be used to change and recalculate region sizes in a DPI independent way. To get the size with DPI applied, ARegion.winx/y should be used instead. Added note on this in comment.
2019-12-04Make curve decimation only take into account the selected curve pointsSebastian Parborg
Previously the decimation would take the whole curve into account when decimating and not just the selected part. This also contains various smaller bug fixes for the fcurve decimation. Reviewed By: Sybren Differential Revision: http://developer.blender.org/D6286
2019-11-04UI: Rewrite stacked full-screen logic, fixing issuesJulian Eisel
To recreate the main issue: * Set render and file browser to show in full-screen in the preferences * Default scene, press F12 in 3D View * Press Alt+S to save the image * Escape the file browser * Escape the image editor The former 3D View would now show the image editor. This is a common use-case that should work. Full-screen code is a hassle to get to work as expected. There are reports from 2.5, I did lots of work years ago to get these kind of use-cases to work fine. But apparently I broke this one with a fix for another common use-case in March (0a28bb14222c). This now stores hints in the space, rather than the area, which should make things much more controlable and hopefully help us fix issues like this. Here are a few references describing further common issues (all should work fine now): 0a28bb14222c, e61588c5a544, T19296 Checked over this with Bastien, we agreed that at some point we should do a big rewrite of all of this, for now this is acceptable.
2019-09-07Cleanup: style, spellingCampbell Barton
2019-08-15WM: reuse visible region calculationCampbell Barton
Avoids calculating the visible part of a region whenever on-screen overlays are drawn.
2019-06-02Fix T65185: Cycles viewport render no refreshing overlays properlyBrecht Van Lommel
Don't rely on detecting view matrix changes to refresh depth buffer, instead detect redraw tags coming from progressive render samples.
2019-06-02Cleanup: better comments and naming for redraw flagsBrecht Van Lommel
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-03Cleanup: replace RGN_ALIGN_ENUM_MASKCampbell Barton
This was only used once, other checks were masking out RGN_SPLIT_PREV which isn't future proof (if other flags are added). Add RGN_ALIGN_ENUM_FROM_MASK macro, use it everywhere we need to check the alignment enum.
2019-04-21Cleanup: comments (long lines) in makesdnaCampbell Barton
2019-04-19UI: move top-bar into the spaces headerCampbell Barton
Currently this is only in the 3D viewport however all spaces that use the tool-system will have this region added. D4680 by @brecht with own updates.
2019-04-18UI: Revert fix T37463: Y-clamp for header-only spacesCampbell Barton
This reverts 91d8519c4782 since I can't redo the reported error which was in the old header-only info space.
2019-04-18UI: option to toggle 'Adjust Last Operation'Campbell 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-05Interface: New region type 'Footer', used by text editorGeorge Vogiatzis
* It can be hidden by dragging it up/down. * It can be at the top or bottom, independent of the header. * It uses the color theme from the header. * It does not change its color, when the area becomes active. Currently, it is used in the text editor to display the file path. Differential Revision: https://developer.blender.org/D4601
2019-04-03UI: Fix odd behavior in region sizing, simplify codeGeorge Vogiatzis
* When resizing sidebars, don't collapse when the region becomes too big but instead clamp the region size to the available space. * Fix clicking the tab to expand sidebars no working if the sidebar is too wide to fit. Instead make it less wide so it does fit. * Fix incorrect limit on tool properties region height, for example in the file browser. Differential Revision: https://developer.blender.org/D4611
2019-03-17Cleanup: rename DEPRECATED to UNUSEDCampbell Barton
While the flags have been deprecated they're currently unused. Rename for clarity.
2019-03-14Fix T62425: topbar showing wrong buttons at some UI scales.Brecht Van Lommel
2019-03-14Fix T62526: Can't scroll redo panelCampbell Barton
2019-03-14Comments: correct ARegion.sizex/y commentCampbell Barton
Also remove unused 'fsize'
2019-03-08Cleanup: spellingCampbell Barton
2019-02-27Cleanup: use '_pad' convention for padding in all DNA structsCampbell Barton
Avoids mixing these in with regular variables in code-completion. Use char for pad members except for 'void *', to make size clearer. Removed/shrink a few redundant padding vars which were >= 8 bytes.
2019-02-21UI: better widget drawing with thick line width.Harley Acheson
When the line width was larger than the UI scale, there was not enough space for thicker widget outlines to draw properly. Now widgets are made a little larger to accommodate the thicker outlines. Differential Revision: https://developer.blender.org/D4368
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-17Cleanup: move flag definition into screen headerCampbell Barton
This has been moved to screen, move declaration as well.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2019-01-28Cleanup: sort forward declarations of enum & structCampbell Barton
Done using: source/tools/utils_maintenance/c_sort_blocks.py
2019-01-26Cleanup: redundant definesCampbell Barton
Comment or remove unused defines.