blender.git
2 months agoGPencil: Implement custom channel color in Dopesheet
Antonioya [Wed, 3 Apr 2019 08:25:49 +0000 (10:25 +0200)]
GPencil: Implement custom channel color in Dopesheet

A new parameter in the layer adjustment panel allows to define the color of the channel in Dopesheet.

This is needed when there are a lot of layers.

See D4623 for more details.

2 months agoFix T63220: Cannot make object single user after Duplicate Scene with Link Object...
Bastien Montagne [Tue, 2 Apr 2019 19:50:17 +0000 (21:50 +0200)]
Fix T63220: Cannot make object single user after Duplicate Scene with Link Object Data.

Caused by own recent rB17c15798c35f33e (already a fix in that code).

We cannot erase immediately master_collection's childrn list, as it is
used in sub-code to check in how many scenes an object is instanciated.
Further more, we only want to do the remove old/add new children
collections in case we are actually duplicating them.

Makes me even more eager to nuke that whole piece of code and rethink
from scratch that kind of ID handling. Some day...

2 months agoPython API: expose text object kerning.
Damien Picard [Tue, 2 Apr 2019 17:11:03 +0000 (19:11 +0200)]
Python API: expose text object kerning.

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

2 months agoMerge branch 'blender2.7'
Sergey Sharybin [Tue, 2 Apr 2019 15:51:44 +0000 (17:51 +0200)]
Merge branch 'blender2.7'

2 months agoConstraints: Use RNA update instead of block update
Sergey Sharybin [Tue, 2 Apr 2019 15:44:18 +0000 (17:44 +0200)]
Constraints: Use RNA update instead of block update

Allows to have more control over which tags are done for which
properties.

This is a part of T62960 which fixes the issue in the 2.7 series.

2 months agoConstraints: Mark proxy lcoal as not editable
Sergey Sharybin [Tue, 2 Apr 2019 15:43:33 +0000 (17:43 +0200)]
Constraints: Mark proxy lcoal as not editable

This can not work reliably anyway.

2 months agoCleanup: Remove space at the end of description
Sergey Sharybin [Tue, 2 Apr 2019 15:42:30 +0000 (17:42 +0200)]
Cleanup: Remove space at the end of description

2 months agoFix T62434: EEVEE not using correct World Output node
Philipp Oeser [Tue, 2 Apr 2019 14:37:54 +0000 (16:37 +0200)]
Fix T62434: EEVEE not using correct World Output node

We were already getting the designated output node in
'ntreeGPUMaterialNodes()' but this wasnt used in 'ntreeExecGPUNodes()',
instead whatever node was tagged NODE_DO_OUTPUT was executed.

note: this is just the bare minimum to fix the bug, other improvements
previously done in D4482 might follow as a separate commit.

Reviewers: brecht, fclem

Maniphest Tasks: T62434

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

2 months agoCleanup: Fix compiler warning
Antonioya [Tue, 2 Apr 2019 15:02:10 +0000 (17:02 +0200)]
Cleanup: Fix compiler warning

2 months agoUI: Collapsed nodes have the same width as uncollapsed nodes
Robert Guetzkow [Tue, 2 Apr 2019 14:39:48 +0000 (16:39 +0200)]
UI: Collapsed nodes have the same width as uncollapsed nodes

Fixes T63079.

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

2 months agoFix Linux build error after recent changes.
Brecht Van Lommel [Tue, 2 Apr 2019 14:30:39 +0000 (16:30 +0200)]
Fix Linux build error after recent changes.

2 months agoCleanup: Scene Copy: remove scene's camera remapping in core func.
Bastien Montagne [Tue, 2 Apr 2019 14:20:56 +0000 (16:20 +0200)]
Cleanup: Scene Copy: remove scene's camera remapping in core func.

This is useless at that point, since no object has been duplicated yet...

2 months agoFix T62970: Scene Copy: remove 'linked objects/obdata', add 'linked collections'.
Bastien Montagne [Tue, 2 Apr 2019 14:15:17 +0000 (16:15 +0200)]
Fix T62970: Scene Copy: remove 'linked objects/obdata', add 'linked collections'.

'Linked objects' option was not behaving correctly before, effectively
linking in collections, so this one has been renamed to just 'Linked Copy',
and gives a fully shallow copy of current scene.

'Linked Obdata' was not really useful, kind of confusing, and was
painful to maintain, so dropping it now.

2 months agoFix broken BLI_STATIC_ASSERT on Visual Studio.
Brecht Van Lommel [Tue, 2 Apr 2019 13:49:07 +0000 (15:49 +0200)]
Fix broken BLI_STATIC_ASSERT on Visual Studio.

The old trick seems to no longer work in newer VS version.

2 months agoFix T63164: DNA size mismatches on 32bit, causing memory corruption and crashes.
Brecht Van Lommel [Tue, 2 Apr 2019 13:56:16 +0000 (15:56 +0200)]
Fix T63164: DNA size mismatches on 32bit, causing memory corruption and crashes.

Some alignment rules from Visual Studion on 32 bit are not taken into
account, this fixes the structs to confirm. We now have static asserts
to catch when such breakage happens in the future.

2 months agoFix T63219: error in previous commit for makesdna mismatch detection
Brecht Van Lommel [Tue, 2 Apr 2019 11:34:53 +0000 (13:34 +0200)]
Fix T63219: error in previous commit for makesdna mismatch detection

2 months agoDNA: add error for DNA computed struct sizes and member offsets mismatch.
Brecht Van Lommel [Tue, 2 Apr 2019 10:32:21 +0000 (12:32 +0200)]
DNA: add error for DNA computed struct sizes and member offsets mismatch.

Ref T63164, there was a hidden bug like this on Windows 32 bit.

2 months agoCleanup: remove DNA_PRIVATE_WORKSPACE hacks.
Brecht Van Lommel [Tue, 2 Apr 2019 11:21:21 +0000 (13:21 +0200)]
Cleanup: remove DNA_PRIVATE_WORKSPACE hacks.

This is just not practical to do for the code as a whole, and having it as an
exception for one specific data structure is not that helpful. This has only
been in the way for me when refactoring code.

2 months agoCleanup: Fix compiler warning
Antonioya [Tue, 2 Apr 2019 11:13:23 +0000 (13:13 +0200)]
Cleanup: Fix compiler warning

2 months agoFix T63120 Select random in particle edit mode is broken
Sebastian Parborg [Tue, 2 Apr 2019 10:35:16 +0000 (12:35 +0200)]
Fix T63120 Select random in particle edit mode is broken

Fix coding snafu where the variable keeping track of changes only took
the state of the last element into account.

2 months agoFix T63211: Can't move camera in viewport while realtime render mode on
Sergey Sharybin [Tue, 2 Apr 2019 09:38:55 +0000 (11:38 +0200)]
Fix T63211: Can't move camera in viewport while realtime render mode on

The issue is that Eevee directly evaluates animation on a datablock which
is a part of active dependency graph.

This is a broken logic by design and requires a complete revamp to support
more real life cases when camera is parented to a camera rig, but it is
beyond of what i can do with a simple bugfix.

2 months agoFix T61598: Python error from connect rigid body feature
Philipp Oeser [Tue, 2 Apr 2019 08:15:04 +0000 (10:15 +0200)]
Fix T61598: Python error from connect rigid body feature

needed update to 2.8

2 months agoFix T60199: Icon Viewer addon causes internal errors and slows text editor
Philipp Oeser [Fri, 29 Mar 2019 15:10:36 +0000 (16:10 +0100)]
Fix T60199: Icon Viewer addon causes internal errors and slows text editor

this just removes unused icon definitions [for which no icons exist
anymore]

Reviewers: billreynish, brecht

Maniphest Tasks: T60199

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

2 months agoCleanup: empty expression statement warning
Campbell Barton [Tue, 2 Apr 2019 06:54:04 +0000 (17:54 +1100)]
Cleanup: empty expression statement warning

2 months agoFix T63101: Blender crashes on adding any object to collection duplicated with added...
Bastien Montagne [Mon, 1 Apr 2019 19:10:25 +0000 (21:10 +0200)]
Fix T63101: Blender crashes on adding any object to collection duplicated with added scene.

Issue was that (deep) duplication code of scene ended up leaving
children collections of new master one without any parent.

Note that even though I think that fix is OK for now, we should really
make 'deep' duplication of IDs part of the generic ID management code.
Am less and less happy with current handling of this, done half from
/editors code, half from some semi-specialized helpers from /blenkernel,
with sometimes nearly the same logic replicated several times for
slightly different needs, etc. Unfortunately this would not be a small
refactor, so it will have to wait...

2 months agoEdit Mesh Selection: Clear out buffer that indicates out of bounds pixels.
mano-wii [Sun, 31 Mar 2019 18:58:29 +0000 (15:58 -0300)]
Edit Mesh Selection: Clear out buffer that indicates out of bounds pixels.

This prevents the use of uninitialized buffer.
In addition, use `memset` instead of assigning in a loop.

2 months agoGPencil: Handle vertex groups weights correctly
Antonioya [Mon, 1 Apr 2019 14:47:01 +0000 (16:47 +0200)]
GPencil: Handle vertex groups weights correctly

In extrude operator when the point was added, the weight data pointer was wrongly connected to old pointer.

Now, when move the data, the pointer is moved, but when a new point is added, the memory is duplicated to keep separated copies of the pointer.

This is related T62872

Thanks to @sergey for his help fixing this bug.

2 months agoCleanup: Indentation
Sergey Sharybin [Mon, 1 Apr 2019 14:33:28 +0000 (16:33 +0200)]
Cleanup: Indentation

Got broken in the previous commit somehow.

2 months agoFix memory leak in armatures with no bones
Sergey Sharybin [Mon, 1 Apr 2019 14:09:26 +0000 (16:09 +0200)]
Fix memory leak in armatures with no bones

The cleanup operation was never run for such armatures.

2 months agoCleanup: Spelling
Sergey Sharybin [Mon, 1 Apr 2019 13:33:09 +0000 (15:33 +0200)]
Cleanup: Spelling

2 months agoTweak behavior of object.to_mesh()
Sergey Sharybin [Wed, 27 Mar 2019 21:28:44 +0000 (22:28 +0100)]
Tweak behavior of object.to_mesh()

- Passing original object with apply_modifiers=false will give a
  non-modified non-deformed mesh.
  The result mesh will point to datablocks from the original "domain". For
  example, materials will be original.

- Passing original object with apply_modifiers=true will give a mesh which
  has all modifiers applied.
  The result mesh will point to datablocks from the original "domain". For
  example, materials will be original.

- Passing evaluated object will ignore apply_modifiers argument, and the
  result always contains all modifiers applied.
  The result mesh will point to an evaluated datablocks. For example,
  materials will be an evaluated IDs from the dependency graph.

Fixes T62916: Applying boolean modifier does not set material properly

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

2 months agoModifiers: Proper fix for the Apply Modifier
Sergey Sharybin [Tue, 26 Mar 2019 10:39:11 +0000 (11:39 +0100)]
Modifiers: Proper fix for the Apply Modifier

It is up to the operator to pass valid object to the modifiers
evaluation.

Fixes T62916: Applying boolean modifier does not set materials properly

2 months agoModifiers: Use object passed to evaluation
Sergey Sharybin [Tue, 26 Mar 2019 10:25:07 +0000 (11:25 +0100)]
Modifiers: Use object passed to evaluation

This was wrong and violating design to force modifiers to query
evaluated objects and IDs. It is up to the caller to make sure
the object is properly evaluatable.

Effectively, reverting changes from de491abf9962 (and possibly
other related changes).

2 months agoFix T62960: Expanding/Closing Constraints/Modifiers causes re-render
Sergey Sharybin [Mon, 1 Apr 2019 08:22:06 +0000 (10:22 +0200)]
Fix T62960: Expanding/Closing Constraints/Modifiers causes re-render

Mark specific properties as no-dependency-graph tag.

This is needed to avoid a centralized Copy-on-Write tag from RNA
pointer update.

2 months agoRemove evaluated RNA pointer lookup in interface
Sergey Sharybin [Mon, 1 Apr 2019 08:18:07 +0000 (10:18 +0200)]
Remove evaluated RNA pointer lookup in interface

Since there is a flush of evaluated values back to the original
for an active dependency graph we don't need this lookup anymore.

Not only it slows interface drawing down, but also is becoming
in a way of the upcoming fix.

2 months agoFix T63071: Bevel inconsistent results toggling harden_normals.
Howard Trickey [Mon, 1 Apr 2019 11:58:34 +0000 (07:58 -0400)]
Fix T63071: Bevel inconsistent results toggling harden_normals.

Some iterations in bevel were over a hash table, which leads
to possibly different results run-to-run, especially when
loop_slide is enabled. Changed those iters to go over all verts
of BMesh, which leads to consistent order run-to-run.

2 months agoFix T63169: 'Duplicate Current' entry in new workspace menu is not translated.
Bastien Montagne [Mon, 1 Apr 2019 09:30:44 +0000 (11:30 +0200)]
Fix T63169: 'Duplicate Current' entry in new workspace menu is not translated.

2 months agoGPencil: Redesign soft eraser logic
Antonioya [Mon, 1 Apr 2019 09:24:03 +0000 (11:24 +0200)]
GPencil: Redesign soft eraser logic

The old logic was working if the eraser was moved towards the end of the stroke, but got ugly results when the eraser was done towards the start of the stroke.

2 months agoGPencil: Remove low limit for soft eraser
Antonioya [Sun, 31 Mar 2019 18:30:54 +0000 (20:30 +0200)]
GPencil: Remove low limit for soft eraser

The low limit was not needed in the loop.

2 months agoFix T62996
Richard Antalik [Sun, 31 Mar 2019 21:52:47 +0000 (14:52 -0700)]
Fix T62996

Reviewers
    Brecht Van Lommel (brecht)
    Clément Foucault (fclem)

Differential revision: https://developer.blender.org/D4618

2 months agoFix: Buffer overflow in StudioLight
Ray Molenkamp [Sun, 31 Mar 2019 19:45:13 +0000 (13:45 -0600)]
Fix: Buffer overflow in StudioLight

sl->light_ambient is a float[3], copy_v4_fl4 overwrites sl->free_function with a bogus
pointer on 32 bit.

2 months agoI18n messages extraction: add 'generic' handling of Tools.
Bastien Montagne [Sun, 31 Mar 2019 16:49:11 +0000 (18:49 +0200)]
I18n messages extraction: add 'generic' handling of Tools.

2 months ago18N for tools definitions: make them resilient to None context.
Bastien Montagne [Sun, 31 Mar 2019 16:43:14 +0000 (18:43 +0200)]
18N for tools definitions: make them resilient to None context.

Dynamic callbacks generating lists of tools should accept None context,
not crash on it.

Similar to what we do with dynamic RNA enums, when NULL/None context is
given, assume we are in 'introspection' mode and return as many things
as possible.

This is currently essentially used by i18n messages extraction tool
(where getting all possible entries is kind of mandatory ;) ).

Also add some initial missing tranlations for complex cases that cannot
be automated, there'll likely be more of that kind...

2 months agoFix/Cleanup bad usage of RNA_def_parameter_clear_flags() on RNA properties.
Bastien Montagne [Sun, 31 Mar 2019 14:48:39 +0000 (16:48 +0200)]
Fix/Cleanup bad usage of RNA_def_parameter_clear_flags() on RNA properties.

2 months agoFix T63137: crash pressing enter to confirm menu, after recent changes.
Brecht Van Lommel [Sat, 30 Mar 2019 19:30:35 +0000 (20:30 +0100)]
Fix T63137: crash pressing enter to confirm menu, after recent changes.

2 months agoCleanup: remove unused modifier methods.
Brecht Van Lommel [Sat, 30 Mar 2019 18:16:44 +0000 (19:16 +0100)]
Cleanup: remove unused modifier methods.

2 months agoGPencil: Uses same random seed for render in Noise modifier
Antonioya [Sat, 30 Mar 2019 16:06:49 +0000 (17:06 +0100)]
GPencil: Uses same random seed for render in Noise modifier

As the random seed was calculated in the copy data, the render could be a little different. Now, the data is saved in the original data.

2 months agoGPencil: Fix segment fault when use F3 search menu.
Author Name [Sat, 30 Mar 2019 15:03:39 +0000 (16:03 +0100)]
GPencil: Fix segment fault when use F3 search menu.

Author of the patch: Robert Guetzkow (@rjg)

2 months agoGPencil: Improve soft eraser for low pressure strokes
Antonioya [Sat, 30 Mar 2019 09:43:52 +0000 (10:43 +0100)]
GPencil: Improve soft eraser for low pressure strokes

For very thin strokes with low pressure, the low limit value was too high.

2 months agoFix T63086: Navigation problem with Background/Reference Images
Sebastian Parborg [Sat, 30 Mar 2019 07:21:09 +0000 (08:21 +0100)]
Fix T63086: Navigation problem with Background/Reference Images

The issue was the manipulated depth for images would be used when doing distance depth checks.
Now we will use the actual depth of the image object when doing such tests.

Reviewed By: Clément Foucault

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

2 months agoFix T63115 crash upon switching to textured/rendered mode
Clément Foucault [Sat, 30 Mar 2019 03:20:25 +0000 (04:20 +0100)]
Fix T63115 crash upon switching to textured/rendered mode

2 months agoUI: Icons update
William Reynish [Sat, 30 Mar 2019 00:02:15 +0000 (01:02 +0100)]
UI: Icons update

New icons from Andrzej Ambroż / jendrzych:
-Adds separate icons for 3D Cursor orientation and pivot
Also, many dozens of tweaks and updates - too many to mention here.
Full list is on Devtalk

2 months agoCleanup: style, use braces for the Python API
Campbell Barton [Fri, 29 Mar 2019 19:12:48 +0000 (06:12 +1100)]
Cleanup: style, use braces for the Python API

2 months agoCleanup: style
Campbell Barton [Fri, 29 Mar 2019 20:13:55 +0000 (07:13 +1100)]
Cleanup: style

2 months agoEevee: Material: Decouple transparent shadows from blend mode
Clément Foucault [Fri, 29 Mar 2019 18:18:08 +0000 (19:18 +0100)]
Eevee: Material: Decouple transparent shadows from blend mode

This makes it easier to exclude a surface from casting shadows and can be
used to manipulate the shadows even for opaque surfaces.

Versionning ensure that old behavior is transfered to new rendering logic.

2 months agoFix T61129 Eevee: alpha texture shadow bug
Clément Foucault [Fri, 29 Mar 2019 17:59:11 +0000 (18:59 +0100)]
Fix T61129 Eevee: alpha texture shadow bug

This was due to some shading resources not being bound for the shadow
shader. This commit completely remove the shading part when in a shadow
shader. Thus making it a bit more lightweight and removing the needed
sources.

2 months agoFix cramped display of tool setting enums in workspace tab.
Brecht Van Lommel [Fri, 29 Mar 2019 16:53:56 +0000 (17:53 +0100)]
Fix cramped display of tool setting enums in workspace tab.

2 months agoFix part of T63102: wrong Python API Reference link in Help menu.
Brecht Van Lommel [Fri, 29 Mar 2019 16:34:16 +0000 (17:34 +0100)]
Fix part of T63102: wrong Python API Reference link in Help menu.

2 months agoFix header text for muted collapsed nodes not being greyed out.
Brecht Van Lommel [Fri, 29 Mar 2019 14:51:36 +0000 (15:51 +0100)]
Fix header text for muted collapsed nodes not being greyed out.

2 months agoEevee: Implement Texture coordinate from object
Clément Foucault [Fri, 29 Mar 2019 16:40:50 +0000 (17:40 +0100)]
Eevee: Implement Texture coordinate from object

First try to implement T57489. But unfortunately, there is a missing
dependency in the depsgraph that does not trigger the shader update.

2 months agoCleanup: Line wrapping
Sergey Sharybin [Fri, 29 Mar 2019 14:40:59 +0000 (15:40 +0100)]
Cleanup: Line wrapping

2 months agoGPencil: Improve soft eraser for last stroke points
Antonioya [Fri, 29 Mar 2019 14:39:29 +0000 (15:39 +0100)]
GPencil: Improve soft eraser for last stroke points

Now, the last point is managed separately in order to get smoother transition.

2 months agoCleanup: Spelling in comment
Sergey Sharybin [Fri, 29 Mar 2019 14:33:44 +0000 (15:33 +0100)]
Cleanup: Spelling in comment

2 months agoFix T63042: Grease pencil and armature will sometimes copy successfully because of...
Bastien Montagne [Fri, 29 Mar 2019 13:54:50 +0000 (14:54 +0100)]
Fix T63042: Grease pencil and armature will sometimes copy successfully because of the put in Collection order, sometimes fail.

Remove remapping to new IDs from `BKE_object_duplicate()` itself, doing
it here will break later remapping done after all desired objects have
been duplicated, preventing complete remap of ID pointers used in obdata
and other sub-data of duplicated objects.

Checked, the only two usages of this function were already doing
separated later step for this anyway.

2 months agoCleanup: BKE_object_duplicate.
Bastien Montagne [Fri, 29 Mar 2019 13:53:45 +0000 (14:53 +0100)]
Cleanup: BKE_object_duplicate.

Comments, code consistency, remove disabled code...

2 months agoCleanup: Fix comment.
Bastien Montagne [Thu, 28 Mar 2019 14:20:58 +0000 (15:20 +0100)]
Cleanup: Fix comment.

2 months agoFix T63075: edit mode crash with deforming modifiers, after recent changes.
Brecht Van Lommel [Fri, 29 Mar 2019 13:53:56 +0000 (14:53 +0100)]
Fix T63075: edit mode crash with deforming modifiers, after recent changes.

2 months agoGPencil: Cleanup code
Antonioya [Fri, 29 Mar 2019 11:51:46 +0000 (12:51 +0100)]
GPencil: Cleanup code

Reduce double function calling.

2 months agoFix T63082: Outliner allows assign grease pencil materials to mesh
Antonioya [Fri, 29 Mar 2019 10:58:28 +0000 (11:58 +0100)]
Fix T63082: Outliner allows assign grease pencil materials to mesh

The grease pencil materials only can be assigned to objects of grease pencil type.

2 months agoFix T62938: Rigid body crash with surface effector
Sergey Sharybin [Fri, 29 Mar 2019 09:27:57 +0000 (10:27 +0100)]
Fix T62938: Rigid body crash with surface effector

Missing dependency graph relation from geometry to simulation,
which made simulation to use evaluated mesh while it is being
evaluated.

2 months agoCleanup: Make it obvious which relations are used
Sergey Sharybin [Fri, 29 Mar 2019 09:21:36 +0000 (10:21 +0100)]
Cleanup: Make it obvious which relations are used

Relation in dependency graph is something else. So make it clear
that those are the effector ones.

2 months agoFix T62908: Missing update when inserting keyframe from dopesheet
Sergey Sharybin [Fri, 29 Mar 2019 09:01:55 +0000 (10:01 +0100)]
Fix T62908: Missing update when inserting keyframe from dopesheet

2 months agoFix T63063: solidify modifier crash after recent changes.
Brecht Van Lommel [Fri, 29 Mar 2019 00:27:58 +0000 (01:27 +0100)]
Fix T63063: solidify modifier crash after recent changes.

It should not assume there to be an origindex layer. Checked other modifiers
and they all seem to explicitly create it or verify if it's NULl.

2 months agoCycles: reduce number of synchronizing object prints.
Brecht Van Lommel [Fri, 29 Mar 2019 00:29:42 +0000 (01:29 +0100)]
Cycles: reduce number of synchronizing object prints.

Do it only for meshes/curves since those are potentially slow and need user
feedback to see things are not stuck. For object instances and lights assume
it's fast enough.

Printing too much can have a performance impact on slow Windows command
prompt or when logging complex scene renders.

2 months agoBuild environment: update comment about required packages.
Brecht Van Lommel [Thu, 28 Mar 2019 23:39:19 +0000 (00:39 +0100)]
Build environment: update comment about required packages.

2 months agoEevee: Render: Reduce debug print amount to not decrease perf
Clément Foucault [Thu, 28 Mar 2019 22:24:25 +0000 (23:24 +0100)]
Eevee: Render: Reduce debug print amount to not decrease perf

This is to fix the slowdown issue experienced on windows when rendering
from command line.

Fix T59649 Eevee in command-line batch mode is slow with particles/duplis

2 months agoGPU: Fix color difference when rendering to gpu_py_offscreen
Clément Foucault [Thu, 28 Mar 2019 21:38:55 +0000 (22:38 +0100)]
GPU: Fix color difference when rendering to gpu_py_offscreen

Now we do the color management inside the Draw manager and output CM byte
buffer.

2 months agoFix T62178 Eevee: Texture Box mapping not matching Cycles if object is scaled
Clément Foucault [Thu, 28 Mar 2019 21:08:39 +0000 (22:08 +0100)]
Fix T62178 Eevee: Texture Box mapping not matching Cycles if object is scaled

The wrong transformation was used. Add a new matrix specially for this case.

This also fix the Node texture coordinate that was suffering the same issue.

2 months agoFix T58387 Voronoi(Cells) does not work on eevee (amd + windows)
Clément Foucault [Thu, 28 Mar 2019 17:14:04 +0000 (18:14 +0100)]
Fix T58387 Voronoi(Cells) does not work on eevee (amd + windows)

Thanks to Gabor Fekete for helping finding the issue.

Was caused by uninitialized variable. Also took the oportunity to use comp
swizzling instead of multiple assignment.

2 months agoDRW: Fix Memory leak introduced by previous commit
Clément Foucault [Thu, 28 Mar 2019 17:09:10 +0000 (18:09 +0100)]
DRW: Fix Memory leak introduced by previous commit

2 months agoDRW/Eevee: Add correct support for Orco
Clément Foucault [Thu, 28 Mar 2019 15:36:45 +0000 (16:36 +0100)]
DRW/Eevee: Add correct support for Orco

Until now, Orcos were computed by the gpu (GLSL) and were not taking into
account the modifier stack (breaking orco for deformed mesh).

Now Orco is now computed on CPU but only if a modifier stack is present.

Tagging that an ORCO layer is present is done via a 4th component, which is
a waste of memory/bandwidth. Best would be to do the same as auto attrib
color space and save a bool uniform somewhere but for now it's too
disruptive.

2 months agoUI: tweak display of report messages in the status bar.
Nathan Craddock [Thu, 28 Mar 2019 16:54:35 +0000 (17:54 +0100)]
UI: tweak display of report messages in the status bar.

Remove fading away the color, share theme colors with info editor.

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

2 months agoFix T60719: muted nodes are not clearly visible.
Robert Guetzkow [Thu, 28 Mar 2019 16:39:54 +0000 (17:39 +0100)]
Fix T60719: muted nodes are not clearly visible.

Now the entire node gets greyed out, instead of using a red header that is
hard to distinguish from other nodes with similar header colors.

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

2 months agoFix part of T60735: invalid CD_ORIGINDEX data in some modifier stack evaluations.
Brecht Van Lommel [Thu, 28 Mar 2019 14:05:04 +0000 (15:05 +0100)]
Fix part of T60735: invalid CD_ORIGINDEX data in some modifier stack evaluations.

BKE_mesh_new_nomain automatically added a CD_ORIGINDEX layer initialized to 0,
which was never filled in correctly. In 2.7 the equivalent function used to
modify the source derivedmesh and add valid original indices to it, but this
is no longer possible in the new design and was quite unpredictable anyway.

Now instead rely on mesh_calc_modifiers and the depsgraph to determine when
CD_ORIGINDEX should be added.

2 months agoFix T60735: Cycles render hangs with vertex instancing.
Brecht Van Lommel [Thu, 28 Mar 2019 13:44:12 +0000 (14:44 +0100)]
Fix T60735: Cycles render hangs with vertex instancing.

This should not use the original index as a unique instance index, with for
example an array modifier the same original index may be used multiple times.

2 months agoCleanup: better naming, comments, variable scoping in mesh_calc_modifiers.
Brecht Van Lommel [Thu, 28 Mar 2019 10:42:53 +0000 (11:42 +0100)]
Cleanup: better naming, comments, variable scoping in mesh_calc_modifiers.

2 months agoCleanup: remove unused derivedmesh code.
Brecht Van Lommel [Wed, 27 Mar 2019 18:07:16 +0000 (19:07 +0100)]
Cleanup: remove unused derivedmesh code.

2 months agoFix build errors
mano-wii [Thu, 28 Mar 2019 18:59:51 +0000 (15:59 -0300)]
Fix build errors

From rBd5cb425b8745

2 months agoUI: Theme: Make selected text stand out
William Reynish [Thu, 28 Mar 2019 18:59:46 +0000 (19:59 +0100)]
UI: Theme: Make selected text stand out

Previous selected text color was almost invisible against the dark background.
Use same selected/highlight color as in other places in the default theme.

Issue reported on Devtalk by user Symstract

2 months agoPossible fix for T62999: Crash when select in edit mode.
mano-wii [Thu, 28 Mar 2019 17:17:00 +0000 (14:17 -0300)]
Possible fix for T62999: Crash when select in edit mode.

Apparently some drivers don't allow `glReadPixel` read out pixels of texture boundaries.
Intersect `rect` to avoid such cases.

2 months agoGPencil: Fix error in previous commit
Antonioya [Thu, 28 Mar 2019 16:17:04 +0000 (17:17 +0100)]
GPencil: Fix error in previous commit

2 months agoFix T63054: Crash on "Grease Pencil Unlink"
Antonioya [Thu, 28 Mar 2019 16:07:49 +0000 (17:07 +0100)]
Fix T63054: Crash on "Grease Pencil Unlink"

This operator was used only by annotations and it was part of the old legacy code.

Now, the operator is limited to annotations and cannot be used with grease pencil objects.

Also changed the tooltip to clarify it's only for annotations.

2 months agoFix T63052: Crash on "Grease Pencil Fill" without Grease Pencil Object
Antonioya [Thu, 28 Mar 2019 15:48:32 +0000 (16:48 +0100)]
Fix T63052: Crash on "Grease Pencil Fill" without Grease Pencil Object

Changed poll function to verify if the context is valid.

Also cleanup return values.

2 months agoFix T62717: Switching Shading Modes During Sculpting
Jeroen Bakker [Thu, 28 Mar 2019 15:10:15 +0000 (16:10 +0100)]
Fix T62717: Switching Shading Modes During Sculpting

Switching shader modes to material or render during a sculpting session
showed the model when the sculptsession was started. The user needed
to click that forced an update of the sculptsession.

In `sculpt_flush_update` the eevee drawing mesh is not updated when
workbench engine is used.

2 months agoFix T63032: Increase camera properties precision in UI
Jacques Lucke [Thu, 28 Mar 2019 14:56:53 +0000 (15:56 +0100)]
Fix T63032: Increase camera properties precision in UI

Reviewers: brecht

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

2 months agoFix T63015: Crash when using circle select tool in lattice edit mode
Jacques Lucke [Thu, 28 Mar 2019 14:03:27 +0000 (15:03 +0100)]
Fix T63015: Crash when using circle select tool in lattice edit mode

Reviewers: brecht

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

2 months agoFix T62874: Crash Texture shading+Transparency
Jeroen Bakker [Thu, 28 Mar 2019 13:58:37 +0000 (14:58 +0100)]
Fix T62874: Crash Texture shading+Transparency

When texure shading is enabled, the transparency accum shaders were not set/updated.
This resulted into a crash when transparent objects were rendered when shading mode
was set to texture.

This patch will add the V3D_SHADING_TEXTURE_COLOR to the modes for OIT so the
shaders are set.

Reviewed By: fclem

Maniphest Tasks: T62874

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

2 months agoFix T63040: Resizing node has offset
Jacques Lucke [Thu, 28 Mar 2019 13:56:55 +0000 (14:56 +0100)]
Fix T63040: Resizing node has offset

This broke in rB6500b31728d870506207d9d70837b171cbef32ea.

Reviewers: brecht

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

2 months agoDrawManager: Add Edge Detection To DisplayLists
Jeroen Bakker [Thu, 28 Mar 2019 13:51:29 +0000 (14:51 +0100)]
DrawManager: Add Edge Detection To DisplayLists

Objects that internally uses DispList do not cast shadow in the workbench.
Their outline is also not visible in object mode. The reason for this is
that edge detection was not implemented for Display Lists. This patch will
implement the edge detection.

Reviewed By: fclem

Maniphest Tasks: T62479

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

2 months agoFix T60421: Bone heads are hidden when non-connected parent is hidden
Sebastian Parborg [Thu, 28 Mar 2019 12:09:16 +0000 (13:09 +0100)]
Fix T60421: Bone heads are hidden when non-connected parent is hidden

The root point of a bone is now always drawn unless it is connected to an other bone.

Reviewed By: Clément Foucault

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