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-02-05Cleanup: replace inline loops with RNA_enum_from_identifierCampbell Barton
2021-01-13UI: Revert design changes to data-block selector for the 2.92 releaseJulian Eisel
Partially reverts 2250b5cefee7. Removing the user count and fake user count icons was controversial (which was expected) and there are a few further changes needed, that won't make it in time for the release, see D9946. While there is a design to bring back the user count and fake user indicators, a new design idea was proposed that the UI team wants to follow. This came too late for the 2.92 release, the new design is targeted at the 2.93 release now. Meanwhile, UI team decision was to simply revert the design changes. The new design is being worked on in https://developer.blender.org/T84669. Note that this commit does not revert some internal changes done in 2250b5cefee7. Namely the introduction of `ed_util_ops.c` and data-block operators in there. These will still be needed in the new design.
2020-12-18UI: Redesigned data-block selectorsJulian Eisel
The previous design is rather old and has a couple of problems: * Scalability: The current solution of adding little icon buttons next to the data-block name field doesn't scale well. It only works if there's a small number of operations. We need to be able to place more items there for better data-block management. Especially with the introduction of library overrides. * Discoverability: It's not obvious what some of the icons do. They appear and disappear, but it's not obvious why some are available at times and others not. * Unclear Status: Currently their library status (linked, indirectly linked, broken link, library override) isn't really clear. * Unusual behavior: Some of the icon buttons allow Shift or Ctrl clicking to invoke alternative behaviors. This is not a usual pattern in Blender. This patch does the following changes: * Adds a menu to the right of the name button to access all kinds of operations (create, delete, unlink, user management, library overrides, etc). * Make good use of the "disabled hint" for tooltips, to explain why buttons are disabled. The UI team wants to establish this as a good practise. * Use superimposed icons for duplicate and unlink, rather than extra buttons (uses less space, looks less distracting and is a nice + consistent design language). * Remove fake user and user count button, they are available from the menu now. * Support tooltips for superimposed icons (committed mouse hover feedback to master already). * Slightly increase size of the name button - it was already a bit small before, and the move from real buttons to superimposed icons reduces usable space for the name itself. * More clearly differentiate between duplicate and creating a new data-block. The latter is only available in the menu. * Display library status icon on the left (linked, missing library, overridden, asset) * Disables "Make Single User" button - in review we weren't sure if there are good use-cases for it, so better to see if we can remove it. Note that I do expect some aspects of this design to change still. I think some changes are problematic, but others disagreed. I will open a feedback thread on devtalk to see what others think. Differential Revision: https://developer.blender.org/D8554 Reviewed by: Bastien Montagne Design discussed and agreed on with the UI team, also see T79959.
2020-10-13UI: Add highlight arguments to tab buttonsHans Goudey
This adds arguments to `uiLayout.prop_tabs_enum` and the C equivalent (`uiItemTabsEnumR_prop`) to gray out tabs based on a boolean array. For property search in multiple tabs, we need a way to show which tabs have a search result, but we still need to show which tab is active. Differential Revision: https://developer.blender.org/D8858
2020-09-18Cleanup: use 'UI_icon_*' prefix for icons APICampbell Barton
- UI_collection_color_icon_get -> UI_icon_color_from_collection - UI_idcode_icon_get -> UI_icon_from_idcode - UI_library_icon_get -> UI_icon_from_library - UI_mode_icon_get -> UI_icon_from_object_mode - UI_rnaptr_icon_get -> UI_icon_from_rnaptr - UI_alert_image -> UI_icon_alert_imbuf_get - UI_preview_render_size -> UI_icon_preview_to_render_size - UI_id_icon_render -> UI_icon_render_id
2020-09-15UI: Add `icon_only` argument to operator_enumNathan Craddock
Add an option to only draw icons for operator_enum menus. This is used for drawing inline icon buttons in the outliner context menu for collection color tagging. Part of T77408 Differential Revision: https://developer.blender.org/D8880
2020-06-22UI/BPY: Make layout headings translatable from BPYJulian Eisel
This was an oversight when layout headings were added. There's now the regular translation context option in the Python API.
2020-06-19UI: ShaderFx Drag and Drop, Layout UpdatesHans Goudey
This patch implements the list panel system D7490 for grease pencil shader effects. It also moves their drawing to a callback in ShaderFxTypeInfo in line with the extensible architecture refactoring goal T75724. The implementation is basically exactly the same as for the modifier patch (9b099c86123fc82). Thanks to Matias Mendiola (@mendio) for helping to develop the layout changes. Differential Revision: https://developer.blender.org/D7985
2020-06-19UI: Grease Pencil Modifier Drag and Drop, Layout ChangesHans Goudey
This patch implements the list panel system D7490 for grease pencil modifiers. It also moves their drawing to a callback in GpencilModifierTypeInfo in line with the extensible architecture refactoring goal T75724. This also adds the "set_error" function for grease pencil modifiers, which hadn't been copied from mesh modifiers yet. The implementation is basically exactly the same as for the modifier patch (9b099c86123fc82). Thanks to Matias Mendiola (mendio) for providing mockups for many of the layout changes. Differential Revision: https://developer.blender.org/D7978
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-05UI: Drag and Drop Modifiers, Layout UpdatesHans Goudey
This patch implements the list panel system D7490 for modifiers. It also moves modifier drawing to a callback in ModifierTypeInfo in line with the extensible architecture refactoring goal T75724. This adds a PanelRegister callback and utilities for registering panels and subpanels. It also adds the callbacks for expansion saving and drag and drop reordering described in D7490. These utilities, callbacks, and other common UI elements shared between modifiers live in MOD_ui_common.c. Because modifier buttons are now in panels, we can make use of subpanels for organization. The UI layouts also use the single column layout style consistently used elsewhere in Blender. Additionally, the mode-setting buttons are aligned and ordered consistently with the outliner. However, the large number of UI changes in this patch may mean that additional polishing is required in master. Thanks to William Reynish (@billreynish) who did a fair amount of the layout work and to Julian Eisel (@Severin) for consistent help. Differential Revision: https://developer.blender.org/D7498
2020-06-02Cleanup: Use const context for some UI templatesHans Goudey
- uiTemplateID: Straightforward, just const for the template and the functions it calls - uiTemplateCacheFile: Create a function in rna_ui.c because the generated RNA callback doesn't have const context. Differential Revision: https://developer.blender.org/D7895
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-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-03-24UI: add menu search functionality to operator search menuCampbell Barton
This has some advantages over operator search: - Some operators need options set to be usefully accessed. - Shows key bindings to access menus (for actions that don't have key bindings themselves). - Non operator actions such as check-boxes are also shown. - Menu items can control execution context, using invoke or execute where appropriate so we can control how the operator runs. Part of the design task T74157. This can be tested using the 'Experimental' preferences section or selected in the key-map editor.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-09GPencil: Refactor of Draw Engine, Vertex Paint and all internal functionsAntonio Vazquez
This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes. Also, a huge code cleanup has been done at all levels. Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development. Differential Revision: https://developer.blender.org/D6293
2019-11-25UI: Allow label for Template-ID (respecting property split layout)Julian Eisel
Adds a `text` parameter to `bpy.types.uiLayout.template_ID()` which causes a label to be added, as usual. Adding the label also makes the template respect the `bpy.types.uiLayout.use_property_split` option. Also fixes wrong layout being used in the template-ID, although I think that didn't cause issues in practice. Sergey requested this for usage in the Movie Clip Editor.
2019-11-21Bevel: Custom Profile and CurveProfile WidgetHans Goudey
Custom profiles in bevel allows the profile curve to be controlled by manually placed control points. Orientation is regularized along groups of edges, and the 'pipe case' is updated. This commit includes many updates to comments and changed variable names as well. A 'cutoff' vertex mesh method is added to bevel in addition to the existing grid fill option for replacing vertices. The UI of the bevel modifier and tool are updated and unified. Also, a 'CurveProfile' widget is added to BKE for defining the profile in the interface, which may be useful in other situations. Many thanks to Howard, my mentor for this GSoC project. Reviewers: howardt, campbellbarton Differential Revision: https://developer.blender.org/D5516
2019-10-27UI: add utility to show icons for the keymap itemCampbell Barton
This is useful for drawing keymap items into the header or status bar While these icons are available directly, mapping them from the keymap item isn't trivial.
2019-09-06UI: Bring back features for file path buttonJulian Eisel
Adds back auto-completion and auto-creation (inserting a non-existing file-path would create it) for the file path button. The second feature was left out knowingly, but seems there are reasonable use cases for it. We can't add these features to the button in the Python script, we have to call into C. So using a template to do that. Note that this is based on the old file browser code, I've copied over the TODO comment.
2019-08-14Cleanup: move trailing comments to avoid wrapping codeCampbell Barton
Some statements were split across multiple lines because of their trailing comments. In most cases it's clearer to put the comments above.
2019-05-21UI: support drawing booleans with icons as check-boxesCampbell Barton
Previously, if a boolean happened to use an icon there was no way to make it display as a check-box from Python scripts. The previous logic meant we ended up having to edit the RNA. Since booleans with icons don't work well with the split-property layout (now used for most of the interface). Icons were being removed from RNA then added back using awkward Python ternary expressions in the interface scripts. The toggle argument now has an unset state (-1). - toggle=True: no checkbox (emboss). - toggle=False: always use a checkbox (no icon). - toggle=(unset/-1): depends on the icon status, default as before. Since toggle=False was default, this isn't used in existing UI logic.
2019-05-20UI: add Visibility panel for objectsDalai Felinto
The outliner should not be the only way for users to change these settings. The Python API was extended to keep these properties positive and keyframable. Differential Revision: https://developer.blender.org/D4889
2019-04-21Cleanup: comments (long lines) in makesrnaCampbell Barton
2019-04-18Cleanup: comment blocksCampbell Barton
2019-04-17ClangFormat: format '#if 0' codeCampbell Barton
Previous cleanups didn't account for space after '#'.
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-03-25RNA: add UILayout.prop_with_menu functionCampbell Barton
Matches prop_with_popover, supporting menu types, useful if we want to control behavior of enum switching.
2019-03-25RNA: rename prop_popover_enum to prop_with_popoverCampbell Barton
A version for menu's is going to be added next and we already have UILayout.prop_menu_enum. This name indicates the popover is added behavior instead of a different kind of widget.
2019-03-25UI: add icon_only option to prop_popover_enumCampbell Barton
2019-03-25UI: add UILayout.prop_popover_enum functionCampbell Barton
Support for RNA enum buttons that activate popovers when clicked. This means we get useful tooltips, shortcuts and Ctrl-Wheel cycling over enum items. It also avoids inconvenient & slow access of enum values currently done via RNA type lookups on the type to get the name & icon to use for a regular popover button. Resolves T57738
2019-03-15Cleanup: indentation, wrappingCampbell Barton
Mostly functions wrapping args, not confirming to our style guide.
2019-03-12RNA: support None text argument to UI functionsCampbell Barton
Without this there isn't a convenient way to write wrapper UI functions that forward a text argument that optionally uses the default text.
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-03Cleanup: trailing commasCampbell Barton
Needed for clan-format not to wrap onto one line.
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-24Cleanup: removed unused 3D view header template.Brecht Van Lommel
2019-01-09Revert/Redo ugly rBd12b3767f81d commit (i.e. add locked sorting option to ↵Bastien Montagne
UIList). Too many things done wrong in original rBd12b3767f81d to list them all here, hopefully nothing bad sneaked in again this time :| Also cleaned up a little the 'sort by name', even though (since we only have two options by default, sort by index and by name) we can abuse it as a binary option for now, this is not a bitflag...
2019-01-02UI: add scale option for template_icon_view buttonCampbell Barton
The existing scale option only changed the scale if icons in the popup.
2018-12-20UI: add method to draw menu contentsCampbell Barton
This supports expanding menu contents into an existing layout. Needed to fix T58937.
2018-11-02Add hide_buttons option to template_ID_previewAntonioya
When use the template in the topbar for only select an ID is very annoying to have the buttons after the name and only adds noise to the selector. This option hide the number of users, new and delete buttons to get a cleaner topbar selector. By default the parameter is disabled in order to keep all existing code/UI running.
2018-11-02Fix missing separators after recent changes.Brecht Van Lommel
2018-11-02Add new factor parameter to layout.separator()Antonioya
The new parameter allows to define the scale of the space.
2018-10-29UI: Support Displaying Enums as TabsJulian Eisel
Adds `uiLayout.prop_tabs_enum(data, property, icon_only)` to BPY.
2018-10-21Cleanup: trailing spaceCampbell Barton
2018-10-11Add new parameter to reverse UIList itemsAntonioya
Now, it was possible to invert the order of the UIlist using the filter, but it was impossible to know if the list was inverted or not. The problem with this is that any other element depending of this value could not be adjusted. See https://devtalk.blender.org/t/how-to-access-uilist-properties/2268 The new parameter allows to set the reverse order by default. When the list is set as reverse, it cannot be inverted again, so the invert button is removed of the filter. This change is needed to fix a requested feature for Grease Pencil (T56985) and because a lot of 2D softwares use the drawing layers in the inverse order used in Blender.
2018-10-08UI: add icon color coding for different data types in the outliner.Brecht Van Lommel
For now we have categories collection, object, object data, modifiers & constraints, and shading. The icons can be categorized by adding e.g. DEF_ICON_OBJECT() in UI_icons.h. Light themes will need to be updated to use darker colors to keep icons visible in the outliner.
2018-10-08UI: new icon set by Andrzej Ambroz.Brecht Van Lommel
This is a monochrome icon set, with a more modern look and icons for various features that did not have a proper icon before.