18 months agoEevee: DOF: Optimization: Move some operations out of the shader
Clément Foucault [Fri, 15 Mar 2019 21:17:07 +0000 (22:17 +0100)]
Eevee: DOF: Optimization: Move some operations out of the shader

18 months agoFix T61857 Eevee DOF not working if the camera is in orthographic mode
Clément Foucault [Fri, 15 Mar 2019 21:14:42 +0000 (22:14 +0100)]
Fix T61857 Eevee DOF not working if the camera is in orthographic mode

It was just a bad mapping of the ogl depth to scene linear depth.

18 months agoParticle: Remove Billboard Particle code
Clément Foucault [Fri, 15 Mar 2019 19:56:29 +0000 (20:56 +0100)]
Particle: Remove Billboard Particle code

The billboard particles were only used by Blender Internal. So until it is
supported by Cycles of Eevee there is no reason to keep it in the code and

Fix T61695 Billboard particles not displaying in Eevee viewport, render

18 months agoSilence warning from recent GPU simplify commit
Dalai Felinto [Fri, 15 Mar 2019 21:14:24 +0000 (18:14 -0300)]
Silence warning from recent GPU simplify commit

Said commit introduced warnings and build problens. Let's be more
careful in the future. Warnings are not to be treated lightly either.

18 months agoFix compiling after last commit
Jens Verwiebe [Fri, 15 Mar 2019 21:07:09 +0000 (22:07 +0100)]
Fix compiling after last commit

18 months agoGPU: Simplify select shaders.
mano-wii [Fri, 15 Mar 2019 19:02:55 +0000 (16:02 -0300)]
GPU: Simplify select shaders.

This commit allows the drawing of the mesh select ids to be done on a 32UI format texture.
This simplifies the shader that previously acted on the backbuffer and had to do an uint to rgba conversion.

Differential Revision:

18 months agoRemove object hide_* operators from outliner keymap
Dalai Felinto [Fri, 15 Mar 2019 19:19:35 +0000 (16:19 -0300)]
Remove object hide_* operators from outliner keymap

We already have dedicated outliner visibility operators that not only
take precedent over those ones, but also unhide collections as well.

No change for the end user. That said, since I added the outliner
hide/unhide operators I assumed that newly visible objects are to be
selected. That can change in a separate commit, but it should be done
by changing OUTLINER_OT_unhide_all.

Reviewers: brecht

Differential Revision:

18 months agoFix T62438: Unhide all doesn't set newly visible objects to selected
Dalai Felinto [Fri, 15 Mar 2019 19:14:21 +0000 (16:14 -0300)]
Fix T62438: Unhide all doesn't set newly visible objects to selected

The select option in the operator was never working because we were
trying to select an object considered unselectable (since it was hidden).

Reviewers: brecht

Differential Revision:

18 months agoFix T62313 - No way to remove object from master collection in 3d view
Dalai Felinto [Tue, 12 Mar 2019 22:55:33 +0000 (19:55 -0300)]
Fix T62313 - No way to remove object from master collection in 3d view

This introduces a new iterator, FOREACH_COLLECTION, that unlike the
FOREACH_SCENE_COLLECTION it iterates over all the Blender file
collections, including the scene master collection, as well the database
ones (bmain).

Reviewers: brecht

18 months agoFix T62320: Outliner collection disable not propagating to other view layers
Dalai Felinto [Fri, 15 Mar 2019 18:35:17 +0000 (15:35 -0300)]
Fix T62320: Outliner collection disable not propagating to other view layers

The moment you switched to another view layer the visibility was still

18 months agoFix T62608: many tools in the toolbar not working.
Brecht Van Lommel [Fri, 15 Mar 2019 18:29:20 +0000 (19:29 +0100)]
Fix T62608: many tools in the toolbar not working.

The keymap names still use the label, so use that again for looking up the
keymap so things work again after recent changes.

18 months agoFix T59943 Color banding present in Workbench render but not in viewport
Clément Foucault [Fri, 15 Mar 2019 18:27:54 +0000 (19:27 +0100)]
Fix T59943 Color banding present in Workbench render but not in viewport

I don't really like forcing RGBA16F for Albedo render but that's ok since
the texture is shared with the effect_fb.

18 months agoFix T62601: parenting to curve (follow path) causes offset
Philipp Oeser [Fri, 15 Mar 2019 15:15:37 +0000 (16:15 +0100)]
Fix T62601: parenting to curve (follow path) causes offset

Similar to T60623 / rB2894e75121d7.
Issue (when parenting with 'Follow Curve') is that the curves
CU_FOLLOW flag is set on the original, but not the
evaluated curve (yet), leading to misbehaviour in 'ob_parcurve()'.
Setting this on both now.

Reviewers: sergey

Maniphest Tasks: T62601

Differential Revision:

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

18 months agoCycles: upgrade to CUDA 10.1 as the one officially supported version.
Brecht Van Lommel [Fri, 15 Mar 2019 13:18:22 +0000 (14:18 +0100)]
Cycles: upgrade to CUDA 10.1 as the one officially supported version.

This version fixes various bugs, and there is no need anymore to use both
9.1 and 10.0 for different cards.

There is a bug related to WITH_CYCLES_CUBIN_COMPILER and bump mapping in the
regression tests, so that remains disabled same as it was for CUDA 10.0.

Fix T59286: CUDA bake failing on some cards.
Fix T56858: CUDA 9.2 and 10 issues.

18 months agoFix cycles preferences.get_devices() not returning all devices as before.
Brecht Van Lommel [Fri, 15 Mar 2019 14:26:18 +0000 (15:26 +0100)]
Fix cycles preferences.get_devices() not returning all devices as before.

It only returned those for the active device type. For backwards compatibility
return them all again, but still avoid enumerating them from our own code on
startup or opening preferences.

18 months agoMerge branch 'blender2.7'
Jeroen Bakker [Fri, 15 Mar 2019 15:28:33 +0000 (16:28 +0100)]
Merge branch 'blender2.7'

18 months agoCycles/OpenCL: Compile Kernels During Scene Update
Jeroen Bakker [Wed, 13 Mar 2019 11:31:48 +0000 (12:31 +0100)]
Cycles/OpenCL: Compile Kernels During Scene Update

The main goals of this change is faster starting when using foreground

This patch will build kernels in parallel to the update process of
the scene. When these optimized kernels are not available (yet) an AO
kernel will be used.

These AO kernels are fast to compile (3-7 seconds) and can be
reused by all scenes. When the final kernels become available we
will switch to these kernels.

In background mode the AO kernels will not be used.
Some kernels are being used during Scene update (displace, background
light). When these kernels are being used the process can halt until
these become available.

Reviewed By: brecht, #cycles

Maniphest Tasks: T61752

Differential Revision:

18 months agoFix T62614: Copy eevee settings when scene is copied
Jacques Lucke [Fri, 15 Mar 2019 15:06:30 +0000 (16:06 +0100)]
Fix T62614: Copy eevee settings when scene is copied

Reviewers: brecht, fclem

Differential Revision:

18 months agoFix T62594: Truncated text in UI
Jacques Lucke [Fri, 15 Mar 2019 14:12:42 +0000 (15:12 +0100)]
Fix T62594: Truncated text in UI

Reviewers: brecht, billreynish

Differential Revision:

18 months agoFix: "Jump To Target" showing up in workspace context menu
Dalai Felinto [Fri, 15 Mar 2019 13:49:26 +0000 (10:49 -0300)]
Fix: "Jump To Target" showing up in workspace context menu

Issue introduced on d227c58e3ec2020.

This was affecting WorkSpaces as well as background scene and probably
other places. We use the operator poll to decide whether to show it.

Reviewers: brecht, mont29

Differential Revision:

18 months agoFix T62592: GPencil layer activation from outliner needed two clicks
Antonioya [Fri, 15 Mar 2019 13:38:40 +0000 (14:38 +0100)]
Fix  T62592: GPencil layer activation from outliner needed two clicks

For some reason, the code was commented and we missed to enable it again.

18 months agoFix T62284: apply a retroactive fix for T57366 to old files.
Alexander Gavrilov [Fri, 15 Mar 2019 11:58:04 +0000 (14:58 +0300)]
Fix T62284: apply a retroactive fix for T57366 to old files.

18 months agoUI: rename object Boundary back to Bounds, it's not the same thing.
Brecht Van Lommel [Fri, 15 Mar 2019 11:16:35 +0000 (12:16 +0100)]
UI: rename object Boundary back to Bounds, it's not the same thing.

18 months agoCorrect tool name (missed in recent update)
Campbell Barton [Fri, 15 Mar 2019 09:32:49 +0000 (20:32 +1100)]
Correct tool name (missed in recent update)

18 months agoFix T62297: Grease Pencil dots drawing crashes Blender
Antonioya [Fri, 15 Mar 2019 09:07:18 +0000 (10:07 +0100)]
Fix T62297: Grease Pencil dots drawing crashes Blender

Fix again this bug. Maybe it was introduced when change how wireframe mode by object works.

18 months agoCleanup: unused imports
Campbell Barton [Fri, 15 Mar 2019 08:45:21 +0000 (19:45 +1100)]
Cleanup: unused imports

18 months agoCycles/OpenCL: Added missing opencl programs
Jeroen Bakker [Fri, 15 Mar 2019 07:11:28 +0000 (08:11 +0100)]
Cycles/OpenCL: Added missing opencl programs

The functions that determine the program name + filename of kernels
were missing some base kernels like denoising and base. For completeness
I added those kernels so the function returns the correct results.

18 months agoTool System: add tool registration API
Campbell Barton [Thu, 14 Mar 2019 03:15:29 +0000 (14:15 +1100)]
Tool System: add tool registration API

This mimics RNA style class registration,
keeping the same internal data types.

Currently there is a template which shows an example of adding a tool
group with a keymap.

Icon generation still needs to be exposed for general use.

18 months agoTool System: use categories for tool identifiers
Campbell Barton [Fri, 15 Mar 2019 03:18:21 +0000 (14:18 +1100)]
Tool System: use categories for tool identifiers

Tools that come with Blender use 'builtin' or 'builtin_brush' prefix.

18 months agoTool System: split UI label from tool identifiers
Campbell Barton [Fri, 15 Mar 2019 01:45:41 +0000 (12:45 +1100)]
Tool System: split UI label from tool identifiers

Prepare for exposing tool registration to the Python API.

- Generated tools can use their own prefix so naming collisions
  won't happen between hard coded & generated tools.
- Add-on authors can use the add-on name as a prefix.

Currently the names match, renaming will happen next.

18 months agoUI: rename brush "Overlay" to "Display"
Campbell Barton [Fri, 15 Mar 2019 00:34:43 +0000 (11:34 +1100)]
UI: rename brush "Overlay" to "Display"

Brush cursor display options are more closely related to other
data-block display options than per-3D viewport overlay.

Rename to avoid confusion.

18 months agoFix T59155: Can't select light in-front of other objects
Campbell Barton [Thu, 14 Mar 2019 23:57:48 +0000 (10:57 +1100)]
Fix T59155: Can't select light in-front of other objects

Enable depth picking by default.

This adds new 'gpu_flag' since it's not so relevant to add GPU drawing
options into uiflag & uiflag2.

This resets the recently added smooth edge flag.

18 months agoCleanup: deprecated flags to named DNA flags
Campbell Barton [Thu, 14 Mar 2019 23:42:39 +0000 (10:42 +1100)]
Cleanup: deprecated flags to named DNA flags

18 months agoCleanup: indentation, wrapping
Campbell Barton [Thu, 14 Mar 2019 21:53:22 +0000 (08:53 +1100)]
Cleanup: indentation, wrapping

Mostly functions wrapping args, not confirming to our style guide.

18 months agoCleanup: style, use doxygen for comments
Campbell Barton [Thu, 14 Mar 2019 22:41:13 +0000 (09:41 +1100)]
Cleanup: style, use doxygen for comments

18 months agoGPencil: Invert Texture for Line Strokes
Antonioya [Thu, 14 Mar 2019 18:53:47 +0000 (19:53 +0100)]
GPencil: Invert Texture for Line Strokes

Invert the texture of the stroke if the random UV is activated. Before, this parameter only affected to dot mode, but not to line strokes.

The texture is inverted vertically.

18 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Thu, 14 Mar 2019 18:00:10 +0000 (19:00 +0100)]
Merge branch 'blender2.7'

18 months agoFix T62460: undo doesn't work in files that have a paint curve.
Brecht Van Lommel [Thu, 14 Mar 2019 17:58:37 +0000 (18:58 +0100)]
Fix T62460: undo doesn't work in files that have a paint curve.

18 months agoFix T62425: topbar showing wrong buttons at some UI scales.
Brecht Van Lommel [Thu, 14 Mar 2019 16:10:47 +0000 (17:10 +0100)]
Fix T62425: topbar showing wrong buttons at some UI scales.

18 months agoFix T62120: number button editing outside of soft max range jumps.
Brecht Van Lommel [Thu, 14 Mar 2019 17:27:17 +0000 (18:27 +0100)]
Fix T62120: number button editing outside of soft max range jumps.

18 months agoTests: BLI_heap_simple test fix build error with MSVC.
Ray Molenkamp [Thu, 14 Mar 2019 17:14:12 +0000 (11:14 -0600)]
Tests: BLI_heap_simple test fix build error with MSVC.

BLI_heap_simple.h uses types from BLI_sys_types.h causing a build error on windows.

18 months agoFix T57138: Cycles CMJ failing with viewport samples set to 0.
Brecht Van Lommel [Thu, 14 Mar 2019 16:29:18 +0000 (17:29 +0100)]
Fix T57138: Cycles CMJ failing with viewport samples set to 0.

Can't use INT_MAX, CMJ runs into precision/overflow issues before that.

18 months agoFix T58793: Volumetric Clouds in Eevee not working | MacOs
Clément Foucault [Thu, 14 Mar 2019 16:18:32 +0000 (17:18 +0100)]
Fix T58793: Volumetric Clouds in Eevee not working | MacOs

Fix missing attribute in vertex shader. Theses are optimized out if using
volumetric shader but on MacOS they seems to be needed.

18 months agoFix T58610: EEVEE: camera motion blur renders only one viewport sample
Clément Foucault [Thu, 14 Mar 2019 15:51:34 +0000 (16:51 +0100)]
Fix T58610: EEVEE: camera motion blur renders only one viewport sample

This fix saves the camera matrices in order to not call
BKE_animsys_evaluate_animdata during each draw loop. This function tags
the view as dirty even if the camera does not move.
This effectivly, avoids the constant reset of TAA.

18 months agoFix T58694 Eevee: Wrong result when using normal map and face is flipped
Clément Foucault [Wed, 13 Mar 2019 22:42:38 +0000 (23:42 +0100)]
Fix T58694 Eevee: Wrong result when using normal map and face is flipped

18 months agoFix T62551: Limited Hair editing (no grab, scale, rotate)
Sergey Sharybin [Thu, 14 Mar 2019 14:53:52 +0000 (15:53 +0100)]
Fix T62551: Limited Hair editing (no grab, scale, rotate)

This is actually re-introduced T59963 which got broken by 6752022310b.
Use less obscure recalc flag now.

18 months agoFix T61300: First letter truncated
Jacques Lucke [Thu, 14 Mar 2019 14:44:07 +0000 (15:44 +0100)]
Fix T61300: First letter truncated

The main problem was that the character `J` has "negative kerning".
It was cut off because it started outside of the clipping rectangle.

Reviewers: brecht

Differential Revision:

18 months agoFix T62321: Crash on motion tracking when dopesheet open and deleting track
Sergey Sharybin [Thu, 14 Mar 2019 14:16:56 +0000 (15:16 +0100)]
Fix T62321: Crash on motion tracking when dopesheet open and deleting track

Need to ensure all dopesheet are properly tagged for update.

The tricky part here is that due to the animation we need to keep
movie clips covered by copy-on-write, but the interface uses an
original clip to draw dopesheet.

Use same idea of an active dependency graph as is done in other
similar cases.

18 months agoGPencil: Change Brush defaults for Block and Marker
Antonioya [Thu, 14 Mar 2019 13:03:04 +0000 (14:03 +0100)]
GPencil: Change Brush defaults for Block and Marker

Still pending the change in default 2D template.

Changes reviewed by @pepeland and @mendio

18 months agoFix some unreported issues with image sequence updates, clean code.
Brecht Van Lommel [Thu, 14 Mar 2019 11:40:15 +0000 (12:40 +0100)]
Fix some unreported issues with image sequence updates, clean code.

Lamp and world nodes were missing, nested node trees were updated twice,
remove some legacy code.

18 months agoFix T61937: image sequences not updating in workbench display mode.
Brecht Van Lommel [Thu, 14 Mar 2019 11:37:51 +0000 (12:37 +0100)]
Fix T61937: image sequences not updating in workbench display mode.

Need to pass the image user along to get the frame number.

18 months agoMerge branch 'blender2.7' of
Stefan Werner [Thu, 14 Mar 2019 10:47:27 +0000 (11:47 +0100)]
Merge branch 'blender2.7' of

18 months agoCycles: Improved thread order for better CUDA performance.
Stefan Werner [Thu, 14 Mar 2019 10:45:58 +0000 (11:45 +0100)]
Cycles: Improved thread order for better CUDA performance.

This patch puts threads that render the same pixel closer together,
as opposed to threads that render the same sample. Thus threads
within a warp are more coherent in memory access and control flow,
leading to performance improvements.

Example benchmarks on a Quadro RTX4000 (WDDM) on Windows 10:
Koro:                 4:23 ->  3:46
BMW:                  1:18 ->  1:25
Barbershop Interior: 17:52 -> 14:55
Classroom:            4:37 ->  3:45

Performance differences on OpenCL/AMD were hit and miss, some scenes
became faster, others lost significantly. Therefore, this is kept as
CUDA only change for now.

18 months agoFix T62528: data transfer modifier error.
Bastien Montagne [Thu, 14 Mar 2019 08:46:46 +0000 (09:46 +0100)]
Fix T62528: data transfer modifier error.

Stupid mistake in previous 'fixing' commit, I put the call computing
extra required source cddata masks into the callback used to get
destination (current object) cddata masks...

18 months agoMerge branch 'blender2.7'
Jeroen Bakker [Thu, 14 Mar 2019 08:31:20 +0000 (09:31 +0100)]
Merge branch 'blender2.7'

18 months agoFix T62145: Geometry.Backface Node Renders Black
Jeroen Bakker [Thu, 14 Mar 2019 08:20:11 +0000 (09:20 +0100)]
Fix T62145: Geometry.Backface Node Renders Black

The NODE_GROUP_LEVEL of the Geometry node should be bumped to 1
when Backface is connected. Backface uses `NODE_LIGHT_PATH` that
is part of NODE_GROUP_LEVEL1, the rest of the geometry ndoe is

18 months agoFix separators use within tool groups
Campbell Barton [Thu, 14 Mar 2019 06:27:22 +0000 (17:27 +1100)]
Fix separators use within tool groups

18 months agoKeymap: tweak keymap loading type checks
Campbell Barton [Thu, 14 Mar 2019 04:53:48 +0000 (15:53 +1100)]
Keymap: tweak keymap loading type checks

For full keymaps, ensure keymap items are lists to allow predictable
manipulation at runtime.

When calling `keymap_init_from_data` directly, allow any sequence type
to allow tools to define their keymaps as tuples.

18 months agoCleanup: unused imports
Campbell Barton [Thu, 14 Mar 2019 04:14:43 +0000 (15:14 +1100)]
Cleanup: unused imports

18 months agoKeymap: remove select linked deselect
Campbell Barton [Thu, 14 Mar 2019 04:33:24 +0000 (15:33 +1100)]
Keymap: remove select linked deselect

This didn't do anything useful (always de-selected all).

18 months agoCleanup: match WorkSpace and WorkSpaceTool capitalization
Campbell Barton [Thu, 14 Mar 2019 03:36:36 +0000 (14:36 +1100)]
Cleanup: match WorkSpace and WorkSpaceTool capitalization

18 months agoCleanup: remove redundant UV select linked options
Campbell Barton [Thu, 14 Mar 2019 03:09:24 +0000 (14:09 +1100)]
Cleanup: remove redundant UV select linked options

18 months agoCleanup: doxy sections
Campbell Barton [Thu, 14 Mar 2019 02:36:48 +0000 (13:36 +1100)]
Cleanup: doxy sections

18 months agoUI: disallow splitting of temporary screens
Campbell Barton [Thu, 14 Mar 2019 00:12:52 +0000 (11:12 +1100)]
UI: disallow splitting of temporary screens

D4510 by @harley

18 months agoCleanup: style
Campbell Barton [Thu, 14 Mar 2019 00:08:48 +0000 (11:08 +1100)]
Cleanup: style

18 months agoFix "Follow Active Quad" poll function
Campbell Barton [Wed, 13 Mar 2019 23:56:25 +0000 (10:56 +1100)]
Fix "Follow Active Quad" poll function

Since this uses the active face this only makes sense in edit-mode.

18 months agoFix T60172: UV smart project fails for unselected active object
Campbell Barton [Wed, 13 Mar 2019 23:47:25 +0000 (10:47 +1100)]
Fix T60172: UV smart project fails for unselected active object

Support multi-object edit-mode too.

18 months agoFix T62526: Can't scroll redo panel
Campbell Barton [Wed, 13 Mar 2019 22:58:20 +0000 (09:58 +1100)]
Fix T62526: Can't scroll redo panel

18 months agoComments: correct ARegion.sizex/y comment
Campbell Barton [Wed, 13 Mar 2019 22:50:47 +0000 (09:50 +1100)]
Comments: correct ARegion.sizex/y comment

Also remove unused 'fsize'

18 months agoEevee: Fix black mesh when tangent is not present
Clément Foucault [Wed, 13 Mar 2019 22:13:58 +0000 (23:13 +0100)]
Eevee: Fix black mesh when tangent is not present

In this case, the generic vertex attribute is {0,0,0,1}. So we look for
this case.

This fixes black text objects with a normal map applied. Also this could
help porting sculpt mode drawing to Eevee without supporting normal

Note that will just fix black meshes due to T61870 but objects will not
show their normal map. So it's not a fix for this issue.

18 months agoFix T60170: Eevee: smoke color does not apply permanently
Clément Foucault [Wed, 13 Mar 2019 21:35:54 +0000 (22:35 +0100)]
Fix T60170: Eevee: smoke color does not apply permanently

This was because color is not present in the density texture if there is
only one constant color. Adding it as a uniform.

18 months agoFix T59445: top bar hides everything when there isn't enough space.
Brecht Van Lommel [Wed, 13 Mar 2019 19:13:09 +0000 (20:13 +0100)]
Fix T59445: top bar hides everything when there isn't enough space.

Left and right aligned regions get hidden when there is not enough space,
and the main center region was empty. Now remove the left region and put
its contents in the center region, so that it always remains.

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

18 months agoFix T62156: Hair particle only shows up in final render when visible in viewport
Sergey Sharybin [Wed, 13 Mar 2019 17:04:40 +0000 (18:04 +0100)]
Fix T62156: Hair particle only shows up in final render when visible in viewport

Draw manager was checking for particles being enabled in viewport, but
actual evaluation was happening for render. Now the check in draw manager
properly follows current evaluation mode.

Additionally, de-duplicated some check, by moving everything needed to
a single place.

Annoying part is the const-cast, that could be cleaned up later by
modifying some underlying functions.

18 months agoBuild environment: require Alsa/OSS/PulseAudio backends for OpenAL on Linux.
Brecht Van Lommel [Wed, 13 Mar 2019 12:00:03 +0000 (13:00 +0100)]
Build environment: require Alsa/OSS/PulseAudio backends for OpenAL on Linux.

Otherwise we can silently build an OpenAL that can't actually playback audio.

18 months agoFix T60434: crash with OSL and viewport + preview render at the same time.
Brecht Van Lommel [Wed, 13 Mar 2019 17:26:11 +0000 (18:26 +0100)]
Fix T60434: crash with OSL and viewport + preview render at the same time.

Don't free LLVM JIT memory until process exit, there might be multiple OSL
instances using it.

18 months agoBuild environment: backport master changes to blender2.7.
Brecht Van Lommel [Wed, 13 Mar 2019 17:30:42 +0000 (18:30 +0100)]
Build environment: backport master changes to blender2.7.

We can keep these in sync for now.

18 months agoGPencil: Cleanup code
Antonioya [Wed, 13 Mar 2019 16:42:29 +0000 (17:42 +0100)]
GPencil: Cleanup code

18 months agoFix T62521: Fake dependency cycle with spline IK
Sergey Sharybin [Wed, 13 Mar 2019 15:57:27 +0000 (16:57 +0100)]
Fix T62521: Fake dependency cycle with spline IK

The core was hooking up relation to a wrong operation, in an
attempt to cause proper full update of the pose (since there
is no intermediate state stored anywhere). This is now done
as a part of flush_handle_component_node(), so can properly
route more granular relation.

This fixes the crash which was caused by an access of partially
evaluated data by solving the fake cycle. However, if there
is a real cycle involved the code will still not survive, but
this is more generic issue (which also includes modifiers
for meshes and curves).

Reviewers: brecht

Reviewed By: brecht

Differential Revision:

18 months agoT62446: Mouse cursor disappears on Grease Pencil stroke
Antonioya [Wed, 13 Mar 2019 16:13:37 +0000 (17:13 +0100)]
T62446: Mouse cursor disappears on Grease Pencil stroke

Before the cursor was only visible after the cursor moves over side areas, but not in viewport area.

Now, as soon the drawing is completed, the cursor is reset in order to get again the icon in the viewport.

18 months agoUI: New option to display factors as percentages
Jacques Lucke [Wed, 13 Mar 2019 15:58:00 +0000 (16:58 +0100)]
UI: New option to display factors as percentages

The option can be changed in the Preferences
in `Interface -> Editors -> Factor Display Type`.

Reviewers: campbellbarton, brecht, billreynish

Differential Revision:

18 months agoFix T58668: Misaligned text when editing multiple values
Jacques Lucke [Wed, 13 Mar 2019 15:26:34 +0000 (16:26 +0100)]
Fix T58668: Misaligned text when editing multiple values

Reviewers: brecht

Differential Revision:

18 months agoFix T59448: Eevee broken Area Light shadows for square and rectange shape
Clément Foucault [Wed, 13 Mar 2019 15:06:23 +0000 (16:06 +0100)]
Fix T59448: Eevee broken Area Light shadows for square and rectange shape

18 months agoFix T58721: Keyframing one transform option reset other transforms
Sergey Sharybin [Wed, 13 Mar 2019 14:38:45 +0000 (15:38 +0100)]
Fix T58721: Keyframing one transform option reset other transforms

Use dedicated flag to tag animation just for copy-on-write synchronization,
which makes it so copies of the original data blocks gets in sync with the
original ID. This will not flush the animation update to all objects which
depend on that animation.

If such flush is required, use ID_RECALC_ANIMATION.

Reviewers: brecht

Reviewed By: brecht

Differential Revision:

18 months agoCurves: change default fill mode to full, increase bevel resolution.
Alex Strand [Wed, 13 Mar 2019 14:03:07 +0000 (15:03 +0100)]
Curves: change default fill mode to full, increase bevel resolution.

Ref D4438.

18 months agoFix T60185: Crash on adding Inverse Kinematics
Jose C. Rubio [Wed, 13 Mar 2019 14:13:52 +0000 (15:13 +0100)]
Fix T60185: Crash on adding Inverse Kinematics

When having loops in a kinematic chain and also a IK constrain,
the solve_cycle function removes graph relations necessary to ensure
the cleanup operation was running at the very end.

Due to his Blender was crashing when some operations (the bone
constraints) accessed a pointer that was already freed.

Solved by adding more relations between crucial nodes.

18 months agoUI: put Armature constraint in alphabetical order in the menu.
Adrian Newton [Wed, 13 Mar 2019 13:44:56 +0000 (14:44 +0100)]
UI: put Armature constraint in alphabetical order in the menu.

Differential Revision:

18 months agoFix use of uninitialized variable in undo system.
Brecht Van Lommel [Wed, 13 Mar 2019 12:47:47 +0000 (13:47 +0100)]
Fix use of uninitialized variable in undo system.

18 months agoWM: pre-fill bug-reports
Campbell Barton [Wed, 13 Mar 2019 12:02:51 +0000 (23:02 +1100)]
WM: pre-fill bug-reports

D4507 by @LazyDodo w/ edits & moved into own module.

18 months agoBuild environment: require Alsa/OSS/PulseAudio backends for OpenAL on Linux.
Brecht Van Lommel [Wed, 13 Mar 2019 12:00:03 +0000 (13:00 +0100)]
Build environment: require Alsa/OSS/PulseAudio backends for OpenAL on Linux.

Otherwise we can silently build an OpenAL that can't actually playback audio.

18 months agoFix T57305: NDOF frozen w/ lock view to camera
Campbell Barton [Wed, 13 Mar 2019 11:18:22 +0000 (22:18 +1100)]
Fix T57305: NDOF frozen w/ lock view to camera

This effectively reverts 030297209f2508a and 785e8a636a2939,
which caused this issue.

18 months agoBMesh: make edge winding from face optional
Campbell Barton [Wed, 13 Mar 2019 08:55:18 +0000 (19:55 +1100)]
BMesh: make edge winding from face optional

Broke uv-sphere creation, further it might be a problem
for script authors expecting matching edge order for duplicated content.

Now only apply this when duplicating via the operator.

18 months agoFix Cycles interface after 3017d88aec7f
Sergey Sharybin [Wed, 13 Mar 2019 08:53:07 +0000 (09:53 +0100)]
Fix Cycles interface after 3017d88aec7f

18 months agoFix T62487: Flipped normals extruding edge loop
Campbell Barton [Wed, 13 Mar 2019 08:19:41 +0000 (19:19 +1100)]
Fix T62487: Flipped normals extruding edge loop

18 months agoBMesh: utility function to swap edge verts
Campbell Barton [Wed, 13 Mar 2019 08:11:43 +0000 (19:11 +1100)]
BMesh: utility function to swap edge verts

Needed so we can control the winding of extruded faces.

18 months agoFix T62484: Mesh undo ignores selection mode
Campbell Barton [Wed, 13 Mar 2019 06:37:43 +0000 (17:37 +1100)]
Fix T62484: Mesh undo ignores selection mode

18 months agoFix T62524: Popover w/ keep-open moves on cursor motion
Campbell Barton [Wed, 13 Mar 2019 05:40:30 +0000 (16:40 +1100)]
Fix T62524: Popover w/ keep-open moves on cursor motion

18 months agoCleanup: rename,my to bounds_offset
Campbell Barton [Wed, 13 Mar 2019 05:35:24 +0000 (16:35 +1100)]
Cleanup: rename,my to bounds_offset

Use a name that related to block bounds calculation
(mx/my are typically used for mouse x,y).

18 months agoCleanup: use unpacking & generators to build classes
Campbell Barton [Wed, 13 Mar 2019 02:03:54 +0000 (13:03 +1100)]
Cleanup: use unpacking & generators to build classes

No reason to make a classes tuple then manipulate it when
everything can be declared inline.