Commit Graph

75472 Commits

Author SHA1 Message Date
Campbell Barton
a4f08297ed UI: preference for developer extras
Currently only used for "Edit Source" feature.
2018-06-21 14:54:21 +02:00
Campbell Barton
52aa963f0e Fix T55568: second click event ignored
Double-click handling caused the second click to be ignored
for keymaps that only handle click.
2018-06-21 14:04:43 +02:00
Brecht Van Lommel
3584810fdd Python/BLF: add blf.color(r, g, b, a) method.
This is needed now that glColor() no longer works.
2018-06-21 13:37:02 +02:00
Campbell Barton
8d1ea6a767 Fix T55573: Mode rotate on local axis crashes 2018-06-21 12:53:58 +02:00
Campbell Barton
9b91e727be Merge branch 'master' into blender2.8 2018-06-21 11:10:37 +02:00
Campbell Barton
b681461c84 Fix T55568: second click event ignored
Double-click handling caused the second click to be ignored
for keymaps that only handle click.
2018-06-21 11:07:52 +02:00
Campbell Barton
66263905ae Merge branch 'master' into blender2.8 2018-06-21 10:32:16 +02:00
Campbell Barton
f1bc9331b1 Fix T55491: Double click fail in menu popups 2018-06-21 10:07:18 +02:00
Campbell Barton
3995b33a42 WM: don't make LMB a special case for double click 2018-06-21 09:49:30 +02:00
Jeroen Bakker
00d52376f7 CodeStyle: Comments 2018-06-21 09:22:34 +02:00
Jeroen Bakker
e60d4d6a0c Code cleanup: Added newline 2018-06-21 09:05:31 +02:00
Jeroen Bakker
54c4a107b1 Missed warning is previous commit 2018-06-21 09:04:03 +02:00
Jeroen Bakker
032c741214 Studiolight: Calculation of irradiance buffer
The calculation of the irradiance buffer was slow. Now it is only
calculated when it is being used (background_alpha > 0.0)
this solves the freeze when switching to LookDev mode.

Also changed the default calculation to use the Spherical Harmonics
calculation. This is able to generate the irradiance buffer fast, but is
less accurate. As the irradiance buffer is only used for visual
guidance speed is more important than accuracy.

Added compile directive to switch between the implementations.
(see STUDIOLIGHT_IRRADIANCE_METHOD)

Disabled caching the irradiance buffer when
STUDIOLIGHT_IRRADIANCE_METHOD_SPHERICAL_HARMONICS is used as it is not
needed.
2018-06-21 09:02:12 +02:00
Joshua Leung
636a690eb1 Fix: Ensure that summary channel is enabled when creating timeline 2018-06-21 17:56:11 +12:00
Joshua Leung
b081436d1c Graph Editor: Changing the display mode to "Drivers" mode now runs the Drivers-Editor UI setup code
This is a step towards being able to just choose the "Drivers Editor"
from the editor selector, and have everything displayed, ready to use.

Currently there are a few problems to resolve still:
1) This update callback doesn't run when changing the mode via the
   editors selector in the UI. (Note: This problem also affects the
   Timeline vs Dopesheet, causing a lot of initialisation work to be
   skipped)

2) There's some missing redraw/refresh here to cause the properties
   region to actually show. You need to resize the window for that to
   happen now.
2018-06-21 17:15:45 +12:00
Joshua Leung
876c73c9af Cleanup: Move logic for initialising a new Drivers editor into its own function
This shouldn't really be part of the windowmanager code. Pulling it out
now, so that we can reuse in RNA when switching display modes,
(and perhaps other places later)
2018-06-21 16:58:14 +12:00
Joshua Leung
3777918e5c Remove debug prints 2018-06-21 16:08:52 +12:00
Joshua Leung
417856dae5 Fix: Incorrect submodes being set in Dopesheet/Action Editor when changing modes
This commit fixes a number of problematic corner cases when switching between
editors after 2b5050a4cd

The root cause of these issues was that mode_prev was not being set in
many cases, resulting in mode changes to the Timeline and back (via other
editors) causing Dopesheet Editors to reset back to "Action Editor" mode.

1) Creating new Dopesheet Editors (e.g. change the default 3D view to
   a Dopesheet editor) would default to displaying the "Action Editor",
   since mode/mode_prev == 0 represents the "Action Editor" (for backwards
   compatability reasons), while mode == 3 is for the "Dopesheet"

2) If you set the Dopesheet Editor to another mode (e.g. "Grease Pencil" mode),
   change to another editor (e.g. Shaders), then come back, the mode would
   get reset to "Action Editor".
2018-06-21 16:07:47 +12:00
Pablo Vazquez
0b7edf105d UI: Icons for Outliner display modes
We need a better icon for Orphan Data
2018-06-21 00:32:56 +02:00
Campbell Barton
4cfc54a5cb UI: adjust menu triangle
Was not centered for single icon buttons.
2018-06-20 21:34:27 +02:00
Campbell Barton
8d00d6d0bf UI: rename "NLA Editor" -> "Nonlinear Animation"
See: T54744
2018-06-20 20:16:47 +02:00
Campbell Barton
2b5050a4cd UI: expose Timeline as a space type
See: T54744
2018-06-20 20:11:41 +02:00
Rohan Rathi
c73a6b0d42 Merge branch 'blender2.8' into soc-2018-bevel 2018-06-20 22:29:44 +05:30
Campbell Barton
6991b477d7 UI: expose Driver as a space type
See: T54744
2018-06-20 18:46:48 +02:00
Dalai Felinto
2e66e5faca Silence warning in greasepencil-object branch
We don't have warnings in 2.8 because of include order.
But headers shouldn't depend on that for warnings, really.
2018-06-20 18:44:17 +02:00
Brecht Van Lommel
40e1e8ebed Despgraph: don't tag for transform/geometry update on relations rebuild.
This should already be happening elsewhere and was causing depsgraph
rebuild to be slower than it should.
2018-06-20 18:12:48 +02:00
Brecht Van Lommel
e1dff01e29 Depsgraph: add some missing depsgraph tags when relations change. 2018-06-20 18:12:48 +02:00
Brecht Van Lommel
0d0d8935a5 Fix outliner mixed collection/object visibility drag toggle not working. 2018-06-20 18:12:48 +02:00
Brecht Van Lommel
73d0a3f142 Fix hide object operator to do nothing if no object is selected. 2018-06-20 18:12:48 +02:00
Campbell Barton
54a0247f59 Cleanup: whitespace 2018-06-20 16:42:19 +02:00
Campbell Barton
ab9e2dccd3 Cleanup: follow naming conventions
Using panels for presets printed warnings for classes named as menus.
2018-06-20 16:32:31 +02:00
Jeroen Bakker
a3428131b6 Studiolight: Spherical harmonics
Compile time option to reduce the level of the SH
2018-06-20 16:08:11 +02:00
Campbell Barton
3414a16705 Merge branch 'master' into blender2.8 2018-06-20 16:01:30 +02:00
Campbell Barton
d312dbea2d Cleanup: naming (make it clear vars are squared) 2018-06-20 15:58:46 +02:00
Campbell Barton
e6609deba2 Merge branch 'master' into blender2.8 2018-06-20 15:50:54 +02:00
Campbell Barton
12e926781a Merge branch 'master' into blender2.8 2018-06-20 15:40:14 +02:00
Campbell Barton
372754c164 Screen: split ED_area_actionzone_find_xy
Add ED_area_actionzone_refresh_xy which can tag redraw
find no longer changes changes to the action zone.
2018-06-20 15:34:20 +02:00
Campbell Barton
5cad6afac6 Cleanup: rename is_in_area_actionzone 2018-06-20 15:34:20 +02:00
Bastien Montagne
3df5625ae7 Cleanup: remove some useless Derivedmesh struct declarations. 2018-06-20 15:17:35 +02:00
Bastien Montagne
b13585e782 Cleanup: remove last DM usages from datatransfer code. 2018-06-20 15:17:35 +02:00
Jeroen Bakker
0fb1093b14 Studiolight: fixed diffuse lighting
- Orientation of the cubemap were not conform cycles and eevee
- one side of the cubemap was flipped, so one side was overlit and the
other side was to dark.
2018-06-20 15:00:23 +02:00
Bastien Montagne
c6ab911744 Merge branch 'master' into blender2.8 2018-06-20 14:16:22 +02:00
Brecht Van Lommel
984a78e763 Fix crash opening some files, after recent changes. 2018-06-20 13:42:23 +02:00
Brecht Van Lommel
4234cddda9 Objects: support for hiding all objects in a collection.
In the outliner there are now icons for it, Ctrl+Click isolates a
single collections.

In the 3D view, Ctrl+H key opens a menu that is more or less the
equivalent of the old layer buttons in the header. Regular Click isolates
the collection, Shift+Click toggle the collection visibility. Pressing
number keys and letters works in this menu, which can help for quickly
selecting a specific collection.

Shortcuts for quick switching by just pressing 1/2/3/.. keys are available
again. The order can be confusing with nested collections, but that seems
unavoidable. The first numbers control the top level collections, and then
sub collections if numbers are left.

Remaining design issues:

* The 3D view menu needs to be improved: support for sub collections,
  staying open on shift+click, access from the 3D view header somewhere,
  shortcut key display.
* Currently collection hiding just controls per-object hiding, we plan
  to separate this state still so alt+H doesn't affect collection hiding.
2018-06-20 13:04:51 +02:00
Brecht Van Lommel
5e968a996a Objects: restore per object restrict view/render/select.
Note this is now separate from H key hiding, and meant for more persistent
ways to define which objects are relevant to the viewport or render.

This avoids some cases where you'd have to create collection specifically
to hide objects for viewport/render.
2018-06-20 12:35:25 +02:00
Brecht Van Lommel
0619f960c2 Objects: restore H key per object hiding.
H hides selected objects, Shift+H hides unselected objects, and Alt+H
reveals hidden objects.

This hiding state is distinct from restrict viewport and render, and
meant for temporarily hiding objects without affecting more persistent
collection hiding.

Object hiding is per view-layer, same as selection. It affects the
viewport and any preview renders in there, but not final renders.

In the outliner, different icons are now used for temporary hiding, and
restrict viewport and render. Hidden objects are greyed out.

Remaining design issues:

* For lamps we probably still want to keep their effect on the scene,
  currently they are fully disabled by hiding. Arguably mesh lights or
  even objects being reflected or casting shadows are not that different
  but perhaps the special lamp exception from local view should remain.
* We need a feature still to disabled this hiding for specific viewports,
  for render or animation preview where you want to see the entire scene
  while working in another view.
* We need a new icon for restrict viewport, for now it uses a grid similar
  to the 2.4 icon.
* Hiding objects does not preserve selection state as it did in 2.7,
  it's probably convenient to support this again?
2018-06-20 12:35:25 +02:00
Jeroen Bakker
c17ba4a903 T55550: Workbench Shadows are incorrect in first draw cycle
Shadows uses the old location for light_direction. Maybe a merge
conflict.
2018-06-20 12:29:09 +02:00
Bastien Montagne
fd48e685c3 Cleanup: remove some G.main from BKE's node.c
Validate some cases using G_MAIN instead (I don't think we want to work
on any other Main than G.main one when registering/unregistering nodes
etc.).

And when freeing, all ID not in Main shall now be tagged accordingly, so
we *should* not need to do that stupi search over all ntrees in G.main
to check wether we have to free it ourself or not!
2018-06-20 12:27:26 +02:00
Pablo Vazquez
84c2ef0eaf UI: Use chevrons for number sliders, pulldowns and popovers
In the future popovers/pulldowns should have different indicators

Patch by William Reynish and Clement Foucault
2018-06-20 12:24:24 +02:00
Bastien Montagne
20788e1747 Cleanup: moar G.main removal.
Nice trick from blender2.8, we now can get active scene from active
window of windowmanager!
2018-06-20 11:53:30 +02:00