7 months agoFix T62507: Removing Annotation layers removes layers option
Antonioya [Tue, 12 Mar 2019 18:49:46 +0000 (19:49 +0100)]
Fix T62507: Removing Annotation layers removes layers option

Now, when the layer is removed, the Annotation title is removed too to get the same situation when you start using annotations.

7 months agoFix T62506: Erasing blank annotation layer activates Move operator
Antonioya [Tue, 12 Mar 2019 18:36:12 +0000 (19:36 +0100)]
Fix T62506: Erasing blank annotation layer activates Move operator

If you try to erase empty annotations, the operator is canceled.

The message is necessary to avoid the keymap is captured by the next keymap in the stack.

7 months agoPython/ViewLayers: add object.hide_get/set(), and optional view layer parameters.
Brecht Van Lommel [Tue, 12 Mar 2019 17:44:56 +0000 (18:44 +0100)]
Python/ViewLayers: add object.hide_get/set(), and optional view layer parameters.

These new functions control the per view layer object hiding state, similar to
the selection state. All these object state checking functions now also optionally
take a view layer to use instead of the active view layer.

Fixes T62062.

7 months agoWindows: Add convenience logging batch files.
Ray Molenkamp [Tue, 12 Mar 2019 17:36:44 +0000 (11:36 -0600)]
Windows: Add convenience logging batch files.

To make triaging a little easier these batchfiles generate the
debug log and sysinfo files and instruct the user how to attach
them to their bug report

Differential Revision:

Reviewers: brecht, zeddb

7 months agoCleanup: comment on `GPU_pass_compile`.
mano-wii [Tue, 12 Mar 2019 17:28:57 +0000 (14:28 -0300)]
Cleanup: comment on `GPU_pass_compile`.

7 months agoFix T62388: object.visible_get() not affected by object.hide_viewport.
Brecht Van Lommel [Tue, 12 Mar 2019 17:24:33 +0000 (18:24 +0100)]
Fix T62388: object.visible_get() not affected by object.hide_viewport.

After recent changes BASE_VISIBLE was not always disabled properly when the
object is hidden. This refactors the code a bit to hopefully be more clear.

7 months agoUse the same string for DNA enum and CLI argument for EXR image format setting
Sybren A. Stüvel [Tue, 12 Mar 2019 15:17:47 +0000 (16:17 +0100)]
Use the same string for DNA enum and CLI argument for EXR image format setting

The `--render-format` CLI option takes `EXR` and `MULTILAYER`, whereas
the DNA image format render setting uses `OPEN_EXR` and
`OPEN_EXR_MULTILAYER`. This commit adds the DNA values to the CLI
argument, so that it is possible to take the selected value from DNA and
pass it as-is to the CLI. This is used in Flamenco, for example.

The `OPEN_EXR` and `OPEN_EXR_MULTILAYER` are now aliases, so both the
existing and the new options keep working.

Reviewers: campbellbarton, brecht

Reviewed By: brecht

Subscribers: fsiddi

Tags: #bf_blender_2.8

Differential Revision:

7 months agoFix T62279: Rendering simple geometry corrupts with greasepencil layer
Clément Foucault [Tue, 12 Mar 2019 14:53:10 +0000 (15:53 +0100)]
Fix T62279: Rendering simple geometry corrupts with greasepencil layer

This was caused by a missing state reset. Also adding safety state reset
before and after drawing (might not be necessary).

7 months agoEevee: Planar Ref.: Invert view matrix to remove triangle front face flip
Clément Foucault [Tue, 12 Mar 2019 14:45:44 +0000 (15:45 +0100)]
Eevee: Planar Ref.: Invert view matrix to remove triangle front face flip

This was the cause of some issue with normal mapping. This way is cleaner
since it does not modify the state of the drawcalls and other ad-hoc
solutions to fix the problems down the road. Unfortunately, it does require
to fix every sampling coordinate for this texture.

Fix T62215: flipped normals in reflection plane

7 months agoDRW: Fix missing state reset before draw pass
Clément Foucault [Mon, 11 Mar 2019 22:52:12 +0000 (23:52 +0100)]
DRW: Fix missing state reset before draw pass

This is needed before any drawcall. If not, undefined behavior can happen.

7 months agoFix (unreported) Outliner could add (link...) a collection to a linked scene/collection.
Bastien Montagne [Tue, 12 Mar 2019 14:47:07 +0000 (15:47 +0100)]
Fix (unreported) Outliner could add (link...) a collection to a linked scene/collection.

Think that's the last case... At least for now.

7 months agoFix T62488: Can delete collection from indirect linked library.
Bastien Montagne [Tue, 12 Mar 2019 14:37:09 +0000 (15:37 +0100)]
Fix T62488: Can delete collection from indirect linked library.

Same issue as with previous commits for other Collection Outlier's
operations, checks are always different though...

7 months agoFix (unreported) Outliner's New Collection adding local collection to linked IDs.
Bastien Montagne [Tue, 12 Mar 2019 14:15:58 +0000 (15:15 +0100)]
Fix (unreported) Outliner's New Collection adding local collection to linked IDs.

Similar issue to the one about Duplicate operation...

7 months agoCleanup: Outliner's Collection duplicate: don't check for visualization type in exec...
Bastien Montagne [Tue, 12 Mar 2019 14:05:11 +0000 (15:05 +0100)]
Cleanup: Outliner's Collection duplicate: don't check for visualization type in exec function.

This has already been ensured by poll callback...

7 months agoFix (unreported) duplicated collection from linked scene would be parented to that...
Bastien Montagne [Tue, 12 Mar 2019 13:58:33 +0000 (14:58 +0100)]
Fix (unreported) duplicated collection from linked scene would be parented to that scene.

In other words, Duplicate Collection could link local ID into a linked
one... Nasty. ;)

Add checks that found parent is not a linked data-block (and try to
find a fall-back one if this is the case).

7 months agoBKE Collections: add helper to find the scene of a master collection.
Bastien Montagne [Tue, 12 Mar 2019 13:57:59 +0000 (14:57 +0100)]
BKE Collections: add helper to find the scene of a master collection.

7 months agoFix T62457: Crash with rigid body and disabled objects
Sergey Sharybin [Tue, 12 Mar 2019 14:25:50 +0000 (15:25 +0100)]
Fix T62457: Crash with rigid body and disabled objects

Need to always ensure objects form rigid body wortld are part
of dependency graph.

7 months agoFix missing metadata for multilayer exr sequences
Sergey Sharybin [Tue, 12 Mar 2019 13:50:58 +0000 (14:50 +0100)]
Fix missing metadata for multilayer exr sequences

7 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Tue, 12 Mar 2019 13:22:53 +0000 (14:22 +0100)]
Merge branch 'blender2.7'

7 months agoAPI Doc: Gotcha: add section about 'exceptions to the rules' known crashing cases.
Bastien Montagne [Tue, 12 Mar 2019 13:09:41 +0000 (14:09 +0100)]
API Doc: Gotcha: add section about 'exceptions to the rules' known crashing cases.

As exposed in T62406, we can have some rare cases of crashes due to
memory re-allocation happening outside of expected scenarii.

Ideally this should be re-designed, but at least keep track of those
known exceptions to general rules...

7 months agoFix T62481: Cycles crash rendering with UV pass after recent changes.
Brecht Van Lommel [Tue, 12 Mar 2019 13:03:05 +0000 (14:03 +0100)]
Fix T62481: Cycles crash rendering with UV pass after recent changes.

7 months agoCycles/OpenCL: Reduce How Often Kernel Recompilations Are Needed
Jeroen Bakker [Tue, 12 Mar 2019 12:58:39 +0000 (13:58 +0100)]
Cycles/OpenCL: Reduce How Often Kernel Recompilations Are Needed

This patch will reduce the number of times that we need to
recompile kernels. It does this by (en/dis)abling features
by default. So when the user needs them that the kernels are
already available.

Other features are enabled by default for background and foreground
rendering. When in background rendering the user wants the best
render performance. When in foreground rendering the user wants
the least amount of recompilations.

Enabling volumetrics or subdivision evaluation will still trigger
a recompilation during foreground rendering.

Reviewed By: #cycles, brecht

Differential Revision:

7 months agoFix T62485: wrong tooltip text
Antonioya [Tue, 12 Mar 2019 12:45:28 +0000 (13:45 +0100)]
Fix T62485: wrong tooltip text

7 months agoFix T62470: instanced object does not preserve bounds display type.
Brecht Van Lommel [Tue, 12 Mar 2019 12:21:54 +0000 (13:21 +0100)]
Fix T62470: instanced object does not preserve bounds display type.

Inheriting the display type from the instancer should only happen if it's
a simpler one.

7 months agoUI: Adjustments to Texture Paint Projection Paint panel
William Reynish [Tue, 12 Mar 2019 10:07:43 +0000 (11:07 +0100)]
UI: Adjustments to Texture Paint Projection Paint panel

7 months agoMake B-Bone deformation code more robust with bad cached segment data.
Alexander Gavrilov [Tue, 12 Mar 2019 09:38:19 +0000 (12:38 +0300)]
Make B-Bone deformation code more robust with bad cached segment data.

Various dependency graph problems can cause obsolete data to reach the
armature modifier, so add checks to reduce the chance of crashing.

7 months agoGPencil: Set wire mode when object is set to wire
Antonioya [Tue, 12 Mar 2019 09:23:33 +0000 (10:23 +0100)]
GPencil: Set wire mode when object is set to wire

When the object view is set to Wireframe, the display must be set as wireframe view with x-ray on.

Now the x-ray switch is handled by object.

7 months agoCleanup: use doxygen sections for BLI_utildefines
Campbell Barton [Tue, 12 Mar 2019 06:45:25 +0000 (17:45 +1100)]
Cleanup: use doxygen sections for BLI_utildefines

7 months agoCleanup: BLI_utildefines struct macros
Campbell Barton [Tue, 12 Mar 2019 05:59:04 +0000 (16:59 +1100)]
Cleanup: BLI_utildefines struct macros

Use the term "AFTER" instead of "OFS" since it wasn't obvious these
macros operate on everything after the struct member passed.

Avoid casting to non-const types when only reading.

7 months agoUI: Avoid redundant text argument to UnifiedPaintPanel methods
Campbell Barton [Tue, 12 Mar 2019 05:19:37 +0000 (16:19 +1100)]
UI: Avoid redundant text argument to UnifiedPaintPanel methods

Now when the text argument is omitted, use the default name
matching how regular properties work.

Avoids passing in the same name which RNA has,
matches UILayout.prop behavior.

Also use keyword only for optional arguments.

7 months agoRNA: support None text argument to UI functions
Campbell Barton [Tue, 12 Mar 2019 05:27:17 +0000 (16:27 +1100)]
RNA: support None text argument to UI functions

Without this there isn't a convenient way to write wrapper UI functions
that forward a text argument that optionally uses the default text.

7 months agoCleanup: use UnifiedPaintPanel for context menu
Campbell Barton [Tue, 12 Mar 2019 04:29:18 +0000 (15:29 +1100)]
Cleanup: use UnifiedPaintPanel for context menu

7 months agoFix use of uninitialized stack memory
Campbell Barton [Tue, 12 Mar 2019 04:17:26 +0000 (15:17 +1100)]
Fix use of uninitialized stack memory

The matrix multiply uses x,y values so both must be initialized.

7 months agoDRW: use object color from instancer
Campbell Barton [Tue, 12 Mar 2019 01:28:01 +0000 (12:28 +1100)]
DRW: use object color from instancer

Otherwise it's impossible to set the color of instanced library objects.

Follows convention of instancer controlling draw options.

7 months agoFix T61531: can't select same material in multi edit mode
Campbell Barton [Tue, 12 Mar 2019 00:57:01 +0000 (11:57 +1100)]
Fix T61531: can't select same material in multi edit mode

D4441 by @zazizizou w/ edits.

7 months agoCleanup: rename specials -> context_menu
Campbell Barton [Mon, 11 Mar 2019 23:59:57 +0000 (10:59 +1100)]
Cleanup: rename specials -> context_menu

In keeping with convention to match code & UI naming.

- No user visible changes.
- Include 'menu' in the name since context is an overloaded term.
- While a few of these are panels, from a user perspective they are
  still context menus.

7 months agoTools: Only show cursor tool in wpaint mode when a pose object exists
Campbell Barton [Mon, 11 Mar 2019 23:51:04 +0000 (10:51 +1100)]
Tools: Only show cursor tool in wpaint mode when a pose object exists

7 months agoUI: Restore orient/pivot UI for wpaint & pose mode
Campbell Barton [Mon, 11 Mar 2019 23:35:11 +0000 (10:35 +1100)]
UI: Restore orient/pivot UI for wpaint & pose mode

This was removed since 2.7x (by accident?)

7 months agoGPU: Avoid access violation while reading the `pass->shader`.
mano-wii [Mon, 11 Mar 2019 23:32:00 +0000 (20:32 -0300)]
GPU: Avoid access violation while reading the `pass->shader`.

7 months agoFix overlay pose panel context check
Campbell Barton [Mon, 11 Mar 2019 23:21:55 +0000 (10:21 +1100)]
Fix overlay pose panel context check

Displayed pose options when weight-paint armature wasn't in pose mode.

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

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

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

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

7 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

7 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

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

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

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

Also odd parenthesis.

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

7 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

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

7 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

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

7 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

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

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

7 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

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

7 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

7 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

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

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

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

7 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

7 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

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

Reviewers: brecht

Differential Revision:

7 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

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

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

7 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

7 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

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

7 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

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

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

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

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

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

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

7 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

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

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

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

7 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

7 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

7 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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