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-05-03BLF: use 'int' for internal glyph x,y bearingCampbell Barton
These were stored as float but were originally cast from an int and were often cast back to int. Also use int pairs for dimensions values.
2020-05-03UI: improve widget text cursor positionHarley Acheson
Use BLF_boundbox_foreach_glyph for more accurate cursor placement.
2020-05-03BLF: add new arguments to BLF_GlyphBoundsFnCampbell Barton
- glyph_bounds: to get the character width. - glyph_bearing: lower left character starting point. These values are needed for more precise glyph calculations.
2020-05-01Cleanup: moved drivers to BKE_fcurve_driver.h / fcurve_driver.cSybren A. Stüvel
All the driver-specific code in `fcurve.c` has been moved into a new file `fcurve_driver.c`. The corresponding declarations have been moved from `BKE_fcurve.h` to `BKE_fcurve_driver.h`. All the `#include "BKE_fcurve.h"` statements have been investigated and replaced with `BKE_fcurve_driver.h` where necessary. No functional changes.
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-30UI: add all operators to search menu when developer extras is enabledCampbell Barton
This allows developers to easily access operators they're working on, without having to add them to the interface first.
2020-04-28Merge branch 'blender-v2.83-release'Campbell Barton
2020-04-28Fix T76098: Dragging text selection with offset resets select startCampbell Barton
2020-04-28Merge branch 'blender-v2.83-release'Campbell Barton
2020-04-28Fix T76152: Shortcut underline under wrong letterCampbell Barton
Use glyph bounds to calculate a better underline position.
2020-04-27UI: (Internal) utility for more controllable property split layoutJulian Eisel
Adds a wrapper-struct to create and return the three layouts required for the propery split layout (i.e. `UILayout.use_property_split`). This gives more flexibility for special treatment. E.g. needed for adding the arrow icon buttons when there is a hierarchy of nodes to be represented in the material properties (needs inserting in the text column to not offset the split layout). This commit also makes use of the utility for `uiItemL_respect_property_split()`.
2020-04-27UI: Add (internal) option to use property splitting for label-less itemsJulian Eisel
Usually items without labels don't use the property split layout and just use the full layout width. In some cases that is not wanted because it looks odd if single items within the split layout use the full width. The option is unused but would be needed for adding decorators to the material properties.
2020-04-27UI: Support array properties for UILayout.prop_decorator()Julian Eisel
Previously `UILayout.prop_decorator()` (or `uiItemDecoratorR()` in C) only worked for single items, not for arrays. The decorators are added vertically, like `UILayout.prop()` adds them. This will be needed for adding decorators to material properties, but will likely have other use-cases as well. Also, `None` (or `NULL`) can be passed for the data-pointer and property now to create blank decorators (as already possible for `uiItemDecoratorR_prop` in C).
2020-04-26Fix utterly wrong decorator button logicJulian Eisel
This was in fact completely messed up, but it worked by accident for all current cases. That is, we always inserted the decorator buttons immediately after the button they applied to. So the first button comparision in ui_but_anim_decorate_find_attached_button() would succeed, because it just compared a few values that all happened to be NULL and thus the comparison returned true. Further, avoid NULL-pointer dereferences and incorrect printing.
2020-04-24Merge branch 'blender-v2.83-release'Campbell Barton
2020-04-24Fix T75749: UI button text selecting is broken by text offsetCampbell Barton
2020-04-22Merge branch 'blender-v2.83-release'Bastien Montagne
2020-04-21Fix T75909: icons memory leak in headless buildBrecht Van Lommel
2020-04-20Cleanup: typoJacques Lucke
2020-04-20Simulations: Add new simulation data blockJacques Lucke
This data block will be the container for simulation node trees. It will be used for the new particle node system (T73324). The new data block has the type `ID_SIM`. It is not visible to users and other developers by default yet. To enable it, activate the cmake option `WITH_NEW_SIMULATION_TYPE`. New simulation data blocks can be created by running `bpy.data.simulations.new("name")`. Reviewers: brecht Differential Revision: https://developer.blender.org/D7225
2020-04-20Merge branch 'blender-v2.83-release'Campbell Barton
2020-04-20Fix invalid comparison checking button unit typeCampbell Barton
Checking button unit type was length for proportional multi-button adjustment wasn't working.
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-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-17Merge branch 'blender-v2.83-release'Bastien Montagne
2020-04-17Fix (unreported) bda locking of whole GP modifiers whem GP obdata is linked.Bastien Montagne
Only applys to obdata feature is supposed to be locked in that case, not the whole modifier.
2020-04-17UI: Layout changes for new checkbox layout possibilitiesWilliam Reynish
Follow-up to previous commit. Some examples: {F8473507} {F8473508} {F8473509} {F8473510} For more screenshots, please see D7430. We use column or row headings here to bring more structure, and to give the eye visual anchors which aid eye-scanning. The left-aligned checkboxes likewise help with this. And we keep the adherence to the center line, so the alignment matches up between the various buttons and controls. * Changes the property split percentage from 50/50% to 40/60%. This is needed to give enough space for the checkboxes. But in most cases this looks better anyway - see Transform panel. In some cases it simply fills out the available space more efficently. * Fix various hacks where we previously used manually defined splits. When we did this, the alignment was never quite right, and the layout code was a mess. * Adds column headings to many places where a list of checkboxes all share a common purpose or leading text. * Add checkbox + value configurations various places where a checkbox only serves to enable the value slider * Removes most uses of grid flow layout. The grid flow layouts combine poorly with column headings, and also they would mess alignment up badly. The grid flow layouts also often made buttons and controls jump around on the screen if you would just resize editors slightly, causing visual confusion, making users lose their place. The logic for at what time the list of items would re-flow was often flawed, jumping to multiple columns too fast or too late - and frankly, the grid flow layouts would often just look bad. Maniphest Task: https://developer.blender.org/T65965 Differential Revision: https://developer.blender.org/D7430 Reviewed by: Brecht Van Lommel, Pablo Vazquez. Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17UI: Better split layout support for checkboxesJulian Eisel
Makes the following layout changes possible: {F8473498} {F8473499} {F8473502} The next commit will contain many layout changes to make good use of these new possibilities. The result should be more consistent, easier to read and should give a more organized impression. Additionally, it should be possible to replace many sub-panels with compacter layouts. Main changes: * Checkboxes now respect the property split layouts * Add support for row and column headers (i.e. `uiLayout.column(heading="Foo")`, `uiLayout.row(heading="Bar")`). If the first property added to this layout doesn't insert anything into the label split column, the heading is inserted there. Otherwise, it's inserted as own item. * Add support for manually inserting decorators for an existing item (`uiLayout.prop_decorator()`). That way layout creators can manually insert this, which was the only way I saw to support property split layouts with a checkbox before the actual property. {F8471883} * Autogenerated layouts for operator properties look bad if there are only checkboxes (which only use half the region width). So before creating the layout, we iterate over visible properties and disable split layout if all are booleans. I think this is fine, if needed we could also add layout hints to operators. * `uiTemplateOperatorPropertyButs()` now handles macros itself, the caller used to be responsible for this. Code that didn't handle these so far never used macros I think, so this change should be invisible. * Remove manual property split layout from autogenerated operator properties layout. * Padding of checkboxes is tweaked to make their label visually more connected to the checkboxes. * Support split layout for menus (should work for `uiLayout.menu()`, `.operator_menu_enum()`, `.prop_menu_enum()`, maybe more) Maniphest Task: https://developer.blender.org/T65965 Differential Revision: https://developer.blender.org/D7427 Reviewed by: Brecht Van Lommel, William Reynish, Pablo Vazques
2020-04-17Merge branch 'blender-v2.83-release'Campbell Barton
2020-04-17Fix T75796: Misaligned quit dialog keymapCampbell Barton
2020-04-17UI: support A-Z accelerator keys for pie menusCampbell Barton
Converting menus to PIE's was removing convenient key accelerators.
2020-04-17Cleanup: comments for ui_draw_menu_item & correct argument nameCampbell Barton
2020-04-16UI: Remove old hacks for dynamic scrollbar hidingJulian Eisel
Although we still dynamically hide scrollbars, they don't change the region size anymore. They are simply drawn on top of the region content. Because of this, some hacks introduced by fa28e50ac2a7 are no longer necessary. Without these hacks, the scrollbar visibility is evaluated much more often (cheap operation) which should be more reliable and possibly solve some glitches. Also replaces integers passed as booleans. Fixes T75782.
2020-04-16Merge branch 'blender-v2.83-release'Philipp Oeser
2020-04-16Fix T75675: Unlinking [with setting users to zero] not clearingPhilipp Oeser
LIB_TAG_EXTRAUSER_SET flag For example in the Image Editor, an assert would be triggered after unlinking an image [with setting users to zero] and then setting the image for the Image Editor again. Whenever we set an Image for Image Editor, the Image ID is flagged LIB_TAG_EXTRAUSER_SET, when we unlink [with setting users to zero] this flag was not cleared. quote @mont29: "a proper fix would be to move this to modern code, and actually delete the ID..." but that is for later. Maniphest Tasks: T75675 Differential Revision: https://developer.blender.org/D7452
2020-04-16UI: Draw real node sockets for node input buttonsJulian Eisel
For buttons representing node inputs (e.g. in the material properties) rather than drawing some generic socket icon, the actual sockets are drawn now. That includes color, shape and the selection outline. This should make it easier to understand what these buttons relate to. Screenshots: {F8469252}, {F8469248} (The left alignment will be done in a follow-up commit.) Differential Revision: https://developer.blender.org/D7409 Reviewed by: Brecht Van Lommel, Clément Foucault, William Reynish
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-15Fix incorrect UI_SEP_CHAR checksCampbell Barton
- Menu drawing function used first instance instead of last. - Menu hash function checked for the character without first checking UI_BUT_HAS_SEP_CHAR was enabled.
2020-04-15Fix menu search using exec instead of invoke by defaultCampbell Barton
Caused edit preferences not to open.
2020-04-14GPUShader: Implement workaround for gizmo drawing on sRGB framebufferClément Foucault
This solution involves adding a uniform to each fragment shader that is used by gizmo drawing and use the framebuffer state to set this uniform accordingly. This solution can also be carried to external shaders (addons). A single line of code would then be enough to fix the issue. The only trickery here is the dummy define: `#define srgb_to_framebuffer_space(a)` This is in order to avoid breaking other DRW shaders that use the same fragment shader code but do not need the tranformation. Related to T74139 Reviewed By: brecht, campbellbarton Differential Revision: https://developer.blender.org/D7261
2020-04-14Fix showing check-boxes in menu-searchCampbell Barton
2020-04-14UI: improve menu search with dimmed menu prefixCampbell Barton
- Show dimmed text for the menu entries leading up to the menu item. - Show icons between the menu text and menu item. - Use unicode right pointing triangle instead of arrow.
2020-04-14Cleanup: pass font drawing x/y offset arguments as int'sCampbell Barton
Internally these values are ints.
2020-04-14UI: correct menu used for dope-sheetCampbell Barton
2020-04-14Cleanup: spellingCampbell Barton
2020-04-10UI: Better support for linked data-blocks in search buttonsJulian Eisel
In RNA pointer search buttons (i.e. the ones with an eyedropper), data-blocks were handled badly. It was not possible to select a linked data-block that had the same name as a local one, which is especially common with library overrides. Neither was there a hint to tell appart linked data-blocks and which .blend file they come from. These issues are addressed now, we show an "L" prefix and the .blend file name in the search box (like in ID-templates). Changes here are quite simple, since the heavy lifting was already done through c20c203b8226. Addresses T73156.
2020-04-09Fix T75203: Crash when changing active keying setJulian Eisel
When updating the active button, the search data wasn't updated, so it kept using the old pointers. A check in `ui_rna_collection_search_cb()` relied on this incorrect behavior so I had to fix that too. Note that the previous commit was also needed for the second fix to work. Caused by c46dcdf8871e.
2020-04-09Fix error in UI_butstore_ APIJulian Eisel
If the `uiButStore` data was freed after the buttons/blocks were updated from previous instances (see `UI_block_update_from_old()`), e.g. by delaying that to the "afterfuncs" (`ui_apply_but_funcs_after()`), the data would get lost. As result, the button pointers that the API is supposed to keep valid would point to freed memory. This wasn't an issue so far since the API didn't happen to be used this way. That changes with the next commit.
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