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-01-27UI: Tooltip for data-block selector menus, showing full name and library infoJulian Eisel
Long data-block names are clipped to fit into data-block selector menus. For linked data-blocks, there's also a hint indicating the source library, which takes further space and may get clipped too. So this commit adds a tooltip to the menu items, which displays the full, unclipped data-block name and the unclipped library name. Plus, the library path is shown too, which is also useful info. Adds helper functions for search menu item tooltips, so these are easier to add to other search menus in future. Part of T84188.
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.
2021-01-05Fix T84367: Fix crash when showing invalid/legacy constraintsPhilipp Oeser
Exposed by rBeaa44afe703e. Definition for CONSTRAINT_TYPE_NULL is not totally clear (it is set for constraints without data, see an old comment from Ton), but for these, a TypeInfo cannot be fetched. Avoid processing those constraints in UI code, just do nothing instead. Maniphest Tasks: T84367 Differential Revision: https://developer.blender.org/D9987
2021-01-04Cleanup: use const variablesCampbell Barton
2020-12-23Cleanup: Move functions to new ED (editor) operators file & general cleanupJulian Eisel
With the new `ed_util_ops.c` introduced in 2250b5cefee7, existing code can be cleaned up to use it. * Move new ID preview operators to `ed_util_ops.c` * Move ED operator registration to `ed_util_ops.c` * Use doxygen sections in `ed_util_ops.c` * Rename ID related ED operators to use `ED_OT_lib_id_` prefix. * Remove unused `#include`s
2020-12-22UI: keep image open button always visible in image editor datablock selectorBrecht Van Lommel
Does not need to be hidden in the menu.
2020-12-19Fix T83868: Button animation states no longer visible without embossHans Goudey
This bug was caused by making it so that non-embossed modifier icon buttons could become an operator button and retain their red highlight for disabled modifiers. The icon button needs emboss turned off, but in earlier versions of Blender, `UI_EMBOSS_NONE` would be overridden by animation or red alert states. Instead of abusing "NONE" to mean "none unless there is animation or red alert", this commit adds a new emboss flag for that situation, `UI_EMBOSS_NONE_OR_STATUS`, which uses no emboss unless there is an animation state, or another status. There are only a few situations where this is necessary, so the change isn't too big. Differential Revision: https://developer.blender.org/D9902
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-12-15Cleanup: doxy comments (use colon after parameter name)Campbell Barton
Also remove colon after `\note`.
2020-12-15Cleanup: spellingCampbell Barton
2020-12-12UI: Allow UI to pass focused data-block to operators via contextJulian Eisel
This is similar to c4a2067130130d, but applies to the general UI and is only about single data-blocks. Here there was a similar problem: How can buttons pass the data they represent to operators? We currently resort to ugly ad-hoc solutions like `UI_context_active_but_get_tab_ID()`. So the operator would need to know that it is executed on a tab button that represents a data-block. A single button can now hand operators a data-block to operate on. The operator can request it via the "id" context member (`CTX_data_pointer_get_type(C, "id", &RNA_ID)` in C, `bpy.context.id` in .py). In this commit, it is already set in the following places: * Generic RNA button code sets it to the pointed to data-block, if the button represents a data-block RNA pointer property. (I.e for general data-block search buttons.) * Data-block selectors (`templateID`) set it to the currently active data-block. * The material slot UI-List sets it for each slot to the material it represents. The button context menu code is modified so its operators use the context set for the layout of its parent button (i.e. `layout.context_pointer_set()`). No user visible changes. This new design isn't actually used yet. It will be soon for asset operators. Reviewed as part of https://developer.blender.org/D9717. Reviewed by: Brecht Van Lommel
2020-11-13Cleanup: Make panel type flag names more clearHans Goudey
The overlap with the `Panel` flags that start with "PNL" was quite confusing because wasn't clear which enum a flag was from. The new names are a bit longer, but the clarity is worth it.
2020-11-06Cleanup: use ELEM macroCampbell Barton
2020-11-04Cleanup: Remove broken/deprecated setting of color-ramp button step sizeJulian Eisel
Setting the button's step size like this wouldn't work anymore after e6f0b60c2e91, which is reported in T81794. Instead, the step size should be set for the RNA property, as proposed in D9277. That will be committed separately as bug fix.
2020-10-24UI: Capitalization CorrectionsYevgeny Makarov
Approximately 141 changes of capitalization to conform to MLA title style. Differential Revision: https://developer.blender.org/D8392 Reviewed by Julian Eisel
2020-10-19Spelling: It's Versus ItsHarley Acheson
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required. Differential Revision: https://developer.blender.org/D9250 Reviewed by Campbell Barton
2020-10-14UI: Change Invert Filter icon for UIListAntonio Vazquez
This makes the icon equals to the invert icon used in all modifiers. {F8986444} Reviewed By: #user_interface, Severin, Blendify Differential Revision: https://developer.blender.org/D9194 3bb3b2
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-10-07UI: Fix Incorrect Workspace Tab SizingHarley Acheson
Changes Workspace tabs so that the text size and tab width are both set by style.widget.points. Differential Revision: https://developer.blender.org/D9108 Reviewed by Julian Eisel
2020-10-05Cleanup: Declare variables where initializedHans Goudey
Declaring variables where they are initialized and used makes their scope much more explicit and it aids readility since types are visible. This commit doesn't touch the ID template code since there is an active patch in that area.
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-30Cleanup: Make function privateHans Goudey
The "UI_panel_set_expand_from_list_data" doesn't need to be in the public API since it's just called every time an instanced panel is added. This commit just sets the expansion automatically and adjusts some naming to account for the moved function.
2020-09-23Fix T81057: PoseBone Constraints are displayed in Object Constraints tabPhilipp Oeser
Own mistake in rB9dcae4eb17d7b. We cannot use ED_object_constraint_active_list in uiTemplateConstraints since it is dependent on mode (pose vs. object). Now get object constraints directly when use_bone_constraints is false. Note: unfortunately a derivate of this bug has made its way into 2.90.1 Maniphest Tasks: T81057 Differential Revision: https://developer.blender.org/D8989
2020-09-18Cleanup: change enum usage so types are explicitly listedCampbell Barton
Structure switch statements so new missing items cause warnings.
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-17Cleanup: remove unneeded check in uiTemplateConstraintHeaderPhilipp Oeser
Following rB7a0a60dde8b4, checking for temporary IK constraints in uiTemplateConstraintHeader is not needed anymore (since the whole panel will now be skipped earlier for those). Differential Revision: https://developer.blender.org/D8902
2020-09-15UI: Refactor some list panel expansion codeHans Goudey
This commit moves the "get panel expansion from list data" function to UI_panels_end, which is an improvement because it's more centralized.
2020-09-15Dont show temporary IK constraints in the constraint stackPhilipp Oeser
Those constraints are added when using AutoIK (or targetless IK as well). While not strictly incorrect, these kinds of constraints were not showing in the UI prior to rBeaa44afe703e (and I think they should not). ref T80437 Maniphest Tasks: T80437 Differential Revision: https://developer.blender.org/D8895
2020-09-09Cleanup: reduce variable scopeJacques Lucke
2020-09-09Refactor getting constraintsPhilipp Oeser
This is the refactoring part of D8805 (should be no functional changes). - exposes pose-related part of former 'get_constraints()' from interface_templates.c to new ED_object_pose_constraint_list - rename ED_object_constraint_list_from_context --> ED_object_constraint_active_list Also clarify comments on both of these. ref T80464 ref https://developer.blender.org/D8805
2020-09-09UI: improve search results by using fuzzy and prefix matchingJacques Lucke
Blender does string based searching in many different places. This patch updates four of these places to use the new string search api in `BLI_string_search.h`. In the future we probably want to update the other searches as well. Reviewers: Severin, pablovazquez Differential Revision: https://developer.blender.org/D8825
2020-09-04UI Code Quality: Use derived struct for number buttonsJulian Eisel
For the man rationale behind this design, see 49f088e2d093. Further, this removes users of uiBut.a1/uiBut.a2, which is a very ugly design choice (hard to reason about). Note that I had to do rather ugly, specific exceptions for the number buttons in `ui_def_but_rna()`. But once all users of a1/a2 are removed, this special handling shouldn't be needed anymore. I also had to move a sanity check out of the button definition. It's now moved into a new debug only sanity checking function executed when finishing the layout definition (block end).
2020-09-04UI Code Quality: Store curve-button gradient type in derived structJulian Eisel
We want to move away from using `uiBut.a1`/`a2`, which is a hard to reason about design. Part of T74432. Also correct comment.
2020-09-04Fix T78084: Search does not accept text fragments everywherePhilipp Oeser
This was reported for the "Add Node" search functionality, but is relevant in other searches as well. So e.g. when searching for "Separate XYZ", typing "sep", then " " (with the intention to type "X" next) would clear the search field. Now use the same method (matching against all search words) as in F3 searching ('menu_search_update_fn') in other searches as well [searching IDs, property objects, finding nodes,...] This should give a much nicer search experience in general. Note: this does not touch other searches in the Dopesheet, Outliner, Filebrowser or User Preferences that have other search implementations. Maniphest Tasks: T78084 Differential Revision: https://developer.blender.org/D8232
2020-09-03UI: Fix use after free for instanced panel expansionHans Goudey
The "set_expand_from_list_data" function has to be called after updating the panels' custom data pointers. Otherwise the wrong information is retrieved in the best base and it will cause a crash in the worst case.
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-26Cleanup: use const variables in interface codeCampbell Barton
2020-08-21Cleanup: Remove unused variablesHans Goudey
2020-08-19Fix incorrect number of recent items displayed in splashBrecht Van Lommel
After recent code cleanup in rB349eebd7.
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-12Merge branch 'blender-v2.90-release' into masterBastien Montagne
2020-08-12Fix (unreported) glitch when making liboverride of object from IDtemplate.Bastien Montagne
We need to ensure new override is instantiated in the scene... Reported by @Severin, thanks.
2020-08-07UI Code Quality: Use derived struct for HSV Cube buttonsJulian Eisel
For the main rationale behind this design, see 49f088e2d093. Further, this removes users of uiBut.a1, which is a very ugly design choice (hard to reason about). Part of T74432.
2020-08-07UI Code Quality: Use derived struct for progessbar buttonsJulian Eisel
For the main rationale behind this design, see 03b122e2a18df. Further, this removes users of `uiBut.a1`, which is a very ugly design choice (hard to reason about). Part of T74432.
2020-08-07UI Code Quality: Use derived struct for color buttonsJulian Eisel
For the main rationale behind this design, see 03b122e2a18df. Further, this removes users of `uiBut.a1`/`uiBut.a2`, which is a very ugly design choice (hard to reason about). Part of Part of T74432.
2020-08-07UI Code Quality: Use derived structs for search buttons and decoratorsJulian Eisel
The current on-size-fits-all `uiBut` creates quite a mess, where it's hard to reason about which members are free for use, under which conditions they are used and how. `uiBut` also has members that aren't used at times, violating the "don't pay for what you don't use" principle. To address this, we want to move to typed buttons, where `uiBut` is just a base struct and each type extends it as needed. That structures data better and type specific data is only available if it's actually used by a button type. Two trade-offs: * Many casts to the derived type have to be done. * Sometimes we change the button type after it's created. So I had to add logic to reallocate the button for use with the new, possibly derived struct. Ideally that wouldn't be needed, but for now that's what we have. Part of T74432. Differential Revision: https://developer.blender.org/D7610 Reviewed by: Brecht Van Lommel, Campbell Barton
2020-08-03Cycles: add support for rendering deformation motion blur from Alembic caches.Kévin Dietrich
This patch adds the ability to render motion blur from Alembic caches. The motion blur data is derived from a velocity attribute whose name has to be defined by the user through the MeshSequenceCache modifier, with a default value of ".velocities", which is the standard name in Alembic for the velocity property, although other software may ignore it and write velocity with their own naming convention (e.g. "v" in Houdini). Furthermore, a property was added to define how the velocity vectors are interpreted with regard to time : frame or second. "Frame" means that the velocity is already scaled by the time step and we do not need to modify it for it to look proper. "Second" means that the unit the velocity was measured in is in seconds and so has to be scaled by some time step computed here as being the time between two frames (1 / FPS, which would be typical for a simulation). This appears to be common, and is the default behavior. Another property was added to control the scale of the velocity to further modify the look of the motion blur. Reviewed By: brecht, sybren Differential Revision: https://developer.blender.org/D2388
2020-07-23Fix T79162: 'prop_search' includes ID prefix in string propertiesCampbell Barton
Regression from d6cefef98f87a This also fixes an unreported issue where finding an exact match wasn't being detected for items that contained an ID prefix.
2020-07-16UI: Add shortcuts for constraint panelsHans Goudey
Only the delete shortcut applies here, although the move up and down operators can optionally be assigned in the keymap. See rB1fa40c9f8a81 for more details and rB5d2005cbb54b for the grease pencil modifier panel implementation, which is the same. Some refactoring of the constraint delete operator was necessary, including adding an invoke function. Differential Revision: https://developer.blender.org/D8238
2020-07-14UI: Add missing row in curve profile templateHans Goudey