3 months agoCmake/Windows: Fix numpy being unpacked every build.
Ray Molenkamp [Thu, 6 Jun 2019 02:51:00 +0000 (20:51 -0600)]
Cmake/Windows: Fix numpy being unpacked every build.

Every time you build cmake it unpacks numpy. It is seemingly
very unhappy with OUTPUTS being directories rather than files.

The creating of the directory is not needed, so that step was easy
to resolve, next problem: was there was not a target that outputs
the tarball so it too was deemed out of date. Losing that dependency
as well, fixes the issue, while this is not great if we ever update
the libs in svn, we are planning to drastically change the way we
package python for windows so this is ok for now, but needs to be
addressed with the next python update, T65547 is the tracking ticket
for this.

Tested with VS2015/2017/2019 with both msbuild and ninja generators

3 months agoFreestyle: Use precompiled headers with MSVC.
Ray Molenkamp [Thu, 6 Jun 2019 01:05:16 +0000 (19:05 -0600)]
Freestyle: Use precompiled headers with MSVC.

This brings down the build time for freestyle with MSVC from a
minute to 10-20 seconds.

vs2019 bf_freestyle debug   before: 60464 ms  after: 11028 ms
vs2019 bf_freestyle release before: 56984 ms  after: 20526 ms

Differential Revision:

Reviewed By: brecht , sergey

3 months agoCleanup: quiet missing variable declaration warning
Campbell Barton [Thu, 6 Jun 2019 00:26:32 +0000 (10:26 +1000)]
Cleanup: quiet missing variable declaration warning

3 months agoCleanup: extra-semi-stmt warning
Campbell Barton [Thu, 6 Jun 2019 00:16:18 +0000 (10:16 +1000)]
Cleanup: extra-semi-stmt warning

3 months agoCMake: pass link deps to library targets with INTERFACE
Campbell Barton [Thu, 6 Jun 2019 00:16:06 +0000 (10:16 +1000)]
CMake: pass link deps to library targets with INTERFACE

Introduced since removing BLENDER_SORTED_LIBS.

This caused building a library to build all it's dependencies.

3 months agoFix missing header for gpu_state.c
Campbell Barton [Thu, 6 Jun 2019 00:06:54 +0000 (10:06 +1000)]
Fix missing header for gpu_state.c

Failed to build without WITH_LEGACY_OPENGL.

3 months agoCleanup: argument sign mismatch warning
Campbell Barton [Wed, 5 Jun 2019 23:55:53 +0000 (09:55 +1000)]
Cleanup: argument sign mismatch warning

3 months agoFix T65118 Eevee: NaN when using bent normals
Clément Foucault [Wed, 5 Jun 2019 19:31:19 +0000 (21:31 +0200)]
Fix T65118 Eevee: NaN when using bent normals

3 months agofix T65480: Collada exporter did not export image texture for Base Color
Gaia Clary [Wed, 5 Jun 2019 19:15:16 +0000 (21:15 +0200)]
fix T65480: Collada exporter did not export image texture for Base Color

3 months agoFix crash when editing shaders on Intel HD 4000.
mano-wii [Wed, 5 Jun 2019 16:06:11 +0000 (13:06 -0300)]
Fix crash when editing shaders on Intel HD 4000.

In the Intel HD 4000 driver a shader has to be deleted in the same context in which it is created.
However, because you can't use a rendering context on different threads, to maintain the multithreaded compilation, the solution was to use the `GL_ARB_get_program_binary` and copy the binary generated for the shader and generate a shader on the main context using that binary.
This solution is limited only to Intel HD 4000 and windows.

Reviewers: fclem

Reviewed By: fclem

Differential Revision:

3 months agoTooltip: Fix use_preview_range tooltip (OpenGL > View)
Dalai Felinto [Wed, 5 Jun 2019 14:41:29 +0000 (14:41 +0000)]
Tooltip: Fix use_preview_range tooltip (OpenGL > View)

In 2.80 the old OpenGL render is called View render.
Also made the tooltip shorter (it was too repetitive).

3 months agoFix T65437: sculpt dyntopo undo not showing correct mesh
Brecht Van Lommel [Wed, 5 Jun 2019 14:29:19 +0000 (16:29 +0200)]
Fix T65437: sculpt dyntopo undo not showing correct mesh

3 months agoGPencil: Fix mirror modifier rotation around object
Antonioya [Wed, 5 Jun 2019 13:54:22 +0000 (15:54 +0200)]
GPencil: Fix mirror modifier rotation around object

Still pending when the original object is rotated or scaled.

3 months agoFix T64336: Switching to a Camera which is hidden, does not evaluate the animation...
Sergey Sharybin [Wed, 5 Jun 2019 13:51:50 +0000 (15:51 +0200)]
Fix T64336: Switching to a Camera which is hidden, does not evaluate the animation data

Changing camera might require more objects pulled into the dependency graph,
so need tag relations for update.

3 months agoDopesheet: drag to box select in dopesheet
Jacques Lucke [Wed, 5 Jun 2019 13:48:30 +0000 (15:48 +0200)]
Dopesheet: drag to box select in dopesheet

This includes refactoring of the `mouse_action_keys` to
make it easier to just detect if there is a key under
the mouse. The refactoring mostly consists of extracting
methods and reducing vertical scope of variables.

Reviewers: billreynish, brecht

Differential Revision:

3 months agomake.bat: Support optional paths for `make format`
Ray Molenkamp [Wed, 5 Jun 2019 13:30:45 +0000 (07:30 -0600)]
make.bat: Support optional paths for `make format`

make.bat now supports optional parameters to restrict
the formatting to a specific folder. Multiple paths
may be given

make.bat format source/blender/blenkernel source/blender/gpu

3 months agoFix T63384: Vertices are moving in different directions
Sergey Sharybin [Wed, 5 Jun 2019 13:17:53 +0000 (15:17 +0200)]
Fix T63384: Vertices are moving in different directions

3 months agoCleanup: Remove unused argument
Sergey Sharybin [Wed, 5 Jun 2019 13:14:48 +0000 (15:14 +0200)]
Cleanup: Remove unused argument

3 months agoFix T65520: Assigning Material a second time crashes Blender
Sergey Sharybin [Wed, 5 Jun 2019 12:51:40 +0000 (14:51 +0200)]
Fix T65520: Assigning Material a second time crashes Blender

3 months agoCode Style: Make Format
Jeroen Bakker [Wed, 5 Jun 2019 12:30:44 +0000 (14:30 +0200)]
Code Style: Make Format

3 months agoTexturePaint: Missing Texture Depth Test
Jeroen Bakker [Tue, 4 Jun 2019 09:28:21 +0000 (11:28 +0200)]
TexturePaint: Missing Texture Depth Test

Depth testing was off as it used the precomputed ModelView matrix. As
draw engines currently use a different approach the depth was sometimes
a bit off making the color disappear.

This change will use a different vertex shader that will write the
correct depth. I expected the same change to be needed in the bone
selection overlay but was not able to reproduce it.

Reviewed By: fclem

Maniphest Tasks: T64615

Differential Revision:

3 months agoWorkbench: World Space Cavity
Jeroen Bakker [Wed, 5 Jun 2019 12:23:10 +0000 (14:23 +0200)]
Workbench: World Space Cavity

When using the world space cavity shader together with viewport or image
rendering only a single pattern was used. This was that the iteration of
the cavity shader was updated when the cache is initialized.

Now the cavity iteration is updated together when the TAA samples are

Reviewed By: fclem

Differential Revision:

3 months agoSound: Port to a copy-on-write concept
Sergey Sharybin [Tue, 4 Jun 2019 14:52:48 +0000 (16:52 +0200)]
Sound: Port to a copy-on-write concept

This change makes it so sound handles are created for evaluated scene,
sequencer and speakers. This allows to have properly evaluated animation
on them.

For the viewport playback sound uses regular dependency graph.

For the final render sound uses dependency graph created for render pipeline,
which now also contains sequencer and sound datablocks.

All the direct sound update calls are replaced with corresponding dependency
graph recalc tag.

3 months agoDepsgraph: Store recalc tag in ID->recalc
Sergey Sharybin [Tue, 4 Jun 2019 14:51:02 +0000 (16:51 +0200)]
Depsgraph: Store recalc tag in ID->recalc

Allows to have more granularity in checks compared to a node-factory
based tagging in a generic tag/flush code.

3 months agoCleanup: Make comment around DEG evaluation functions more clear
Sergey Sharybin [Tue, 4 Jun 2019 14:48:47 +0000 (16:48 +0200)]
Cleanup: Make comment around DEG evaluation functions more clear

3 months agoFix T65389 Edit Mesh: Face dots are not shown in Xray mode
Clément Foucault [Wed, 5 Jun 2019 12:21:06 +0000 (14:21 +0200)]
Fix T65389 Edit Mesh: Face dots are not shown in Xray mode

3 months agoPython GPU Shader: Fix crash when uniform is not found.
mano-wii [Wed, 5 Jun 2019 11:44:24 +0000 (08:44 -0300)]
Python GPU Shader: Fix crash when uniform is not found.

Error in string format.

3 months agoFix empty name shown for operators opening menus without a title
Brecht Van Lommel [Wed, 5 Jun 2019 11:27:41 +0000 (13:27 +0200)]
Fix empty name shown for operators opening menus without a title

For some cases like the edit mode context menu we don't currently have a fixed
title since it's dynamic. This should be improved, but we should at least still
show Call Menu if there is no menu title.

3 months agoupdate Collada Importer: reworked export and import of Materials
Gaia Clary [Tue, 4 Jun 2019 12:31:22 +0000 (14:31 +0200)]
update Collada Importer: reworked export and import of Materials

- added import of transparency and emission into principled BSDF Shader
- added support for importing all default collada material parameters

  * diffuse
  * emission
  * index_of_refraction
  * shininess (mapped to BSDF Roughness)
  * reflectivity (mapped to BSDF Metallic)
  * transparency + transparent mapped to BSDF Alpha)
  * ambient (creates unconnected texture node)
  * specular (creates unconnected texture node)
  * reflective(creates unconnected texture node)

- added support for exporting collada material parameters:

  * diffuse
  * emission
  * index_of_refraction
  * shininess (mapped to BSDF Roughness)
  * reflectivity (mapped to BSDF Metallic)
  * transparency + transparent mapped to BSDF Alpha)

- prepared support for exporting the following parameters
  but currently commented out:

  * ambient (creates unconnected texture node)
  * specular (creates unconnected texture node)
  * reflective(creates unconnected texture node)

  Problem: For now we only allow export of principled BSDF based
  materials. I am not sure from where to get ambient, specular
  and reflective as those values are not included in the
  principled BSDF Shader (wip).

3 months agoFix T65298 Eevee: Principled BSDF doesn't use specular with metals
Clément Foucault [Wed, 5 Jun 2019 10:17:37 +0000 (12:17 +0200)]
Fix T65298 Eevee: Principled BSDF doesn't use specular with metals

This does add some more register pressure as it passes a new vec3 down
the shading function. But for now we care more about accuracy than

3 months agoFix T65492: make material slots popover wider
Jacques Lucke [Wed, 5 Jun 2019 09:46:27 +0000 (11:46 +0200)]
Fix T65492: make material slots popover wider

3 months agoGPencil: Create new set of brushes for Win32 damaged files when use primitives
Antonio Vazquez [Wed, 5 Jun 2019 07:57:21 +0000 (09:57 +0200)]
GPencil: Create new set of brushes for Win32 damaged files when use primitives

Some old Win32 files could have the brushes damaged and this produces a segment fault. Now, if the brush is damaged, a new set of brushes is created.

Related to T61413

3 months agoFix T65502: Crash when moving Collection into disabled Collection
Dalai Felinto [Tue, 4 Jun 2019 20:42:38 +0000 (17:42 -0300)]
Fix T65502: Crash when moving Collection into disabled Collection

3 months agoOutliner: Fix drawing of collection with disabled parent
Dalai Felinto [Tue, 4 Jun 2019 21:28:47 +0000 (18:28 -0300)]
Outliner: Fix drawing of collection with disabled parent

If the layer collection had a parent that was disabled we wouldn't draw
it altogether.

Note: In this case I'm moving any enabled collection with a disabled
parent up in the hierarchy.

All in all I'm happy with this but I would like us to tackle the 1-20
shortcut, Ctrl+H menu and Collections viewport panel to do something

3 months agoGTests: BLI_task: Add basic tests for BLI_task_parallel_listbase(), and some performa...
Bastien Montagne [Tue, 4 Jun 2019 21:23:55 +0000 (23:23 +0200)]
GTests: BLI_task: Add basic tests for BLI_task_parallel_listbase(), and some performances benchmarks.

Nothing special to mention about regression test itself, it basically
mimics the one for `BLI_task_parallel_mempool()`...

Basic performances benchmarks do not tell us much, besides the fact that
for very light processing of listbase, even with 100k items,
single-thread remains an order of magnitude faster than threaded code.
Synchronization is just way too expensive in that case with current
code. This should be partially solvable with much bigger (and
configurable) chunk sizes though (current ones are just ridiculous
for such cases ;) )...

3 months agoFix (unreported) Broken `BLI_threadapi_exit()`.
Bastien Montagne [Tue, 4 Jun 2019 21:20:22 +0000 (23:20 +0200)]
Fix (unreported) Broken `BLI_threadapi_exit()`.

Function would not clear the static scheduler pointer, which lead to
crash (mem use after free) when trying to re-init and use the task API
again. Should not happen in Blender itself, but could in other cases
(like some future gtests ;) ).

3 months agoCleanup: Freedesktop: Use 2.79b release date
Aaron Carlisle [Tue, 4 Jun 2019 19:04:28 +0000 (15:04 -0400)]
Cleanup: Freedesktop: Use 2.79b release date

3 months agoFix T65372: Can't turn off Freestyle line anti-aliasing in Eevee
Clément Foucault [Tue, 4 Jun 2019 18:07:15 +0000 (20:07 +0200)]
Fix T65372: Can't turn off Freestyle line anti-aliasing in Eevee

Freestyle was not copying the eevee settings when creating a scene

3 months agoPartial revert of e388cd8bb4b5
William Reynish [Tue, 4 Jun 2019 17:21:11 +0000 (19:21 +0200)]
Partial revert of e388cd8bb4b5

The constraint icons are now no longer shown in the Outliner again.

This needs a more robust implementation that also works for bones & pose mode.

The new constraint icons are still shown in the Constraint Properties.

3 months agoFix T65378 Eevee: Glitches in ESM shadowmapping
Clément Foucault [Tue, 4 Jun 2019 16:39:48 +0000 (18:39 +0200)]
Fix T65378 Eevee: Glitches in ESM shadowmapping

This happen to be a NaN caused by an infinite sum in the shadow
copy shader.

3 months agoEevee: Merge shadow map processing into one drawcall per light
Clément Foucault [Tue, 4 Jun 2019 16:26:36 +0000 (18:26 +0200)]
Eevee: Merge shadow map processing into one drawcall per light

This removes a lot of framebuffer configuration and binding.

3 months agoFix T64214 Eevee: Issue with Emission node and Alpha blending
Clément Foucault [Tue, 4 Jun 2019 10:52:00 +0000 (12:52 +0200)]
Fix T64214 Eevee: Issue with Emission node and Alpha blending

Emission node was outputing alpha information but is was not
supposed to. Match cycles reference.

3 months agoFix T65042 Eevee: Hair Info Tangent Normal not working correctly
Clément Foucault [Tue, 4 Jun 2019 10:29:05 +0000 (12:29 +0200)]
Fix T65042 Eevee: Hair Info Tangent Normal not working correctly

3 months agoFix T65032: selection conflicts between motion tracks and masks in clip editor
Brecht Van Lommel [Tue, 4 Jun 2019 12:47:29 +0000 (14:47 +0200)]
Fix T65032: selection conflicts between motion tracks and masks in clip editor

3 months agoFix T65486: Cycles f-stop value from old files not preserved
Brecht Van Lommel [Tue, 4 Jun 2019 15:14:09 +0000 (17:14 +0200)]
Fix T65486: Cycles f-stop value from old files not preserved

3 months agoFix status bar and keymap editor showing Call Menu instead of menu name
Brecht Van Lommel [Tue, 4 Jun 2019 13:50:15 +0000 (15:50 +0200)]
Fix status bar and keymap editor showing Call Menu instead of menu name

3 months agoUI: Add icons to Constraints
William Reynish [Tue, 4 Jun 2019 16:10:47 +0000 (18:10 +0200)]
UI: Add icons to Constraints

Each constraint now has a unique icon, just like modifiers.

Icons are designed by Andrzej Ambroż & Alessio Monti, with user input.

Patch by Alessio Monti.

3 months agoGPencil: Clarify Target weight tooltip and remove lower limit
Antonio Vazquez [Tue, 4 Jun 2019 15:42:39 +0000 (17:42 +0200)]
GPencil: Clarify Target weight tooltip and remove lower limit

The target value was affecting the lower value and this was weird. Now the value is clamped between 0 and target weight.

3 months agoNLA Editor: drag in empty region to invoke box-select
Jacques Lucke [Tue, 4 Jun 2019 14:20:30 +0000 (16:20 +0200)]
NLA Editor: drag in empty region to invoke box-select

Reviewers: brecht, billreynish

Differential Revision:

3 months agoFix T60971: Apply visual transform not working
Pelle Johnsen [Tue, 4 Jun 2019 13:17:23 +0000 (15:17 +0200)]
Fix T60971: Apply visual transform not working

Fix issue with 'apply visual transfrom' not working.
Based on fix for

Reviewers: campbellbarton, sergey

Maniphest Tasks: T60971

Differential Revision:

3 months agoFix T65054: Blender 2.80 crashes when opening a scene created by blender 2.7x with...
Bastien Montagne [Tue, 4 Jun 2019 13:18:37 +0000 (15:18 +0200)]
Fix T65054: Blender 2.80 crashes when opening a scene created by blender 2.7x with hierarchy duplication set to "group".

Regression introduced by rB7fe3d1e7d718 (fixing T57934).

This effectively reverts rBrB7fe3d1e7d718, since changing the type of an
object is a very bad idea in general, and would need a careful and
complex check of all of its usages (many object usages assume a specific
type of object...).

Instead, we simply remove duplicollection on those objects, and give a
warning in case dupligroup was effectively used (in many reported cases,
dupligroup was a 'mistake setting', without actually instancing

Note that the otehr idea to fix that versioning issue (to create a new
empty object for the instancing) is much less easy than it might look
(one would need to take into account potential animations, relations
between objects, etc.). Doable probably, but way overkill for a
corner-case 'bad' usage of the feature in the first place.

3 months agoGPU: High Definition Color Buffer
Jeroen Bakker [Tue, 4 Jun 2019 12:31:00 +0000 (14:31 +0200)]
GPU: High Definition Color Buffer

For offscreen rendering a high definition color buffer is needed.
Without it there are banding issues when doing multi-sampling viewport

Reviewed By: fclem

Maniphest Tasks: T65287

Differential Revision:

3 months agoImage Info
Jeroen Bakker [Fri, 31 May 2019 13:02:38 +0000 (15:02 +0200)]
Image Info

The image information for multilayer openexr files are only shown on the
first draw. In the second draw the render result property is filled of
the image, making blender think the image is a render result and it want
to display information about the renderpasses. Which are not present.

It could be that in the first draw the image data is not requested as
the buttons are drawn, before the main area

This change will display both information. We should investigate how to
actually detect if this is a render result or not as similar code is
present in the `node_shader_buts_tex_environment_ex`.

Reviewed By: brecht

Maniphest Tasks: T65345

Differential Revision:

3 months agoNLA Editor: box-select was selecting wrong elements
Jacques Lucke [Tue, 4 Jun 2019 12:50:43 +0000 (14:50 +0200)]
NLA Editor: box-select was selecting wrong elements

This was missing in rBfa59346c134.

3 months agoFix (unreported) missing updates in scripts/docs after `scene.update()` removal.
Bastien Montagne [Tue, 4 Jun 2019 12:36:53 +0000 (14:36 +0200)]
Fix (unreported) missing updates in scripts/docs after `scene.update()` removal.

This should really have been done together with API changes, simple
usage of grep does the trick to catch most places needing updates.

3 months agoFix T64827: "Batch-Generate Previews" crashes.
Bastien Montagne [Tue, 4 Jun 2019 12:11:55 +0000 (14:11 +0200)]
Fix T64827: "Batch-Generate Previews" crashes.

Missed when py API for depsgraph was changed... tsst...

Based on D4917 by @lichtwerk, thanks.

3 months agoFix T65303: fix and improve autorun-scripts popup
Jacques Lucke [Tue, 4 Jun 2019 11:37:45 +0000 (13:37 +0200)]
Fix T65303: fix and improve autorun-scripts popup

Now, the file does not have to be reloaded in all cases.
Instead, just scripts are enabled and all depsgraphs freed.

Reviewers: brecht

Differential Revision:

3 months agoFix T65451: Changing driver expression doesn't update relations
Sergey Sharybin [Tue, 4 Jun 2019 10:10:42 +0000 (12:10 +0200)]
Fix T65451: Changing driver expression doesn't update relations

3 months agoDepsgraph: Only run editors ID update on manual edits
Sergey Sharybin [Tue, 4 Jun 2019 09:33:41 +0000 (11:33 +0200)]
Depsgraph: Only run editors ID update on manual edits

This is how it worked in 2.79 and it is how it is expected to be working.

Avoids unintended icons update during animation playback.

Fixes T64318: Update of material icons during animation 2x performance penalty

3 months agoGraph Editor: drag to box select keyframes
Jacques Lucke [Tue, 4 Jun 2019 09:35:57 +0000 (11:35 +0200)]
Graph Editor: drag to box select keyframes

There is a keymap conflict with ctrl+tweak.
Therefore, I did not include this yet.

Reviewers: brecht

Differential Revision:

3 months agoFix T65447: Mask doesn't update in compositor unless there's motion blur on
Sergey Sharybin [Mon, 3 Jun 2019 12:47:44 +0000 (14:47 +0200)]
Fix T65447: Mask doesn't update in compositor unless there's motion blur on

This is probably just one of the related issues.

Root of the problem was that compositor job was using original scene and node
tree for compositing. It is not guaranteed to have all the evaluated data.

Switched compositor job to use it's own render-pipeline-like dependency graph
which has everything evaluated in it.

Reviewers: brecht

Reviewed By: brecht

Differential Revision:

3 months agoFix T64247: Crash on playback with special shader node tree
Sergey Sharybin [Mon, 3 Jun 2019 15:08:25 +0000 (17:08 +0200)]
Fix T64247: Crash on playback with special shader node tree

The root of the problem goes to the fact that node tree copying
uses source tree and nodes for a temporary storage.

This makes it so multiple dependency graphs can not be reliably
evaluated from different threads if they are using same original
node tree.

Solved by doing the following:

- Commonly used tree copying function (which is used by library
  manager) keeps source tree, nodes and sockets untouched.

- All the related areas (like node tree's callback) now have
  const qualifier on the input.

- Areas which needs to have those temporary pointers assigned are
  now using explicit function.

  Would be really cool to get rid of those temporary pointers
  completely, but this is a bit tricky due to hairy nature of the
  code. Can happen any time now though: is easy enough to generalize
  the new pointers mapping.

Note that this change is only intended to solve the crash.
The fact that icons shouldn't be updated on playback will be fixed
as a separate change.

Reviewers: brecht, fclem

Reviewed By: brecht, fclem

Subscribers: brecht, fclem

Differential Revision:

3 months agoDocs: update quick-start
Campbell Barton [Tue, 4 Jun 2019 03:12:59 +0000 (13:12 +1000)]
Docs: update quick-start

Resolves T64146

3 months agoRevert "Cleanup: Cleanup: style, use braces for GHOST (X11/SDL)"
Campbell Barton [Tue, 4 Jun 2019 01:35:28 +0000 (11:35 +1000)]
Revert "Cleanup: Cleanup: style, use braces for GHOST (X11/SDL)"

This reverts commit 935c9ab0de1ce3d36f93ce5aeee5d0f82d6f2591.

Clang-tidy was making unrelated *fixes*.

3 months agoCleanup: Cleanup: style, use braces for GHOST (X11/SDL)
Campbell Barton [Tue, 4 Jun 2019 01:30:31 +0000 (11:30 +1000)]
Cleanup: Cleanup: style, use braces for GHOST (X11/SDL)

3 months agoCleanup: Cleanup: style, use braces for collada (BCMath)
Campbell Barton [Tue, 4 Jun 2019 01:14:59 +0000 (11:14 +1000)]
Cleanup: Cleanup: style, use braces for collada (BCMath)

3 months agoCleanup: style, use braces for draw (fxaa_lib)
Campbell Barton [Fri, 31 May 2019 05:14:10 +0000 (15:14 +1000)]
Cleanup: style, use braces for draw (fxaa_lib)

3 months agoCleanup: rename 2D scroll defines
Campbell Barton [Tue, 4 Jun 2019 00:53:12 +0000 (10:53 +1000)]
Cleanup: rename 2D scroll defines

- Use `V2D_SCROLL_` prefix.
- Use more descriptive names.

3 months agoCleanup: clang-format, remove tabs
Campbell Barton [Tue, 4 Jun 2019 00:51:48 +0000 (10:51 +1000)]
Cleanup: clang-format, remove tabs

3 months agoFix T65352: doesn't increment user count for materi...
Bastien Montagne [Mon, 3 Jun 2019 18:59:13 +0000 (20:59 +0200)]
Fix T65352: doesn't increment user count for materials referenced by the mesh.

We cannot do refcount operations in a non-Main ID, this is forbidden.

While that whole func could probably use some love and refactor, for now
sticking to minimal changes and just moving refcounting op after mesh
has been transferred to Main database.

3 months agotransform_snap_object: Ignore occlusion test on curves in edit mode.
mano-wii [Mon, 3 Jun 2019 18:16:51 +0000 (15:16 -0300)]
transform_snap_object: Ignore occlusion test on curves in edit mode.

3 months agoUI: Prevent scrollbars from getting too small to grab
EitanSomething [Mon, 3 Jun 2019 16:13:52 +0000 (18:13 +0200)]
UI: Prevent scrollbars from getting too small to grab

Differential Revision:

3 months agoFix T65448 - Outliner - Show all inside in disabled collection crash
Dalai Felinto [Mon, 3 Jun 2019 16:10:35 +0000 (13:10 -0300)]
Fix T65448 - Outliner - Show all inside in disabled collection crash

3 months agoGPU: Fix Restart index bug
Clément Foucault [Mon, 3 Jun 2019 15:47:42 +0000 (17:47 +0200)]
GPU: Fix Restart index bug

Restart index can have been changed in another context and the static
var can get out of sync. A better solution is to set the restart index
when binding the VAO. It also have less perf impact.

Fix T65364 Corrupted mesh display on macOS

3 months agoCleanup: style, use braces in GPU
Campbell Barton [Mon, 3 Jun 2019 14:36:16 +0000 (00:36 +1000)]
Cleanup: style, use braces in GPU

3 months agofix collada: get Alpha and Emission from principled BSDF Shader
Gaia Clary [Mon, 3 Jun 2019 14:34:47 +0000 (16:34 +0200)]
fix collada: get Alpha and Emission from principled BSDF Shader

3 months agoCleanup: style, use braces in RNA
Campbell Barton [Mon, 3 Jun 2019 14:21:57 +0000 (00:21 +1000)]
Cleanup: style, use braces in RNA

3 months agoCleanup: Cleanup: style, use braces for collada
Campbell Barton [Mon, 3 Jun 2019 14:17:37 +0000 (00:17 +1000)]
Cleanup: Cleanup: style, use braces for collada

3 months agoUI: Fix wrong use of icons in the Object > Visibility panel when using Cycles
William Reynish [Mon, 3 Jun 2019 14:15:12 +0000 (16:15 +0200)]
UI: Fix wrong use of icons in the Object > Visibility panel when using Cycles

3 months agoCleanup: style, use braces in draw
Campbell Barton [Mon, 3 Jun 2019 14:13:11 +0000 (00:13 +1000)]
Cleanup: style, use braces in draw

3 months agoCleanup: style, use braces in makesrna
Campbell Barton [Mon, 3 Jun 2019 14:10:44 +0000 (00:10 +1000)]
Cleanup: style, use braces in makesrna

3 months agoCleanup: use const arguments
Campbell Barton [Mon, 3 Jun 2019 13:58:10 +0000 (23:58 +1000)]
Cleanup: use const arguments

3 months agoCleanup: remove unused arg to wm_event_add_ghostevent
Campbell Barton [Mon, 3 Jun 2019 13:48:56 +0000 (23:48 +1000)]
Cleanup: remove unused arg to wm_event_add_ghostevent

3 months agoFix T65391: Wrong drag threshold for mouse motion
Campbell Barton [Mon, 3 Jun 2019 13:40:58 +0000 (23:40 +1000)]
Fix T65391: Wrong drag threshold for mouse motion

3 months agoFix T65328: Offset when outliner gains focus
Jacques Lucke [Mon, 3 Jun 2019 12:10:29 +0000 (14:10 +0200)]
Fix T65328: Offset when outliner gains focus

I'm not actually not sure under which circumstances
this code is actually doing something useful.

3 months agoCleanup: differentiate drag-and-drop from drag events
Campbell Barton [Mon, 3 Jun 2019 11:41:12 +0000 (21:41 +1000)]
Cleanup: differentiate drag-and-drop from drag events

3 months agoMarkers: Click-drag in empty area to box select markers
Jacques Lucke [Mon, 3 Jun 2019 09:37:47 +0000 (11:37 +0200)]
Markers: Click-drag in empty area to box select markers

To make this work, other changes were necessary:
* To select a specific marker you have to click more exactly on the icon.
* Moving markers with click-drag only works when starting on a marker.

Additionally this patch implements that all markers are deselected,
when the user clicks in an empty area.

Reviewers: billreynish, brecht

Differential Revision:

3 months agoFix T65399: crash playing animation after applying smoke flow modifier
Philipp Oeser [Mon, 3 Jun 2019 08:30:38 +0000 (10:30 +0200)]
Fix T65399: crash playing animation after applying smoke flow modifier

missing DEG update.

Reviewers: sergey

Maniphest Tasks: T65399

Differential Revision:

3 months agoFix T65408: GPencil Weight Paint, strength and falloff are ignored when painting...
Antonio Vazquez [Mon, 3 Jun 2019 07:58:48 +0000 (09:58 +0200)]
Fix T65408: GPencil Weight Paint, strength and falloff are ignored when painting a lesser vertexweight

The value was clamped to minimum value before checking the influence.

3 months agoFix T65294: Orbit navigate gizmo fails in paint modes
Campbell Barton [Mon, 3 Jun 2019 07:52:47 +0000 (17:52 +1000)]
Fix T65294: Orbit navigate gizmo fails in paint modes

3 months agoFix T65439: quick explode error
Philipp Oeser [Mon, 3 Jun 2019 07:49:58 +0000 (09:49 +0200)]
Fix T65439: quick explode error

Material setup for quick explode was assuming a shader with a "BSDF"
output socket connected to the material output node whereas other socket
names are valid ("Shader", "Emission", "BSSRDF", "Holdout"...)

3 months agoFix return type in recent gizmo key-map refactor
Campbell Barton [Mon, 3 Jun 2019 06:59:22 +0000 (16:59 +1000)]
Fix return type in recent gizmo key-map refactor

3 months agofix collada Importer: Set bone transformation type when importing unskinned skeleton
Gaia Clary [Sun, 2 Jun 2019 21:33:22 +0000 (23:33 +0200)]
fix collada Importer: Set bone transformation type when importing unskinned skeleton

3 months agofeature collada: Allow export/import of skeletal animations as curves
Gaia Clary [Sun, 2 Jun 2019 17:06:14 +0000 (19:06 +0200)]
feature collada: Allow export/import of skeletal animations as curves

3 months agorefactor collada: Added utility functions bc_string_before() and bc_string_after()
Gaia Clary [Sun, 2 Jun 2019 17:02:38 +0000 (19:02 +0200)]
refactor collada: Added utility functions bc_string_before() and bc_string_after()

3 months agofix T34062 Collada exporter: changed order of export for decomposed transformation.
Gaia Clary [Wed, 29 May 2019 06:57:47 +0000 (08:57 +0200)]
fix T34062 Collada exporter: changed order of export for decomposed transformation.

1.) The Blender order of applying transforms is:


Reasoning: This order ensures there is no shearing, which happens
when you do scaling after rotation, see also:

The Collada exporter now exports in the order how the transforms
need to be applied upon import.

2.) Also removed obsolete #if 0 lines

3 months agorefactor: use Quat and BCQuat instead of float[4] arrays for Quaternions (wip)
Gaia Clary [Tue, 28 May 2019 20:08:23 +0000 (22:08 +0200)]
refactor: use Quat and BCQuat instead of float[4] arrays for Quaternions (wip)

3 months agofix: enforce transform export as <matrix> when exporting animated armature"
Gaia Clary [Tue, 28 May 2019 20:05:09 +0000 (22:05 +0200)]
fix: enforce transform export as <matrix> when  exporting animated armature"

Currently we can not export Decompsed Transforms in combination with
Armature asnimations. As a temporary workaround enforce export
of transformations as Matrix for armature objects.

3 months agofix: add back changes after last pull from master
Gaia Clary [Tue, 28 May 2019 12:41:56 +0000 (14:41 +0200)]
fix: add back changes after last pull from master

3 months agorefactor collada: replace bc_sanitize_mat() by static class method in BCMatrix
Gaia Clary [Tue, 28 May 2019 07:23:05 +0000 (09:23 +0200)]
refactor collada: replace bc_sanitize_mat() by static class method in BCMatrix