2 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:

2 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

2 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:

2 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.

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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.

2 months 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:

2 months 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

2 months 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.

2 months 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

2 months 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:

2 months 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.

2 months 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

2 months 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.

2 months 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.

2 months 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.

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

2 months 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

2 months 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

2 months 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

2 months 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

- 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

- 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

- 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):


Patch to make addons tests to pass:


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:

2 months 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

2 months 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.

2 months 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...

2 months 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.

2 months 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.

2 months 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.

2 months 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.

2 months 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.

2 months 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

2 months 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

2 months 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

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

2 months 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

2 months 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.

2 months 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.

2 months 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.

2 months 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.

2 months 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).

2 months 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.

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

2 months 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.

2 months 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

2 months 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.

2 months 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.

2 months 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.

2 months agoArmature Constraint: don't calculate the unneeded ct->matrix for solve.
Alexander Gavrilov [Wed, 15 May 2019 18:49:27 +0000 (21:49 +0300)]
Armature Constraint: don't calculate the unneeded ct->matrix for solve.

This constraint requires full bone data to evaluate, so it can't
use the generic single target matrix system. Calculating it is
thus useless waste of CPU time.

2 months agoPy NodeShader wrapper helper: add support for new Alpha setting of Principled BSDF.
Bastien Montagne [Wed, 15 May 2019 18:58:18 +0000 (20:58 +0200)]
Py NodeShader wrapper helper: add support for new Alpha setting of Principled BSDF.

Now that we have real alpha in BSDF, it's much better option for
transparency, than previously used Transmission value.

Related to T64609.

2 months agoFix T64649: Deprecated Annotation editing causes a crash
Antonioya [Wed, 15 May 2019 18:26:26 +0000 (20:26 +0200)]
Fix T64649: Deprecated Annotation editing causes a crash

The Edit option was removed from annotations and the buttons must not be in the panel.

2 months agoGPencil: Invert Fade Object slider
Antonioya [Wed, 15 May 2019 17:30:27 +0000 (19:30 +0200)]
GPencil: Invert Fade Object slider

The Fade Objects and Fade Layers parameters had opposite meaning and this was not correct.

Now, both parameters work in the same direction.

2 months agoTheme: don't use red as hue for shading icons.
Pablo Vazquez [Wed, 15 May 2019 17:12:20 +0000 (19:12 +0200)]
Theme: don't use red as hue for shading icons.

It can be confused with an error or something wrong in the UI.

2 months agoTheme: Darker grid.
Pablo Vazquez [Wed, 15 May 2019 17:11:37 +0000 (19:11 +0200)]
Theme: Darker grid.

2 months agoTheme: match outliner/properties colors with modes in viewport.
Pablo Vazquez [Wed, 15 May 2019 17:11:14 +0000 (19:11 +0200)]
Theme: match outliner/properties colors with modes in viewport.

Helps to:
* Make a connection between what we see in Outliner, Viewport and Properties editor
  (clicking on the obdata icon takes us to Edit mode, which shares colors).
* Quickly tell which mode we are in.
* Armatures have now distinct color when in Object, Edit, and Pose modes.

Missing is Pose mode which is currently cyan in the viewport and obdata category in properties,
it would probably need its own special category though as it doesn't match the others.

2 months agoObjects: new 3D cursor alignment option when adding objects
Hans Goudey [Wed, 15 May 2019 14:56:22 +0000 (16:56 +0200)]
Objects: new 3D cursor alignment option when adding objects

The choices are now World, View and 3D Cursor.

This breaks Python API compatibility, add-ons that add objects with this
parameter will need to be updated.

Differential Revision:

2 months agoFix T64634: Incorrect type casting in versioning code
Jacques Lucke [Wed, 15 May 2019 15:39:07 +0000 (17:39 +0200)]
Fix T64634: Incorrect type casting in versioning code

2 months agospace_file: fix build error with msvc.
Ray Molenkamp [Wed, 15 May 2019 15:13:07 +0000 (09:13 -0600)]
space_file: fix build error with msvc.

Both windows.h and wm_types.h define HKEY, moving wm_types after windows.h
sidesteps the issue, since HKEY isn't used in fsmenu.c it doesn't cause

2 months agoFix missing separator before Save System Info with Developer Extras on
Brecht Van Lommel [Wed, 15 May 2019 14:40:45 +0000 (16:40 +0200)]
Fix missing separator before Save System Info with Developer Extras on

2 months agoFix T63748: Long startups after network drives are disconnected.
Bastien Montagne [Wed, 15 May 2019 14:20:14 +0000 (16:20 +0200)]
Fix T63748: Long startups after network drives are disconnected.

We need to make those paths validation async, since some infamous OS is
unable to provide a quick way to check whether a path is valid or not...

Not much to say here, this is basic wmJob stuff really... We don’t even
need complex threaded coordination locks or atomics, given how simple
the changes are here.

Fake-tested with some `sleep()` calls to add atificial delay, seems to
work as expected.

2 months agoUI: make sidebars in 3D view and other editors a little wider and consistent
Brecht Van Lommel [Wed, 15 May 2019 14:17:23 +0000 (16:17 +0200)]
UI: make sidebars in 3D view and other editors a little wider and consistent

2 months agoLights: reduce default strength of sun light to 1.0
Brecht Van Lommel [Wed, 15 May 2019 14:07:34 +0000 (16:07 +0200)]
Lights: reduce default strength of sun light to 1.0

2 months agoLights: change sun light size to be specified as angle
Tim Stullich [Wed, 15 May 2019 12:45:33 +0000 (14:45 +0200)]
Lights: change sun light size to be specified as angle

This is the angular diameter as seen from earth, which is between 0.526° and
0.545° in reality. Sharing the size with other light types did not make much
sense and meant the unit was unclear.

Differential Revision:

2 months agoFix T64650: missing topbar update when changing brush in sculpt mode
Brecht Van Lommel [Wed, 15 May 2019 13:20:57 +0000 (15:20 +0200)]
Fix T64650: missing topbar update when changing brush in sculpt mode

2 months agoUI: remove splash from help menu
Campbell Barton [Wed, 15 May 2019 11:51:44 +0000 (21:51 +1000)]
UI: remove splash from help menu

Already accessible in the app-menu.

2 months agoRemove ability to delete data from the File Browser
William Reynish [Wed, 15 May 2019 11:46:24 +0000 (13:46 +0200)]
Remove ability to delete data from the File Browser

This removes the ability to hit X or Del to delete data from inside the File Browser.

This was extremely dangerous because it didn't use the system trash/recycle bin. This made it a very dangerous operation with no way to get data back.

Later on, we should add support for the OS trash through native API's, but until then we will remove this feature from the keymaps.

This addresses T61412 and T64104

2 months agoFix icon for outliner temporarily hide
Dalai Felinto [Wed, 15 May 2019 11:17:09 +0000 (08:17 -0300)]
Fix icon for outliner temporarily hide

2 months agoFix default open outliner restrict columns
Dalai Felinto [Wed, 15 May 2019 11:14:00 +0000 (08:14 -0300)]
Fix default open outliner restrict columns

Regression introduced on 777a546c0c7.

2 months agoUI: add 'App' menu besides the 'File' menu
Campbell Barton [Wed, 15 May 2019 11:05:51 +0000 (21:05 +1000)]
UI: add 'App' menu besides the 'File' menu

This uses the Blender icon that previously activated the splash.

Menu items which apply to the application are located here:
startup file, app templates & preferences.

2 months agoEevee: Add per material option to cull backfaces
Clément Foucault [Wed, 15 May 2019 10:03:26 +0000 (12:03 +0200)]
Eevee: Add per material option to cull backfaces

This is in order to have more flexibility and to have an explicit option
for final renders.

2 months agoPreferences: Default ViewportAA
Jeroen Bakker [Wed, 15 May 2019 09:51:20 +0000 (11:51 +0200)]
Preferences: Default ViewportAA

Due to recent changes the default aa samples in the viewport was set to
16, but should have been 8. This is due to how the old viewport quality
setting was interpreted by the workbench engine. This patch will respect
the same way to version the viewport quality to viewport_aa as the
workbench used to do this.

2 months agoUI: move preferences save options into submenu
William Reynish [Wed, 15 May 2019 08:39:41 +0000 (18:39 +1000)]
UI: move preferences save options into submenu

Avoid clutter in the UI by moving save/revert options into submenu,
only show the save button when auto-save is disabled.

2 months agoFix T57203: Rotation overlaps scale gizmo handles
Campbell Barton [Wed, 15 May 2019 06:33:29 +0000 (16:33 +1000)]
Fix T57203: Rotation overlaps scale gizmo handles

2 months agoGizmo: add depth bias for 3D selection
Campbell Barton [Wed, 15 May 2019 06:29:16 +0000 (16:29 +1000)]
Gizmo: add depth bias for 3D selection

This allows some gizmos priority over others even when they're behind.

2 months agoGPU: Add a matrix unproject function that takes an inverted matrix
Campbell Barton [Wed, 15 May 2019 04:16:35 +0000 (14:16 +1000)]
GPU: Add a matrix unproject function that takes an inverted matrix

This is normally already calculated so add a version that takes the
inverted matrix.

2 months agoCleanup: de-duplicate active tool panel
Campbell Barton [Wed, 15 May 2019 02:20:13 +0000 (12:20 +1000)]
Cleanup: de-duplicate active tool panel

2 months agoFix top-bar showing paint popover panels
Campbell Barton [Wed, 15 May 2019 01:42:47 +0000 (11:42 +1000)]
Fix top-bar showing paint popover panels

Regression from 6b082278d1959 when panels were moved into the 3D view.

2 months agoFix T64604: Changing keymap doesn't tag preferences as dirty
Campbell Barton [Wed, 15 May 2019 00:44:43 +0000 (10:44 +1000)]
Fix T64604: Changing keymap doesn't tag preferences as dirty

2 months agoFix preference dirty tagging for addons & keymaps
Campbell Barton [Tue, 14 May 2019 23:44:56 +0000 (09:44 +1000)]
Fix preference dirty tagging for addons & keymaps

2 months agoFix T64467: Outliner Rename drawing overlapping restriction column + checkbox
Dalai Felinto [Tue, 14 May 2019 23:03:44 +0000 (20:03 -0300)]
Fix T64467: Outliner Rename drawing overlapping restriction column + checkbox

For anyone interesting on polishing pixels, this is still one of the few
places in Blender where when renaming the name "jumps" a tiny bit when
editing. Most of the other places (id rename, UI list rename, ...) have
the text drawing in the exact same place while editing it and drawing.

2 months agoFix T64618: Cycles crash with point density texture on Windows
Brecht Van Lommel [Tue, 14 May 2019 22:42:51 +0000 (00:42 +0200)]
Fix T64618: Cycles crash with point density texture on Windows

A better solution would be to not use the callback mechanism anymore for
cases like this where the dependency graph will free volume data, but
that would be a bigger refactor.

2 months agoUI: adjust preferences save/revert button layout
Campbell Barton [Tue, 14 May 2019 22:55:36 +0000 (08:55 +1000)]
UI: adjust preferences save/revert button layout

Also add description for factory preferences.

2 months agoTool System: avoid redundant refresh
Campbell Barton [Tue, 14 May 2019 22:43:02 +0000 (08:43 +1000)]
Tool System: avoid redundant refresh

Workspaces refreshes tools multiple times when used by multiple windows.

Also improve comments.

2 months agoCleanup: use doxy sections for workspace
Campbell Barton [Tue, 14 May 2019 22:23:33 +0000 (08:23 +1000)]
Cleanup: use doxy sections for workspace

Also move function in wrong category.

2 months agoOutliner Tooltips Cleanup: Retrict/Allow > Restrict ; set/unset > set
Dalai Felinto [Tue, 14 May 2019 22:35:55 +0000 (19:35 -0300)]
Outliner Tooltips Cleanup: Retrict/Allow > Restrict ; set/unset > set

2 months agoT64020: Outliner - implement Shift + Click for objects as well
Dalai Felinto [Tue, 14 May 2019 22:31:15 +0000 (19:31 -0300)]
T64020: Outliner - implement Shift + Click for objects as well

2 months agoFix T64623: Freestyle procedural noise not consistent across platforms
Brecht Van Lommel [Tue, 14 May 2019 21:36:50 +0000 (23:36 +0200)]
Fix T64623: Freestyle procedural noise not consistent across platforms

Use the Blender RNG instead of rand() to solve it.

2 months agoCode style cleanup: `make format`
Dalai Felinto [Tue, 14 May 2019 21:11:54 +0000 (18:11 -0300)]
Code style cleanup: `make format`

2 months agoOutliner Restriction: Naming sanitization and icon
Dalai Felinto [Tue, 14 May 2019 20:45:47 +0000 (17:45 -0300)]
Outliner Restriction: Naming sanitization and icon

No major API change here, only in the outliner restriction column
variables (e.g., show_restrict_column_selectable > show_restrict_column_select).

* Get rid of _INSTANCE (introduced on b1af68200159).
* Differentiate (everywhere but the API) between HIDE (temporary) and VIEWPORT (global).
* Use the expected icon for restrict viewport (same as objects and modifiers).
* selectable > select

2 months agoOutliner restriction filter: Unify order
Dalai Felinto [Tue, 14 May 2019 20:13:26 +0000 (17:13 -0300)]
Outliner restriction filter: Unify order

The popup menu was a different order than the drawing in the outliner.

2 months agoT64607: Outliner UI Tooltips
Dalai Felinto [Tue, 14 May 2019 17:28:28 +0000 (14:28 -0300)]
T64607: Outliner UI Tooltips

In the outliner we don't have yet a clear distinction for the users of when
to use each of the visibility settings.

This changes that by properly naming the property and their tooltips.
I'm also unifying the naming between the rna properties and the outliner
for collections and objects (e.g., so collection and object hide_select
have the same tooltips everywhere).

The API did not change.

2 months agoFix T64611: Bone Size property is not copied when a bone is copied
Philipp Oeser [Tue, 14 May 2019 20:35:07 +0000 (22:35 +0200)]
Fix T64611: Bone Size property is not copied when a bone is copied

2 months agoDepsgraph: dependency on B-Bone start handle end roll when inheriting it.
Alexander Gavrilov [Tue, 14 May 2019 19:24:34 +0000 (22:24 +0300)]
Depsgraph: dependency on B-Bone start handle end roll when inheriting it.

Specifically the dependency is on any drivers that may be affecting
the RNA property of the handle bone, which currently link to segments.

2 months agoArmature: implement universal hash table lookup of Bone objects by name.
Alexander Gavrilov [Tue, 14 May 2019 18:48:22 +0000 (21:48 +0300)]
Armature: implement universal hash table lookup of Bone objects by name.

Since drivers on Bone properties are really supposed to be stored
in Armature data and access bones via its bones[] collection, this
lookup path should work efficiently.

Mass lookup of bones by name was already done through hashes,
but they were built temporarily every time that was needed. This
simply replaces it with a common hash table computed immediately
after file load, copy, or Edit to Object mode switch.

2 months agoEevee: Fix volumetric shaders compilation error
Clément Foucault [Tue, 14 May 2019 17:58:26 +0000 (19:58 +0200)]
Eevee: Fix volumetric shaders compilation error

2 months agoFix T64455 Texture extension mode 'clip' defaults to 'extend'
Clément Foucault [Tue, 14 May 2019 17:34:31 +0000 (19:34 +0200)]
Fix T64455 Texture extension mode 'clip' defaults to 'extend'

2 months agoCleanup: isolate image dirty flag access in functions
Brecht Van Lommel [Tue, 14 May 2019 15:28:13 +0000 (17:28 +0200)]
Cleanup: isolate image dirty flag access in functions

2 months agoFix T64514: wrong grease pencil icon preview renders
Brecht Van Lommel [Tue, 14 May 2019 15:57:10 +0000 (17:57 +0200)]
Fix T64514: wrong grease pencil icon preview renders

This broken when the new Cycles/Eevee preview scene was added, make it work
the same as before for Grease Pencil now.

2 months agoGPencil: Rename property Follow Drawing Path to Alignment
Antonioya [Tue, 14 May 2019 15:28:31 +0000 (17:28 +0200)]
GPencil: Rename property Follow Drawing Path to Alignment

The old name was not clear and with new options the new name is more easy to understand.