blender.git
3 months agoContext: add pose_object
Campbell Barton [Mon, 11 Mar 2019 23:18:51 +0000 (10:18 +1100)]
Context: add pose_object

Needed for UI scripts to detect mixed weight paint + pose mode.

3 months agoUI: Remove Sculpt Direction from context menu
William Reynish [Mon, 11 Mar 2019 22:47:24 +0000 (23:47 +0100)]
UI: Remove Sculpt Direction from context menu

It didn't work well in here - the menu would close and re-spawn as you hovered over this control.

3 months agoFix wrong memory handling in own rB93633efe69ca.
Bastien Montagne [Mon, 11 Mar 2019 22:36:32 +0000 (23:36 +0100)]
Fix wrong memory handling in own rB93633efe69ca.

`BLO_library_read_struct()` actually takes care for us of nearly
everything, makes things much simpler...

3 months agoUI: Remove incorrect usage of ellipses in menus
William Reynish [Mon, 11 Mar 2019 22:33:13 +0000 (23:33 +0100)]
UI: Remove incorrect usage of ellipses in menus

We only use ellipses when a popup appears, not for regular submenus.

3 months agoIcons: Add Links Cut icon to Node Editor, plus other tweaks
William Reynish [Mon, 11 Mar 2019 22:22:41 +0000 (23:22 +0100)]
Icons: Add Links Cut icon to Node Editor, plus other tweaks

- Tweaks to Paint Mode Fill and Sample tool icons
- Tweaks to GP Add Primitive icons

3 months agoUI: correct context menu edge selection check
Campbell Barton [Mon, 11 Mar 2019 21:22:38 +0000 (08:22 +1100)]
UI: correct context menu edge selection check

3 months agoCleanup: style
Campbell Barton [Mon, 11 Mar 2019 21:21:13 +0000 (08:21 +1100)]
Cleanup: style

3 months agoCleanup: trailing space
Campbell Barton [Mon, 11 Mar 2019 21:16:55 +0000 (08:16 +1100)]
Cleanup: trailing space

3 months agoUI: correct typo
Campbell Barton [Mon, 11 Mar 2019 21:08:48 +0000 (08:08 +1100)]
UI: correct typo

Also odd parenthesis.

3 months agoAdd WorkSpace to list of ID types that are not supported by standard copy mechanism...
Bastien Montagne [Mon, 11 Mar 2019 19:43:25 +0000 (20:43 +0100)]
Add WorkSpace to list of ID types that are not supported by standard copy mechanism for now.

Am not sure whether we want to support that at some point, but at least
if we don’t, make it safe and get out of copy code early, previously
trying to duplicate workspace through BKE_id_copy() would have given a
very bad a broken result...

3 months agoGPencil: Add support to display the material name in selected strokes
Antonioya [Mon, 11 Mar 2019 16:42:45 +0000 (17:42 +0100)]
GPencil: Add support to display the material name in selected strokes

2D artists have requested a way to see in viewport the name of the material assigned to a stroke. This is a special request for 2D animation and required to manage complex drawings with multiple materials on it. We don't need add a separate option for this in the panel.

Now, when enable Name option in the Viewport Display panel, when you select a stroke in edit mode, the name of the material is displayed near the first point selected.

Design reviewed by @mendio and @pepeland

3 months agoGPencil: Add visual feedback for darwing in Bound mode
Antonioya [Mon, 11 Mar 2019 16:27:00 +0000 (17:27 +0100)]
GPencil: Add visual feedback for darwing in Bound mode

As the final stroke is not visible in Bound mode, at least display the current stroke while drawing to get a visual hint of what are you doing.

3 months agoUI: Add back frame operators to GPencil Draw and Sculpt mode contextual menus
William Reynish [Mon, 11 Mar 2019 16:25:10 +0000 (17:25 +0100)]
UI: Add back frame operators to GPencil Draw and Sculpt mode contextual menus

Maniphest Task: T62130

3 months agoGPencil: Add support for Bound Box
Antonioya [Mon, 11 Mar 2019 16:13:30 +0000 (17:13 +0100)]
GPencil: Add support for Bound Box

The bound box was not calculated for grease pencil objects.

3 months agoFix (unreported) broken ID previews reading.
Bastien Montagne [Mon, 11 Mar 2019 16:05:03 +0000 (17:05 +0100)]
Fix (unreported) broken ID previews reading.

Recent changes to blendfile reading adding deferred reading of actual
data broke it, we cannot use the nifty `bhead + 1` to access data
anymore, since there is no guaranty that that block hass been fully
read.

Note that there is still one case in `read_file_thumbnail()`, however
loading of blendfile preview itself seems to be working fine... Maybe
@campbellbarton can double check that point (or knows of hands whether
it is OK there)?

3 months agoFix T62310: Batch generate data-block previews broken.
Bastien Montagne [Mon, 11 Mar 2019 15:49:29 +0000 (16:49 +0100)]
Fix T62310: Batch generate data-block previews broken.

Some uninitialized colormanagement data was breaking RNA acces for them,
exposed in batch preview management when generating previews for scenes
because we have to backup/restore scene and all its settings
before/after rendering it...

3 months agoFix: Remove unnecessary check in previous commit
William Reynish [Mon, 11 Mar 2019 15:51:04 +0000 (16:51 +0100)]
Fix: Remove unnecessary check in previous commit

3 months agoFix T62366: Grease pencil material color keying
Sergey Sharybin [Mon, 11 Mar 2019 15:48:19 +0000 (16:48 +0100)]
Fix T62366: Grease pencil material color keying

Do proper tagging for material changes, and avoid grease-pencil hack
in the relations builder.

The dependency graph code was forcing animation to be run for any
copy-on-write change of material. However, animation is not supposed
to be run on copy-on-write changes.

3 months agoAdd missing Add Face and Fill commands to Edit Mode Edge contextual menu
William Reynish [Mon, 11 Mar 2019 15:48:39 +0000 (16:48 +0100)]
Add missing Add Face and Fill commands to Edit Mode Edge contextual menu

3 months agoUI: Move UV Editor Cursor Position to sidebar
William Reynish [Mon, 11 Mar 2019 15:37:57 +0000 (16:37 +0100)]
UI: Move UV Editor Cursor Position to sidebar

Consistent with the 3D View

3 months agoUI: Use 'None' instead of 'No' for cache compression method.
Pablo Vazquez [Mon, 11 Mar 2019 15:35:17 +0000 (16:35 +0100)]
UI: Use 'None' instead of 'No' for cache compression method.

3 months agoSculpt: Fix undo when shape keys are used
Sergey Sharybin [Mon, 11 Mar 2019 15:29:51 +0000 (16:29 +0100)]
Sculpt: Fix undo when shape keys are used

Can not use undo node's total vertices count, it only contains
single PBVH node vertex count. Need to pass an entire key block
number of vertices.

3 months agoGPU: Make the creation of opengl shaders more stable.
mano-wii [Mon, 11 Mar 2019 15:22:33 +0000 (12:22 -0300)]
GPU: Make the creation of opengl shaders more stable.

This commit possibly fixes the T58938.
The crash happens when a shader that is created in a rendering context is deleted and another shader with the same name/program of the deleted one is created in the same context and used in another context.

3 months agoUI: Add missing transform operators to Transform menu
William Reynish [Mon, 11 Mar 2019 15:18:34 +0000 (16:18 +0100)]
UI: Add missing transform operators to Transform menu

- Consistent with other editors and modes
- Allows users to discover G R S keys

Maniphest task: T61556

3 months agoFix T61253: Wrong syntax highlighting when @ is used as multiplication
Jacques Lucke [Mon, 11 Mar 2019 15:14:46 +0000 (16:14 +0100)]
Fix T61253: Wrong syntax highlighting when @ is used as multiplication

This is obviously not a perfect solution. However, to do proper
highlighting a more advanced Python parser would be necessary.
I think this patch implements a good heuristic to differentiate
between the cases when `@` is used for a decorator vs for
multiplication.

When `@` is directly followed by an identifier, it is interpreted
as decorated. Otherwise not.

Reviewers: brecht

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

3 months agoUI: Add missing All Transform to Object > Apply menu
William Reynish [Mon, 11 Mar 2019 15:12:29 +0000 (16:12 +0100)]
UI: Add missing All Transform to Object > Apply menu

Reported on Devtalk

3 months agoFix T62059: Driver not updating in Color Ramp
Jacques Lucke [Mon, 11 Mar 2019 15:08:52 +0000 (16:08 +0100)]
Fix T62059: Driver not updating in Color Ramp

Reviewers: sergey

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

3 months agoFix T62423: Wrong sculpting with shape keys and modifiers
Sergey Sharybin [Mon, 11 Mar 2019 15:00:04 +0000 (16:00 +0100)]
Fix T62423: Wrong sculpting with shape keys and modifiers

Need to use original mesh to get virtual modifiers list, otherwise
key datablocks will not be properly taken into account (since evaluated
mesh doesn't have key datablock).

3 months agoUI: Add brush controls to contextual menu for GPencil Draw and Sculpt modes
William Reynish [Mon, 11 Mar 2019 14:51:54 +0000 (15:51 +0100)]
UI: Add brush controls to contextual menu for GPencil Draw and Sculpt modes

Maniphest task: T62130

3 months agoFix T59928: 'Radius' option does nothing when adding light probe
Jacques Lucke [Mon, 11 Mar 2019 14:35:30 +0000 (15:35 +0100)]
Fix T59928: 'Radius' option does nothing when adding light probe

3 months agoDepsgraph: Add missing parameters for node trees
Sergey Sharybin [Mon, 11 Mar 2019 14:31:56 +0000 (15:31 +0100)]
Depsgraph: Add missing parameters for node trees

This allows to have drivers on node trees.

Probably now it will be better to simply add parameters for any
ID node, to avoid such amount of manual work.

Initial idea was to not have nodes if it's not needed to avoid
any possible overhead. Having more robust system is probably more
valuable. We can always optimize overhead in one way or another.

3 months agoUI: Add brush controls to contextual menus for Texture Paint, Vertex Paint, Sculpt...
William Reynish [Mon, 11 Mar 2019 14:01:07 +0000 (15:01 +0100)]
UI: Add brush controls to contextual menus for Texture Paint, Vertex Paint, Sculpt Mode

Maniphest task: T62130

3 months agoFix T62359: Flip colors for Fill Tool missing
Philipp Oeser [Fri, 8 Mar 2019 14:53:38 +0000 (15:53 +0100)]
Fix T62359: Flip colors for Fill Tool missing

Reviewers: brecht

Maniphest Tasks: T62359

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

3 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Mon, 11 Mar 2019 13:34:17 +0000 (14:34 +0100)]
Merge branch 'blender2.7'

3 months agoUV editor: automatically show image assigned to active face.
Brecht Van Lommel [Mon, 11 Mar 2019 11:44:14 +0000 (12:44 +0100)]
UV editor: automatically show image assigned to active face.

When manually selecting a different image, this image will become pinned and
continue to show. The material node is not automatically modified as it was in
old Blender versions, only the image displayed in the UV editor.

Fixes T61239: confusing behavior when unwrapping non-square images. By showing
the relevant image by default it's more clear why it does aspect correction.

3 months agoFix T60855: workspace duplicate does not preserve addons filters.
Brecht Van Lommel [Mon, 11 Mar 2019 10:52:36 +0000 (11:52 +0100)]
Fix T60855: workspace duplicate does not preserve addons filters.

3 months agoFix T61906: crash rendering softbody with Cycles and timeline visible.
Brecht Van Lommel [Mon, 11 Mar 2019 09:07:36 +0000 (10:07 +0100)]
Fix T61906: crash rendering softbody with Cycles and timeline visible.

Make sure we don't reallocate arrays in the pointcache when not needed, the
size of a memory allocation can be slightly bigger than the requested size.

Also, use consistent check for shared cached in copy and free functions.

3 months agoCleanup: fix warning about unused parameter.
Brecht Van Lommel [Fri, 8 Mar 2019 17:19:01 +0000 (18:19 +0100)]
Cleanup: fix warning about unused parameter.

3 months agoUI: Add brush controls to contextual menu in Weight Paint mode
William Reynish [Mon, 11 Mar 2019 13:34:07 +0000 (14:34 +0100)]
UI: Add brush controls to contextual menu in Weight Paint mode

Maniphest task: T62130

3 months agoFix T61053: crash baking to float image after file save.
Brecht Van Lommel [Mon, 11 Mar 2019 10:09:14 +0000 (11:09 +0100)]
Fix T61053: crash baking to float image after file save.

This is the wrong flag to check, no other code actually reads it.

3 months agoFix T61103: Cycles bevel wrong on objects with negative scale.
Brecht Van Lommel [Mon, 11 Mar 2019 09:20:31 +0000 (10:20 +0100)]
Fix T61103: Cycles bevel wrong on objects with negative scale.

3 months agoFix T61831: Denoising Clean pass not scaled correctly with samples.
Brecht Van Lommel [Mon, 11 Mar 2019 08:13:46 +0000 (09:13 +0100)]
Fix T61831: Denoising Clean pass not scaled correctly with samples.

3 months agoView3D: Fix object without bounds displaying bounding boxes
Clément Foucault [Mon, 11 Mar 2019 13:16:51 +0000 (14:16 +0100)]
View3D: Fix object without bounds displaying bounding boxes

3 months agoView3D: Fix Empties displaying bounding boxes
Clément Foucault [Mon, 11 Mar 2019 13:02:58 +0000 (14:02 +0100)]
View3D: Fix Empties displaying bounding boxes

3 months agoDespgraph: Make dupli objects inherit the parent's display type
Clément Foucault [Mon, 11 Mar 2019 13:01:14 +0000 (14:01 +0100)]
Despgraph: Make dupli objects inherit the parent's display type

Fix T61152 Instanced Collections Don't Honor Viewport Display Setting

3 months agoTools: Add Selection tools to Texture Paint toolbar when Face Selection is enabled.
William Reynish [Mon, 11 Mar 2019 12:45:15 +0000 (13:45 +0100)]
Tools: Add Selection tools to Texture Paint toolbar when Face Selection is enabled.

Consistent with the other paint modes.

3 months agoEevee: Update LTC code
Clément Foucault [Mon, 11 Mar 2019 12:11:46 +0000 (13:11 +0100)]
Eevee: Update LTC code

Main change are:
- the fresnel LUT is separated from the main GGX LUT.
- LUTs use sqrt(1.0 - NV) as roughness remapping. Improving precision and
  removes needs for acos().
- LTC LUT is normalized by matrix middle component. Improving precision.

3 months agoMerge branch 'blender2.7'
Sergey Sharybin [Mon, 11 Mar 2019 10:31:17 +0000 (11:31 +0100)]
Merge branch 'blender2.7'

3 months agoColor management: Fix/workaround broken getDefaultDisplay()
Sergey Sharybin [Wed, 5 Dec 2018 12:34:04 +0000 (13:34 +0100)]
Color management: Fix/workaround broken getDefaultDisplay()

This is something what is caused by OCIO library. The patch
has been submitted there:

  https://github.com/imageworks/OpenColorIO/pull/638

For until it is refined and checked we do workaround from
our side.

3 months agoColor management: Query default view from display
Sergey Sharybin [Wed, 5 Dec 2018 11:06:48 +0000 (12:06 +0100)]
Color management: Query default view from display

Solves weird situation when default display name is queried
from OCIO, but Default view being assumed to be set for it.

Now view is initialized to a default view of that display.

3 months agoGPencil: Fix unreported problem with input samples
Antonioya [Mon, 11 Mar 2019 10:12:32 +0000 (11:12 +0100)]
GPencil: Fix unreported problem with input samples

The parameter was not working because it ws testing for guides only.

3 months agoGPencil: Cleanup comment text
Antonioya [Mon, 11 Mar 2019 09:44:56 +0000 (10:44 +0100)]
GPencil: Cleanup comment text

3 months agoGPencil: Fix unreported UV error when use subdivide modifier
Antonioya [Mon, 11 Mar 2019 09:42:39 +0000 (10:42 +0100)]
GPencil: Fix unreported UV error when use subdivide modifier

When the subdivide modifier was used, the UV was not recalculated and the texture of the stroke was wrong.

3 months agoFix T62255: Blender defaults to "OpenAL Soft" in sound settings, regardless of saved...
Jörg Müller [Sun, 10 Mar 2019 22:28:51 +0000 (23:28 +0100)]
Fix T62255: Blender defaults to "OpenAL Soft" in sound settings, regardless of saved preferences

- Default device (index 0) was hard coded.
- Also fixing crash with invalid device passed to blender via -setaudio.

3 months agoFix T62393: Materials made from 'Make Single User' have linked animation.
Bastien Montagne [Sun, 10 Mar 2019 14:23:59 +0000 (15:23 +0100)]
Fix T62393: Materials made from 'Make Single User' have linked animation.

`id_single_user()` was still code from older ID management, now we can
use modern code to handle animdata duplication for us (which allows to
keep handling of nasty sub-data ID horrors like nodtrees in a single
place, much safer and simpler).

3 months agoFix T62125: snapping not working if invisible object is between you and the target
Sebastian Parborg [Sun, 10 Mar 2019 11:05:06 +0000 (12:05 +0100)]
Fix T62125: snapping not working if invisible object is between you and the target

If we were not in x-ray/wireframe mode, the snapping would treat all
objects like they were in solid mode. This were not desirable if you
had objects that were in wire or bounding box display mode.

Now objects that are in bounding box mode is ignored (unless the object
is in edit mode) and objects with wire display mode is treated as if
they were in x-ray mode.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4493

3 months agoGPencil: Fix user count for autocreated materials
Antonioya [Sun, 10 Mar 2019 10:18:52 +0000 (11:18 +0100)]
GPencil: Fix user count for autocreated materials

The user count was 2 when the value must be 1.

3 months agoGPencil: Set brush material after copying a material
Antonioya [Sun, 10 Mar 2019 07:55:38 +0000 (08:55 +0100)]
GPencil: Set brush material after copying a material

This change updates the brush material in the topbar when a new material is created using copy button.

Related to task T62384

Thanks to @matc for suggesting the fix.

Still pending a problem whith user number.

3 months agoFix T60171: Hair Particles Not Displaying in Viewport
Clément Foucault [Sun, 10 Mar 2019 02:36:27 +0000 (03:36 +0100)]
Fix T60171: Hair Particles Not Displaying in Viewport

This patch fixes T60171 by adding a dummy read from the `dummy` vertex attribute to `hair_get_pos_tan_binor_time` in `common_hair_lib.glsl`. Confirmed to work on my machine (macOS 10.14.4 Beta, Radeon R​9 M295X).

According to my experiments regarding this issue, the problem is triggered when all of the following conditions are met: (a) the shader has no vertex reads; (b) the index buffer is ≥ 256KiB. I can't really give an explanation of this misbehavior because of the video driver's closed-source nature.

Reviewers: fclem

Reviewed By: fclem

Subscribers: zeddb

Maniphest Tasks: T60171

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

3 months agoFix T58890: Sculpt Mode not updating in LookDev or Rendered
Clément Foucault [Thu, 7 Mar 2019 17:08:32 +0000 (18:08 +0100)]
Fix T58890: Sculpt Mode not updating in LookDev or Rendered

This fix is a hack and will slow down update performance. But at least,
all shading features are supported. This is only in "normal" sculpt mode
(no dyntopo, no multires).

3 months agoMerge branch 'blender2.7'
Julian Eisel [Sat, 9 Mar 2019 16:19:52 +0000 (17:19 +0100)]
Merge branch 'blender2.7'

Conflicts:
intern/cycles/blender/addon/properties.py
intern/cycles/device/opencl/opencl_split.cpp

3 months agoFix stashed full-screens returning to wrong layout
Julian Eisel [Sat, 9 Mar 2019 15:58:13 +0000 (16:58 +0100)]
Fix stashed full-screens returning to wrong layout

Steps to reproduce were:
* Maximize area (Shift+Spacebar in 2.7, Ctrl+Spacebar in 2.8)
* Open temp file browser (Ctrl+O)
* Cancel file browser (Esc) - should return to previous full-screen
* Press "Return to Previous" button
The previously maximized area would turn into a file-browser.

Note that the issue will still happen when opening old files saved while
in maximized area full-screen.

3 months agoGPencil: Material panel is hidden after adding new material
Antonioya [Sat, 9 Mar 2019 15:50:10 +0000 (16:50 +0100)]
GPencil: Material panel is hidden after adding new material

This bug was introduced by previous Pin fix commit. Maybe it's not the best solution, but this bug is critical and need a quick fix.

This commit fix the problem, but not totally sure this is working fine with pin.

@dfelinto Could you review and adapt if required.

3 months agoGPU Extension: Add OS defines
Clément Foucault [Sat, 9 Mar 2019 15:42:44 +0000 (16:42 +0100)]
GPU Extension: Add OS defines

This makes possible to have os specific workaround inside the shaders.

3 months agoFix T57655: Crash opening 2.79 file saved with maximized area
Julian Eisel [Sat, 9 Mar 2019 11:56:56 +0000 (12:56 +0100)]
Fix T57655: Crash opening 2.79 file saved with maximized area

During screen to workspace/workspace-layout conversion, the first layout
of each workspace would be activated. For temporary full-screens, this
used to be the full-screen layout (IIRC), apparently it's now the
the layout to return to on "Back to Previous". So the 'previous' layout
would be activated, not the full-screen one.
When actually pressing "Back to Previous" now, the operator would first
free the active layout (which it assumes to be the temp full-screen -
wrongly in this case) and then try to activate the non-full-screen one,
causing use-after-free.

3 months agoFix T62104: VertexGroup.add() doesn't push depsgraph update for the mesh.
Sebastian Parborg [Sat, 9 Mar 2019 10:45:31 +0000 (11:45 +0100)]
Fix T62104: VertexGroup.add() doesn't push depsgraph update for the mesh.

When adding and removing weights from the python api, no depsgraph
updates were triggered.  This would cause the mesh geometry to be out of
sync in the viewport if there were any modifiers that used the vertex
groups in question.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4439

3 months agoFix T61737: Gizmo refresh issue
Sebastian Parborg [Sat, 9 Mar 2019 10:41:04 +0000 (11:41 +0100)]
Fix T61737: Gizmo refresh issue

When using a transform.select_orientation keyboard shortcut, the
orientation change would not update the viewport.
So if you had the move gizmo visible, it would not change transform
orientation.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4386

3 months agoFix T62162: Bones set to unselectable can be fully selected through the viewport...
Sebastian Parborg [Sat, 9 Mar 2019 10:35:13 +0000 (11:35 +0100)]
Fix T62162: Bones set to unselectable can be fully selected through the viewport in edit mode.

Bone selectability in edit mode now matches the behavior of pose mode
(can no longer be selected).

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4469

3 months agoFix active workspace changes when deleting workspace
Dalai Felinto [Fri, 8 Mar 2019 21:48:27 +0000 (18:48 -0300)]
Fix active workspace changes when deleting workspace

Tested for multi-window as well, which failed with the previous code even
before we introduced ordered workspaces.

3 months agoFix crash when deleting workspaces too fast
Dalai Felinto [Fri, 8 Mar 2019 20:58:20 +0000 (17:58 -0300)]
Fix crash when deleting workspaces too fast

Delete workspaces via the menu was not refreshing the workspace tabs
drawing. This way if you deleted the non-active workspace  with the "e" shortcut
from the workspace tab context menu and clicked on the workspace tabs again, it
would crash.

A few notes:
* Deleting a non-active workspace is changing which workspace is then active,
  which is really strange.

* Even when deleting the active workspace which workspace then becomes active
  seems random.

* Using notifiers (ND_WORKSPACE_DELETE) to delete the workspace seems rather
abusing notifiers in my humble opinion.

This is not an important bugfix anyways, people probably would rarely
run into this. I just ran into it while investigating another bug.

3 months agoFinal fix for greasepencil materials assign/select/deselect in edit mode
Dalai Felinto [Fri, 8 Mar 2019 19:48:11 +0000 (16:48 -0300)]
Final fix for greasepencil materials assign/select/deselect in edit mode

3 months agoFix T62349: Grease Pencil top material list not working
Dalai Felinto [Fri, 8 Mar 2019 18:30:22 +0000 (15:30 -0300)]
Fix T62349: Grease Pencil top material list not working

This is a fixup for my own: 92d185faebe.
I'm also fixing the poll of the EEVEE_MATERIAL_PT_context_material
which would fail when we had no context.material available.

3 months agoDepsgraph: Fix missing relation when driving image offset
Sergey Sharybin [Fri, 8 Mar 2019 17:12:33 +0000 (18:12 +0100)]
Depsgraph: Fix missing relation when driving image offset

Related on T61937.

3 months agoPartially revert "Collection duplication from Outliner: add a 'duplicate hierarchy...
Bastien Montagne [Fri, 8 Mar 2019 16:13:33 +0000 (17:13 +0100)]
Partially revert "Collection duplication from Outliner: add a 'duplicate hierarchy' operation."

This partially reverts commit a77feabb51470b9cfb71be7f0ea7e774d6591799,
removing the shallow 'duplicate hierarchy' option from outliner.

Core changes from that commit in BKE_collections are kept.

3 months agoFollowup to T62318: Fix on-the-fly that kind of .blend file cddata corruption.
Bastien Montagne [Fri, 8 Mar 2019 16:01:18 +0000 (17:01 +0100)]
Followup to T62318: Fix on-the-fly that kind of .blend file cddata corruption.

Remove cddata layers which are not supposed to be written in .blend file,
when reading it.

This is a cheap and simple check, which also gives us forward compatibility
in case we decide some day to make a currently un-written layer type
to be written in .blend files.

3 months agoFix T62318: Blender crash whith 'corrupt' customdata (CD_BWEIGHT).
Bastien Montagne [Fri, 8 Mar 2019 14:54:39 +0000 (15:54 +0100)]
Fix T62318: Blender crash whith 'corrupt' customdata (CD_BWEIGHT).

Mistake in rBab0bc65c24bd, in conversion of static 'common' sets of
masks, BWEIGHT slipped in CD_MASK_MESH (probably from copy/paste from
CD_MASK BAREMESH).

Note that having it in CD_MASK_BAREMESH but not CD_MASK_MESH looks rather
counter-intuitive, but this is not the time for that kind of cleanup.

Went over whole conversion again, and found two other mistakes, should
really have recheck that before committing...

3 months agoFix (unreported) datatransfer code could still modify source mesh in some cases.
Bastien Montagne [Fri, 8 Mar 2019 10:49:49 +0000 (11:49 +0100)]
Fix (unreported) datatransfer code could still modify source mesh in some cases.

Source (i.e. other) mesh should not be modified in any case in modifier
evaluation case (this is forbidden by design and can lead to all kind of
threaded locks and crashes), and doing so even in operator case was
never a good idea either.

Now that we can specifically request needed data (poly and/or loop
normals) from evaluation code, we can finally get rid of those
computations inside data transfer/mesh remapping area.

This is hopefully the last remaining bit of this 'bad crashing code' in
datatransfer area.

3 months agoBKE mesh remap: add utils to add needed cddata mask for source mesh.
Bastien Montagne [Fri, 8 Mar 2019 10:45:00 +0000 (11:45 +0100)]
BKE mesh remap: add utils to add needed cddata mask for source mesh.

In some cases (currently, only when using avanced mapping of loops),
code needs access to some cddata of the source mesh (CD_NORMAL...).

We need a way to inform calling code about that (actual issue requiring
this change is fixed in next commit).

3 months agoModifier eval: add support for request poly normals layer.
Bastien Montagne [Fri, 8 Mar 2019 10:42:45 +0000 (11:42 +0100)]
Modifier eval: add support for request poly normals layer.

Ensure we do get poly normals if they are requested in given cddata mask.

3 months agoFix potential bad behavior, and cleanup/refactor a bit BKE_mesh_ensure_normals_for_di...
Bastien Montagne [Fri, 8 Mar 2019 10:37:53 +0000 (11:37 +0100)]
Fix potential bad behavior, and cleanup/refactor a bit BKE_mesh_ensure_normals_for_display().

This is merely making behaviors of this function a bit more explicit,
and avoid re-adding another CD_NORMAL layer to polys in the (unlikely)
case it would already have one.

It also handles CD_MASK_NORMAL in cd_dirty_poly, but this is more like
future-proof thing, this is not used anywhere currently afaik.

3 months agoFix T59407: remove outdated right click select info in readme, other updates.
Brecht Van Lommel [Fri, 8 Mar 2019 16:33:24 +0000 (17:33 +0100)]
Fix T59407: remove outdated right click select info in readme, other updates.

3 months agoFix T61961; Smooth brush distorts multires
Sergey Sharybin [Fri, 8 Mar 2019 16:00:11 +0000 (17:00 +0100)]
Fix T61961; Smooth brush distorts multires

The issue was caused by lack of proper accumulation for
averaging. Doing it incrementally introduced a bias.

3 months agoGPencil: Add basic edit support for Hook and Array modifier
Antonioya [Fri, 8 Mar 2019 15:35:46 +0000 (16:35 +0100)]
GPencil: Add basic edit support for Hook and Array modifier

These modifiers were not included in previous commit.

3 months agoCycles OpenCL: Remove single program
Jeroen Bakker [Fri, 8 Mar 2019 15:31:05 +0000 (16:31 +0100)]
Cycles OpenCL: Remove single program

Part of the cleanup of the OpenCL codebase.
Single program is not effective when using OpenCL, it is slower
to compile and slower during rendering (when used in for example
`barbershop` or `victor`).

Reviewers: brecht, #cycles

Maniphest Tasks: T62267

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

3 months agoCleanup: Spelling in comment
Sergey Sharybin [Fri, 8 Mar 2019 15:20:47 +0000 (16:20 +0100)]
Cleanup: Spelling in comment

3 months agoGPencil: Make visible Armature modifier in edit mode
Antonioya [Fri, 8 Mar 2019 15:09:07 +0000 (16:09 +0100)]
GPencil: Make visible Armature modifier in edit mode

This change displays the stroke in the deformed position, but the edition is done in rest position.

This is no the final solution, but at least we have some visual feedback in edit mode.

The real solution is to create a full system to manage derived strokes in Edit mode, but this needs a lot of work and we haven't resources now to do it.

3 months agoUI: Rename 'Use Lib Path' to 'Use Library Path' in particle settings.
Pablo Vazquez [Fri, 8 Mar 2019 14:50:36 +0000 (15:50 +0100)]
UI: Rename 'Use Lib Path' to 'Use Library Path' in particle settings.

Also align items in the column since they work together.

3 months agoFix T60086: missing update when removing fcurves from Python API.
Brecht Van Lommel [Fri, 8 Mar 2019 14:40:22 +0000 (15:40 +0100)]
Fix T60086: missing update when removing fcurves from Python API.

3 months agoUI: Naming and tooltip for the new high-resolution smoke simplify setting.
Pablo Vazquez [Fri, 8 Mar 2019 14:30:41 +0000 (15:30 +0100)]
UI: Naming and tooltip for the new high-resolution smoke simplify setting.

* Rename "Use Smoke Highres" to "Use High-resolution Smoke"
* Use 'Display' instead of 'Draw', following the naming conventions in 2.8
* Drop the 'Use' prefix in the UI, a "High-resolution Smoke' checkbox sufficiently communicates what it does.

3 months agocmake/windows: Set LLVM_INCLUDE_DIRS variable.
Ray Molenkamp [Fri, 8 Mar 2019 14:17:56 +0000 (07:17 -0700)]
cmake/windows: Set LLVM_INCLUDE_DIRS variable.

3 months agobuild_environment/Windows: Copy llvm debug headers.
Ray Molenkamp [Fri, 8 Mar 2019 13:59:54 +0000 (06:59 -0700)]
build_environment/Windows: Copy llvm debug headers.

llvm generates some header files at build time that differ between
debug/release causing linker errors when you used the release headers
for a debug build.

3 months agoCodestyle: comments
Jeroen Bakker [Fri, 8 Mar 2019 07:56:16 +0000 (08:56 +0100)]
Codestyle: comments

3 months agocmake/windows: Set LLVM_INCLUDE_DIRS variable.
Ray Molenkamp [Fri, 8 Mar 2019 14:17:56 +0000 (07:17 -0700)]
cmake/windows: Set LLVM_INCLUDE_DIRS variable.

3 months agobuild_environment/Windows: Copy llvm debug headers.
Ray Molenkamp [Fri, 8 Mar 2019 13:59:54 +0000 (06:59 -0700)]
build_environment/Windows: Copy llvm debug headers.

llvm generates some header files at build time that differ between
debug/release causing linker errors when you used the release headers
for a debug build.

3 months agoCleanup: remove debug prints.
Brecht Van Lommel [Fri, 8 Mar 2019 14:12:36 +0000 (15:12 +0100)]
Cleanup: remove debug prints.

3 months agoFix T60900, T61111, T61963: node values stuck after clearing keyframes.
Brecht Van Lommel [Fri, 8 Mar 2019 13:59:33 +0000 (14:59 +0100)]
Fix T60900, T61111, T61963: node values stuck after clearing keyframes.

This removes special dependency graph code that was intended to avoid GPU
shader recompiles by preserving the node tree and GPU material in specific
cases. This is no longer needed now that we have a general shader pass
cache that compares the generated shader code. The GPU material is already
being freed in material and world eval as well, so there's no point.

Note also that GPU materials are now safe to free from threads, actual
OpenGL buffer freeing happens delayed.

3 months agoTools: Re-order Weight Paint toolbar
William Reynish [Fri, 8 Mar 2019 14:07:18 +0000 (15:07 +0100)]
Tools: Re-order Weight Paint toolbar

-Group gradient with the other paint tools
-Nest the two Sample tools together
-Keep painting tools first, secondary tools after
-Make sure toolbar doesn't jump when selection is enabled

3 months agoFix T62327: Multires with Particles: Undo not working
Sergey Sharybin [Fri, 8 Mar 2019 13:37:46 +0000 (14:37 +0100)]
Fix T62327: Multires with Particles: Undo not working

Modifier stack was forced to be re-evaluated when it was not
supposed to. Should also improve sculpt performance.

3 months agoFix T59304: boolean modifier does not preserve UV textures.
Brecht Van Lommel [Fri, 8 Mar 2019 13:09:54 +0000 (14:09 +0100)]
Fix T59304: boolean modifier does not preserve UV textures.

In the old derivedmesh function it was merging customdata layers, added
that back for mesh conversion too.

3 months agoFix T62355: Running blender 2.80 headless broken in recent builds
Clément Foucault [Fri, 8 Mar 2019 13:31:58 +0000 (14:31 +0100)]
Fix T62355: Running blender 2.80 headless broken in recent builds