Age | Commit message (Collapse) | Author |
|
|
|
Needed to support alternate search UI's, no functional changes.
|
|
operator-enum pies
Now a 'More' item is added to the pie when there are too many items. It opens a sub-pie that contains the remaining items.
Note that this only touches operator-enum pies (like the object mode pie is), it is not a complete support for pies with more than 8 items. For this further design and code work would be needed, but this is too urgent to wait for that.
This is a better fix for T46973, should definitely be applied for 2.77 release.
Patch D1800 by myself with some edits by @campbellbarton, thanks!
|
|
- test_idbutton -> BLI_libblock_ensure_unique_name (not only used from UI)
- BKE_rename_id -> BKE_libblock_rename (always pass valid main)
also rename:
- name_uiprefix_id -> BKE_id_uiprefix
|
|
introduced
To ensure all items of a pie are always at the same position, invisible dummy buttons were added for unavailable items. This caused mainly two issues: Command line printed warning because of the > 8 elements, and some modes weren't visible in some cases ('Object Mode' entry was missing in stroke edit mode).
To solve this nicely, we had to support > 8 items per pie. Will look into that this week, but for now, drawing dummy buttons is disabled.
From a user POV this has two ugly consequences: 1. While this temporary workaround is used, *some* pie items are positioned differently than before, 2. The 'Edit Strokes' mode entry might change its position depending on the amount of available modes.
|
|
|
|
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
|
|
A non repeatable operator would disable editing options for all operators after it.
|
|
|
|
|
|
- Add blentranslation `BLT_*` module.
- moved & split `BLF_translation.h` into (`BLT_translation.h`, `BLT_lang.h`).
- moved `BLF_*_unifont` functions from `blf_translation.c` to new source file `blf_font_i18n.c`.
|
|
for them.
|
|
We already had that for global keymaps (used e.g. to generate shortcuts for menu entries),
but this wasn’t possible for modal keymaps yet (e.g. help message in header during
transforms and other modal operation).
This commit only adds needing background code, it does not change anything from user PoV.
Modal operators will be updated to use it in comming weeks.
Thanks to Campbell for revisions & suggestions. :)
Differential Revision: https://developer.blender.org/D780
|
|
|
|
|
|
|
|
This will print a warning and users will get overlap of pie buttons, but
it should be quick paper over the cracks and at least should keep
blender working until a more complete fix is coded.
|
|
|
|
Internal change only,
use UI_BTYPE_SEARCH_MENU with an unlink flag instead.
They are really the same button type, one just happens to have the option to unlink.
|
|
Scene buttons).
Reported by sebastian_k through IRC, thanks!
|
|
|
|
|
|
|
|
Both were maked as temp, but used often.
Now pass uiFontStyle to both, rename UI_draw_string to UI_fontstyle_draw_simple,
since its a variant of UI_fontstyle_draw that skips shadow, align... etc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Recent flag re-order broke it since bits overlap, but logic here was far too complicated & fragile,
Checked the type of each button when testing which direction to handle events as well as block direction.
Now store the block-flipped state as a flag.
|
|
Make the UI API more consistent and reduce confusion with some naming.
mainly:
- API function calls
- enum values
some internal static functions have been left for now
|
|
|
|
If user drags away from initial position, menu changes to drag style and
returning to that position won't remake the menu click-style. Allows to
use the threshold indicator to cancel the pie.
|
|
Make pie menu item placement touch the radius from the internal side of
the buttons rather than placing on the center on the cirtcle. This
allows us to get rid of the separate visual angle property, also allows
for tighter placement of pies with a smaller radius without easily
overlapping.
Also pie menu title now always appears above the threshold indicator.
|
|
This commit merges the code in the pie-menu branch.
As per decisions taken the last few days, there are no pie menus
included and there will be an official add-on including overrides of
some keys with pie menus. However, people will now be able to use the
new code in python.
Full Documentation is in http://wiki.blender.org/index.php/Dev:Ref/
Thanks:
Campbell Barton, Dalai Felinto and Ton Roosendaal for the code review
and design comments
Jonathan Williamson, Pawel Lyczkowski, Pablo Vazquez among others for
suggestions during the development.
Special Thanks to Sean Olson, for his support, suggestions, testing and
merciless bugging so that I would finish the pie menu code. Without him
we wouldn't be here. Also to the rest of the developers of the original
python add-on, Patrick Moore and Dan Eicher and finally to Matt Ebb, who
did the research and first implementation and whose code I used to get
started.
|
|
We do have odd behaviors with name and expanded enums, but in this case it did
not made any sense at all! :)
Note the error was not in RNA, but in C UILayout api itself...
|
|
|
|
This is needed for popups to chance state once activated,
currently it makes use of operators `check` callback, after values are modified,
as the file selector does already.
|
|
|
|
Missed setting the flag for operator-menus.
Now call `ui_but_add_shortcut` to match the rest of the api.
|
|
also remove redundant loop in BKE_pose_copy_data
|
|
|
|
This deduplicates/simplifies some code. Also cleanup up a bit scopes UI code!
Use new GRIP button for uiList grab-resize.
This allows us to greatly simplifies the code, and get rid of a few hacks in uiList event handling!
Note autosize mode of uiList is now trigered by any value of list_grip below a given threshold, rather than the fixed zero value...
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D343
|
|
|
|
|
|
Enum icon-only buttons were getting their strings set,
then truncated with blenders string shortening methods, then not drawn
because there was no room (since buttons are icon width).
Modify UI code so icon-only buttons don't get names and passing "" to a
button won't have its text set later on.
|
|
|
|
Allow menu functions to define their own direction, this way
menu_item_enum_opname_menu can keep menu flipping from 2.69.
|
|
|