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-08-12Cleanup: use C++ style comments for disabled codeCampbell Barton
2021-06-28Cleanup: update commentsCampbell Barton
2020-09-30Cleanup: convert gforge task ID's to phabricator formatValentin
Cleanup old tracker task format to the new. e.g: [#34039] to T34039 Ref D8718
2020-09-09Cleanup: reduce variable scopeJacques Lucke
2020-08-19UI Code Quality: Use LISTBASE_FOREACH in interface directoryHans Goudey
I only skipped a few loops in the monstrous ui_handle_menu_event function. Also, I only changed variable names where necessary to prevent redeclarations. Differential Revision: https://developer.blender.org/D8586
2020-08-03Fix T78575: Assert when using UILayout.prop_tabs_enumJulian Eisel
Code required the tabs to be placed in an aligned region. Code should work fine even for unaligned regions though, so I don't see a reason to forbid this.
2020-07-16Fix T78636: Crash displaying many aligned buttonsCampbell Barton
Displaying user preferences search crashed on macOS when the search contained a common character such as 'E'. This caused alignment to 'alloca' too much memory. Replace with a heap allocation fallback.
2020-07-16Cleanup: fix building without USE_UIBUT_SPATIAL_ALIGN definedCampbell 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-26Fix overlapping tabs placement when used in right Top-bar splitJulian Eisel
Didn't respect alignment rules for split layouts. Reported in T77075.
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-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-07-07Cleanup: spellingCampbell 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-14Cleanup: doxy commentsCampbell Barton
Use doxy references to function and enums, also correct some names which became out of sync.
2019-03-25Cleanup: use braces for interface codeCampbell Barton
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-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-26Cleanup: remove redundant BKE/BLI/BIF headersCampbell Barton
2019-01-15Cleanup: comment line length (editors)Campbell Barton
Prevents clang-format wrapping text before comments.
2018-10-29UI: Support Displaying Enums as TabsJulian Eisel
Adds `uiLayout.prop_tabs_enum(data, property, icon_only)` to BPY.
2018-10-29Cleanup: typoCampbell Barton
2018-10-27Cleanup: More meaningful variable nameSeverin
2018-06-11UI: Separator spacerDalai Felinto
This support layout.separator_spacer() to be used by headers as a way to dynamically separate the ui buttons. Right now no UI file is changed, though we can use this right away in the timeline, and shortly after in the viewport header (moving settings from the topbar to it). Original design by William Reynish. Review: Campbell Barton D3468
2018-05-23Merge branch 'master' into blender2.8Campbell Barton
2018-05-23Cleanup: strip trailing space from interface filesCampbell Barton
2018-04-20UI: New Global Top-Bar (WIP)Julian Eisel
== Main Features/Changes for Users * Add horizontal bar at top of all non-temp windows, consisting out of two horizontal sub-bars. * Upper sub-bar contains global menus (File, Render, etc.), tabs for workspaces and scene selector. * Lower sub-bar contains object mode selector, screen-layout and render-layer selector. Later operator and/or tool settings will be placed here. * Individual sections of the topbar are individually scrollable. * Workspace tabs can be double- or ctrl-clicked for renaming and contain 'x' icon for deleting. * Top-bar should scale nicely with DPI. * The lower half of the top-bar can be hided by dragging the lower top-bar edge up. Better hiding options are planned (e.g. hide in fullscreen modes). * Info editors at the top of the window and using the full window width with be replaced by the top-bar. * In fullscreen modes, no more info editor is added on top, the top-bar replaces it. == Technical Features/Changes * Adds initial support for global areas A global area is part of the window, not part of the regular screen-layout. I've added a macro iterator to iterate over both, global and screen-layout level areas. When iterating over areas, from now on developers should always consider if they have to include global areas. * Adds a TOPBAR editor type The editor type is hidden in the UI editor type menu. * Adds a variation of the ID template to display IDs as tab buttons (template_ID_tabs in BPY) * Does various changes to RNA button creation code to improve their appearance in the horizontal top-bar. * Adds support for dynamically sized regions. That is, regions that scale automatically to the layout bounds. The code for this is currently a big hack (it's based on drawing the UI multiple times). This should definitely be improved. * Adds a template for displaying operator properties optimized for the top-bar. This will probably change a lot still and is in fact disabled in code. Since the final top-bar design depends a lot on other 2.8 designs (mainly tool-system and workspaces), we decided to not show the operator or tool settings in the top-bar for now. That means most of the lower sub-bar is empty for the time being. NOTE: Top-bar or global area data is not written to files or SDNA. They are simply added to the window when opening Blender or reading a file. This allows us doing changes to the top-bar without having to care for compatibility. == ToDo's It's a bit hard to predict all the ToDo's here are the known main ones: * Add options for the new active-tool system and for operator redo to the topbar. * Automatically hide the top-bar in fullscreen modes. * General visual polish. * Top-bar drag & drop support (WIP in temp-tab_drag_drop). * Improve dynamic regions (should also fix some layout glitches). * Make internal terminology consistent. * Enable topbar file writing once design is more advanced. * Address TODO's and XXX's in code :) Thanks @brecht for the review! And @sergey for the complaining ;) Differential Revision: D2758
2017-03-17Add tabs as standard button typesJulian Eisel
NOTE: This is really a backend-only implementation, nothing is changed in the UI Adds a tab button-type and the basic drawing and handling code for it. More work needs to be done on it, but idea is to get in ready for usage in the topbar. Differential Revision: https://developer.blender.org/D1371
2016-01-28cleanup: spelling / typosMike Erwin
no functional changes
2015-11-26Fix assert in UI align code in some specific situations.Bastien Montagne
Situations like [top_button over [label, button]] need some subtle handling, since we only store one neighbor per side of a button...
2015-11-19Fix new UI align code behavior with very small buttons.Bastien Montagne
In case two neighbor buttons are very small, their total width (or height) can remain below max authorized delta, and hence wrong side could be detected as 'common side' for the pair. This is now fixed by checking both opposite sides at once. Also, we expect buttons to have some width and height to be considered alignable now! Took me two days to sort that out, grrrr!
2015-11-10"Fix" assert in new UI align code.Bastien Montagne
Looks like UI code can produce widgets with same left/top positions (in very narrow space case). Not nice, but we do not really care, UI becomes unusable way before we reach that point anyway.
2015-11-07Cleanup: ui align headerCampbell Barton
2015-11-07Cleanup: spelling, headersCampbell Barton
2015-11-06New uialign code, based on 2D positions of widgets.Bastien Montagne
This new code fixes a tons of issues with previous one, which basically was epic-failing in many non-basic cases (especially mixed columns and rows with column-dominant layout). It basically no more relies over order of buttons declaration in the uiBlock, instead it finds and stores spatial neighbors and uses that data to compute needed stitching. See code comments for details. New code seems to be roughly ten times slower than old one (for complex grouped layouts), that is, about a few microsecconds per alignment group - this remains reasonable. Also, ui-align code becomming rather big in itself, it was separated in own new `interface_align.c` file. Reviewers: campbellbarton, severin Reviewed By: campbellbarton, severin Differential Revision: https://developer.blender.org/D1573