Commit Graph

75472 Commits

Author SHA1 Message Date
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
Brecht Van Lommel
d60be68100 Fix crash with depsgraph iterator and empty scene.
This causes crashes in the view layer tests.
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
29e96158b9 Icons: correct arg parsing
Use _PyArg_ParseTupleAndKeywordsFast
2018-04-26 15:18:00 +02:00
Campbell Barton
3f1df6f6fc Fix T54836: Select sharp edges doesn't flush to faces 2018-04-26 14:35:55 +02:00
Campbell Barton
57405054b2 Fix T54836: Select sharp edges doesn't flush to faces 2018-04-26 14:32:35 +02:00
Julian Eisel
35742e882f Merge branch 'master' into blender2.8 2018-04-26 14:24:41 +02:00
fclem
2ebcde701a BLF: Fix problem with drawing with fonts with multiple size.
Fix T54838 : Text display glitch w/ fonts at different sizes.

This was cause by the cache not being flushed when changing font texture.
2018-04-26 14:21:16 +02:00
Jeroen Bakker
df3ea82b84 Workbench: GLSL layout locations
Added layout locations
2018-04-26 14:12:39 +02:00
Julian Eisel
3c7500ca71 Cleanup: Use enums for View2D value defines
Makes the file much less cluttered and more structured.
Also made some whitespace tweaks.
2018-04-26 14:07:03 +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
7fcdccbb6c Fix vertex slide regression from multi-edit
- Invalid casts.
- Leaked memory on mode switching.
2018-04-26 10:18:03 +02:00
Jeroen Bakker
badab5cb7d Workbench: Hair rendering 2018-04-26 08:46:58 +02:00
Jeroen Bakker
6c608b2f8a Workbench: Environment Light
- Changed defaults
 - Updated render panel
2018-04-26 08:31:14 +02:00
Jeroen Bakker
27d837a6ac Workbench: Shader compilation 2018-04-26 08:06:22 +02:00
Jeroen Bakker
e4ee23f780 Merge branch 'blender2.8' into blender2.8-workbench 2018-04-26 07:52:09 +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
Jeroen Bakker
6c1a121aef Workbench: normal packing
Normal packing. The sign is stored in the A of the color buffer.
if the A == 1.0 the normal should be inverted. before use.

The reason is that packing has more precision for frontfaces, than for
backfaces
2018-04-25 21:33:59 +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
81f19b0c5f Fix selection with image planes 2018-04-25 19:01:41 +02:00
Joshua Leung
ce7c6e3894 Multi-Pose: Port POSE_OT_select_mirror 2018-04-25 18:35:20 +02:00
Clément Foucault
46bfdb48a1 WM: Add GHOST lazy init for background mode.
This allows for background rendering with EEVEE and other opengl render
engine.

I've only tested it on Linux for the moment so I can't say about other
platforms.

We do lazy init because we cannot assume we will need Ghost for rendering
before having parsed all arguments and we cannot know if a script will
trigger rendering. This is also because it currently does not work without
any display server (blender will crash).
2018-04-25 17:43:18 +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
Sergey Sharybin
e584f3d8d2 Depsgraph: Don;t use copy actions flag
Is useless without main.
2018-04-25 17:00:41 +02:00
Sergey Sharybin
99c5bd0cd9 Merge branch 'master' into blender2.8 2018-04-25 17:00:19 +02:00
Sergey Sharybin
89bcc80c25 Library: Add assert to catch unsupported copy flags combination
Thanks Bastien for review!
2018-04-25 16:59:35 +02:00
Jeroen Bakker
fa43886690 Workbench: make normal packing optional 2018-04-25 16:57:18 +02:00
Sergey Sharybin
75e0767849 Merge branch 'master' into blender2.8 2018-04-25 16:35:11 +02:00
Sergey Sharybin
a153acde1d Depsgraph: Introduce flag top indicate scene is evaluating for a new frame 2018-04-25 16:34:55 +02:00
Sergey Sharybin
e5633114cd Depsgraph: Preserve CoW ID recalc flags
Previously they would have been replaced with flag from original
datablock, which is not what we want.
2018-04-25 16:34:55 +02:00
Sergey Sharybin
29631ff013 Depsgraph: Ensure we only expand scene datablock on evaluation
Previously it could have happened on every request to evaluated scene
or view layer.

This commit also removes expansion of view layer and scene from iterator.
Iterator is not to be used before depsgraph is evaluated.
2018-04-25 16:34:55 +02:00
Sergey Sharybin
09da47b67a Depsgraph: Avoid hash lookup for every evaluated scene query
Cache pointer to evaluated scene datablock on relations build time,
that pointer never changes after that.
2018-04-25 16:34:55 +02:00
Sergey Sharybin
331e97bcf3 Depsgraph: Fix missing relations in array modifier
Found by Dr. Sybren while working on modifiers port.
2018-04-25 16:34:01 +02:00