3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Mon, 23 Apr 2018 10:59:57 +0000 (12:59 +0200)]
Merge branch 'master' into blender2.8

3 years agoFix git submodules branch configuration
Sergey Sharybin [Mon, 23 Apr 2018 10:55:04 +0000 (12:55 +0200)]
Fix git submodules branch configuration

3 years agoCleanup: style
Campbell Barton [Mon, 23 Apr 2018 08:00:42 +0000 (10:00 +0200)]
Cleanup: style

3 years agoDepsgraph: Make update flags debug print more useful
Sergey Sharybin [Mon, 23 Apr 2018 10:52:53 +0000 (12:52 +0200)]
Depsgraph: Make update flags debug print more useful

Will print list of human-readable update flags, not the combined bitfield
printed as a number.

3 years agoDRW: Antialiased 3D cursor.
Clément Foucault [Mon, 23 Apr 2018 10:48:54 +0000 (12:48 +0200)]
DRW: Antialiased 3D cursor.

Common peeps! Why wasn't it already done?

3 years agoWM: use last_redo operator
Campbell Barton [Mon, 23 Apr 2018 10:36:20 +0000 (12:36 +0200)]
WM: use last_redo operator

Was showing operators that weren't meant to display in the UI.

3 years agoFix T54766: "Record With"-NLA "Push Down" discards Blend Mode, Extrapolation, and...
Joshua Leung [Mon, 23 Apr 2018 10:35:37 +0000 (12:35 +0200)]
Fix T54766: "Record With"-NLA "Push Down" discards Blend Mode, Extrapolation, and Influence

Applied similar fix to T54233 to get the "Record with NLA" feature working with
active action blending + influence settings. Extrapolation is explicitly ignored
though, as it shouldn't be used with this feature (i.e. it is already disabled
with the new strips and also on the animdata by default)

3 years agoFix T54767: Crash in versionning code for recent editors' removal.
Bastien Montagne [Mon, 23 Apr 2018 10:27:09 +0000 (12:27 +0200)]
Fix T54767: Crash in versionning code for recent editors' removal.

Always check for non-Null pointers there! This versionning code is
called from many different places, with many different kind of Main's.

3 years agoDepsgraph: Avoid redundant copy-on-write relations
Sergey Sharybin [Mon, 23 Apr 2018 10:18:11 +0000 (12:18 +0200)]
Depsgraph: Avoid redundant copy-on-write relations

Was adding some relations twice. Harmless, but means extra stuff to do
when evaluating the scene.

3 years agoUI Tweak: Bring Graph Editor's mode selector left of the menus, as is now done for...
Joshua Leung [Mon, 23 Apr 2018 10:01:59 +0000 (12:01 +0200)]
UI Tweak: Bring Graph Editor's mode selector left of the menus, as is now done for Dopesheet

3 years agoFix crash reading old userpref.blend
Sergey Sharybin [Mon, 23 Apr 2018 09:45:40 +0000 (11:45 +0200)]
Fix crash reading old userpref.blend

While window manager is supposed to exist after file was fully read
and do-versioned, we can not rely on window manager to exist while
reading file and setting up an environment.

3 years agoCleanup: uninitialized variable
Campbell Barton [Mon, 23 Apr 2018 08:02:10 +0000 (10:02 +0200)]
Cleanup: uninitialized variable

3 years agoCleanup: style
Campbell Barton [Mon, 23 Apr 2018 08:00:42 +0000 (10:00 +0200)]
Cleanup: style

3 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Mon, 23 Apr 2018 07:34:50 +0000 (09:34 +0200)]
Merge branch 'master' into blender2.8

3 years agoDepsgraph: Add missing relations builder
Sergey Sharybin [Mon, 23 Apr 2018 07:33:33 +0000 (09:33 +0200)]
Depsgraph: Add missing relations builder

Was possible to miss some relations from being built
when parent object is linked to the scene graph indirectly.

3 years agoUI: show arrow for popovers above buttons
Campbell Barton [Mon, 23 Apr 2018 06:38:15 +0000 (08:38 +0200)]
UI: show arrow for popovers above buttons

Also don't align popover buttons with activated popovers.

3 years agoCleanup: includes & comments
Campbell Barton [Mon, 23 Apr 2018 06:09:47 +0000 (08:09 +0200)]
Cleanup: includes & comments

3 years agoManipulators/Tools: always draw a cursor while interacting
Ines Almeida [Sun, 22 Apr 2018 22:42:17 +0000 (00:42 +0200)]
Manipulators/Tools: always draw a cursor while interacting

Cursor can be a system one or drawn with OpenGL.
Before, dragging the transform manipulator would hide the cursor and reset it to the initial positon.

3 years agoManipulators: tweak plane distance in move manipulator
Ines Almeida [Sun, 22 Apr 2018 21:45:06 +0000 (23:45 +0200)]
Manipulators: tweak plane distance in move manipulator

3 years agoManipulators: removed unused structure member
Ines Almeida [Sun, 11 Mar 2018 15:29:36 +0000 (16:29 +0100)]
Manipulators: removed unused structure member

3 years agoUpdate default workspaces.blend fixing crashes after editor removals
Julian Eisel [Sun, 22 Apr 2018 22:18:31 +0000 (00:18 +0200)]
Update default workspaces.blend fixing crashes after editor removals

* Fixes crashes in versioning code for the removed editor types (see d8c719d8d8149de2d49)
* Removes 'Game Logic' workspace.

It still only contains workspaces converted from old screen-layouts, proper
defaults are on the TODO.

3 years agoReplace old Timelines and Logic Editors with new Dopesheet (Timeline mode)
Julian Eisel [Sun, 22 Apr 2018 21:57:19 +0000 (23:57 +0200)]
Replace old Timelines and Logic Editors with new Dopesheet (Timeline mode)

Timelines and Logic Editors are gone. So far they were simply replaced by broken
Info Editors, now they are replaced by Dopesheets in the new Timeline mode.

We reuse ScrArea.butspacetype to temporarily store the space-type identifier of
the deprecated editor (see 9db492de6dd07). That way we can identify it in
versioning code and replace it nicely.
Action editor creation needs a scene to set the scrolling based on frame range.
Active screen-layouts use the active scene of the window they are displayed in.
Inactive screens simply use the first scene in the main data base.
Note that inactive editors don't need version patching, readfile.c converts them
to SPACE_EMPTY already, so users can't activate them.

Files saved since the editors were removed will still be broken.
Workspace config files saved before this will also crash (will update default
one in followup commit).

3 years agoCleanup: Get rid of ScrArea.butspacetype syncing with ScrArea.spacetype
Julian Eisel [Sun, 22 Apr 2018 17:58:27 +0000 (19:58 +0200)]
Cleanup: Get rid of ScrArea.butspacetype syncing with ScrArea.spacetype

The only real reason we need `butspacetype` is while switching areas, where we
need to delay the actual switch to the RNA _update callback since only there we
can access context.
So instead of trying to sync it with `spacetype`, only set while needed and
unset it afterwards (as in set to `SPACE_EMPTY`).

This should also allow us to re-use `butspacetype` in versioning code when
trying to read removed editors. It'll store the space type value of the removed
editor which we can then use on versioning.

For backwards compatibility, we store `butspacetype` with the value of

3 years agoUI: draw arrow for popover
Campbell Barton [Sun, 22 Apr 2018 21:03:08 +0000 (23:03 +0200)]
UI: draw arrow for popover

3 years agoUI: Editor outline color themable
Dalai Felinto [Sun, 22 Apr 2018 20:55:05 +0000 (22:55 +0200)]
UI: Editor outline color themable

Note: Not bothering with doversion, re-using 280, 10 bump.

3 years agoUI: support for center popovers over buttons
Campbell Barton [Sun, 22 Apr 2018 20:08:48 +0000 (22:08 +0200)]
UI: support for center popovers over buttons

3 years agoEmbossing for the areas only, with unified color
Dalai Felinto [Sun, 22 Apr 2018 20:09:48 +0000 (22:09 +0200)]
Embossing for the areas only, with unified color

We bring back embossing however only for areas.
We use the same color for the corners.

3 years agoUI: number button arrows appear on hover, highlight clickable areas.
Brecht Van Lommel [Sun, 22 Apr 2018 11:57:50 +0000 (13:57 +0200)]
UI: number button arrows appear on hover, highlight clickable areas.

3 years agoUI: make button roundness themeable.
Brecht Van Lommel [Sun, 22 Apr 2018 11:57:42 +0000 (13:57 +0200)]
UI: make button roundness themeable.

3 years agoFix missing filter size in Eevee film panel.
Brecht Van Lommel [Sun, 22 Apr 2018 15:02:52 +0000 (17:02 +0200)]
Fix missing filter size in Eevee film panel.

3 years agoCycles: rename engine to just "Cycles" instead of "Cycles Render" in the UI.
Brecht Van Lommel [Sun, 22 Apr 2018 08:21:40 +0000 (10:21 +0200)]
Cycles: rename engine to just "Cycles" instead of "Cycles Render" in the UI.

3 years agoUI: Remove Embossing
Dalai Felinto [Sun, 22 Apr 2018 18:11:36 +0000 (20:11 +0200)]
UI: Remove Embossing

We are using a different visual system to tell the areas apart.
There is no longer need for embossing.

3 years agoAction Zone: No need for drawing (the triangles)
Dalai Felinto [Sun, 22 Apr 2018 17:54:19 +0000 (19:54 +0200)]
Action Zone: No need for drawing (the triangles)

Now that we can easily tell the corners apart, there is no need to
a specific action zone draw here (cursor still changes, naturally).

3 years agoAction Zone: Enable them in the four corners
Dalai Felinto [Sun, 22 Apr 2018 17:48:00 +0000 (19:48 +0200)]
Action Zone: Enable them in the four corners

3 years agoUI: Draw round corners between the editors
Dalai Felinto [Sun, 22 Apr 2018 16:56:06 +0000 (18:56 +0200)]
UI: Draw round corners between the editors

This makes easier to distinguish between different editors
(as oppose to an editor and its regions).

Note action zones look a bit strange with this. I recommend we do next:
* Make sure all 4 corners can be used as action zones.
* Remove their drawing code (or show them only on mouse hover).

3 years agoUI: Move ui_draw_anti_tria to UI_interface.h
Dalai Felinto [Sun, 22 Apr 2018 17:02:17 +0000 (19:02 +0200)]
UI: Move ui_draw_anti_tria to UI_interface.h

Using extern makes too easy to get a crash if the original
function definition changed.

3 years agoUI: Remove hard-code + add comment for aa triangles
Dalai Felinto [Sun, 22 Apr 2018 15:01:57 +0000 (17:01 +0200)]
UI: Remove hard-code + add comment for aa triangles

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Sun, 22 Apr 2018 17:23:02 +0000 (19:23 +0200)]
Merge branch 'master' into blender2.8

3 years agoCleanup: UI naming
Campbell Barton [Sun, 22 Apr 2018 17:22:10 +0000 (19:22 +0200)]
Cleanup: UI naming

3 years agoUI: moving the cursor to open other popovers
Campbell Barton [Sun, 22 Apr 2018 16:43:59 +0000 (18:43 +0200)]
UI: moving the cursor to open other popovers

Match menu behavior

3 years agoUI: popover now use menu style buttons
Campbell Barton [Sun, 22 Apr 2018 16:39:29 +0000 (18:39 +0200)]
UI: popover now use menu style buttons

Also scale width with UI-scale.

3 years agoUI: Initial popover support for panels
Campbell Barton [Sun, 22 Apr 2018 15:16:39 +0000 (17:16 +0200)]
UI: Initial popover support for panels

- UILayout.popover(.. panel_type ..)
  A single panel
- UILayout.popover_group(.. panel categories ..)
  Expands all panels matching args.

Currently used in the topbar for redo and paint options.

3 years agoOverlay: face orientation
Jeroen Bakker [Sun, 22 Apr 2018 10:58:11 +0000 (12:58 +0200)]
Overlay: face orientation

- fixed the blending with solid drawtype

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Sun, 22 Apr 2018 08:51:23 +0000 (10:51 +0200)]
Merge branch 'master' into blender2.8

3 years agoCleanup: de-dup popup/pie menu RNA definition
Campbell Barton [Sun, 22 Apr 2018 08:49:45 +0000 (10:49 +0200)]
Cleanup: de-dup popup/pie menu RNA definition

Also rename pupmenu -> popmenu

3 years agoCleanup: ui-link drawing code from logic bricks
Campbell Barton [Sun, 22 Apr 2018 08:05:47 +0000 (10:05 +0200)]
Cleanup: ui-link drawing code from logic bricks

3 years agoCleanup: style
Campbell Barton [Sun, 22 Apr 2018 07:09:28 +0000 (09:09 +0200)]
Cleanup: style

3 years agoRemove unused shader
Campbell Barton [Sun, 22 Apr 2018 06:57:56 +0000 (08:57 +0200)]
Remove unused shader

Originally added for icon drawing, no longer used.

3 years agoCleanup: trailing spaces
Campbell Barton [Sun, 22 Apr 2018 06:44:23 +0000 (08:44 +0200)]
Cleanup: trailing spaces

Applied to newly added files in 2.8

3 years agoLattice Select Random, Mirror
Campbell Barton [Sat, 21 Apr 2018 21:52:47 +0000 (23:52 +0200)]
Lattice Select Random, Mirror

D3165, D3166 by @ranjian0

3 years agoError in last commit
Campbell Barton [Sat, 21 Apr 2018 21:52:16 +0000 (23:52 +0200)]
Error in last commit

3 years agoEdit Mesh: multi-object edge split support
Campbell Barton [Sat, 21 Apr 2018 20:18:04 +0000 (22:18 +0200)]
Edit Mesh: multi-object edge split support

D3161 by @JacquesLucke

3 years agoFix crash when opening properties editor
Julian Eisel [Sat, 21 Apr 2018 20:03:04 +0000 (22:03 +0200)]
Fix crash when opening properties editor

Opening as in activating one in an area that didn't contain a properties editor

3 years agoUI: add own icon rasterizer
Campbell Barton [Sat, 21 Apr 2018 19:10:09 +0000 (21:10 +0200)]
UI: add own icon rasterizer

Use software drawing, cache to an image at the requested pixel size.

3 years agoCleanup: style
Campbell Barton [Sat, 21 Apr 2018 18:42:27 +0000 (20:42 +0200)]
Cleanup: style

3 years agoCleanup: variable naming
Campbell Barton [Sat, 21 Apr 2018 18:22:12 +0000 (20:22 +0200)]
Cleanup: variable naming

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Sat, 21 Apr 2018 18:17:41 +0000 (20:17 +0200)]
Merge branch 'master' into blender2.8

3 years agoCleanup: Get rid of context in editor 'new' callback
Julian Eisel [Sat, 21 Apr 2018 17:30:56 +0000 (19:30 +0200)]
Cleanup: Get rid of context in editor 'new' callback

Requiring context means we can't easily create new editors to replace deprecated
ones in versioning code.
Think it's reasonable to give editors access to scene and area data for their
initial setup though. They mostly need it for setting "the view", as in,
scrolling values.

Also did minor cleanup in top-bar creation function.

3 years agoFix point density rendering in Cycles.
Brecht Van Lommel [Sat, 21 Apr 2018 17:35:12 +0000 (19:35 +0200)]
Fix point density rendering in Cycles.

3 years agoFix: Adding new 3D View changes custom transform orientation to gimbal
Julian Eisel [Sat, 21 Apr 2018 17:05:15 +0000 (19:05 +0200)]
Fix: Adding new 3D View changes custom transform orientation to gimbal

Steps to recreate were:
* Create custom transform orientation.
* Change properties editor into 3D View.
* Trigger refresh of 3D view header by mouse hovering it.

Mistake in rB7d055da327b9555f.

3 years agoTop-bar: Don't draw horizontal region separator
Julian Eisel [Sat, 21 Apr 2018 15:15:39 +0000 (17:15 +0200)]
Top-bar: Don't draw horizontal region separator

That way the tabs look nicely together with the lower sub-bar.

3 years agoBLI_bitmap: 2D triangle drawing function
Campbell Barton [Sat, 21 Apr 2018 16:34:34 +0000 (18:34 +0200)]
BLI_bitmap: 2D triangle drawing function

Matching polygon filling but no need for allocation or qsort.

3 years agoBLI math: clamped barycentric weight calculation
Campbell Barton [Sat, 21 Apr 2018 16:34:20 +0000 (18:34 +0200)]
BLI math: clamped barycentric weight calculation

3 years agoFix active region flickering in some cases, now always update before draw.
Brecht Van Lommel [Sat, 21 Apr 2018 15:39:34 +0000 (17:39 +0200)]
Fix active region flickering in some cases, now always update before draw.

3 years agoView3D: Atenuate banding artifacts on background gradient.
Clément Foucault [Sat, 21 Apr 2018 14:45:47 +0000 (16:45 +0200)]
View3D: Atenuate banding artifacts on background gradient.

Dithering the output color for 8bit precision framebuffer with bayer matrix.
On my tests the bayer matrux patterns are not noticeable at all.

Note that it also does that in opengl rendered mode which can be in a much
higher bitdepth. We can fix that if that's a problem in the future but I
doubt it will.

3 years agoFix feature set button misalignment.
Brecht Van Lommel [Sat, 21 Apr 2018 11:03:16 +0000 (13:03 +0200)]
Fix feature set button misalignment.

3 years agoTopbar: remove info editor menus, rename topbar menus for script compatibility.
Brecht Van Lommel [Sat, 21 Apr 2018 08:28:27 +0000 (10:28 +0200)]
Topbar: remove info editor menus, rename topbar menus for script compatibility.

We can still rename them later, but avoid breaking stuff for now.

3 years agoTopbar: visual tweaks
Brecht Van Lommel [Sat, 21 Apr 2018 08:06:12 +0000 (10:06 +0200)]
Topbar: visual tweaks

* Make bottom half of topbar a bit higher
* Make tabs higher and put them closer together
* Remove screen layouts dropdown, we'll have one layout per window
* Hide action zones from topbar
* Don't change topbar background color when activating

3 years agoFix: Typos in operator names were resulting in warnings being printed to the console
Joshua Leung [Fri, 20 Apr 2018 22:34:19 +0000 (00:34 +0200)]
Fix: Typos in operator names were resulting in warnings being printed to the console

3 years agoFix: D3160 fixed blednerplayer stub.s for unix
Gaia Clary [Fri, 20 Apr 2018 21:34:54 +0000 (23:34 +0200)]
Fix: D3160 fixed blednerplayer stub.s for unix

3 years agoFix topbar UI w/ no active object
Campbell Barton [Fri, 20 Apr 2018 21:08:08 +0000 (23:08 +0200)]
Fix topbar UI w/ no active object

3 years agoFix frame-buffer texture creation
Clément Foucault [Fri, 20 Apr 2018 18:51:54 +0000 (20:51 +0200)]
Fix frame-buffer texture creation

- disable depth buffer didn't work.
- push/pop viewport bit was needed.

3 years agoCleanup: warnings
Campbell Barton [Fri, 20 Apr 2018 18:48:19 +0000 (20:48 +0200)]
Cleanup: warnings

3 years agoRemove attempt at timeline editor version patching
Joshua Leung [Fri, 20 Apr 2018 16:45:12 +0000 (18:45 +0200)]
Remove attempt at timeline editor version patching

This will never get run, because direct_link_area() already flags/resets
every space type isn't registered, meaning that we don't have any opportunity
to apply our patching.

3 years agoDopesheet-Timeline: Removal of Timeline Editor!
Joshua Leung [Fri, 20 Apr 2018 15:17:10 +0000 (17:17 +0200)]
Dopesheet-Timeline: Removal of Timeline Editor!

This commit removes all references to the old timeline editor.

Unfortuantely, the removal of the Timeline spacetype defining
functions has ended up breaking the version patching code I'd
been working on earlier (as now, the editor gets marked as
"unknown/info" before we get a chance to patch it!)

3 years agoFix: Copy and paste error from earlier commit adding message_subscriber callbacks
Joshua Leung [Fri, 20 Apr 2018 15:08:06 +0000 (17:08 +0200)]
Fix: Copy and paste error from earlier commit adding message_subscriber callbacks

All of these were previously using the timeline theme, instead of the one
for each respective editor

3 years agoDopesheet-Timeline: Somewhat hacky version-patching code to switch old timelines...
Joshua Leung [Fri, 20 Apr 2018 14:12:36 +0000 (16:12 +0200)]
Dopesheet-Timeline: Somewhat hacky version-patching code to switch old timelines to dopesheet-timelines

After a lot of failed attempts and head banging working trying to find a way to reuse
the standard editor-switching/creation code, I've just hacked in a temporary solution
here so that users can load old files and see the old timeline instances replaced
with Dopesheet-Timelines.

Note: This is not nice code, and copies a lot of the standard initialisation code,
but it works well enough for now. We can revisit this later when the other mode changes
come along.

3 years agoFix: Timeline's "Show Cache" options should not get reset on window size change
Joshua Leung [Fri, 20 Apr 2018 11:45:48 +0000 (13:45 +0200)]
Fix: Timeline's "Show Cache" options should not get reset on window size change

These were getting set in the init() callback instead of the new(). As a result,
the settings would get reset everytime you resized the window/area - not quite
something you'd really want happening everything the size changes!

3 years agoDopesheet-Timeline: Make sure ND_SPACE_TIMELINE notifier gets handled by dopesheet
Joshua Leung [Fri, 20 Apr 2018 10:26:47 +0000 (12:26 +0200)]
Dopesheet-Timeline: Make sure ND_SPACE_TIMELINE notifier gets handled by dopesheet

3 years agoDopesheet-Timeline: Channels list now gets hidden automatically when switching to...
Joshua Leung [Fri, 20 Apr 2018 10:20:09 +0000 (12:20 +0200)]
Dopesheet-Timeline: Channels list now gets hidden automatically when switching to dopesheet-timeline

3 years agoAdd utility to make it easier to get editors/regions to redraw after changing visibil...
Joshua Leung [Fri, 20 Apr 2018 10:14:07 +0000 (12:14 +0200)]
Add utility to make it easier to get editors/regions to redraw after changing visibility of regions

Previously, there was only an API method to toggle and update, but sometimes you
want to explicitly hide instead of just toggling.

3 years agoDopesheet-Timeline: Collapse summary channel by default (so that it's more like defau...
Joshua Leung [Thu, 19 Apr 2018 16:51:42 +0000 (18:51 +0200)]
Dopesheet-Timeline: Collapse summary channel by default (so that it's more like default timeline)

TODO: Still can't figure out a way to get the channels region to hide

3 years agoFix: Toggling preview range from timeline button didn't update animation editors
Joshua Leung [Thu, 19 Apr 2018 16:44:57 +0000 (18:44 +0200)]
Fix: Toggling preview range from timeline button didn't update animation editors

Most of these were missing the message bus stuff that now handles the update flushing.

3 years agoPreview Range: Show preview range using a different color (based on ANIM_ACTIVE)
Joshua Leung [Thu, 19 Apr 2018 16:21:05 +0000 (18:21 +0200)]
Preview Range: Show preview range using a different color (based on ANIM_ACTIVE)
instead of using "black" curtains

With most editors now showing the start/end range by default, we need a way of
easily distinguishing when preview range is now enabled. By using a different color
(the exact color used is something we can change/adjust later), there is a more distinct
visual difference between them, making it easier to see what's happening.

3 years agoAnimEditors: Draw start/end frame ranges on all timelines by default
Joshua Leung [Thu, 19 Apr 2018 16:03:15 +0000 (18:03 +0200)]
AnimEditors: Draw start/end frame ranges on all timelines by default

This uses the global scene range, with styling matching the sequencer's start/end
frame drawing.

(The graph editor's "drivers" mode is exempt, as that doesn't really display time
in a linear way, so the start/end frames don't apply)

3 years agoMove the set start/end frame operators from Timeline to Animation module
Joshua Leung [Thu, 19 Apr 2018 14:51:16 +0000 (16:51 +0200)]
Move the set start/end frame operators from Timeline to Animation module

Eventually the idea is that they'll get remapped to some more global/generic hotkey
that can get used across all animation editors (see T54728). However, to facilitate
the removal of the timeline editor, it's better we do this now.

3 years agoDopesheet-Timeline: Ported over all (missing) notifiers/listeners/etc. from timeline...
Joshua Leung [Thu, 19 Apr 2018 14:31:19 +0000 (16:31 +0200)]
Dopesheet-Timeline: Ported over all (missing) notifiers/listeners/etc. from timeline to dopesheet

We already had most of these, but some of these were missing (e.g. pointcache and animplay)
as well as messagebus stuff. Hopefully I didn't miss any!

3 years agoCleanup: Remove the "SpaceTime->caches" and "SpaceTimeCache" stuff
Joshua Leung [Thu, 19 Apr 2018 14:28:27 +0000 (16:28 +0200)]
Cleanup: Remove the "SpaceTime->caches" and "SpaceTimeCache" stuff

These were runtime only data, used in pre 2.8 Blender to make use of GL vertex arrays
to draw these more efficiently. Maybe we might restore these sometime as an optimisation
step, but for now, they're not needing and were confusing.

3 years agoDopesheet-Timeline: Ported over cache indicator drawing + settings used to control...
Joshua Leung [Thu, 19 Apr 2018 14:04:26 +0000 (16:04 +0200)]
Dopesheet-Timeline: Ported over cache indicator drawing + settings used to control their visibility

These now live in the action editor/dopesheet related files.

Apart from these, the timeline didn't actually have other settings
of its own that were of any interest to anyone.

3 years agoDopesheet-Timeline: First steps towards making the Timeline a mode of the DopeSheet...
Joshua Leung [Thu, 19 Apr 2018 12:41:20 +0000 (14:41 +0200)]
Dopesheet-Timeline: First steps towards making the Timeline a mode of the DopeSheet Editor

For many years, animators have been requesting the ability to edit keyframes in the
timeline. However, implementing such tools in the timeline quickly becomes a slippery
slope, where we'll eventually end up having to duplicate all the functionality from the
dopesheet editor.

Discussing with William and Pablo this morning, we realised that perhaps it might be possible
to just make the Timeline a mode of the Dopesheet Editor (and kill off the old standalone
Timeline), meaning that we essentially get all the Dopesheet Editor goodness for free!
Also, with some proposed UI updates (i.e. allowing "submodes" of editors to be part of the
the main editors selector), it might not even matter that there isn't an "actual" timeline
editor anymore.

This commit implements the following changes (which are actually sufficient for supporting
most basic workflows):
* Timeline mode in Dopesheet Editor
* Tweaks to UI code to make the Timeline header/menus show up in Dopesheet editor

* Hide channels list when switching to timeline mode
* Port over cache-file indicators
* Add missing timeline-only settings that need a new home in the dopesheet
* Go through fixing all timeline editor operators (e.g. Bind to camera)
* Port over start/end frame shading (and adjust preview range rendering to make the
  distinction between these clear)
* Remove old timeline editor, and transfer over any leftover code

3 years agoEevee: TAA Reprojection: Initial implementation
Clément Foucault [Fri, 20 Apr 2018 16:24:14 +0000 (18:24 +0200)]
Eevee: TAA Reprojection: Initial implementation

This "improve" the viewport experience by reducing the noise from random
sampling effects (SSAO, Contact Shadows, SSR) when moving the viewport or
during playback.

This does not do Anti Aliasing because this would conflict with the outline
pass. We could enable AA jittering in "only render" mode though.

There are many things to improve but this is a solid basis to build upon.

3 years agoEevee: TAA Reprojection: Add layer property.
Clément Foucault [Fri, 20 Apr 2018 16:20:39 +0000 (18:20 +0200)]
Eevee: TAA Reprojection: Add layer property.

3 years agoEevee: Add Velocity pass.
Clément Foucault [Fri, 20 Apr 2018 16:18:33 +0000 (18:18 +0200)]
Eevee: Add Velocity pass.

This pass create a velocity buffer which is basically a 2D motion vector
texture. This is not yet used for rendering but will be usefull for motion
blur and temporal reprojection.

3 years agoDRW: Cleanup: Make DRW_shgroup_uniform_mat4 uniform expect float (*)[4]
Clément Foucault [Fri, 20 Apr 2018 16:10:00 +0000 (18:10 +0200)]
DRW: Cleanup: Make DRW_shgroup_uniform_mat4 uniform expect float (*)[4]

Same thing for mat3.

3 years agoEevee: Contact Shadows: Fix blue noise correlation.
Clément Foucault [Thu, 19 Apr 2018 16:05:25 +0000 (18:05 +0200)]
Eevee: Contact Shadows: Fix blue noise correlation.

3 years agoUI: New Global Top-Bar (WIP)
Julian Eisel [Fri, 20 Apr 2018 15:14:03 +0000 (17:14 +0200)]
UI: New Global Top-Bar (WIP)

== Main Features/Changes for Users

* Add horizontal bar at top of all non-temp windows, consisting out of two horizontal sub-bars.
* Upper sub-bar contains global menus (File, Render, etc.), tabs for workspaces and scene selector.
* Lower sub-bar contains object mode selector, screen-layout and render-layer selector. Later operator and/or tool settings will be placed here.
* Individual sections of the topbar are individually scrollable.
* Workspace tabs can be double- or ctrl-clicked for renaming and contain 'x' icon for deleting.
* Top-bar should scale nicely with DPI.
* The lower half of the top-bar can be hided by dragging the lower top-bar edge up. Better hiding options are planned (e.g. hide in fullscreen modes).
* Info editors at the top of the window and using the full window width with be replaced by the top-bar.
* In fullscreen modes, no more info editor is added on top, the top-bar replaces it.

== Technical Features/Changes

* Adds initial support for global areas

  A global area is part of the window, not part of the regular screen-layout.
  I've added a macro iterator to iterate over both, global and screen-layout level areas. When iterating over areas, from now on developers should always consider if they have to include global areas.
* Adds a TOPBAR editor type

  The editor type is hidden in the UI editor type menu.
* Adds a variation of the ID template to display IDs as tab buttons (template_ID_tabs in BPY)
* Does various changes to RNA button creation code to improve their appearance in the horizontal top-bar.
* Adds support for dynamically sized regions. That is, regions that scale automatically to the layout bounds.

  The code for this is currently a big hack (it's based on drawing the UI multiple times). This should definitely be improved.
* Adds a template for displaying operator properties optimized for the top-bar. This will probably change a lot still and is in fact disabled in code.

Since the final top-bar design depends a lot on other 2.8 designs (mainly tool-system and workspaces), we decided to not show the operator or tool settings in the top-bar for now. That means most of the lower sub-bar is empty for the time being.

NOTE: Top-bar or global area data is not written to files or SDNA. They are simply added to the window when opening Blender or reading a file. This allows us doing changes to the top-bar without having to care for compatibility.

== ToDo's

It's a bit hard to predict all the ToDo's here are the known main ones:
* Add options for the new active-tool system and for operator redo to the topbar.
* Automatically hide the top-bar in fullscreen modes.
* General visual polish.
* Top-bar drag & drop support (WIP in temp-tab_drag_drop).
* Improve dynamic regions (should also fix some layout glitches).
* Make internal terminology consistent.
* Enable topbar file writing once design is more advanced.
* Address TODO's and XXX's in code :)

Thanks @brecht for the review! And @sergey for the complaining ;)

Differential Revision: D2758

3 years agoMerge branch 'blender2.8' of into blender2.8
Jeroen Bakker [Fri, 20 Apr 2018 14:42:33 +0000 (16:42 +0200)]
Merge branch 'blender2.8' of into blender2.8

3 years agoWorkbench: Removed Clay engine draw mode
Jeroen Bakker [Fri, 20 Apr 2018 14:40:08 +0000 (16:40 +0200)]
Workbench: Removed Clay engine draw mode

- need a draw mode in workbench engine.
- reorganized render engine retrieval in 3d view. There are 2 places
where this happenes 1. 3d view draw code and 2. draw manager.
the draw manager code is not used for external engines, currently added
an exception in for cycles. will need to have a better solution in

3 years agoMore debug timing info from main RNA diffing func.
Bastien Montagne [Fri, 20 Apr 2018 14:04:27 +0000 (16:04 +0200)]
More debug timing info from main RNA diffing func.

3 years agoUI: move manipulator to tool-system
Campbell Barton [Fri, 20 Apr 2018 13:59:42 +0000 (15:59 +0200)]
UI: move manipulator to tool-system

Current manipulator now follows active tool.