3 months ago3D View: re-use select id buffer for circle select on cursor-motion
Campbell Barton [Mon, 20 May 2019 06:29:04 +0000 (16:29 +1000)]
3D View: re-use select id buffer for circle select on cursor-motion

The new selection code was redrawing everything for each update.

Use the gestures wmGenericUserData to store the cache between
executions and ensure it's freed.

3 months agoWM: add wmGenericUserData utility struct
Campbell Barton [Mon, 20 May 2019 05:06:06 +0000 (15:06 +1000)]
WM: add wmGenericUserData utility struct

Useful to have a generic user data with an optional custom free function,
use for wmGesture.

3 months agoCleanup: rename buffer select var: bbsel to use_zbuf
Campbell Barton [Mon, 20 May 2019 03:49:38 +0000 (13:49 +1000)]
Cleanup: rename buffer select var: bbsel to use_zbuf

3 months agoCleanup: move selection utilities into ED_select_buffer_utils
Campbell Barton [Mon, 20 May 2019 03:16:29 +0000 (13:16 +1000)]
Cleanup: move selection utilities into ED_select_buffer_utils

3 months agoCleanup: remove EDBM_backbuf API
Campbell Barton [Mon, 20 May 2019 02:39:01 +0000 (12:39 +1000)]
Cleanup: remove EDBM_backbuf API

3 months agoCleanup: remove unused G_FLAG_BACKBUFSEL
Campbell Barton [Mon, 20 May 2019 02:35:24 +0000 (12:35 +1000)]
Cleanup: remove unused G_FLAG_BACKBUFSEL

3 months ago3D View: use new buffer selection API's for paint vert/face select
Campbell Barton [Mon, 20 May 2019 02:15:56 +0000 (12:15 +1000)]
3D View: use new buffer selection API's for paint vert/face select

Removes EDBM_backbuf use.

3 months agoFix missing assignments in object mode select id drawing
Campbell Barton [Mon, 20 May 2019 02:14:30 +0000 (12:14 +1000)]
Fix missing assignments in object mode select id drawing

The code currently doesn't run, needed for upgrading all selection
code to use the new API's.

3 months agoFix error mixing old/new buffer selection API's
Campbell Barton [Mon, 20 May 2019 02:09:29 +0000 (12:09 +1000)]
Fix error mixing old/new buffer selection API's

Missed from 4f6e25280558c, the second pass often wont run,
so the error didn't show up on basic tests.

3 months agoFix invalid face offset in DRW_draw_select_id_object
Campbell Barton [Mon, 20 May 2019 01:36:50 +0000 (11:36 +1000)]
Fix invalid face offset in DRW_draw_select_id_object

3 months agoFix error showing active tool side-bar in the image editor
Campbell Barton [Mon, 20 May 2019 00:49:42 +0000 (10:49 +1000)]
Fix error showing active tool side-bar in the image editor

3 months agoIndustry Compat keymap: Fix deselecting rings
William Reynish [Sun, 19 May 2019 21:36:47 +0000 (23:36 +0200)]
Industry Compat keymap: Fix deselecting rings

Issue was caused by a keymap conflict

3 months agoFix T64832: Industry keymap - Pressing F to View Selected in Node Editor not working...
William Reynish [Sun, 19 May 2019 21:16:22 +0000 (23:16 +0200)]
Fix T64832: Industry keymap - Pressing F to View Selected in Node Editor not working via hotkey

3 months agoUI: Add back Sequencer sidebar toggles into the header
William Reynish [Sun, 19 May 2019 20:47:14 +0000 (22:47 +0200)]
UI: Add back Sequencer sidebar toggles into the header

The properties inside are still hidden when the toggles are off, but we really should use greying out here instead.

That needs changes to DNA/RNA to work though.

3 months agoRender: Use GHash for storing render parts
Lukas Stockner [Sun, 19 May 2019 19:51:18 +0000 (21:51 +0200)]
Render: Use GHash for storing render parts

Previously, render parts were stored in a linked list and every tile update
searched the entire list for the correct part. As a result, the overhead
of searching tiles increased quadratically w.r.t. the number of tiles.

By hashing the parts based on their location, this operation is much faster,
significantly reducing the tile update overhead for small tiles and/or large

For example, rendering an empty scene in 1080p at 1spp and 8x8 tiles goes
down from 9.22sec to 1.45sec on my laptop.

Reviewers: brecht, sergey

Differential Revision:

3 months agoFix build
Dalai Felinto [Sun, 19 May 2019 20:33:43 +0000 (17:33 -0300)]
Fix build

Issue introduced on b7eba20236ca.

I'm surprised it compiled elsewhere, but in Linux at least this fix was

3 months agoUI: Edit Menu Operator Polling
Harley Acheson [Sun, 19 May 2019 20:12:15 +0000 (13:12 -0700)]
UI: Edit Menu Operator Polling

This patch updates the polling that enable/disables Edit Menu items. Slight Undo History menu changes

Differential Revision:

Reviewed by Brecht Van Lommel

3 months agoEdit Mesh Select: Fix/update to new logic.
mano-wii [Sun, 19 May 2019 18:15:27 +0000 (15:15 -0300)]
Edit Mesh Select: Fix/update to new logic.

3 months agoFix T64720: Sequencer UI doesn't draw properly with some strip types
Richard Antalik [Sun, 19 May 2019 18:29:21 +0000 (11:29 -0700)]
Fix T64720: Sequencer UI doesn't draw properly with some strip types

cleanup after rB86eefefdc1aae2a3ab4160770032671abf55aa30.

Reviewed By: brecht

Differential Revision:

3 months agoVSE: add movie strips on top of audio
Richard Antalik [Sun, 19 May 2019 18:21:37 +0000 (11:21 -0700)]
VSE: add movie strips on top of audio

- add movies to channel above free slot (no check for 2 free slots),
  add sound to the free slot
- don't override channel settings if `channel` property is set

This is just a hack. Propper implementation should be done along with T59540

Reviewed By: brecht

Differential Revision:

3 months agoFix T64579: Failure to honor anamorphic display
Richard Antalik [Sun, 19 May 2019 18:18:23 +0000 (11:18 -0700)]
Fix T64579: Failure to honor anamorphic display

Restore stretching of sequencer preview removed in rB005626b8c6b4

Reviewed By: brecht

Differential Revision:

3 months agoUI: Icons update
William Reynish [Sun, 19 May 2019 18:23:58 +0000 (20:23 +0200)]
UI: Icons update

A few icons were missed in the last update.

  - Added dedicated icon for showing hidden objects in the Graph Editor
  - Added new, more descriptive icon for F-Curve snapshots
  - Tweaks for Toggle Full Screen and Collections icons

This should be the final set for 2.80.

Thanks to Andrzej Ambroż for contributing this icon set.

3 months agoUI: expand more image editor scope panels by default
Brecht Van Lommel [Sun, 19 May 2019 17:33:01 +0000 (19:33 +0200)]
UI: expand more image editor scope panels by default

Better to show all information about the image at once, there is enough space
since they are in their own category.

3 months agoUI: don't ask for confirmation to save or revert to saved preferences
Brecht Van Lommel [Sun, 19 May 2019 17:02:21 +0000 (19:02 +0200)]
UI: don't ask for confirmation to save or revert to saved preferences

3 months agoUI: minor tweaks to image editor panels
Brecht Van Lommel [Sun, 19 May 2019 16:56:17 +0000 (18:56 +0200)]
UI: minor tweaks to image editor panels

3 months agoUI: Use "Viewport" instead of View in Subdivision Modifier.
Pablo Vazquez [Sun, 19 May 2019 15:19:30 +0000 (17:19 +0200)]
UI: Use "Viewport" instead of View in Subdivision Modifier.

Cosmetic change for consistency according to the naming guidelines in 2.80.

Also place Render first, Viewport later to match other areas in Blender
such as the sampling panel in EEVEE/Cycles.

3 months agoUI: Align Render and Viewport samples properties for EEVEE.
Pablo Vazquez [Sun, 19 May 2019 15:09:55 +0000 (17:09 +0200)]
UI: Align Render and Viewport samples properties for EEVEE.

Matches Cycles and other areas in Blender.

3 months agoUI: use single column layout for image settings panels
Brecht Van Lommel [Sun, 19 May 2019 12:51:21 +0000 (14:51 +0200)]
UI: use single column layout for image settings panels

3 months agoImages: change alpha settings to support channel packing
Brecht Van Lommel [Sat, 18 May 2019 18:52:20 +0000 (20:52 +0200)]
Images: change alpha settings to support channel packing

This also replaces the Use Alpha setting. We now have these alpha modes:

* Straight: store RGB and alpha channels separately with alpha acting as a
  mask, also known as unassociated alpha.
* Premultiplied: transparent RGB pixels are multiplied by the alpha channel.
  The natural format for renders.
* Channel Packed: different images are packed in the RGB and alpha channels,
  and they should not influence each other. Channel packing is commonly used
  by game engines to save memory.
* None: ignore alpha channel from the file and make image fully opaque.

Cycles OSL does not correctly support Channel Packed and None yet, we are
missing fine control over the OpenImageIO texture cache to do that.

Fixes T53672

3 months agoImages: don't (un)premultipy non-color data
Brecht Van Lommel [Sun, 19 May 2019 00:56:12 +0000 (02:56 +0200)]
Images: don't (un)premultipy non-color data

The previous behavior here was wrong for some specific combinations of
settings, non-color RGB channels should never be affected by the alpha

3 months agoCleanup: refactor image texture node code for coming changes
Brecht Van Lommel [Sun, 19 May 2019 00:46:24 +0000 (02:46 +0200)]
Cleanup: refactor image texture node code for coming changes

3 months agoCleanup: remove unused image buffer code
Brecht Van Lommel [Sat, 18 May 2019 17:14:59 +0000 (19:14 +0200)]
Cleanup: remove unused image buffer code

3 months agoPython API: add a Matrix.Diagonal constructor to mathutils.
Alexander Gavrilov [Sun, 19 May 2019 11:52:11 +0000 (14:52 +0300)]
Python API: add a Matrix.Diagonal constructor to mathutils.

For some reason there seems to be no way to do the very simple and
obvious task of converting a scale vector to a matrix via mathutils.
The Matrix.Scale constructor does something complicated instead.

Reviewers: brecht, campbellbarton

Differential Revision:

3 months agoUI: don't use decorators for Eevee material quality settings
Brecht Van Lommel [Sun, 19 May 2019 11:22:11 +0000 (13:22 +0200)]
UI: don't use decorators for Eevee material quality settings

3 months agoFix inconsistent toolbar and sidebar sizes in default workspaces
Brecht Van Lommel [Sun, 19 May 2019 11:18:50 +0000 (13:18 +0200)]
Fix inconsistent toolbar and sidebar sizes in default workspaces

3 months agoFix Cycles material settings appearing in the wrong tab in node editor
Brecht Van Lommel [Sun, 19 May 2019 11:07:47 +0000 (13:07 +0200)]
Fix Cycles material settings appearing in the wrong tab in node editor

3 months agoKeymap: Space-L sets "Lasso" with Space tool activation
Campbell Barton [Sun, 19 May 2019 09:55:17 +0000 (19:55 +1000)]
Keymap: Space-L sets "Lasso" with Space tool activation

3 months agoUI: add Panel.bl_order property to control order of panels for add-ons
Brecht Van Lommel [Sun, 19 May 2019 09:23:43 +0000 (11:23 +0200)]
UI: add Panel.bl_order property to control order of panels for add-ons

This fixes poor Cycles panel ordering, with Freestyle and Custom Properties
appearing at the top.

For most cases order of registration is still the easiest way to control
order and it's recommended to keep using that. This is mainly to solve a few
cases where we want a few built-in panels to appear below add-on panels.

3 months agoFix T64822: curve widget point selection does not take into account DPI
Brecht Van Lommel [Sun, 19 May 2019 08:03:45 +0000 (10:03 +0200)]
Fix T64822: curve widget point selection does not take into account DPI

3 months agoCleanup: doxygen parameters
Campbell Barton [Sun, 19 May 2019 09:21:45 +0000 (19:21 +1000)]
Cleanup: doxygen parameters

3 months agoCleanup: spelling for ghost comments
Campbell Barton [Sun, 19 May 2019 09:15:56 +0000 (19:15 +1000)]
Cleanup: spelling for ghost comments

3 months agoCleanup: use wm prefix for GenericCallback
Campbell Barton [Sun, 19 May 2019 04:56:49 +0000 (14:56 +1000)]
Cleanup: use wm prefix for GenericCallback

Without this it's not clear what kinds of data this deals with.

3 months agoCleanup: rename BLI_appdir_fonts_* -> font
Campbell Barton [Sun, 19 May 2019 04:50:02 +0000 (14:50 +1000)]
Cleanup: rename BLI_appdir_fonts_* -> font

Plural name doesn't fit with textures, sounds & other paths
that may be added.

Also quiet unused warning.

3 months agoUI: Remove Hover Highlight When Outliner Loses Focus
Harley Acheson [Sun, 19 May 2019 00:09:45 +0000 (17:09 -0700)]
UI: Remove Hover Highlight When Outliner Loses Focus

This patch removes the hover highlight that can sometimes remain after moving out of the Outliner space

Differential Revision:

Reviewed by Brecht Van Lommel

3 months agoUI: Default Directory for Windows Fonts
Harley Acheson [Sat, 18 May 2019 23:40:33 +0000 (16:40 -0700)]
UI: Default Directory for Windows Fonts

This patch gives new Windows users a better default preference for fonts folder

Differential Revision:

Reviewed by Campbell Barton and Brecht Van Lommel

3 months agoIndustry Compat keymap: Switch mode order to Vert, Edge, Face, Object
William Reynish [Sat, 18 May 2019 17:13:17 +0000 (19:13 +0200)]
Industry Compat keymap: Switch mode order to Vert, Edge, Face, Object

Due to popular demand, this switches the number key mode order, so that it goes:

 1: vert, 2: edge, 3: face, 4: object, 5: sculpt and so on

This has a number of downsides in practice, because it works less well for objects other than meshes, which now have a gap in the keymap between 1 and 4. I will try this change anyway, due to popular demand.

Also use V for viewport pie, which makes it easier to switch viewpoints on laptops especially.

3 months agomake.bat: Add option to only update sources from git.
Ray Molenkamp [Sat, 18 May 2019 16:34:33 +0000 (10:34 -0600)]
make.bat: Add option to only update sources from git.

SVN takes a long time to sync even if there are no updates,
the `code_update` parameter gives the option opt out of the
SVN updates.

This is a developer option, people just wanting to build
blender and not do any development are highly recommended
to keep using the `update` method.

3 months agoEdit Mesh Selection Drawing: Make sure the state of point size is enabled.
mano-wii [Sat, 18 May 2019 15:25:53 +0000 (12:25 -0300)]
Edit Mesh Selection Drawing: Make sure the state of point size is enabled.

3 months agoFix T54686: objects don't occlude each other for edit-mesh select (part 2)
Campbell Barton [Sat, 18 May 2019 13:12:47 +0000 (23:12 +1000)]
Fix T54686: objects don't occlude each other for edit-mesh select (part 2)

The previous fix 8a6414ed46f66, resolved selection picking but didn't
work for box/circle/lasso select.

- Add ED_select_buffer_utils.h for general select-buffer operations
  unrelated to edit-mesh.

- Circle select still needs to cache select-id's for each update.

3 months agoCleanup: remove unused argument
Campbell Barton [Sat, 18 May 2019 12:28:31 +0000 (22:28 +1000)]
Cleanup: remove unused argument

3 months agomacOS/Linux: use more standard button layout in quit dialog
Brecht Van Lommel [Sat, 18 May 2019 12:42:34 +0000 (14:42 +0200)]
macOS/Linux: use more standard button layout in quit dialog

Ref D3118. This matches macOS and GNOME.

3 months agoFix T64762: incorrect textures for non-color images with an alpha channel
Brecht Van Lommel [Sat, 18 May 2019 10:51:48 +0000 (12:51 +0200)]
Fix T64762: incorrect textures for non-color images with an alpha channel

3 months agoFix T64791: light sun angle not saved
Brecht Van Lommel [Sat, 18 May 2019 10:44:44 +0000 (12:44 +0200)]
Fix T64791: light sun angle not saved

There is a deeper problem here with DNA_struct_elem_find and Lamp/Light name
aliasing, to be fixed separately.

3 months agoFix image not being marked as modified on texture paint undo/redo
Brecht Van Lommel [Sat, 18 May 2019 10:41:09 +0000 (12:41 +0200)]
Fix image not being marked as modified on texture paint undo/redo

3 months agoWindows: use more standard button layout in quit dialog
Brecht Van Lommel [Sat, 18 May 2019 10:15:59 +0000 (12:15 +0200)]
Windows: use more standard button layout in quit dialog

macOS and Linux remain the same as before. Ref D3118.

3 months agoFix for Python error due to file missing from last commit
Brecht Van Lommel [Sat, 18 May 2019 09:53:30 +0000 (11:53 +0200)]
Fix for Python error due to file missing from last commit

3 months agoFix use of deprecated DoF distance property
Brecht Van Lommel [Sat, 18 May 2019 09:45:38 +0000 (11:45 +0200)]
Fix use of deprecated DoF distance property

3 months agoMesh: remove Double Sided lighting option, it does nothing in the new viewport
Brecht Van Lommel [Sat, 18 May 2019 09:32:52 +0000 (11:32 +0200)]
Mesh: remove Double Sided lighting option, it does nothing in the new viewport

This is legacy option from fixed-function graphics hardware, where per-vertex
lighting meant this had a significant performance impact.

3 months agoCleanup: remove unused GHOST quit dialog code
Brecht Van Lommel [Sat, 18 May 2019 08:35:06 +0000 (10:35 +0200)]
Cleanup: remove unused GHOST quit dialog code

3 months agomacOS: always use the Blender quit dialog, like other platforms
Brecht Van Lommel [Fri, 17 May 2019 22:12:21 +0000 (00:12 +0200)]
macOS: always use the Blender quit dialog, like other platforms

The same was done for Windows, but some extra changes were needed to make it
work on macOS. This is required because the Blender quit dialog now contains
additional settings for image saving.

3 months agoUI: Sequencer menus
William Reynish [Sat, 18 May 2019 08:05:13 +0000 (10:05 +0200)]
UI: Sequencer menus

  - Rename Frame menu to Navigation, and move to View menu
  - Add missing Zoom entry to View menu
  - Move the Snap/Offset items to the Transform menu
  - Remove Crossfade Sounds from the Strip menu, now that it is in the Transitions menu
  - Added more separators where it makes sense

Suggestions by Peter Fog (tintwotin)

3 months agoIndustry Compat keymap: Sequencer fixes
William Reynish [Fri, 17 May 2019 23:36:34 +0000 (01:36 +0200)]
Industry Compat keymap: Sequencer fixes

  - Use consistent animation controls
  - Use consistent keys for Select More/Less & Select Linked

3 months agoUI: Sequencer menus
William Reynish [Fri, 17 May 2019 23:11:45 +0000 (01:11 +0200)]
UI: Sequencer menus

Add missing menu entries:

  - Select Box
  - Sound Crossfade
  - Toggle Meta
  - Gap Remove

  - Rename menu entries to use Playhead rather than the ambiguous Frame
  - Use icons for the rest of the Add menu categories

Thanks to user tintwotin for pointing out the missing items

3 months agoDesktop Icons Update
William Reynish [Fri, 17 May 2019 21:54:21 +0000 (23:54 +0200)]
Desktop Icons Update

Unify all desktop icons on Mac, Win and Linux to fit with the correct, updated brand guidelines here:

This is using :

PANTONE 716 C = #EA7600 (RGB 234 118 0)
PANTONE 647 C = #236192 (RGB 35 97 146)

Thanks to Yevgeny Makarov (jenkm) for compiling this icon update.

See T63623

3 months agoUI: Icons update
William Reynish [Fri, 17 May 2019 21:22:22 +0000 (23:22 +0200)]
UI: Icons update

New icons from Andrzej Ambroż / Jendrzych:

  - Bespoke icon for creating new Collections
  - Special icons for Rigid Body and Rigid Body Constraints (Physics Properties)
  - New icons for Holdout and Indirect Only toggles in the Outliner
  - New generic Cursor icon for cases that are not related to either Orientation or Pivot

Many other tweaks to existing icons, including:

  - Add & Remove Keyframe
  - Weight Paint & Collision Modifier
  - Tablet Pressure Sensitivity
  - Playback icons

3 months agoFix T64775: crash loading Eevee files with DoF, after recent changes
Brecht Van Lommel [Fri, 17 May 2019 20:53:39 +0000 (22:53 +0200)]
Fix T64775: crash loading Eevee files with DoF, after recent changes

Additional fix to ensure Cycles versioning is done after Eevee.

3 months agoFix T64775: crash loading Eevee files with DoF, after recent changes
Brecht Van Lommel [Fri, 17 May 2019 20:28:49 +0000 (22:28 +0200)]
Fix T64775: crash loading Eevee files with DoF, after recent changes

Version after lib linking due to following ID pointers.

3 months agoImages: changes to avoid losing new images that have not been saved
Brecht Van Lommel [Sun, 4 Mar 2018 21:45:22 +0000 (22:45 +0100)]
Images: changes to avoid losing new images that have not been saved

The basic idea is that such new images will be packed into the .blend file
when saving all modified images from the quit dialog. To make this workflow
nicer a number of changes were made to how this type of packed image is

* "Save Modified Images" now packs generated images into the .blend file.
* "Save As" for packed images now automatically unpacks the image, so that
  it's easy to save automatically packed images. "Save Copy" keeps it packed.
* "Save" for packed images now re-saves the image into the .blend file, so
  that it's effectively the equivalent of "Save" for non-packed images.
* Empty image filepaths are no longer remapped when saving the .blend file.
  Previously it would become e.g. "//../../" which makes no sense for generated
  images with no filepath yet.
* Hide unpack button and filepath for such packed images with no filepath.
  Unpacking does not work in a predictable way without a filepath, better
  to just "Save As".

3 months agoCleanup: Eevee: Use dummy texture for GTAO when not enabled
Clément Foucault [Fri, 17 May 2019 17:12:17 +0000 (19:12 +0200)]
Cleanup: Eevee: Use dummy texture for GTAO when not enabled

3 months agoFix T64300: Missing update of original data-block on redo
Sergey Sharybin [Fri, 17 May 2019 16:59:29 +0000 (18:59 +0200)]
Fix T64300: Missing update of original data-block on redo

Dependency graph was not yet set as active when is used by
operator which is being redone.

3 months agoUI: Small tweaks to the save dialog:
William Reynish [Fri, 17 May 2019 16:56:46 +0000 (18:56 +0200)]
UI: Small tweaks to the save dialog:

  - Add back info icon at the top.
  - Remove icons from the buttons. None of the OS's we support use icons here
  - Remove button align. It doesn't work well with the active default highlighting
  - Center-align the text inside the buttons

To make this look even nicer, we should add more padding all around the edges, but that could be done separately.

3 months agoOutliner: Make restriction icons inactive based on hierarchy value
Dalai Felinto [Fri, 17 May 2019 15:13:58 +0000 (12:13 -0300)]
Outliner: Make restriction icons inactive based on hierarchy value

If the parent of a collection has a setting disabled, the children should have
that setting inactive.

In some cases a column may affect another one. For example, disabling a
collection to render should make holdout and and indirect only inactive.

In View Layer it works for both objects and collections.
For Scenes mode, it works only for collections.

Differential Revision:

3 months agoFix meshes.new_from_object() not preserving materials
Sergey Sharybin [Fri, 17 May 2019 16:23:06 +0000 (18:23 +0200)]
Fix meshes.new_from_object() not preserving materials

3 months agoEevee / Workbench: Fix hair normals
Clément Foucault [Fri, 17 May 2019 16:17:14 +0000 (18:17 +0200)]
Eevee / Workbench: Fix hair normals

Hair normals were not behaving correctly. This corrects their looks and
fix the node shader geometry that was showing the flat normal.

3 months agoCleanup: Eevee: Use DRW_PASS_CREATE macro when possible
Clément Foucault [Fri, 17 May 2019 13:02:47 +0000 (15:02 +0200)]
Cleanup: Eevee: Use DRW_PASS_CREATE macro when possible

3 months agoCleanup: DRW: Remove uneeded DRWState values
Clément Foucault [Fri, 17 May 2019 12:04:30 +0000 (14:04 +0200)]
Cleanup: DRW: Remove uneeded DRWState values

This removes:

3 months agoFix T64759: Pick select selects an incorrect face in edit mode.
mano-wii [Fri, 17 May 2019 16:01:49 +0000 (13:01 -0300)]
Fix T64759: Pick select selects an incorrect face in edit mode.

Bug introduced in T64759.

3 months agoImages: make it harder to accidentally undo image texture painting changes
Brecht Van Lommel [Fri, 17 May 2019 13:10:34 +0000 (15:10 +0200)]
Images: make it harder to accidentally undo image texture painting changes

Editing properties like generated X/Y size clears any changes to the image,
and it's not obvious that this is destructive. Now if the image has been
painted on or baked to, buttons to Save or Discard changes will appear and
editing the properties will be disabled until doing one of these.

3 months agoImages: make image save operator available outside image editor
Brecht Van Lommel [Fri, 17 May 2019 13:45:15 +0000 (15:45 +0200)]
Images: make image save operator available outside image editor

This includes some refactoring of image operator poll functions.

3 months agoCleanup: remove unused image code
Brecht Van Lommel [Fri, 17 May 2019 13:46:53 +0000 (15:46 +0200)]
Cleanup: remove unused image code

3 months agoCleanup: move Image flags into DNA, for consistency with other types
Brecht Van Lommel [Fri, 17 May 2019 09:42:34 +0000 (11:42 +0200)]
Cleanup: move Image flags into DNA, for consistency with other types

3 months agoCycles/Eevee: unify depth of field settings for cameras
Jeroen Bakker [Fri, 17 May 2019 14:57:31 +0000 (16:57 +0200)]
Cycles/Eevee: unify depth of field settings for cameras

There is now a checkbox to enable/disable depth of field per camera. For Eevee
this replace the scene level setting. For Cycles there is now only an F-Stop
value, no longer a Radius.

Existing files are converted based on Cycles or Eevee being set in the scene.

Differential Revision:

3 months agoUI: Use correct icon for saving in the close dialog.
William Reynish [Fri, 17 May 2019 15:55:14 +0000 (17:55 +0200)]
UI: Use correct icon for saving in the close dialog.

3 months agoUI: File Close Dialog
Jacques Lucke [Fri, 17 May 2019 15:31:26 +0000 (17:31 +0200)]
UI: File Close Dialog

This adds a new dialog that is shown whenever a file is closed.
So, either when a new file is opened, or when Blender quits.
The dialog allows to save unsaved changes. Furthermore it also
allows saving images that have been modified in Blender, but are
not saved yet.

Known limitations:
* Images that have no file path and have not been packed before,
  are not saved.
* On MacOS the old dialog is shown when Blender quits.

Reviewers: brecht, billreynish

Differential Revision:

3 months agoFix Blender menu not collapsing when Show Menus is disabled.
Pablo Vazquez [Fri, 17 May 2019 14:34:11 +0000 (16:34 +0200)]
Fix Blender menu not collapsing when Show Menus is disabled.

3 months agoFix T64595: Mask does not update correctly when changing frames
Sergey Sharybin [Fri, 17 May 2019 13:48:01 +0000 (15:48 +0200)]
Fix T64595: Mask does not update correctly when changing frames

Is caused by change which made all IDs to have parameters.

Solved by using more explicit relations.

3 months agoFix compilation error in release mode
Sergey Sharybin [Fri, 17 May 2019 13:35:57 +0000 (15:35 +0200)]
Fix compilation error in release mode

Caused by recent fix.
For some reason compiled fine in debug mode, but not in release.

3 months agoSet selection column restrict hidden by default
Dalai Felinto [Fri, 17 May 2019 13:15:27 +0000 (10:15 -0300)]
Set selection column restrict hidden by default

This was discussed in the past, the idea is to get the outliner even more compact.
Also to let users to use the viewport selection restriction further.

It would be nice to haven indication that an invisible column is set, but this is
no particular to the selection column.

3 months agoFix T63981: Factory default memory cache limit is 4096 MB (32bit builds)
Sergey Sharybin [Fri, 17 May 2019 13:02:12 +0000 (15:02 +0200)]
Fix T63981: Factory default memory cache limit is 4096 MB (32bit builds)

very straightforward: initialize default to the same hard limit as the
RNA properties.

Annoying part is that it's not trivial to make RNA to use same BLI functions,
so leaving that behind for now.

3 months agoPython: Raise an error even NO_MAIN data is assigned to object
Sergey Sharybin [Fri, 17 May 2019 11:59:59 +0000 (13:59 +0200)]
Python: Raise an error even NO_MAIN data is assigned to object

The goal is to prevent assignment of temporary or evaluated meshes
to objects from the main database.

Majority of the change is actually related on passing reports around.

On a positive side there are more error prints which can become more
visible to scripters.

There are still possible further improvements in the related areas.
For example, disable user counting for evaluated ID datablocks when
assignment happens. But can also happen later on as a separate

Reviewers: brecht, campbellbarton, mont29

Reviewed By: brecht

Differential Revision:

3 months agoTheme: Use blue for Outliner selection highlight.
Pablo Vazquez [Fri, 17 May 2019 11:53:56 +0000 (13:53 +0200)]
Theme: Use blue for Outliner selection highlight.

3 months agoUI: Use 'Blender' as label for app menu.
Pablo Vazquez [Fri, 17 May 2019 11:53:20 +0000 (13:53 +0200)]
UI: Use 'Blender' as label for app menu.

The Blender icon can be confusing with some window decorations.

3 months agoCleanup: Eevee: Remove custom volumetric matrix
Clément Foucault [Fri, 17 May 2019 11:31:39 +0000 (13:31 +0200)]
Cleanup: Eevee: Remove custom volumetric matrix

This was the same as using the inverse obmat.

3 months agoEevee: Remove the Volumetric Render checkbox
Clément Foucault [Thu, 16 May 2019 19:41:22 +0000 (21:41 +0200)]
Eevee: Remove the Volumetric Render checkbox

This is to simplify the usage of Volumetrics.

Now it automatically detect if there is any Volumetric material in the
view and allocate the needed buffer if any.

3 months agoEevee: Remove the Subsurface Render checkbox
Clément Foucault [Thu, 16 May 2019 14:43:41 +0000 (16:43 +0200)]
Eevee: Remove the Subsurface Render checkbox

This is to simplify the usage of SSS.

Now it automatically detect if there is any SSS material in the view and
allocate the needed buffer if any.

3 months agoDRW: Fix warning on MSVC
Clément Foucault [Thu, 16 May 2019 12:16:47 +0000 (14:16 +0200)]
DRW: Fix warning on MSVC

3 months agoDRW: Make fullscreen vertex shader position and uv without attributes
Clément Foucault [Thu, 16 May 2019 12:16:23 +0000 (14:16 +0200)]
DRW: Make fullscreen vertex shader position and uv without attributes

3 months agoCleanup: Eevee: Use SET_FLAG_FROM_TEST
Clément Foucault [Thu, 16 May 2019 12:12:32 +0000 (14:12 +0200)]
Cleanup: Eevee: Use SET_FLAG_FROM_TEST

3 months agoUI: Sequencer sidebar tweaks for the viewer
William Reynish [Fri, 17 May 2019 11:38:34 +0000 (13:38 +0200)]
UI: Sequencer sidebar tweaks for the viewer

  - Move the Channels setting to the View panel
  - Remove double separators in the View panel
  - Close the Scene panel by default - it only applies in rare cases
  - Move the Frame Overlay from the header to a sidebar panel
    Previously it used a strange ghost icon, and it make the other controls jump around
    Now uses clearer naming

3 months agoUI: Put Sequencer Proxy & Cache panels back into separate category
William Reynish [Fri, 17 May 2019 11:27:21 +0000 (13:27 +0200)]
UI: Put Sequencer Proxy & Cache panels back into separate category

This works better, because some things are global for the scene and others are per strip