Commit Graph

4207 Commits

Author SHA1 Message Date
Campbell Barton
d09920687c Merge branch 'master' into blender2.8 2018-05-02 12:46:14 +02:00
Campbell Barton
adc17317c5 UI: open toolbar hold buttons on drag
Allows for faster tool switching, no need to wait for it to open.
2018-05-02 12:20:11 +02:00
Campbell Barton
62ed13340b UI: don't allow disabled popovers to open w/ drag
First dragging over active menu items could be used to open a disabled
popover.
2018-05-02 12:02:50 +02:00
Campbell Barton
85dcdb87d2 UI: fix operator redo showing empty popovers
Many operators have no options,
showing a popover button with no content isn't good.
2018-05-02 11:03:03 +02:00
Campbell Barton
2bc9396b55 UI: disable popovers when panel poll fails 2018-05-02 11:03:03 +02:00
Dalai Felinto
3eca0af19c Fix number sliders for the topbar 2018-05-01 18:35:11 +02:00
Dalai Felinto
aaf85e29a1 Popover: tiny cleanup 2018-04-30 21:13:37 +02:00
Brecht Van Lommel
5f8ad885e1 Fix some popup menus that don't support it refreshing and crashing. 2018-04-30 14:27:44 +02:00
Aaron Carlisle
128506eeb1 BLI Color: YUV to/from rgb colorspace option
This commit does two things:

- Adds an option to do the calculation in different color spaces (BT601
or BT709).
- Changes the default caluclation from legacy BT601 to BT709.

This affects several areas:

- UI areas (mainly scopes)
- ViewLevelsNode
- Several other nodes that use `COM_ConvertOperation.h`
2018-04-29 18:00:45 -04:00
Brecht Van Lommel
7a9f64e665 UI: better support for dynamically sized regions in topbar.
Dynamically sized regions in the topbar were flickering due to only updating
their size after redraws. Now there is an optional layout() callback for
all regions in an area to do UI layout first, then refresh the region layout,
and then do the actual drawing for each region.

Task T54753
2018-04-29 22:11:12 +02:00
Brecht Van Lommel
97c7db168d UI: auto open adjacent pulldown and popover buttons. 2018-04-29 09:18:54 +02:00
Brecht Van Lommel
fc32bd729c UI: don't flip contents of popovers, avoid closing when size changes. 2018-04-29 09:18:54 +02:00
Campbell Barton
a56d6e467b UI: show popover arrow directly under the button
A visual hint but looks broken when its not pointing to the button.
2018-04-29 09:16:32 +02:00
Dalai Felinto
922ea41395 UI: Number Slider - treat percentage as a special case
This is to address things like a percentage slider with a fixed soft mininum.

For example, the render resolution ranges from 1% to 100% and it is really
strange to have the slider showing nothing filled when the ui shows 1%.
2018-04-28 16:55:17 +02:00
Dalai Felinto
9b0ea92be7 UI: Number slider uniform filling
Now we always fill the slider with a vertical boundary. A bit hard to explain,
but very easy to see the difference.

I split the widget in three parts and used fragment shader discard to remove the
undesired bits. That means all the widget program is doing a bit extra
calculation.

Reviewers: fclem

Subscribers: billreynish

Differential Revision: https://developer.blender.org/D3186
2018-04-28 16:54:57 +02:00
Dalai Felinto
c06bfe9d09 UI: Remove hardcoded 11 uniform parameters
Using a define makes it easy to increase this later.
2018-04-28 16:33:15 +02:00
Dalai Felinto
c6fccbf842 UI: Remove deprecated drawing code 2018-04-28 16:33:15 +02:00
Brecht Van Lommel
54aa834b7d Cleanup: fix compiler warnings on macOS / clang. 2018-04-28 16:28:19 +02:00
Campbell Barton
b6e66a66c2 Fix number button sides exiting continuous grab 2018-04-28 15:38:33 +02:00
Campbell Barton
a74097dc19 UI: Add icon color saturation preference
Toolbar icon saturation can now be set from the preferences,
(use 0.4 by default).
2018-04-28 13:34:52 +02:00
Campbell Barton
69ca12c45c Revert "UI: don't highlight number button while dragging"
This reverts commit bb513b173e.

Broke click events.
2018-04-28 12:20:38 +02:00
Brecht Van Lommel
a14005c070 UI: fix popover menus not refreshing when changing settings. 2018-04-28 10:42:58 +02:00
Campbell Barton
617534327a Cleanup: style, duplicate includes 2018-04-28 09:02:22 +02:00
Campbell Barton
bb513b173e UI: don't highlight number button while dragging 2018-04-27 22:25:54 +02:00
Campbell Barton
970cf6f765 UI: use the layouts scale_x to scale icon width 2018-04-27 20:03:43 +02:00
Dalai Felinto
a6fb54f236 UI: Set cursor to X_MOV when editing number button middle area
Reviewers: campbellbarton, brecht

Differential Revision: https://developer.blender.org/D3184
2018-04-27 19:38:18 +02:00
Brecht Van Lommel
e01cadd657 WM: new offscreen window draw method to replace all existing methods.
For Blender 2.8 we had to be compatible with very old OpenGL versions, and
triple buffer was designed to work without offscreen rendering, by copying
the the backbuffer to a texture right before swapping. This way we could
avoid redrawing unchanged regions by copying them from this texture on the
next redraws. Triple buffer used to suffer from poor performance and driver
bugs on specific cards, so alternative draw methods remained available.

Now that we require newer OpenGL, we can have just a single draw method
that draw each region into an offscreen buffer, and then draws those to
the screen. This has some advantages:

* Poor 3D view performance when using Region Overlap should be solved now,
  since we can also cache overlapping regions in offscreen buffers.
* Page flip, anaglyph and interlace stereo drawing can be a little faster
  by avoiding a copy to an intermediate texture.
* The new 3D view drawing already writes to an offscreen buffer, which we
  can draw from directly instead of duplicating it to another buffer.
* Eventually we will be able to remove depth and stencil buffers from the
  window and save memory, though at the moment there are still some tools
  using it so it's not possible yet.
* This also fixes a bug with Eevee sampling not progressing with stereo
  drawing in the 3D viewport.

Differential Revision: https://developer.blender.org/D3061
2018-04-27 12:14:14 +02:00
Campbell Barton
226c757b44 UI: add darker theme color for toolbar items 2018-04-26 21:18:27 +02:00
Brecht Van Lommel
c490428bd4 UI: desaturate toolbar icons that the mouse is not over.
This does not look great with light toolbar buttons as in the default,
so consider this a work in progress.
2018-04-26 16:37:59 +02:00
Julian Eisel
a31807ed7c Reduce size of scrollbars that don't contain scale markings
More changes will follow, this is just an initial tweak.
2018-04-26 15:34:39 +02:00
Campbell Barton
6a0264896b UI: toolbar single column size snapping
Once a region is set to it's snapped size, zooming keeps the size.
2018-04-26 12:08:58 +02:00
Campbell Barton
c509922605 UI: use a wider minimum menu width
Icon only buttons with menus would be too narrow,
especially buttons for selecting tools.
2018-04-25 21:54:29 +02:00
Campbell Barton
8430249791 UI: shrink operator menu hold triangle a little 2018-04-25 21:24:55 +02:00
Campbell Barton
7a67bb7018 UI: workaround for text & icon alignment
Blender's icons weren't written to draw different sizes.
For now ifdef in a hack to show toolbar icons larger.
2018-04-25 21:02:50 +02:00
Campbell Barton
700012b66e UI: icon-only hold popup uses region alignment
Gives nicer tool popups for icon only buttons.
2018-04-25 20:51:49 +02:00
Campbell Barton
0113693129 Merge branch 'master' into blender2.8 2018-04-25 17:27:23 +02:00
Campbell Barton
f69feb4957 UI: optionally pass icon size to widget_draw_icon
No functional changes.
2018-04-25 17:26:45 +02:00
Brecht Van Lommel
a9d3f9f54d Revert "UI: fix inconsistency in button rounding when zooming in."
This isn't working well when zoomed out in the properties editor,
we should be taking into account properties editor zoom level.

This reverts commit 1ba91ae2c0.
2018-04-25 15:42:41 +02:00
Campbell Barton
f210c93945 UI: disable advanced option for redo popover 2018-04-25 10:08:04 +02:00
Campbell Barton
b00d971efe UI: Apply remove redo region
This was a disabled part of the top-bar merge (code by @Severin)

The only change made is to move to redo UI into a popover.
2018-04-25 07:55:50 +02:00
Brecht Van Lommel
1ba91ae2c0 UI: fix inconsistency in button rounding when zooming in.
Some widgets would have rounding relative to the button size, others
absolute. Now it's always absolute. Note changing Display Scale in the
user prefs is not zooming, the rounding still scales with that.
2018-04-24 11:10:08 +02:00
Campbell Barton
3581b997d4 UI: use icons for the toolbar 2018-04-24 09:19:28 +02:00
Bastien Montagne
a7960db471 Static Overrides: hide/deactivate all but 'REPLACE' operation.
Others remain in code for now, just not exposed to user.
2018-04-23 15:15:53 +02:00
Campbell Barton
b14979f91f Cleanup: style 2018-04-23 12:53:45 +02:00
Campbell Barton
63c4654135 Cleanup: uninitialized variable 2018-04-23 11:04:10 +02:00
Campbell Barton
fc1374c01b Cleanup: style 2018-04-23 11:04:10 +02:00
Campbell Barton
dea3ba6d81 UI: show arrow for popovers above buttons
Also don't align popover buttons with activated popovers.
2018-04-23 08:51:13 +02:00
Campbell Barton
9971eb4437 Cleanup: includes & comments 2018-04-23 08:10:03 +02:00
Campbell Barton
9eaf00616b UI: draw arrow for popover 2018-04-22 23:03:08 +02:00
Dalai Felinto
387bf726ac UI: Editor outline color themable
Note: Not bothering with doversion, re-using 280, 10 bump.
2018-04-22 22:55:18 +02:00