Commit Graph

530 Commits

Author SHA1 Message Date
3700192043 Fix T59910: material editor UI issue after recent changes.
This reverts part of commit 4f98266cf6, ref D4123.
2018-12-28 11:36:14 +01:00
Harley Acheson
4f98266cf6 UI: fix display of menu buttons without text and icon, and only a down arrow.
Differential Revision: https://developer.blender.org/D4123
2018-12-27 14:21:49 +01:00
Harley Acheson
e07b58537c UI: fix inconsistent icon button widths for popovers and enums.
Differential Revision: https://developer.blender.org/D4086
2018-12-27 12:49:35 +01:00
91240f15c5 UI: add UILayout.direction
Read only attribute, needed for introspection.
2018-12-20 11:59:31 +11:00
756be8f4d8 UI: add method to draw menu contents
This supports expanding menu contents into an existing layout.

Needed to fix T58937.
2018-12-20 11:33:08 +11:00
e62368e6c4 Fix enum icon button size for fractional UI scale.
Err on the side of too much padding.
2018-12-18 15:30:19 +01:00
9f25dad0a9 Fix T59535: Select linked delimit doesn't refresh 2018-12-18 17:22:11 +11:00
Harley Acheson
73b19bfb27 UI: fix enum icon buttons haveing different size.
The alignment makes it so the button edges overlap, now one pixel is removed
to account for this.

Differential Revision: https://developer.blender.org/D4063
2018-12-11 20:46:39 +01:00
Julian Eisel
b00963afc1 UI: Initial User-Preferences redesign
Implements the first changes for T54115:

* Rename "User Preferences" window to "Settings" in the UI.
  We'll likely put workspace settings in there, separate from the global
  user settings. System settings should become separate from user
  settings in future to allow settings for specific hardware.
* Add sidebar region for navigation (scrolls independently).
  Addresses space problems, so we can add more categories as needed now.
* Increase size of Settings window to compensate new navigation bar.
* Group sections into User Preferences and System.
  Icons for section groups by Andrzej Ambroz. Thanks!
* Bumps subversion for file compatibility.

Screenshot: https://developer.blender.org/F5715337

I also added categories for future work, but commented them out.
We may also want to redesign contents of each section now.

Reviewers: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D3088
Design Task: https://developer.blender.org/T54115
2018-11-25 17:08:58 +01:00
5f2ac43b5f UI: allow inaccurate swipe motion to switch tabs
Removes the need to keep your cursor over tabs while dragging.
2018-11-23 12:11:18 +11:00
0a3cf08364 Keymaps: take into account DPI for tweak/drag/pie thresholds.
The intention is to fix a too low default threshold on high DPI screen.
Users with high DPI screens that have increased the threshold to fix this
or liked the lower threshold will need to lower it again.

This is still somewhat of a guess, ideally this would be based on the
physical distance travalled, and maybe different per type of input device.
However we do not have access to this information, and hope this gives a
better default.
2018-11-21 19:31:20 +01:00
3a13b89296 Cleanup: unused args, indentation 2018-11-21 06:29:19 +11:00
Dalai Felinto
d9abb0eaae Explicitly disable separator spacer in popover and pie menus
It is doable to get it to work, you just need to process it line
by line though, and get the right width of each one.

Disabling it for now since it is not implemented anyways.
2018-11-15 16:48:23 -02:00
ae6e84471a Merge branch 'master' into blender2.8 2018-11-14 09:54:55 +11:00
c1d29ea783 WM: enforce descriptions being NULL or defined
Without this bugs slip through that don't null check the descriptions
since many were set to empty strings.
2018-11-14 09:47:23 +11:00
81ed1d7093 UI: don't show shortcuts in toolbar buttons
Restrict these to displaying in tooltips.
2018-11-12 14:05:54 +11:00
f3ffb4e049 Add new factor parameter to layout.separator()
The new parameter allows to define the scale of the space.
2018-11-02 16:35:53 +01:00
1e8a2e1a10 UI: support red alert on labels, not just buttons. 2018-11-01 19:43:46 +01:00
817319a79e UI: add uiItemMenuFN which frees it's argument 2018-10-30 10:57:33 +11:00
4205cd269d UI: add uiItemMenuFN which frees it's argument 2018-10-30 10:53:47 +11:00
Julian Eisel
ab6c7ff2ab UI: Vertical Properties Editor Tabs
Moves the Properties editor context switching to a vertical tabs region.

Design Task: T54951
Differential Revison: D3840

The tabs are regular widgets, unlike the 'old' toolshelf tabs. This means they
give mouse hover feedback, have tooltips, support the right-click menu, etc.
Also, when vertical screen space gets tight, the tabs can be scrolled, they
don't shrink like the toolshelf ones.
The tab region is slightly larger than the header. The tabs are scaled up
accordingly. This makes them nicely readable.

The header is quite empty now. As shown in T54951, we wanted to have a search
button there. This should be added next.

Implementation Notes:

* Added a new region type, RGN_TYPE_NAVIGATION.
* Having the tabs in a separate region allows scrolling of the tab-bar, unlike
  the toolshelf tabs. We might want to remove the scrollbars though.
* Added a new region flag RGN_FLAG_PREFSIZE_OR_HIDDEN, to ensure the tab region
  is either hidden or has a fixed size.
* Added some additional flags to support fine-tuning the layout in panel and
  layout code.
* Bumps subversion.
2018-10-29 21:44:01 +01:00
Julian Eisel
ce148716c8 UI: Support Displaying Enums as Tabs
Adds `uiLayout.prop_tabs_enum(data, property, icon_only)` to BPY.
2018-10-29 21:20:58 +01:00
9bcdb19a3e Fix label misalignment when there are multiple buttons on the right side. 2018-10-28 17:46:52 +01:00
2ac65f6153 UI: new icon set by Andrzej Ambroz.
This is a monochrome icon set, with a more modern look and icons for
various features that did not have a proper icon before.
2018-10-08 19:46:00 +02:00
58adc58661 Merge branch 'master' into blender2.8 2018-09-27 15:49:59 +02:00
a247b53084 Spelling fixes in comments and descriptions, patch by luzpaz.
Differential Revision: https://developer.blender.org/D3732
2018-09-27 15:36:35 +02:00
cbe82f81e1 UI: allow fractical unit size for layouts. 2018-09-26 18:24:09 +02:00
f4f99d1d75 Add fixed width/height parameter for layouts
New parameters to define a fixed size for a layout. This allows to avoid UI changes when the text length changes.

This commit implements D3725
2018-09-25 20:59:04 +02:00
bb3ec3ebaf BLI_utildefines: rename pointer conversion macros
Terms get/set don't make much sense when casting values.

Name macros so the conversion is obvious,
use common prefix for easier completion.

- GET_INT_FROM_POINTER  -> POINTER_AS_INT
- SET_INT_IN_POINTER    -> POINTER_FROM_INT
- GET_UINT_FROM_POINTER -> POINTER_AS_UINT
- SET_UINT_IN_POINTER   -> POINTER_FROM_UINT
2018-09-19 12:12:21 +10:00
f35e9f047a Merge branch 'master' into blender2.8 2018-09-19 12:14:36 +10:00
a30f32891f Cleanup: remove dummy tooltips 2018-09-19 09:52:33 +10:00
b49abbec5f Splash: add first time setup and templates to splash screen.
The first time setup screen only has the interaction preset currently, some
more work is needed to be able to set e.g. the language or compute device
here as in the mockups.

The splash screen stayed the same for now, to make room for the templates
most of the links are now in the Help menu. If there are no recent files yet
the links still show.

The splash screen buttons implementation was fully moved to Python, in the
WM_MT_splash menu.
2018-09-18 19:38:20 +02:00
578879253d UI: use horizontal alignment for expanded enums
With the property separate option, the direction of expanded enums
now follows the current layout.
2018-09-04 14:09:37 +10:00
cc03218962 Fix T56659: Flow UI: Checkboxes report wrong width, making layouts jump to multi-columns too soon.
Wrong handling of ideal width when splitting buttons and labels appart
for checkboxes...
2018-09-03 11:07:29 +02:00
41d1af9a11 UI: check prop-separate before adding black decorator
This caused the blank icon to be added to menus (ndof menu for eg).
2018-08-30 20:50:06 +10:00
ffbe5985c6 Fix T56547: Single column properties not aligned 2018-08-28 01:06:26 +10:00
6a5bc88abf Merge branch 'master' into blender2.8 2018-08-24 12:17:33 +10:00
b2d32d7fa4 UI: always align item w/ label 2018-08-24 12:16:38 +10:00
7fa42b3e51 Fix T56511: UILayout.prop_search misaligned
Add padding when used with property decorations.
2018-08-24 12:11:24 +10:00
5bd731b673 Merge branch 'master' into blender2.8 2018-08-24 11:54:12 +10:00
7ec1a56a41 RNA: avoid redundant property lookups in UI API 2018-08-24 11:44:28 +10:00
f7c1716b6c Merge branch 'master' into blender2.8
Fixes enum-flags having no text w/ property-split
2018-08-15 15:56:20 +10:00
c3e3ccd42c Cleanup: set expand variable for all enum-flags
No functional change, needed for fix in 2.8x
2018-08-15 15:54:27 +10:00
f6300030e0 Cleanup: trailing space 2018-07-31 19:07:56 +10:00
66da2f537a New Grease Pencil object for 2D animation
This commit merge the full development done in greasepencil-object branch and include mainly the following features.

- New grease pencil object.
- New drawing engine.
- New grease pencil modes Draw/Sculpt/Edit and Weight Paint.
- New brushes for grease pencil.
- New modifiers for grease pencil.
- New shaders FX.
- New material system (replace old palettes and colors).
- Split of annotations (old grease pencil) and new grease pencil object.
- UI adapted to blender 2.8.

You can get more info here:

https://code.blender.org/2017/12/drawing-2d-animation-in-blender-2-8/
https://code.blender.org/2018/07/grease-pencil-status-update/

This is the result of nearly two years of development and I want thanks firstly the other members of the grease pencil team: Daniel M. Lara, Matias Mendiola and Joshua Leung for their support, ideas and to keep working in the project all the time, without them this project had been impossible.

Also, I want thanks other Blender developers for their help, advices and to be there always to help me, and specially to Clément Foucault, Dalai Felinto, Pablo Vázquez and Campbell Barton.
2018-07-31 10:50:43 +02:00
cca87ccc75 UI: remove space/region from popover args
Instead use global panel-type list.
2018-07-13 19:16:35 +02:00
0a04314d06 Fix popovers showing unnecessary titles. 2018-07-10 16:30:17 +02:00
1112f49a14 UI: Cleanup - Remove Show Panel Header and Background
A toggle for this is no longer required now that both header and background
colors are RGBA (disabling Show Header is the same setting the alpha to 0).

Thanks Brecht for reviewing!
2018-07-10 00:47:08 +02:00
02f903d099 Fix layout issue with enum property separators. 2018-07-06 14:19:11 +02:00
a883f0fd54 UI: add separators in properties editor header tabs. 2018-07-05 19:27:50 +02:00