2 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Fri, 22 Mar 2019 17:18:37 +0000 (18:18 +0100)]
Merge branch 'blender2.7'

2 months agoRevert "Cleanup: remove legacy mesh save support"
Brecht Van Lommel [Fri, 22 Mar 2019 17:16:46 +0000 (18:16 +0100)]
Revert "Cleanup: remove legacy mesh save support"

Fixes T62793. Leave this in the blender2.7 branch for those that still rely
on it, but it will remain removed in master.

2 months agoModifiers: add minimum number of vertices to triangulate modifier.
Ish Bosamiya [Fri, 22 Mar 2019 16:55:51 +0000 (17:55 +0100)]
Modifiers: add minimum number of vertices to triangulate modifier.

This lets you only triangulate n-gons when setting the number to 5 or more.

Differential Revision:

2 months agoFix T62844: Cycles crash with bevel and degenerate geometry.
Brecht Van Lommel [Fri, 22 Mar 2019 16:01:33 +0000 (17:01 +0100)]
Fix T62844: Cycles crash with bevel and degenerate geometry.

2 months agoUI: move stereo panel above output.
Brecht Van Lommel [Fri, 22 Mar 2019 15:01:15 +0000 (16:01 +0100)]
UI: move stereo panel above output.

Otherwise clicking the stereo panel moves it.

2 months agoFix T58517: Multi-view issues with OpenGL render + scene settings
Dalai Felinto [Fri, 22 Mar 2019 16:15:05 +0000 (13:15 -0300)]
Fix T58517: Multi-view issues with OpenGL render + scene settings

Patch by Shinsuke Irie.

* * *

Note from reviewer/committer (dfelinto):

OpenGL render from the VSE preview window is working, while the VSE
preview window itself does not show stereo.

That said the patch is ok, and I was able to test that the VSE preview
OpenGL still works. I will tackle VSE preview itself separately myself.

2 months agoSilence warnings
Dalai Felinto [Fri, 22 Mar 2019 16:20:45 +0000 (13:20 -0300)]
Silence warnings

2 months agoFix overlay being ignored in functions that read the depth buffer.
mano-wii [Fri, 22 Mar 2019 16:04:23 +0000 (13:04 -0300)]
Fix overlay being ignored in functions that read the depth buffer.

This corresponds to the behavior of blender 2.79.

2 months agoDRW Manager: create and use new DRW_framebuffer_depth_read utility.
mano-wii [Fri, 22 Mar 2019 15:53:50 +0000 (12:53 -0300)]
DRW Manager: create and use new DRW_framebuffer_depth_read utility.

2 months agoGPU: Create and use new GPU_texture_read_rect utility.
mano-wii [Fri, 22 Mar 2019 15:52:38 +0000 (12:52 -0300)]
GPU: Create and use new GPU_texture_read_rect utility.

2 months agoNodeEditor: Connect Viewer To Socket Selection
Jeroen Bakker [Fri, 22 Mar 2019 16:03:02 +0000 (17:03 +0100)]
NodeEditor: Connect Viewer To Socket Selection

Request from the Spring team. When compositing the CTRL-Shift Click on a
node cycles the viewnode with an output socket. When you have many
render layers you spend time cycling to the desired socket. This patch
allows the user to CTRL-Shift Click on a socket to connect directly to
that socket.

Reviewed By: brecht

Maniphest Tasks: T62785

Differential Revision:

2 months agoUI: Rename editor "Compositing" to "Compositor"
Adrian Newton [Fri, 22 Mar 2019 15:45:30 +0000 (16:45 +0100)]
UI: Rename editor "Compositing" to "Compositor"

Reviewers: brecht, billreynish

Differential Revision:

2 months agoFix T62348: Cycles - Viewport rendering not update on switching viewlayer
Dalai Felinto [Fri, 22 Mar 2019 15:45:42 +0000 (12:45 -0300)]
Fix T62348: Cycles - Viewport rendering not update on switching viewlayer

It updates only the main window you edit and the non-main window
children of this main one.

Reviewers: sergey, brecht

Differential Revision:

2 months agoDRW: minor optimization accessing the loop between a face and edge
Campbell Barton [Fri, 22 Mar 2019 15:44:22 +0000 (02:44 +1100)]
DRW: minor optimization accessing the loop between a face and edge

2 months agoFix T62841: Hidden collection shortcut should be work in edit mode
Dalai Felinto [Fri, 22 Mar 2019 14:58:44 +0000 (11:58 -0300)]
Fix T62841: Hidden collection shortcut should be work in edit mode

This is a full revert of b6c61945aed51d86dc474df616761f9a25d71d09.

But ammended to include the object.hide_collection() operator to the
pose keymap as well.

While trying to expose the shortcuts to pose mode, I ended up exposing
them for all the modes. It is now only available for object and mode

2 months agoFix T61816: Crash No Face Index Array Modifier
Jeroen Bakker [Fri, 22 Mar 2019 14:18:07 +0000 (15:18 +0100)]
Fix T61816: Crash No Face Index Array Modifier

Differential Revision:

2 months agoCamera: change how the minimum near clip depth is set
Campbell Barton [Fri, 22 Mar 2019 14:13:04 +0000 (01:13 +1100)]
Camera: change how the minimum near clip depth is set

do_clip wasn't working for its intended purpose,
replace with a simpler method.

2 months agoRNA: Camera.view_frame no longer uses near clip for the camera frame
Campbell Barton [Fri, 22 Mar 2019 14:12:43 +0000 (01:12 +1100)]
RNA: Camera.view_frame no longer uses near clip for the camera frame

Use the same values used for drawing.

2 months agoStyle: describe code using comments instead of preprocessing directives.
mano-wii [Fri, 22 Mar 2019 13:32:57 +0000 (10:32 -0300)]
Style: describe code using comments instead of preprocessing directives.

2 months agoFix T62839 object scale changes normal map output in eevee
Clément Foucault [Fri, 22 Mar 2019 13:30:37 +0000 (14:30 +0100)]
Fix T62839 object scale changes normal map output in eevee

Was using the wrong vector length.

2 months agoFix/workaround some types of black dots in denoising with bright speculars.
Brecht Van Lommel [Fri, 22 Mar 2019 13:05:18 +0000 (14:05 +0100)]
Fix/workaround some types of black dots in denoising with bright speculars.

This is not a real solution and colored dots still remain, just rejecting some
pixels that seem clearly wrong.

2 months agoEEVEE: Memleak Volumetrics Rendering
Jeroen Bakker [Fri, 22 Mar 2019 13:19:54 +0000 (14:19 +0100)]
EEVEE: Memleak Volumetrics Rendering

Volumetric textures were not freed when doing final rendering.

Maniphest Tasks: T62356

Differential Revision:

2 months agoCleanup: minor UI code changes
Campbell Barton [Fri, 22 Mar 2019 13:18:16 +0000 (00:18 +1100)]
Cleanup: minor UI code changes

- Rename ui_but_find_active_in_region -> ui_region_find_active_but
- Remove ui_but_is_active (use ui_region_find_active_but instead)
- Re-order ui_but_* functions take the button as their first arg.

2 months agoFix checkboxes being right aligned when property split is disabled
Campbell Barton [Fri, 22 Mar 2019 13:02:07 +0000 (00:02 +1100)]
Fix checkboxes being right aligned when property split is disabled

2 months agoCleanup: typo in variable name
Campbell Barton [Fri, 22 Mar 2019 13:01:00 +0000 (00:01 +1100)]
Cleanup: typo in variable name

2 months agoUI: refactor queries into interface_query.c
Campbell Barton [Fri, 22 Mar 2019 07:51:04 +0000 (18:51 +1100)]
UI: refactor queries into interface_query.c

interface_handlers.c is quite large (over 10k lines),
move general button utility functions into a separate file.

2 months agoFix incorrect hard limits on motion blur shutter time.
Brecht Van Lommel [Fri, 22 Mar 2019 11:09:02 +0000 (12:09 +0100)]
Fix incorrect hard limits on motion blur shutter time.

2 months agoUI: Move Adjust Strength for Spacing next to the stroke Spacing control
William Reynish [Fri, 22 Mar 2019 10:27:56 +0000 (11:27 +0100)]
UI: Move Adjust Strength for Spacing next to the stroke Spacing control

These items are related.

2 months agoFix T62835: Color picker template value slider does not scale correctly with UI scale
William Reynish [Fri, 22 Mar 2019 09:59:12 +0000 (10:59 +0100)]
Fix T62835: Color picker template value slider does not scale correctly with UI scale

Missing multiplication with UI_DPI_FAC.

2 months agoImplement Stencil Mask Drawing for Texture Painting
Jeroen Bakker [Thu, 21 Mar 2019 15:44:01 +0000 (16:44 +0100)]
Implement Stencil Mask Drawing for Texture Painting

Stencil mask drawing was not implemented yet. This commit will implement this for texture painting.
It brings the state back to how it was for B279.

Reviewed By: fclem

Maniphest Tasks: T58727

Differential Revision:

2 months agoCleanup: move widget enum into source file
Campbell Barton [Fri, 22 Mar 2019 06:56:58 +0000 (17:56 +1100)]
Cleanup: move widget enum into source file

2 months agoFix T62814: Camera frame invisible with large near-clip value
Campbell Barton [Fri, 22 Mar 2019 06:27:39 +0000 (17:27 +1100)]
Fix T62814: Camera frame invisible with large near-clip value

2 months agoUI: use checkbox text for property split layout
Campbell Barton [Fri, 22 Mar 2019 04:29:25 +0000 (15:29 +1100)]
UI: use checkbox text for property split layout

Use right aligned checkboxes when 'use_property_split' is enabled
instead of a separate label.

2 months agoUI: support for showing checkboxes after text
Campbell Barton [Fri, 22 Mar 2019 03:28:06 +0000 (14:28 +1100)]
UI: support for showing checkboxes after text

Needed so the new layouts that show right aligned checkboxes can have
clickable text (as left aligned checkboxes do already).

2 months agoUI: refactor color picker flags out of buttons
Campbell Barton [Fri, 22 Mar 2019 03:01:11 +0000 (14:01 +1100)]
UI: refactor color picker flags out of buttons

These are specialized color picker options which don't need to be
stored in the button (frees of flags for buttons too).

2 months agoDRW: show clipping border for solid mode
Campbell Barton [Fri, 22 Mar 2019 02:23:07 +0000 (13:23 +1100)]
DRW: show clipping border for solid mode

Solid + xray is still not supported.

2 months agoCleanup: use 'use' as prefix for booleans
Campbell Barton [Thu, 21 Mar 2019 14:07:24 +0000 (01:07 +1100)]
Cleanup: use 'use' as prefix for booleans

2 months agoFix T57580: Update windows installer package to have the GPL3 as EULA.
Ray Molenkamp [Fri, 22 Mar 2019 03:25:20 +0000 (21:25 -0600)]
Fix T57580: Update windows installer package to have the GPL3 as EULA.

2 months agoEevee: Add small optimisation for Curve Mapping nodes
Clément Foucault [Fri, 22 Mar 2019 02:53:13 +0000 (03:53 +0100)]
Eevee: Add small optimisation for Curve Mapping nodes

This remove the RGB texture lookups if the curve is only used for "Luma"
correction and does not affect individual RGB channels.

2 months agoUI: Fix curve extention filling on curve widgets
Clément Foucault [Fri, 22 Mar 2019 02:48:41 +0000 (03:48 +0100)]
UI: Fix curve extention filling on curve widgets

2 months agoGPU Matrix: Increase precision of GPU_matrix_unproject.
mano-wii [Fri, 22 Mar 2019 01:23:09 +0000 (22:23 -0300)]
GPU Matrix: Increase precision of GPU_matrix_unproject.

2 months agoBLI Math: Add and use new `projmat_dimensions` utility.
mano-wii [Fri, 22 Mar 2019 01:20:13 +0000 (22:20 -0300)]
BLI Math: Add and use new `projmat_dimensions` utility.

2 months agoEevee: Cleanup
Clément Foucault [Thu, 21 Mar 2019 22:53:33 +0000 (23:53 +0100)]
Eevee: Cleanup

Remove unneeded normalization.

2 months agoEevee: Fix tangent vector not normalized before interpolation.
Clément Foucault [Thu, 21 Mar 2019 22:53:24 +0000 (23:53 +0100)]
Eevee: Fix tangent vector not normalized before interpolation.

2 months agoEevee: Normalize Tangents after transform to world space
Clément Foucault [Thu, 21 Mar 2019 22:52:44 +0000 (23:52 +0100)]
Eevee: Normalize Tangents after transform to world space

Fix T62621 without breaking everything else.

2 months agoRevert "Fix T62621 object scale changes tangent node output in Eevee"
Clément Foucault [Thu, 21 Mar 2019 22:30:24 +0000 (23:30 +0100)]
Revert "Fix T62621 object scale changes tangent node output in Eevee"

This reverts commit 86646dab7c455e739e5d648d0857bf30fd81afb9.

2 months agoFix T59890: regression of the precision when projecting the cursor.
mano-wii [Thu, 21 Mar 2019 20:02:41 +0000 (17:02 -0300)]
Fix T59890: regression of the precision when projecting the cursor.

Basically the framebuffer size was different from the glViewport size.
This made the depth read in glReadPixel not corresponding to the center of the pixel.

Another thing that reduced precision compared to blender 2.79 is the `GPU_matrix_unproject` that now computes using `float`s instead of `double`s.
But this may be for another commit.

2 months agoUI: Use better flow layout
William Reynish [Thu, 21 Mar 2019 17:25:01 +0000 (18:25 +0100)]
UI: Use better flow layout

Flow layout needs columns defined to work properly

2 months agoUI: Spelling: fix wrong apostrophe
William Reynish [Thu, 21 Mar 2019 15:36:29 +0000 (16:36 +0100)]
UI: Spelling: fix wrong apostrophe

2 months agoUI: Fix wrong spelling
William Reynish [Thu, 21 Mar 2019 15:31:46 +0000 (16:31 +0100)]
UI: Fix wrong spelling

Effect vs Affect

2 months agoUI: make UI label clearer for Affect Rotation
William Reynish [Thu, 21 Mar 2019 15:30:55 +0000 (16:30 +0100)]
UI: make UI label clearer for Affect Rotation

2 months agoUI: align header to the left
William Reynish [Thu, 21 Mar 2019 15:30:09 +0000 (16:30 +0100)]
UI: align header to the left

Since it's a header, this makes the hierarchy clearer

2 months agoFix flow layout for camera data Viewport Display panel.
Bastien Montagne [Thu, 21 Mar 2019 15:24:02 +0000 (16:24 +0100)]
Fix flow layout for camera data Viewport Display panel.

Flow layout needs sub-layouts to properly identify 'cells' of its grid.

2 months agoUse 'show_' prefix convention for composition guides
William Reynish [Thu, 21 Mar 2019 15:05:32 +0000 (16:05 +0100)]
Use 'show_' prefix convention for composition guides

2 months agoUI: Correct tooltips for composition guides
William Reynish [Thu, 21 Mar 2019 14:09:11 +0000 (15:09 +0100)]
UI: Correct tooltips for composition guides

2 months agoUI: Put camera composition guides in standard sub-panel
William Reynish [Thu, 21 Mar 2019 14:01:07 +0000 (15:01 +0100)]
UI: Put camera composition guides in standard sub-panel

Before we were using a very inconsistent toggle-menu for this. Just use standard UI here instead.

2 months agoUI: replace button open event with activate on init
Campbell Barton [Thu, 21 Mar 2019 13:54:07 +0000 (00:54 +1100)]
UI: replace button open event with activate on init

No user visible change.

2 months agoFix T62768: Softbody cache still not updated correctly
Sergey Sharybin [Thu, 21 Mar 2019 13:38:35 +0000 (14:38 +0100)]
Fix T62768: Softbody cache still not updated correctly

There was missing flush from transform update to the point cache
reset. Caused by the fact that when update happens in the "middle"
of component all the component operations will be tagged for update
(since the intermediate state is not stored), but that will not
flush updates to other operations since that would cause too much
of updates.

This now we tag point cache for reset after evaluation operation
but before final transform and before rigid body world.

2 months agoFix T62810: AA reversed in workbench
Jeroen Bakker [Thu, 21 Mar 2019 13:35:28 +0000 (14:35 +0100)]
Fix T62810: AA reversed in workbench

Due to recent changes the AA was not rendered in the viewport when not
interacting. When interacting it was. This was due to incorrect
detemination to perform TAA.

2 months agoWM: enable activate on init for wmOperatorType.prop
Campbell Barton [Thu, 21 Mar 2019 13:30:17 +0000 (00:30 +1100)]
WM: enable activate on init for wmOperatorType.prop

This enables popups to edit text when displayed,
use for new collection popup.

2 months agoInstall_deps: add clang-format packages.
Bastien Montagne [Thu, 21 Mar 2019 13:10:47 +0000 (14:10 +0100)]
Install_deps: add clang-format packages.

Even though that one is not really useful just to build Blender, we can
as well explicitely include it here, since all 'default' Blender builds
will include full clang/llvm stack anyway (for Cycles and deps)...

2 months agoDocs: update examples for 2.8x
Campbell Barton [Thu, 21 Mar 2019 13:07:06 +0000 (00:07 +1100)]
Docs: update examples for 2.8x

Use fields for properties

2 months agoKeymap: Use F4 for file context menu
Campbell Barton [Thu, 21 Mar 2019 11:58:42 +0000 (22:58 +1100)]
Keymap: Use F4 for file context menu

- Replace Window context menu with File menu.

  This was recently removed however artists in the studio use
  link/append often.

- Add preferences to this menu so `F4, PKey` can still be used as a
  quick way to access preferences.

2 months agoFix T62808: Hair shape cut crash
Jacques Lucke [Thu, 21 Mar 2019 11:38:07 +0000 (12:38 +0100)]
Fix T62808: Hair shape cut crash

Reviewers: sergey

Differential Revision:

2 months agoCleanup: Outliner: remove warning about no undo of ID deletion.
Bastien Montagne [Thu, 21 Mar 2019 10:17:21 +0000 (11:17 +0100)]
Cleanup: Outliner: remove warning about no undo of ID deletion.

ID deletion is undoable nowadays...

2 months agoFix clipboard copying collections when copying objects from 3DView.
Bastien Montagne [Thu, 21 Mar 2019 08:42:49 +0000 (09:42 +0100)]
Fix clipboard copying collections when copying objects from 3DView.

This was inherited from 2.7x behavior with groups, but in 2.8
collections are also used as 2.7x layers, which turns to be a problem
when pasting back clipboard content, since it would instantiate
collections instead of objects, quickly leading to tens of new
collections in the viewlayer...

Instead, we only copy selected objects from the 3DView now. On paste
time, those will be added to the active collection.

Last part of fixes related to T61670.

2 months agoFix T62802: Layer order inverted in Outliner
Antonioya [Thu, 21 Mar 2019 08:29:16 +0000 (09:29 +0100)]
Fix T62802: Layer order inverted in Outliner

2 months agoCleanup: move functions into doxy sections
Campbell Barton [Thu, 21 Mar 2019 03:19:45 +0000 (14:19 +1100)]
Cleanup: move functions into doxy sections

Also use const args for queries.

2 months agoCleanup: use doxy sections for interface_handlers
Campbell Barton [Thu, 21 Mar 2019 02:51:38 +0000 (13:51 +1100)]
Cleanup: use doxy sections for interface_handlers

2 months agoCleanup: move scroll step into own function
Campbell Barton [Thu, 21 Mar 2019 00:58:03 +0000 (11:58 +1100)]
Cleanup: move scroll step into own function

2 months agoUI: popovers scroll now changes offset directly
Campbell Barton [Thu, 21 Mar 2019 00:37:44 +0000 (11:37 +1100)]
UI: popovers scroll now changes offset directly

Mouse wheel on menus changes the selected item item which doesn't work
well for popovers since buttons aren't always stacked vertically.

Resolves T62777

2 months agoCleanup: split menu scrolling function
Campbell Barton [Thu, 21 Mar 2019 00:33:04 +0000 (11:33 +1100)]
Cleanup: split menu scrolling function

The same function scrolled to a location and button (depending on args).

2 months agoFix T62782: Edge slide crashes with mirror enabled
Campbell Barton [Wed, 20 Mar 2019 22:53:57 +0000 (09:53 +1100)]
Fix T62782: Edge slide crashes with mirror enabled

2 months agoViewport: Draw loose edges in edit mesh mode if there is a modifier stack
Clément Foucault [Wed, 20 Mar 2019 21:36:02 +0000 (22:36 +0100)]
Viewport: Draw loose edges in edit mesh mode if there is a modifier stack

2 months agoFix DEG warning from T52873: Proximity WeightVG modifier can use empty as target...
Bastien Montagne [Wed, 20 Mar 2019 20:12:34 +0000 (21:12 +0100)]
Fix DEG warning from T52873: Proximity WeightVG modifier can use empty as target too.

Only create DEG_OB_COMP_GEOMETRY relation to target object when it has
some, and we use it.

2 months agoFix T58748 Mirror modifier: edges/verts invisible unless face is present
Clément Foucault [Wed, 20 Mar 2019 19:07:12 +0000 (20:07 +0100)]
Fix T58748 Mirror modifier: edges/verts invisible unless face is present

It was due to the mapped mesh not being used if no face was present in the
cage mesh.

3 months agoFix T60815: drag & drop crash when search menu is opened immediately after.
Brecht Van Lommel [Wed, 20 Mar 2019 18:26:54 +0000 (19:26 +0100)]
Fix T60815: drag & drop crash when search menu is opened immediately after.

Patch by matc, some further refactoring by me.

Differential Revision:

3 months agoFix T62788: drop image into node editor puts node at wrong location.
Brecht Van Lommel [Wed, 20 Mar 2019 18:13:56 +0000 (19:13 +0100)]
Fix T62788: drop image into node editor puts node at wrong location.

It should be under the mouse cursor but was wrong for high DPI. Also put the
cursor in the header now so it's easy to reposition.

3 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Wed, 20 Mar 2019 17:40:10 +0000 (18:40 +0100)]
Merge branch 'blender2.7'

3 months agoFix assert after recent changes.
Brecht Van Lommel [Wed, 20 Mar 2019 17:17:24 +0000 (18:17 +0100)]
Fix assert after recent changes.

Mark as localized immediately, so that functions that edit the node tree can
verify they are being used under the correct conditions.

3 months agoFix cycles.merge_images not merging correctly for some channel layouts.
Brecht Van Lommel [Wed, 20 Mar 2019 17:38:02 +0000 (18:38 +0100)]
Fix cycles.merge_images not merging correctly for some channel layouts.

3 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Wed, 20 Mar 2019 16:33:54 +0000 (17:33 +0100)]
Merge branch 'blender2.7'

3 months agoCycles: make cycles.merge_images work with incomplete layers and passes.
Brecht Van Lommel [Wed, 20 Mar 2019 15:02:38 +0000 (16:02 +0100)]
Cycles: make cycles.merge_images work with incomplete layers and passes.

If layers and passes are not exactly the same in all files, we make a best
effort to merge them instead of failing.

3 months agoFix T62758: hair curves with UV mapped textures renders wrong.
Jacques Lucke [Wed, 20 Mar 2019 15:59:49 +0000 (16:59 +0100)]
Fix T62758: hair curves with UV mapped textures renders wrong.

Differential Revision:

3 months agoFix T61326 "In Front" option not working on edit curves
Clément Foucault [Wed, 20 Mar 2019 16:25:24 +0000 (17:25 +0100)]
Fix T61326 "In Front" option not working on edit curves

Create a new pass for them and draw them separately.

Beware of the double multisample resolve when multi-editing a mix of curves
with and without the "in front" option enabled.

3 months agoFix assert on vertex parent
Sergey Sharybin [Wed, 20 Mar 2019 16:19:26 +0000 (17:19 +0100)]
Fix assert on vertex parent

The evaluation was done on an original object, which is not allowed.

3 months agoUI: Make paint context menus more contextual
William Reynish [Wed, 20 Mar 2019 16:04:57 +0000 (17:04 +0100)]
UI: Make paint context menus more contextual

 - Only show Radius for tools with radius
 - Add more sliders here depending on active tool

3 months agoFix T56778: Alembic Override Frame does not update on playback
Sergey Sharybin [Wed, 20 Mar 2019 15:48:14 +0000 (16:48 +0100)]
Fix T56778: Alembic Override Frame does not update on playback

3 months agoFix error in UI of empty image due to last commit
Clément Foucault [Wed, 20 Mar 2019 15:47:50 +0000 (16:47 +0100)]
Fix error in UI of empty image due to last commit

3 months agoSelect Similar: use kdtree de-duplication
Campbell Barton [Wed, 20 Mar 2019 15:29:30 +0000 (02:29 +1100)]
Select Similar: use kdtree de-duplication

Avoids redundant tree traversal when finding nearest.

3 months agoBLI_kdtree: add deduplicate function
Campbell Barton [Wed, 20 Mar 2019 15:27:27 +0000 (02:27 +1100)]
BLI_kdtree: add deduplicate function

Function to remove exact duplicates from the tree before balancing.

3 months agoFix missing free in recent kdtree changes
Campbell Barton [Wed, 20 Mar 2019 15:38:31 +0000 (02:38 +1100)]
Fix missing free in recent kdtree changes

3 months agoDepsgraph: Fix cycle with rigid body and Weight Proximity
Sergey Sharybin [Wed, 20 Mar 2019 15:35:23 +0000 (16:35 +0100)]
Depsgraph: Fix cycle with rigid body and Weight Proximity

The issue is a feedback loop with point cache reset operation.

Solved by introducing extra node which ensures object's transformation
is ready for simulator input. Allows to route relations without causing
a fake dependency cycle now.

3 months agoFix T58550 Dragged in images dont overlap properly
Clément Foucault [Wed, 20 Mar 2019 15:33:17 +0000 (16:33 +0100)]
Fix T58550 Dragged in images dont overlap properly

This patch adds a new "Use Alpha" option on image empties to avoid ordering
issue of reference images.

If ordering is not important, "Use Alpha" can be enabled to provide
transparency and alpha blending support.

3 months agoFix T59449: Particle system creates error in rigid body
Sergey Sharybin [Wed, 20 Mar 2019 14:14:27 +0000 (15:14 +0100)]
Fix T59449: Particle system creates error in rigid body

Is a dependency cycle problem. Fix is similar to what is done in 024f5ba2bdb.

3 months agoUI: relocate rename menu item
Campbell Barton [Wed, 20 Mar 2019 14:04:28 +0000 (01:04 +1100)]
UI: relocate rename menu item

This was in between operator adjust/search.

Also remove line accidentally added in last commit.

3 months agoCleanup: style
Campbell Barton [Wed, 20 Mar 2019 13:58:01 +0000 (00:58 +1100)]
Cleanup: style

3 months agoFix T61759: Dynamic paint smudge crash
Sergey Sharybin [Wed, 20 Mar 2019 13:56:20 +0000 (14:56 +0100)]
Fix T61759: Dynamic paint smudge crash

The issue was caused by mesh needed for dynamic paint brush being
stored in the modifier. That make it to be freed and set to NULL
when running copy-on-write.

Solved by moving the mesh to be stored in modifier's runtime data.

3 months agoUI: Accumulate name was being overridden in Sculpt Mode
William Reynish [Wed, 20 Mar 2019 13:56:32 +0000 (14:56 +0100)]
UI: Accumulate name was being overridden in Sculpt Mode

3 months agoModifiers: Never copy runtime data pointer
Sergey Sharybin [Wed, 20 Mar 2019 13:45:01 +0000 (14:45 +0100)]
Modifiers: Never copy runtime data pointer