Commit Graph

60607 Commits

Author SHA1 Message Date
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
Brecht Van Lommel
ca7964c24b UI: fix toolbar not snapping properly with system DPI and display scale. 2018-04-28 20:50:47 +02:00
Brecht Van Lommel
b5d3fcc9f5 Python/UI: add more convenient API for drawing based on DPI.
system.ui_scale: size multiplier to use when drawing custom UI elements.
system.ui_line_width: suggested line thickness and point size in pixels.
2018-04-28 20:49:46 +02:00
Campbell Barton
e87dd9aa00 Edit Mesh: loop-cut multi-object support 2018-04-28 18:26:44 +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
Brecht Van Lommel
bf75b24818 UI: fix incorrect scaling of manipulator widgets with DPI.
U.ui_scale is the setting from the user preferences and should never be used
for drawing. UI_DPI_FAC is the final scale after DPI from the operating system
is taken into account.
2018-04-28 16:16:04 +02:00
Campbell Barton
b6e66a66c2 Fix number button sides exiting continuous grab 2018-04-28 15:38:33 +02:00
Campbell Barton
d5a766a9ed Merge branch 'master' into blender2.8 2018-04-28 14:49:08 +02:00
Campbell Barton
60f4cb24da Fix vertex paint alpha brush setting color black 2018-04-28 14:47:53 +02:00
Campbell Barton
ffda096413 Cleanup: meaningful names for color blending 2018-04-28 14:45:10 +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
128b7ddd83 Fix multi-editmode memory leak
Previous commit only removed return's.
2018-04-28 09:34:48 +02:00
Campbell Barton
159a7e8b38 UI: replace transform hand icon w/ 4 arrows
The hand doesn't have a hotspot which you might want using manipulators
2018-04-28 09:14:02 +02:00
Campbell Barton
617534327a Cleanup: style, duplicate includes 2018-04-28 09:02:22 +02:00
Campbell Barton
c42a47d177 UI: add new transform tool that enables all widgets
Also add bevel tool.
2018-04-27 22:49:52 +02:00
Campbell Barton
bb513b173e UI: don't highlight number button while dragging 2018-04-27 22:25:54 +02:00
Campbell Barton
e97ab28a03 Edit Mesh: skip unselected meshes w/ fill holes 2018-04-27 21:52:08 +02:00
Thomas Beck
69b95b45f4 Edit Mesh: multi-object support for 'Fill Holes' 2018-04-27 21:22:21 +02:00
Campbell Barton
c4a24a7f5d Tool System: inset tool now completes on release 2018-04-27 20:38:29 +02:00
Brecht Van Lommel
c0c9eb7fe2 Fix quad view region dividing lines not drawing after recent changes. 2018-04-27 20:33:58 +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
Campbell Barton
fd68bdf7f9 UI: updated icons from @billreynish
- black outlines (better readability).
- add bone roll.
- add extrude to cursor.
2018-04-27 19:02:44 +02:00
Germano
a55016d5ef Draw Edit Curve Overlay: Fix the offset direction of the contour of selected handles 2018-04-27 14:00:22 -03:00
Brecht Van Lommel
9cc9db87bb Fix missing action zones and emboss in the 3D viewport.
Not really happy with the fix, but it works. With the new window draw method
we are no longer storing the 3D viewport in 4 buffers, by having the GPU
viewport function directly as the 3rd buffer. This means we need to draw the
action zones into it, and so we need to keep the framebuffer bound a little
longer.
2018-04-27 18:52:19 +02:00
Campbell Barton
351d782286 UI: disable 3 column toolbars
They conflict a little with showing a narrow toolbar w/ text.
2018-04-27 18:20:48 +02:00
Campbell Barton
eb4c60124c UI: multi-column toolbar support 2018-04-27 18:02:45 +02:00
Dalai Felinto
964a2dd73f UI: Bring Embossing for the top-bar and quad-view
Note: Quad-View region overlay drawing is not working because of e01cadd657.
However I tested this patch after reverting that commit locally and this
patch's code seems fine.

Partial revert of 3d62230ed6.
2018-04-27 17:47:19 +02:00
Campbell Barton
c6d68916ed Fix multi-editmode memory leak 2018-04-27 15:38:35 +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
Brecht Van Lommel
3556838983 Fix build error after recent changes (missing FILE). 2018-04-27 10:21:56 +02:00
Campbell Barton
b756e869ee WM: Add function to access last operator props
Needed for tool-settings to control options for a tool
which has not yet been executed.
2018-04-27 10:05:03 +02:00
Campbell Barton
0908fc1190 Tool System: publish/subscribe to tool changes 2018-04-27 08:24:20 +02:00
Campbell Barton
5752e4f06f WM: message bus rna utilkity macros 2018-04-27 08:23:16 +02:00
Campbell Barton
226c757b44 UI: add darker theme color for toolbar items 2018-04-26 21:18:27 +02:00
Sergey Sharybin
9183592698 Animation: Make it possible to keyframe to with copy-on-write
The issue was that every object tweak was doing a full copy
of original datablock onto evaluated version, and was updating
animation. This made it impossible to tweak properties which
has keyframes.

Proposed solution is to:

- Always apply animation on frame change, and when object
  is explicitly tagged for animation update.

  This will store original DNA value of animated property
  in the f-curve.

- When applying animation in other cases, we check original
  DNA value stored in f-curve with the actual original DNA
  property. If they differ, it means user started to tweak
  animated property, and we should skip animation.

  If the value is the same, we apply animation.

This is just a first step towards proper final implementation,
but seems to be the direction we want to take.
2018-04-26 18:11:58 +02:00
Campbell Barton
c86be7345b Tool System: expose tool space-type 2018-04-26 17:58:37 +02:00
Sergey Sharybin
3ca20148c4 Animation: Split f-curve reading and writing functions
This way we can re-use reading part.
2018-04-26 17:24:00 +02:00
Sergey Sharybin
46a256b5d1 Depsgraph: Make it possible to check for ID directly tagged for animation recalc 2018-04-26 17:22:17 +02:00
Brecht Van Lommel
67b014af48 Workspaces: active view layer now always comes from workspace, not scene.
Both the scene and workspace had an active view layer, and it was confusing
which settings were being used or displayed where. Now we always have one,
so there is no mismatch.

The "View Layers" tab in the properties editor is now "View Layer", no longer
showing a list of layers. Instead view layers can be added and removed with
the workspace view layer selector. They are also listed and selectable in the
outliner.

Single layer rendering uses the active view layer from the workspace.

This fixes bugs where the wrong active view layer was used, but more places
remain that are wrong and are now using the first view layer in the scene.
These are all marked with BKE_view_layer_context_active_PLACEHOLDER.
2018-04-26 17:06:14 +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
Brecht Van Lommel
5876856f7b Properties: remove redundant settings from workspaces tab.
Use render settings and active view layer will be handled elsewhere.
Also change icon to not be confusing with render layers.

Probably we should get rid of the workspace tab entirely and do it in
the user preferences, but that's for later.
2018-04-26 16:37:59 +02:00