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

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: https://developer.blender.org/D4706

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

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: https://developer.blender.org/D4819

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.

2 months agoFix T60984: Can't perform viewport navigation with left mouse button and active manip...
William Reynish [Tue, 14 May 2019 15:24:16 +0000 (17:24 +0200)]
Fix T60984: Can't perform viewport navigation with left mouse button and active manipulator

This was fixed for active tool gizmos but not viewport gizmos.

Note that this applies only to the Industry Compatible keymap, which is where this issue manifested itself.

2 months agoFix T64551 Crash on leaving local view on the shading tab
Clément Foucault [Tue, 14 May 2019 15:15:48 +0000 (17:15 +0200)]
Fix T64551 Crash on leaving local view on the shading tab

Was causing by garbage collection free the surf_per_mat_tris array.
The cache validate did not take care of ensuring the array was alloc again.

2 months agoFix Shader compilation error on MacOS & some other platform/driver
Clément Foucault [Tue, 14 May 2019 14:43:37 +0000 (16:43 +0200)]
Fix Shader compilation error on MacOS & some other platform/driver

texture2D() is no longer supported by modern opengl, use texture() instead.

2 months agoFix T64601 Error division by zero in GPUVertexFormat
Clément Foucault [Tue, 14 May 2019 14:31:04 +0000 (16:31 +0200)]
Fix T64601 Error division by zero in GPUVertexFormat

The windows compiler use signed int by default for enums so that broke
the bit count I carefully did. Forcing uint fixes it.

2 months agoFix T63994: Node Editor: Move All Selected Nodes when dragging.
Bastien Montagne [Tue, 14 May 2019 13:51:49 +0000 (15:51 +0200)]
Fix T63994: Node Editor: Move All Selected Nodes when dragging.

Left-click select broke that behavior, since it puts both action and
select buttons on the same physical mouse button...

To support this behavior again, we have to split selection process in
two steps, hence make it modal... While I remain rather skeptical about
that global design decision, and complexity it adds to many UI/UX areas,
this solution ends up being OK-ish I think.

Thanks to @brecht for some final tweaks on the patch.

2 months agoInterface: Free argument callback for popups
Jacques Lucke [Tue, 14 May 2019 13:38:51 +0000 (15:38 +0200)]
Interface: Free argument callback for popups

Reviewers: brecht

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

2 months agoUI: Improve naming for Collections Enable/Disable
William Reynish [Tue, 14 May 2019 13:12:41 +0000 (15:12 +0200)]
UI: Improve naming for Collections Enable/Disable

  - Fix 'ddisable' typo
  - Use clearer names for the operators in the Collections context menu

Instead of Set Exclude / Clear Exclude, we now use Enable in View Layer / Disable from View Layer

2 months agoFix T64567: Rename Viewport to Viewport Render
Jeroen Bakker [Tue, 14 May 2019 13:07:31 +0000 (15:07 +0200)]
Fix T64567: Rename Viewport to Viewport Render

2 months agoFix Cycles build error after recent changes
Brecht Van Lommel [Tue, 14 May 2019 13:05:24 +0000 (15:05 +0200)]
Fix Cycles build error after recent changes

We need to do aligned alloc of the services instead of globals now since the
concurrent map moved there.

2 months agoGPU: Windows+Intel Selection Fix
Jeroen Bakker [Tue, 14 May 2019 11:55:35 +0000 (13:55 +0200)]
GPU: Windows+Intel Selection Fix

On Windows 10 with a post Februari 2019 Intel driver, the box selection
is not working. It only detects the object centers, but not the drawn
triangles of the basic engine.

Reviewed By: fclem

Maniphest Tasks: T62947

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

2 months agoUI: Confirm dialog when closing an unsaved file
Jacques Lucke [Tue, 14 May 2019 12:13:02 +0000 (14:13 +0200)]
UI: Confirm dialog when closing an unsaved file

The complexity in this patch comes from the fact
that the current operator system does not support
multi-step user interactions well.

More specifically, for this to work, we need to show
a confirm dialog and a file browser afterwards.
We decided that it is easier to keep everything in
a single operator, instead of creating separate
operators that invoke each other.

So, now the `WM_OT_open_mainfile` operator invokes
itself in different states. It implements a simple
finite state machine to manage the states.

The dialog itself is expected to be improved in
a future commit. See D4829 for more details.

Reviewers: brecht

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

2 months agoFix zfighting from edit mode face overlays
Clément Foucault [Tue, 14 May 2019 12:13:00 +0000 (14:13 +0200)]
Fix zfighting from edit mode face overlays

2 months agoFix T64574 : Weird shadow mesh glitches in viewport
Clément Foucault [Tue, 14 May 2019 11:57:41 +0000 (13:57 +0200)]
Fix T64574 : Weird shadow mesh glitches in viewport

This is not the most clean but this is what is needed to make
point_object_to_ndc equivalent to
point_object_to_world + point_world_to_ndc

2 months agoFix T64574 : Weird shadow mesh glitches in viewport
Clément Foucault [Tue, 14 May 2019 11:57:41 +0000 (13:57 +0200)]
Fix T64574 : Weird shadow mesh glitches in viewport

This is not the most clean but this is what is needed to make
point_object_to_ndc equivalent to
point_object_to_world + point_world_to_ndc

2 months agoGPU: Fixup and add assert to GPU_VERT_ATTR_NAMES_BUF_LEN
Clément Foucault [Tue, 14 May 2019 11:45:55 +0000 (13:45 +0200)]
GPU: Fixup and add assert to GPU_VERT_ATTR_NAMES_BUF_LEN

2 months agoEevee: Fix Auto Tangent not working if active UV layer is greater than 3
Clément Foucault [Tue, 14 May 2019 10:33:25 +0000 (12:33 +0200)]
Eevee: Fix Auto Tangent not working if active UV layer is greater than 3