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

3 months agoUpdate for Depsgraph API changes
Philipp Oeser [Fri, 17 May 2019 09:51:38 +0000 (11:51 +0200)]
Update for Depsgraph API changes

Reviewers: sergey

Differential Revision:

3 months agoFix: Add back last Sequencer panel that went missing in 86eefefdc1aa
William Reynish [Fri, 17 May 2019 10:01:45 +0000 (12:01 +0200)]
Fix: Add back last Sequencer panel that went missing in 86eefefdc1aa

3 months agoFix: Sequencer Cache panel was accidentally removed in 86eefefdc1aa
William Reynish [Fri, 17 May 2019 09:31:49 +0000 (11:31 +0200)]
Fix: Sequencer Cache panel was accidentally removed in 86eefefdc1aa

Also fixed one last panel missing a category

3 months agoFix T64733: Error baking action
Philipp Oeser [Fri, 17 May 2019 08:40:44 +0000 (10:40 +0200)]
Fix T64733: Error baking action

scene.update() needs to be replaced with view_layer.update() after

note: will go over other occurances of scene.update() in a different

3 months agoAPI Docs: fix mistake in example code
Brecht Van Lommel [Fri, 17 May 2019 08:43:01 +0000 (10:43 +0200)]
API Docs: fix mistake in example code

3 months agoReport an error when trying to remove non-in-main datablock
Sergey Sharybin [Fri, 17 May 2019 08:35:03 +0000 (10:35 +0200)]
Report an error when trying to remove non-in-main datablock

After recent dependency graph API changes it became easy to violate
ownership design (since its changed) and request removal of out-of-main
temporary mesh. This confuses Blender and can cause crashes/locks.

Fixes T64731: Blender freezes after assigning result of object.to_mesh()

3 months agoAPI Docs: add example use cases for mesh functions, fix wrong description
Brecht Van Lommel [Fri, 17 May 2019 08:30:41 +0000 (10:30 +0200)]
API Docs: add example use cases for mesh functions, fix wrong description

3 months agoDepsgraph: State behavior details more explicitly
Sergey Sharybin [Fri, 17 May 2019 08:23:31 +0000 (10:23 +0200)]
Depsgraph: State behavior details more explicitly

3 months agoFix T64713: Link to Collection Textfield does not become active
Philipp Oeser [Fri, 17 May 2019 08:01:19 +0000 (10:01 +0200)]
Fix T64713: Link to Collection Textfield does not become active

3 months agoMesh Select: use select context instead of static structs
mano-wii [Fri, 17 May 2019 04:59:30 +0000 (14:59 +1000)]
Mesh Select: use select context instead of static structs

This patch does not bring any functional change, but it does expose
some utilities that can be very useful to correct occlusion and
performance problems of Circle Select and similar.
Creating a selection context still makes it easier to track issues.

3 months agoFix face mask edge select drawing
Campbell Barton [Fri, 17 May 2019 04:11:22 +0000 (14:11 +1000)]
Fix face mask edge select drawing

All edges were drawing black.

3 months ago3D View: Support texture paint mask clipping
Campbell Barton [Fri, 17 May 2019 04:02:52 +0000 (14:02 +1000)]
3D View: Support texture paint mask clipping

3 months agoUI: add tool panel for node editor, use tabs
Campbell Barton [Fri, 17 May 2019 00:58:43 +0000 (10:58 +1000)]
UI: add tool panel for node editor, use tabs

This follows the 3D view, adding an "Options" tab.

3 months agomakesdna: Fix build error on win32.
Ray Molenkamp [Fri, 17 May 2019 00:03:20 +0000 (18:03 -0600)]
makesdna: Fix build error on win32.

Win32 has some special struct alignment rules that makesdna
is not warning about. See

for details.

3 months agoTests: add more descriptive messages when idiff is not available
Brecht Van Lommel [Thu, 16 May 2019 18:21:35 +0000 (20:21 +0200)]
Tests: add more descriptive messages when idiff is not available

Based on patch contributed by Diana Picus in D4355.

3 months agoPreference: don't autosave preferences when running with --factory-startup
Brecht Van Lommel [Thu, 16 May 2019 18:13:35 +0000 (20:13 +0200)]
Preference: don't autosave preferences when running with --factory-startup

This case is likely intended to be temporary, for manual or automated tests.

3 months agoTheme: Update Blender Light to match viewport and default theme.
Pablo Vazquez [Thu, 16 May 2019 18:01:33 +0000 (20:01 +0200)]
Theme: Update Blender Light to match viewport and default theme.

3 months agoImages: more tweaks to save all modified images
Brecht Van Lommel [Thu, 16 May 2019 17:43:41 +0000 (19:43 +0200)]
Images: more tweaks to save all modified images

Support showing warning messages before saving for cases that we can detect
in advance, to be used by quit dialog.

3 months agoTheme: Match new Outliner color settings with viewport.
Pablo Vazquez [Thu, 16 May 2019 17:53:49 +0000 (19:53 +0200)]
Theme: Match new Outliner color settings with viewport.

3 months agoTheme: stick bones too bright and vertex select too dark.
Pablo Vazquez [Thu, 16 May 2019 17:53:20 +0000 (19:53 +0200)]
Theme: stick bones too bright and vertex select too dark.

3 months agoFix T64725: light power property dragging uses too small increments
Brecht Van Lommel [Thu, 16 May 2019 17:17:32 +0000 (19:17 +0200)]
Fix T64725: light power property dragging uses too small increments

3 months agoBLI_memarena: unpoison memory before freeing it
Jacques Lucke [Thu, 16 May 2019 16:19:04 +0000 (18:19 +0200)]
BLI_memarena: unpoison memory before freeing it

3 months agoUse edit evaluated mesh when creating mesh for object in edit mode
Sergey Sharybin [Thu, 16 May 2019 15:59:45 +0000 (17:59 +0200)]
Use edit evaluated mesh when creating mesh for object in edit mode

Makes the result of object.to_mesh() and bpy.meshes.new_from_object()
to be the same as what is visible in the viewport.

This makes Cycles to respect modifiers enabled in edit mode, and should
also easy some scripter's work. The final render still needs some work,
which, maybe, will be about forcing objects out of editing modes.

3 months agoCycles/Eeeve: unify film transparent setting
Jeroen Bakker [Thu, 16 May 2019 15:03:16 +0000 (17:03 +0200)]
Cycles/Eeeve: unify film transparent setting

For existing files, it will use the setting from Cycles or Eevee depending on
the render engine in the scene.

Differential Revision:

3 months agoCycles: Fix missing viewport updates after recent changes
Sergey Sharybin [Thu, 16 May 2019 15:19:05 +0000 (17:19 +0200)]
Cycles: Fix missing viewport updates after recent changes

We can not access ensured-to-be-evaluated dependency graph from the
render API: some of it is running from within evaluation which makes
it possible for engines to access list of evaluated IDs.

Solved by passing dependency graph to viewport functions, similar to
the final render functions.

3 months agoImages: move save modified images operator from Python to C
Brecht Van Lommel [Thu, 16 May 2019 14:01:11 +0000 (16:01 +0200)]
Images: move save modified images operator from Python to C

We will use this for saving images along with the .blend file.

Ref D4861

3 months agoUI: Move Recover operators into own menu under File.
Pablo Vazquez [Thu, 16 May 2019 14:55:56 +0000 (16:55 +0200)]
UI: Move Recover operators into own menu under File.

3 months agoUI: Blender and Help menu tweaks and organization.
Pablo Vazquez [Thu, 16 May 2019 14:54:48 +0000 (16:54 +0200)]
UI: Blender and Help menu tweaks and organization.

Blender menu:
- Move Preferences to the top as it is used often.
- Introduce two new sub-menus
  - About - links from Help menu, plus link to license section in
  - Support Blender - dev fund, store, they used to be in Help menu.

Help menu:
- Add links to Tutorials and Support section in
- Add link to Developer Documentation (wiki)
- Always show Python API Reference link

3 months agoTweak API to support adding evaluated meshes to main database
Sergey Sharybin [Thu, 16 May 2019 11:49:21 +0000 (13:49 +0200)]
Tweak API to support adding evaluated meshes to main database

One of the usecases is to create mesh from an object is a manner similar to
how Apply Modifiers does it, and have it in the bmain so it can be referenced
by other objects.

This usecase is something what went unnoticed in the previous API changes, so
here is a followup.

Summary of changes:

* bpy.meshes.new_from_object() behaves almost the same as before this change.
  The difference now is that it now ensures all referenced data-blocks are
original (for example, materials referenced by the mesh).

* object.to_mesh() now creates free-standing Mesh data-block which is outside
  of any bmain. The object owns it, which guarantees the memory never leaks.

  It is possible to force free memory by calling object.to_mesh_clear().

Reviewers: brecht

Reviewed By: brecht

Differential Revision:

3 months agoCleanup: pep8 & remove odd empty string addition
Campbell Barton [Thu, 16 May 2019 14:28:22 +0000 (00:28 +1000)]
Cleanup: pep8 & remove odd empty string addition

3 months agoEEVEE: Viewport Rendering TAA
Jeroen Bakker [Thu, 16 May 2019 09:40:07 +0000 (11:40 +0200)]
EEVEE: Viewport Rendering TAA

EEVEE assumed that the OGL renderer did FSAA, as the FSAA was removed we
needed to revalidate this assumption. The temporal sampling only inited
the matrices during init phase. As now we need to update the matrices
for every sample rendered the code for updating the matrices was
isolated in a new function `EEVEE_temporal_sampling_update_matrices`.

Reviewed By: fclem

Maniphest Tasks: T64646

Differential Revision:

3 months agoRevert "Tests: speed up render tests by running multiple in the same process"
Brecht Van Lommel [Thu, 16 May 2019 13:48:30 +0000 (15:48 +0200)]
Revert "Tests: speed up render tests by running multiple in the same process"

This makes finding the crashing tests harder, reverting until there is a
better solution.

This reverts commit 93901e7f0a05ba471f3b4c0201500d9dfcd68c2c.