Age | Commit message (Collapse) | Author |
|
The Python API for the curve mapping widget offers the `update`
function, but no way to reset the view to the clipping rectangle.
This commit adds a blenkernel function for this operation,
and exposes it to the CurvMapping RNA API. This allows addons
to display a more user-friendly view of the data in this widget.
Differential Revision: https://developer.blender.org/D10561
|
|
Currently when you open an RNA collection search button, like a
vertex group selector, the search filter isn't applied until you
start typing, in order to display every option at the start.
Otherwise they wouldn't be visible, since the search filter would
run for the current text.
Currently this check happens in one place, but it relies on the
`changed` value of `uiBut`. This is fine in the interface directory,
but anywhere else it would require exposing `uiBut.changed`, which
is probably too low-level to expose.
The solution is adding an `is_first` argument to the search callbacks,
which is nice for a few reasons:
- They work at a higher level of abstraction, meaning they don't
have to worry about how exactly to tell if this is the first
search.
- It makes it easier to do special behavior when the search menu
is first opened.
- Then, obviously, it makes that state accessible without including
`interface_intern.h`.
Needed for attribute search: T85658
Differential Revision: https://developer.blender.org/D10528
|
|
|
|
|
|
Improved contrast for Status Bar report warning messages.
Differential Revision: https://developer.blender.org/D10242
Reviewed by Hans Goudey
|
|
|
|
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.
|
|
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.
|
|
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
|
|
|
|
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
|
|
Does not need to be hidden in the menu.
|
|
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
|
|
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.
|
|
Also remove colon after `\note`.
|
|
|
|
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
|
|
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.
|
|
|
|
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.
|
|
Approximately 141 changes of capitalization to conform to MLA title style.
Differential Revision: https://developer.blender.org/D8392
Reviewed by Julian Eisel
|
|
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required.
Differential Revision: https://developer.blender.org/D9250
Reviewed by Campbell Barton
|
|
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
|
|
Follow our code style guide by using C-comments for text descriptions.
|
|
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
|
|
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.
|
|
Cleanup old tracker task format to the new. e.g: [#34039] to T34039
Ref D8718
|
|
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.
|
|
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
|
|
Structure switch statements so new missing items cause warnings.
|
|
- 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
|
|
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
|
|
This commit moves the "get panel expansion from list data" function to
UI_panels_end, which is an improvement because it's more centralized.
|
|
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
|
|
|
|
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
|
|
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
|
|
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).
|
|
We want to move away from using `uiBut.a1`/`a2`, which is a hard to
reason about design.
Part of T74432.
Also correct comment.
|
|
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
|
|
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.
|
|
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
|
|
|
|
|
|
After recent code cleanup in rB349eebd7.
|
|
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
|
|
|
|
We need to ensure new override is instantiated in the scene...
Reported by @Severin, thanks.
|
|
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.
|
|
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.
|