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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reviewed By: Brecht

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

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

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

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

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

Related to task T62384

Thanks to @matc for suggesting the fix.

Still pending a problem whith user number.

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

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

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

Reviewers: fclem

Reviewed By: fclem

Subscribers: zeddb

Maniphest Tasks: T60171

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

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

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

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

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

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

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

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

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

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

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

@dfelinto Could you review and adapt if required.

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

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

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

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

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

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

Reviewed By: Brecht

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

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

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

Reviewed By: Brecht

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

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

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

Reviewed By: Brecht

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

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

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

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

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

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

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

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

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

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

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

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

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

Related on T61937.

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

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

Core changes from that commit in BKE_collections are kept.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

These modifiers were not included in previous commit.

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

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

Reviewers: brecht, #cycles

Maniphest Tasks: T62267

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

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

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

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

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

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

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

Also align items in the column since they work together.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

3 months agoBevel: revert idea of always starting in offset mode.
Howard Trickey [Fri, 8 Mar 2019 12:42:16 +0000 (07:42 -0500)]
Bevel: revert idea of always starting in offset mode.

Commit 208fafb to fix bevel tool units included a change to always
start modal in offset mode. This was may or may not be right but
broke a way in which users could set percent mode and then subsequently
start a modal that bevels in that mode. So going back to old way.

3 months agoFix crash reloading images used in compositor node
Sybren A. Stüvel [Fri, 8 Mar 2019 12:40:32 +0000 (13:40 +0100)]
Fix crash reloading images used in compositor node

Similar to what Brecht committed in
38f0d5f75af7d2f30156f4008dc5bc8d8394fbf3.

3 months agoIcons: Desktop icons update for Mac
William Reynish [Fri, 8 Mar 2019 12:23:59 +0000 (13:23 +0100)]
Icons: Desktop icons update for Mac

Previous desktop icon was clipped on one side, and file icon used cropped icon.

3 months agoIcons: Add GPencil Extrude and Radius icons (take 2)
William Reynish [Fri, 8 Mar 2019 12:11:23 +0000 (13:11 +0100)]
Icons: Add GPencil Extrude and Radius icons (take 2)

Also, revision of icons for paint modes, based on suggestions by Aslam Cader.

Previous commit accidentally included an extra file.

3 months agoRevert "Icons: Add GPencil Extrude and Radius icons"
William Reynish [Fri, 8 Mar 2019 12:07:20 +0000 (13:07 +0100)]
Revert "Icons: Add GPencil Extrude and Radius icons"

This reverts commit a44d75a9646cc37b3b6b10decd22db90247795d2.

3 months agoIcons: Add GPencil Extrude and Radius icons
William Reynish [Fri, 8 Mar 2019 12:02:46 +0000 (13:02 +0100)]
Icons: Add GPencil Extrude and Radius icons

Also, revision of icons for paint modes, based on suggestions by Aslam Cader.

3 months agoFix T62317: missing Cycles viewport update when changing active camera.
Brecht Van Lommel [Fri, 8 Mar 2019 11:11:42 +0000 (12:11 +0100)]
Fix T62317: missing Cycles viewport update when changing active camera.

3 months agoFix T60978: crash toggling window fullscreen on macOS.
Brecht Van Lommel [Fri, 8 Mar 2019 01:17:31 +0000 (02:17 +0100)]
Fix T60978: crash toggling window fullscreen on macOS.

GHOST event handling does not need a window in the context, and restoring
it to the previous value is problematic if the window was deleted in the
meantime.

3 months agoCleanup: remove unused test break code for handling cancels.
Brecht Van Lommel [Fri, 8 Mar 2019 01:15:24 +0000 (02:15 +0100)]
Cleanup: remove unused test break code for handling cancels.

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

3 months agoGPencil: Fix field type error in initialization
Antonioya [Fri, 8 Mar 2019 07:49:25 +0000 (08:49 +0100)]
GPencil: Fix field type error in initialization

3 months agoCleanup: spelling
Campbell Barton [Fri, 8 Mar 2019 06:48:49 +0000 (17:48 +1100)]
Cleanup: spelling

3 months agoCleanup: style
Campbell Barton [Fri, 8 Mar 2019 06:16:30 +0000 (17:16 +1100)]
Cleanup: style

3 months agoCleanup: use doxy sections for node select API
Campbell Barton [Fri, 8 Mar 2019 05:59:48 +0000 (16:59 +1100)]
Cleanup: use doxy sections for node select API

3 months agoCleanup: use doxy sections for mask select API
Campbell Barton [Fri, 8 Mar 2019 05:22:38 +0000 (16:22 +1100)]
Cleanup: use doxy sections for mask select API

3 months agoCleanup: use doxy sections for object select API
Campbell Barton [Fri, 8 Mar 2019 04:56:55 +0000 (15:56 +1100)]
Cleanup: use doxy sections for object select API

3 months agoCleanup: make modal event double click handling more straightforward
Campbell Barton [Fri, 8 Mar 2019 03:16:32 +0000 (14:16 +1100)]
Cleanup: make modal event double click handling more straightforward

3 months agoWM: fix double click handling in modal keymaps
Campbell Barton [Fri, 8 Mar 2019 02:35:48 +0000 (13:35 +1100)]
WM: fix double click handling in modal keymaps

Model keymaps wasn't matching double-click events with press
as is done in regular keymap handling.

3 months agoFix T62095: OpenGL render camera image alignment
Campbell Barton [Fri, 8 Mar 2019 01:37:22 +0000 (12:37 +1100)]
Fix T62095: OpenGL render camera image alignment

3 months agoFix: Info window select all toggle broken
Campbell Barton [Fri, 8 Mar 2019 00:55:52 +0000 (11:55 +1100)]
Fix: Info window select all toggle broken

D4477 by @Poulpator

3 months agoCleanup: use macro for listbase collection begin functions
Campbell Barton [Fri, 8 Mar 2019 00:40:37 +0000 (11:40 +1100)]
Cleanup: use macro for listbase collection begin functions

3 months agoRNA: rename bpy.data.grease_pencil to grease_pencils
Campbell Barton [Thu, 7 Mar 2019 22:55:40 +0000 (09:55 +1100)]
RNA: rename bpy.data.grease_pencil to grease_pencils

All other sequences are plural here.

3 months agoCleanup: use plural names for Main lists
Campbell Barton [Thu, 7 Mar 2019 22:29:17 +0000 (09:29 +1100)]
Cleanup: use plural names for Main lists

Convention was not to but after discussion on 918941483f7e we agree its
best to change the convention.

Names now mostly follow RNA.

Some exceptions:

- Use 'nodetrees' instead of 'nodegroups'
  since the struct is called NodeTree.
- Use 'gpencils' instead of 'grease_pencil'
  since 'gpencil' is a common abbreviation in the C code.

Other exceptions:

- Leave 'wm' as it's a list of one.
- Leave 'ipo' as is for versioning.

3 months agofix D4476 collada exporter: in Blender 2.80 we no longer have a specular color.
Gaia Clary [Thu, 7 Mar 2019 22:26:10 +0000 (23:26 +0100)]
fix D4476 collada exporter: in Blender 2.80 we no longer have a specular color.

Specularity is not a color but a factor.
I have replaced the original export code with
a correct export of the Specularity factor.

3 months agoProperties Editor: Grease Pencil and pinning fixes
Dalai Felinto [Thu, 7 Mar 2019 14:55:03 +0000 (14:55 +0000)]
Properties Editor: Grease Pencil and pinning fixes

The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.

Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.

This would lead to all sort of pinning problems:

* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.

* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.

* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.

I also sanitized the name of the panels, their inheritance and poll
functions.

Reviewers: antoniov, brecht

Subscribers: billrey

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

3 months agoGPencil: Update stroke when UV factor is changed
Antonioya [Thu, 7 Mar 2019 19:04:00 +0000 (20:04 +0100)]
GPencil: Update stroke when UV factor is changed

The stroke was updated only after doing a refresh operation.

3 months agoFix T62319: changing keyframe properties does not trigger update
Jacques Lucke [Thu, 7 Mar 2019 18:56:13 +0000 (19:56 +0100)]
Fix T62319: changing keyframe properties does not trigger update

Reviewers: brecht

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

3 months agoFix T62328, T62209: revert recent fix for texture slots updates (T60366).
Brecht Van Lommel [Thu, 7 Mar 2019 18:39:50 +0000 (19:39 +0100)]
Fix T62328, T62209: revert recent fix for texture slots updates (T60366).

This causes other issues, revert for now until a better fix is found.
Reverts commit da1323d1c95095feff98e8aa054d73fd323c363d.

3 months agoCleanup: remove unused parameter.
Brecht Van Lommel [Thu, 7 Mar 2019 11:35:37 +0000 (12:35 +0100)]
Cleanup: remove unused parameter.

3 months agoCleanup: fix compiler warnings.
Brecht Van Lommel [Thu, 7 Mar 2019 11:47:42 +0000 (12:47 +0100)]
Cleanup: fix compiler warnings.

3 months agoFix T62305: Unconnected group vector inputs are mapped incorrectly
Jacques Lucke [Thu, 7 Mar 2019 17:03:20 +0000 (18:03 +0100)]
Fix T62305: Unconnected group vector inputs are mapped incorrectly

The issue was that `bNodeSocketValueVector` and `bNodeSocketValueRGBA`
don't store the value at the same location in the struct.

I kept the cases for `SOCK_VECTOR` and `SOCK_RGBA` completely separate
for now, because they only share code by coincidence and not because
they are actually the same. Eventually there could be a "Vector Input"
node similar to the "RGB" node.

Reviewers: fclem

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

3 months agoFix T62316: Grease Pencil objects display in front of the grid lines
Antonioya [Thu, 7 Mar 2019 16:51:59 +0000 (17:51 +0100)]
Fix T62316: Grease Pencil objects display in front of the grid lines

The fix was move the grease pencil engine before overlays

This also fix the origin not visible bug T62100

There is a limitation of this fix, but we cannot fix both problems. If you have object behind a transparent graese pencil objects, this objects will not be visible.

Thanks @fclem for his advices to fix this bug.

3 months agoCleanup: remove redundant check
Campbell Barton [Thu, 7 Mar 2019 15:47:00 +0000 (02:47 +1100)]
Cleanup: remove redundant check

3 months agoCleanp: use static sets
Campbell Barton [Thu, 7 Mar 2019 15:43:33 +0000 (02:43 +1100)]
Cleanp: use static sets

3 months agoFix gizmos not responding to theme color updates
Campbell Barton [Thu, 7 Mar 2019 15:06:22 +0000 (02:06 +1100)]
Fix gizmos not responding to theme color updates

Re-create gizmos when changing theme colors, since
theme colors don't change often this allows gizmos to setup their
colors on initialization.

3 months agoModifiers Evaluation: generate loop normals when requested.
Bastien Montagne [Thu, 7 Mar 2019 15:23:58 +0000 (16:23 +0100)]
Modifiers Evaluation: generate loop normals when requested.

This also fixes T62228.

However, datatransfer code is still doing bad things with its source,
still working on proper changes here.

3 months agoMultires: Fix crash on exit when sculpting with modifiers
Sergey Sharybin [Thu, 7 Mar 2019 15:07:34 +0000 (16:07 +0100)]
Multires: Fix crash on exit when sculpting with modifiers

The SubdivCCG structure was re-allocated, but the cached one in
the sculpt session was still pointing to an original one.

This is rather a workaround, but is least evil from what i can
currently think. Remember something similar was also required in
2.7 as well.

Definitely need to revision this change.

3 months agoSculpt; Fix memory leak on redraw normals update
Sergey Sharybin [Thu, 7 Mar 2019 14:40:04 +0000 (15:40 +0100)]
Sculpt; Fix memory leak on redraw normals update

3 months agoFix T62271: Particles with multires crash on sculpt
Sergey Sharybin [Thu, 7 Mar 2019 14:27:31 +0000 (15:27 +0100)]
Fix T62271: Particles with multires crash on sculpt

In fact, any modifier on top of multires would lead to crash.
Was missing pointer update.

Basically, bring the control flow closer to 2.7.

3 months agoFix T61671: Too strong too dark text shadow in Blender Light theme
Jacques Lucke [Thu, 7 Mar 2019 14:55:11 +0000 (15:55 +0100)]
Fix T61671: Too strong too dark text shadow in Blender Light theme

Reviewers: pablovazquez

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

3 months agoFix T61761: Randomize Transform is an object mode operator
Jacques Lucke [Thu, 7 Mar 2019 14:54:08 +0000 (15:54 +0100)]
Fix T61761: Randomize Transform is an object mode operator

Reviewers: brecht, billreynish

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

3 months agoUI: Change UI name of Draw Labels to Include Labels
William Reynish [Thu, 7 Mar 2019 14:07:16 +0000 (15:07 +0100)]
UI: Change UI name of Draw Labels to Include Labels

For compliance with recent naming conventions.

3 months agoUI: Use sub-panels inside Grease Pencil Onion Skinning panel
William Reynish [Thu, 7 Mar 2019 13:56:31 +0000 (14:56 +0100)]
UI: Use sub-panels inside Grease Pencil Onion Skinning panel

Reviewers: Antonio Vazquez (antoniov)

Differential Revision: D4465

3 months agoImage: use sample size instead of radius
Campbell Barton [Thu, 7 Mar 2019 13:36:48 +0000 (00:36 +1100)]
Image: use sample size instead of radius

It wasn't possible to sample a 2x2 region.

3 months agoCleanup: redundant select flush
Campbell Barton [Thu, 7 Mar 2019 13:17:52 +0000 (00:17 +1100)]
Cleanup: redundant select flush

3 months agoTool System: use set/add/subtract for all lasso select operators
Campbell Barton [Thu, 7 Mar 2019 12:41:32 +0000 (23:41 +1100)]
Tool System: use set/add/subtract for all lasso select operators

3 months agoFix T62289: crash with texture paint slots and missing node group datablock.
Brecht Van Lommel [Thu, 7 Mar 2019 11:22:38 +0000 (12:22 +0100)]
Fix T62289: crash with texture paint slots and missing node group datablock.