blender.git
5 weeks 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.

5 weeks 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.

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

5 weeks 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

5 weeks 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: https://developer.blender.org/D4882

5 weeks 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.

5 weeks 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: https://developer.blender.org/D4860

5 weeks 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.

5 weeks 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.

5 weeks 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.

5 weeks 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.

5 weeks 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.

5 weeks 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
improvement.

Reviewers: brecht, campbellbarton, mont29

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4884

5 weeks 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.

5 weeks 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.

5 weeks 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.

5 weeks 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.

5 weeks 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.

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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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: https://developer.blender.org/D4881

5 weeks 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

5 weeks 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

5 weeks 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
rBe693918d4074

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

5 weeks 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

5 weeks 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()

5 weeks 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

5 weeks 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

5 weeks 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
automatically

5 weeks 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.

5 weeks 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.

5 weeks 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

5 weeks 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.

5 weeks 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

https://developer.blender.org/T63164#652815

for details.

5 weeks 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.

5 weeks 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.

5 weeks 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.

5 weeks 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.

5 weeks 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.

5 weeks 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.

5 weeks 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

5 weeks 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

5 weeks 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.

5 weeks 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: https://developer.blender.org/D4874

5 weeks 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.

5 weeks 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

5 weeks 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.

5 weeks 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 blender.org
  - Support Blender - dev fund, store, they used to be in Help menu.

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

5 weeks 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: https://developer.blender.org/D4875

5 weeks 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

5 weeks 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: https://developer.blender.org/D4871

5 weeks 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.

5 weeks agoFix T64576: Duplicate option in the header
Campbell Barton [Thu, 16 May 2019 13:17:16 +0000 (23:17 +1000)]
Fix T64576: Duplicate option in the header

D4856 by @Gvgeo

5 weeks agoFix: Some Sequencer panels were missing a category, causing warnings
William Reynish [Thu, 16 May 2019 13:02:15 +0000 (15:02 +0200)]
Fix: Some Sequencer panels were missing a category, causing warnings

5 weeks agoFix T64652: tool settings is gone from top-bar
Campbell Barton [Thu, 16 May 2019 12:13:28 +0000 (22:13 +1000)]
Fix T64652: tool settings is gone from top-bar

5 weeks agoFix unintended fall-through in switch statement
Sergey Sharybin [Thu, 16 May 2019 12:56:17 +0000 (14:56 +0200)]
Fix unintended fall-through in switch statement

5 weeks agoDepsgraph: Make depsgraph.update() safe for threading
Sergey Sharybin [Thu, 16 May 2019 12:53:01 +0000 (14:53 +0200)]
Depsgraph: Make depsgraph.update() safe for threading

This is same as view_layer.update() is doing.

5 weeks agoUI: tweak display of active, selected and edited items in the outliner
Harley Acheson [Wed, 15 May 2019 11:51:34 +0000 (13:51 +0200)]
UI: tweak display of active, selected and edited items in the outliner

* Change circle to roundbox around active icons, so they don't overflow.
* Change text color to indicate selected and active state.

Differential Revision: https://developer.blender.org/D4650

5 weeks agoUI: Tweak naming in Sequencer View menu to match 3D View
William Reynish [Thu, 16 May 2019 12:38:44 +0000 (14:38 +0200)]
UI: Tweak naming in Sequencer View menu to match 3D View

5 weeks agoCleanup: rename IDP_FreeProperty_ex to IDP_FreePropertyContent_ex
Jacques Lucke [Thu, 16 May 2019 12:17:11 +0000 (14:17 +0200)]
Cleanup: rename IDP_FreeProperty_ex to IDP_FreePropertyContent_ex

This was missing from rBdb5120603f.

5 weeks agoUI: Match Sequencer Safe Areas with similar Camera Properties panel
William Reynish [Thu, 16 May 2019 12:14:13 +0000 (14:14 +0200)]
UI: Match Sequencer Safe Areas with similar Camera Properties panel

5 weeks agoRefactor: Simplify ID Property freeing
Jacques Lucke [Thu, 16 May 2019 12:11:11 +0000 (14:11 +0200)]
Refactor: Simplify ID Property freeing

This also makes `IDP_CopyProperty` the "opposite"
of `IDP_FreeProperty`, which is what I'd expect.

Two refactoring steps:
* rename IDP_FreeProperty to IDP_FreePropertyContent
* new IDP_FreeProperty function that actually frees the property

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4872

5 weeks agoGPencil: New filter in Onion by keyframe type
Antonioya [Thu, 16 May 2019 12:00:31 +0000 (14:00 +0200)]
GPencil: New filter in Onion by keyframe type

This new filter allows to select only some type of keyframe (keyframe, breakdown, etc).

This was a request of artists that are used to work with other 2D softwares.

Also some cleanup to remove aninmatable option to some properties.

5 weeks agoUI: Video Sequencer sidebar overhaul
William Reynish [Thu, 16 May 2019 11:58:04 +0000 (13:58 +0200)]
UI: Video Sequencer sidebar overhaul

  - Use single column layout
  - Move the rather obscure Backdrop toggle into the View menu
  - Use correct units for Crop and Offset (pixels)
  - Re-organize the sidebar in 2 main groups: Adjust & Info

Adjust includes Compositing, Offset, Crop, Video, Color, Sound
Info includes strip name, path, start/end and other data

Original changes by tintwotin, with changes and adjustments on top by me

5 weeks agoFix edit-mesh select crash when using face-dots
Campbell Barton [Thu, 16 May 2019 11:41:37 +0000 (21:41 +1000)]
Fix edit-mesh select crash when using face-dots

The GPUVertBuf was freed but not the GPUBatch.

Old bug exposed by new code from 8a6414ed46f66.

5 weeks agoEEVEE: Intel Shader Compiler Bug
Jeroen Bakker [Thu, 16 May 2019 11:35:02 +0000 (13:35 +0200)]
EEVEE: Intel Shader Compiler Bug

When using Intel GPU EEVEE did not display anything. This was due to an
internal shader compilation bug inside the intel drivers. We had fixed
this for other vertex shaders. The same change we have to apply to other
vert shaders that want to limit the need of Matrix multiplications.

5 weeks agoFix edit-mesh face-dot drawing check
Campbell Barton [Thu, 16 May 2019 11:14:15 +0000 (21:14 +1000)]
Fix edit-mesh face-dot drawing check

Since 8a6414ed46f66 the old logic no longer applies.

5 weeks agoCleanup: unused vars
Campbell Barton [Thu, 16 May 2019 11:16:56 +0000 (21:16 +1000)]
Cleanup: unused vars

5 weeks agoFix T64678: wrong DDS normal map rendering after recent changes
Brecht Van Lommel [Thu, 16 May 2019 10:35:57 +0000 (12:35 +0200)]
Fix T64678: wrong DDS normal map rendering after recent changes

5 weeks agoFix T64687: Loop select work only with edges
Campbell Barton [Thu, 16 May 2019 10:26:30 +0000 (20:26 +1000)]
Fix T64687: Loop select work only with edges

Regression in recent commit 8a6414ed46f66

5 weeks agoCycles: Don't advertise BVH8 being supported on 32bit platforms
Sergey Sharybin [Thu, 16 May 2019 09:51:25 +0000 (11:51 +0200)]
Cycles: Don't advertise BVH8 being supported on 32bit platforms

The kernel does not use AVX2 vectorization, and trying to use BVH8 was
leading to an empty scenes.

Fixes T64624: Ctest : Win32 + AVX2 fails virtually all cycles tests

5 weeks agoDependency graph API changes
Sergey Sharybin [Thu, 9 May 2019 09:26:49 +0000 (11:26 +0200)]
Dependency graph API changes

Main goal here is to make it obvious and predictable about
what is going on.

Summary of changes.

- Access to dependency graph is now only possible to a fully evaluated
  graph. This is now done via context.evaluated_depsgraph_get().

  The call will ensure both relations and datablocks are updated.

  This way we don't allow access to some known bad state of the graph,
  and also making explicit that getting update dependency graph is not
  cheap.

- Access to evaluated ID is now possible via id.evaluated_get().

  It was already possible to get evaluated ID via dependency graph,
  but that was a bit confusing why access to original is done via ID
  and to evaluated via depsgraph.

  If datablock is not covered by dependency graph it will be returned
  as-is.

- Similarly, request for original from an ID which is not evaluated
  will return ID as-is.

- Removed scene.update().

  This is very expensive to update all the view layers.

- Added depsgraph.update().

  Now when temporary changes to objects are to be done, this is to
  happen on original object and then dependency graph is to be
  updated.

- Changed object.to_mesh() to behave the following way:

   * When is used for original object modifiers are ignored.

     For meshes this acts similar to mesh-copy, not very useful but
     allows to keep code paths similar (i.e. for exporter which has
     Apply Modifiers option it's only matter choosing between original
     and evaluated object, the to_mesh() part can stay the same).

     For curves this gives a mesh which is constructed from displist
     without taking own modifiers and modifiers of bevel/taper objects
     into account.

     For metaballs this gives empty mesh.
     Polygonization of metaball is not possible from a single object.

   * When is used for evaluated object modifiers are always applied.

     In fact, no evaluation is happening, the mesh is either copied
     as-is, or constructed from current state of curve cache.

  Arguments to apply modifiers and calculate original coordinates (ORCO,
  aka undeformed coordinates) are removed. The ORCO is to be calculated
  as part of dependency graph evaluation.

File used to regression-test (a packed Python script into .blend):

{F7033464}

Patch to make addons tests to pass:

{F7033466}

NOTE: I've included changes to FBX exporter, and those are addressing
report T63689.

NOTE: All the enabled-by-default addons are to be ported still, but
first want to have agreement on this part of changes.

NOTE: Also need to work on documentation for Python API, but, again,
better be done after having agreement on this work.

Reviewers: brecht, campbellbarton, mont29

Differential Revision: https://developer.blender.org/D4834

5 weeks agoDepsgraph: Add queries whether ID is original/evaluated
Sergey Sharybin [Thu, 9 May 2019 13:50:46 +0000 (15:50 +0200)]
Depsgraph: Add queries whether ID is original/evaluated

5 weeks agoUI: use HIDE_HEADER for active tool in properties editor
Campbell Barton [Thu, 16 May 2019 09:43:11 +0000 (19:43 +1000)]
UI: use HIDE_HEADER for active tool in properties editor

Unfortunately this isn't yet compatible with category tabs,
define a duplicate panel only for the properties editor.

5 weeks agoFix T64660: no access to node connectors when a node is inside a layout frame.
Bastien Montagne [Wed, 15 May 2019 20:51:12 +0000 (22:51 +0200)]
Fix T64660: no access to node connectors when a node is inside a layout frame.

Note that the same issue actually showed without a frame node, when
trying to click-drag on a socket on its 'inside node' part, you would get
same behavior.

Only solution I can see here is to prevent Node selection to go on when
user clicks on one of its sockets, there is no way afaik to make
drag-from-socket to start if we keep select-node operator running
modal, since both operators (NODE_OT_select and NODE_OT_link) use the
same shortcut, if select (which is checked first, being a Tool) returns
modal, then event is considered handled it seems, even though
Passthrough is also returned...

5 weeks agoRNA: new FCurve.is_empty property that exposes the new empty curve check.
Alexander Gavrilov [Thu, 16 May 2019 08:20:25 +0000 (11:20 +0300)]
RNA: new FCurve.is_empty property that exposes the new empty curve check.

5 weeks agoGHOST: add header to display manager
Campbell Barton [Thu, 16 May 2019 08:27:30 +0000 (18:27 +1000)]
GHOST: add header to display manager

Was relying on the header recently removed from GHOST_Rect.h,
for some reason only some systems give issues here.

5 weeks agoMinor change to last commit
Campbell Barton [Thu, 16 May 2019 08:20:45 +0000 (18:20 +1000)]
Minor change to last commit

Don't show a background for the toolbar.

5 weeks agoUI: Draw background for headerless panels with region-overlap
Campbell Barton [Thu, 16 May 2019 08:06:55 +0000 (18:06 +1000)]
UI: Draw background for headerless panels with region-overlap

These were drawing without a backdrop.

5 weeks agoFix T64681: evaluate curves with generative modifiers and no keys.
Alexander Gavrilov [Thu, 16 May 2019 06:47:57 +0000 (09:47 +0300)]
Fix T64681: evaluate curves with generative modifiers and no keys.

Introduce a new function and use it everywhere, including
automatic curve deletion checks to guarantee consistency.

5 weeks agoCleanup: redundant headers mixed in with code
Campbell Barton [Thu, 16 May 2019 04:54:23 +0000 (14:54 +1000)]
Cleanup: redundant headers mixed in with code

5 weeks agoFix T64642: Reset to default preferences glitch
Campbell Barton [Thu, 16 May 2019 04:42:09 +0000 (14:42 +1000)]
Fix T64642: Reset to default preferences glitch

5 weeks agoCleanup: use doxy sections for object_add.c
Campbell Barton [Thu, 16 May 2019 04:03:31 +0000 (14:03 +1000)]
Cleanup: use doxy sections for object_add.c

5 weeks agoCleanup: remove unused identifiers
Campbell Barton [Thu, 16 May 2019 03:54:32 +0000 (13:54 +1000)]
Cleanup: remove unused identifiers

5 weeks agoFix using non-euler cursor orientation
Campbell Barton [Thu, 16 May 2019 03:48:23 +0000 (13:48 +1000)]
Fix using non-euler cursor orientation

Missed in 06fe2a5e0c5d6

5 weeks agoRNA: add 3D cursor matrix attribute
Campbell Barton [Thu, 16 May 2019 03:38:33 +0000 (13:38 +1000)]
RNA: add 3D cursor matrix attribute

Avoids having to check rotation modes to get the orientation.

5 weeks agoFix T64651, T64658: image texture not set to non-color properly
Brecht Van Lommel [Thu, 16 May 2019 03:17:22 +0000 (05:17 +0200)]
Fix T64651, T64658: image texture not set to non-color properly

The version check was wrong, only working for older files.

5 weeks agoFix unreported: Presselection cycle not working in multiple meshes editing.
mano-wii [Thu, 16 May 2019 02:05:08 +0000 (23:05 -0300)]
Fix unreported: Presselection cycle not working in multiple meshes editing.

5 weeks agoTheme: add color difference for every other row
Campbell Barton [Thu, 16 May 2019 01:54:50 +0000 (11:54 +1000)]
Theme: add color difference for every other row

D4862 by @CandleComet with minor edits.

5 weeks agoCleanup: remove 2.4x panel tabs
Campbell Barton [Thu, 16 May 2019 01:12:41 +0000 (11:12 +1000)]
Cleanup: remove 2.4x panel tabs

This makes the code confusing since we now have two other kinds of tabs
(navigation bar and panel categories).

5 weeks agoCleanup: panel layout logic
Campbell Barton [Thu, 16 May 2019 00:48:17 +0000 (10:48 +1000)]
Cleanup: panel layout logic

Workspace was being assigned in a loop, make some vars const.

5 weeks agoCleanup: sort DNA renaming defines
Campbell Barton [Wed, 15 May 2019 23:47:00 +0000 (09:47 +1000)]
Cleanup: sort DNA renaming defines

5 weeks agoClangFormat: remove FAKE_SELECT_MODE_BEGIN from ForEachMacros
Campbell Barton [Wed, 15 May 2019 23:40:15 +0000 (09:40 +1000)]
ClangFormat: remove FAKE_SELECT_MODE_BEGIN from ForEachMacros

This isn't used for looping.

5 weeks agoFix T54686: objects don't occlude each other for edit-mesh select
mano-wii [Wed, 15 May 2019 23:26:33 +0000 (09:26 +1000)]
Fix T54686: objects don't occlude each other for edit-mesh select

5 weeks agoTheme: Match edit mode in viewport and uv/image editor.
Pablo Vazquez [Wed, 15 May 2019 21:16:16 +0000 (23:16 +0200)]
Theme: Match edit mode in viewport and uv/image editor.

Also make the grid brighter as it can conflict with mesh wires in wireframe mode.

5 weeks agoTheme: Blender Light update
Pablo Vazquez [Wed, 15 May 2019 21:08:22 +0000 (23:08 +0200)]
Theme: Blender Light update

* Align category icons and color use with Default theme.
* Set colors for new properties and regions.
* Fix several issues.

Needs further testing to tackle all editors but this puts it at much more
usable level compared to how it was.

5 weeks agoAnimation: treat F-Curves with no keys as if muted/not existing.
Alexander Gavrilov [Wed, 15 May 2019 19:26:58 +0000 (22:26 +0300)]
Animation: treat F-Curves with no keys as if muted/not existing.

When normally editing curves, deleting the last keyframe also
deletes the curve. Thus if for some reason it didn't happen,
e.g. maybe due to removing keys directly via Python, skip the
bad curve instead of resetting the channel to zero.