blender.git
2 years agoFix T57923: Freeze in mesh vnors computation code with some degenerated geometry.
Bastien Montagne [Tue, 20 Nov 2018 16:54:48 +0000 (17:54 +0100)]
Fix T57923: Freeze in mesh vnors computation code with some degenerated geometry.

Second part of the fix: do not try at all to compute normals in degenerated
geometry. Just loss of time and potential issues later with weird
invalid computed values.

2 years agoFix T57923: Freeze in mesh vnors computation code with some degenerated geometry.
Bastien Montagne [Tue, 20 Nov 2018 16:52:21 +0000 (17:52 +0100)]
Fix T57923: Freeze in mesh vnors computation code with some degenerated geometry.

Fix first part of it, the freeze itself being caused by float NAN values
never comparing equal to anything, not even themselves.

2 years agoTask scheduler: Optimize parallel loop over lists
Sergey Sharybin [Tue, 20 Nov 2018 11:17:03 +0000 (12:17 +0100)]
Task scheduler: Optimize parallel loop over lists

The goal is to address performance regression when going from
few threads to 10s of threads. On a systems with more than 32
CPU threads the benefit of threaded loop was actually harmful.

There are following tweaks now:

- The chunk size is adaptive for the number of threads, which
  minimizes scheduling overhead.

- The number of tasks is adaptive to the list size and chunk
  size.

Here comes performance comparison on the production shot:

 Number of threads        DEG time before        DEG time after
       44                     0.09                   0.02
       32                     0.055                  0.025
       16                     0.025                  0.025
       8                      0.035                  0.033

2 years agoRemoved superfluous NULL check
Sybren A. Stüvel [Tue, 20 Nov 2018 09:46:17 +0000 (10:46 +0100)]
Removed superfluous NULL check

2 years agoAdded MovieClip.fps read-only property to RNA
Sybren A. Stüvel [Tue, 20 Nov 2018 09:32:24 +0000 (10:32 +0100)]
Added MovieClip.fps read-only property to RNA

This makes it possible for a Python script that loads a MovieClip into the
clip editor to also change the scene frame rate to match.

2 years agoLinux: list GVFS mount points
Roel Koster [Sun, 18 Nov 2018 21:34:04 +0000 (08:34 +1100)]
Linux: list GVFS mount points

2 years agoCall PRE_VIEW and POST_VIEW draw callbacks in movie clip editor
Sybren A. Stüvel [Fri, 16 Nov 2018 12:58:11 +0000 (13:58 +0100)]
Call PRE_VIEW and POST_VIEW draw callbacks in movie clip editor

2 years agoCycles: Cleanup, code style
Sergey Sharybin [Thu, 15 Nov 2018 16:16:40 +0000 (17:16 +0100)]
Cycles: Cleanup, code style

2 years agoCleanup: Comments
Sergey Sharybin [Thu, 15 Nov 2018 15:28:07 +0000 (16:28 +0100)]
Cleanup: Comments

2 years agoCleanup: comment block tabs
Campbell Barton [Wed, 14 Nov 2018 01:53:15 +0000 (12:53 +1100)]
Cleanup: comment block tabs

2 years agoCleanup: naming for paint modes
Campbell Barton [Wed, 14 Nov 2018 00:20:08 +0000 (11:20 +1100)]
Cleanup: naming for paint modes

- Rename ePaint* -> PAINT_MODE_*.
- Use PAINT_OVERLAY_ prefix for eOverlayControlFlags.

2 years agoWM: enforce descriptions being NULL or defined
Campbell Barton [Tue, 13 Nov 2018 22:47:23 +0000 (09:47 +1100)]
WM: enforce descriptions being NULL or defined

Without this bugs slip through that don't null check the descriptions
since many were set to empty strings.

2 years agoCleanup: python doc-strings
Campbell Barton [Tue, 13 Nov 2018 22:04:24 +0000 (09:04 +1100)]
Cleanup: python doc-strings

Indentation & trailing space.

2 years agoCleanup: use lowercase 2d/3d in function names
Campbell Barton [Tue, 13 Nov 2018 03:21:42 +0000 (14:21 +1100)]
Cleanup: use lowercase 2d/3d in function names

2 years agoWM: avoid string replace w/ appconfig-activate
Campbell Barton [Mon, 12 Nov 2018 19:59:23 +0000 (06:59 +1100)]
WM: avoid string replace w/ appconfig-activate

Better construct an exact path, this would fail if the path exists
multiple times in the string.

2 years agoCycles: Fix/workaround for gcc-7.2
Sergey Sharybin [Mon, 12 Nov 2018 11:10:33 +0000 (12:10 +0100)]
Cycles: Fix/workaround for gcc-7.2

For some reason when building with gcc-7.2 (which is default
in previous Ubuntu LTS) the guarded allocator is not being
properly instantiated.

Doesn't happen with newer version of gcc-7 which is 7.3, and
also doesn't happen with gcc-6 and gcc-8.

Would be nice to know what is wrong, but for the time being
committing workaround which keeps Blender users happy.

2 years agoCycles: Proper comment for closing header guard
Sergey Sharybin [Mon, 12 Nov 2018 10:02:10 +0000 (11:02 +0100)]
Cycles: Proper comment for closing header guard

2 years agoPyAPI: update keyword list
Campbell Barton [Sat, 10 Nov 2018 22:37:26 +0000 (09:37 +1100)]
PyAPI: update keyword list

2 years agoBMesh: backport minor changes from 2.8
Campbell Barton [Sat, 10 Nov 2018 08:54:49 +0000 (19:54 +1100)]
BMesh: backport minor changes from 2.8

2 years agoPyAPI: add imports arg to BPY_execute_string
Campbell Barton [Fri, 9 Nov 2018 23:55:04 +0000 (10:55 +1100)]
PyAPI: add imports arg to BPY_execute_string

Allows for avoiding `__import__` in expressions,
was already supported for BPY_execute_string_as_* API calls.

2 years agoRevert "Cycles: Cleanup, move Embree BVH logic to own file"
Sergey Sharybin [Fri, 9 Nov 2018 16:54:09 +0000 (17:54 +0100)]
Revert "Cycles: Cleanup, move Embree BVH logic to own file"

While we shouldn't have logic in an entry point, and since one should
not be making typos when moving lines around, there is bigger entanglement
issue with BVH host code using kernel function. This is bad violation,
but is tricky to get solved moments before the weekly.

In order to keep things in a (less) broken state than before own cleanup
reverting the changes.

This reverts commit 2bad10be96540ff50a149230d656e599775b3f47.
This reverts commit ddabb21d0584e9874e8e5c62c04abe496ec7334b

2 years agoCycles: Cleanup, remove unused method declaration
Sergey Sharybin [Fri, 9 Nov 2018 14:21:19 +0000 (15:21 +0100)]
Cycles: Cleanup, remove unused method declaration

Was never defined. If it's really needed, consider using `const string&`.

2 years agoCycles; Cleanup, line length
Sergey Sharybin [Fri, 9 Nov 2018 11:31:46 +0000 (12:31 +0100)]
Cycles; Cleanup, line length

There are some more sanitization which would be cool to be done
in the neighbourhood of those functions, but that could also happen
later.

2 years agoCycles: Cleanup, move Embree BVH logic to own file
Sergey Sharybin [Fri, 9 Nov 2018 11:28:55 +0000 (12:28 +0100)]
Cycles: Cleanup, move Embree BVH logic to own file

There is no way we can keep generic entry point functions easy to
follow if we start adding actual logic in them.

2 years agoCycles: Cleanup, indentation in preprocessor
Sergey Sharybin [Fri, 9 Nov 2018 11:12:11 +0000 (12:12 +0100)]
Cycles: Cleanup, indentation in preprocessor

2 years agoCycles: Cleanup, indentation
Sergey Sharybin [Fri, 9 Nov 2018 11:10:48 +0000 (12:10 +0100)]
Cycles: Cleanup, indentation

2 years agoCycles: Cleanup, space after (void)
Sergey Sharybin [Fri, 9 Nov 2018 11:08:51 +0000 (12:08 +0100)]
Cycles: Cleanup, space after (void)

It was used in like 95% of places.

2 years agoCycles: Cleanup, don't use strict C prototypes
Sergey Sharybin [Fri, 9 Nov 2018 11:01:38 +0000 (12:01 +0100)]
Cycles: Cleanup, don't use strict C prototypes

Those are more like a legacy of language, which is not
needed in C++.

2 years agoCycles: Cleanup, split array from vector
Sergey Sharybin [Fri, 9 Nov 2018 10:54:24 +0000 (11:54 +0100)]
Cycles: Cleanup, split array from vector

Those are similar but different types, no reason to keep
their definitions in a single file.

2 years agoCycles: Cleanup, some documentation
Sergey Sharybin [Fri, 9 Nov 2018 10:46:09 +0000 (11:46 +0100)]
Cycles: Cleanup, some documentation

2 years agoCycles: Cleanup, remove unneeded manual constructors specification
Sergey Sharybin [Fri, 9 Nov 2018 10:44:33 +0000 (11:44 +0100)]
Cycles: Cleanup, remove unneeded manual constructors specification

2 years agoCycles: Cleanup, remove unneeded method from vector
Sergey Sharybin [Fri, 9 Nov 2018 10:37:56 +0000 (11:37 +0100)]
Cycles: Cleanup, remove unneeded method from vector

Since we've defaulted to C++11, no need to override this
method manually anymore.

2 years agoCycles: Cleanup, spacing after preprocessor
Sergey Sharybin [Fri, 9 Nov 2018 10:34:54 +0000 (11:34 +0100)]
Cycles: Cleanup, spacing after preprocessor

It is supposed to be two spaces before comment stating which if
else/endif statements corresponds to. Was mainly violated in the
header guards.

2 years agoreadme: use name 'macOS'
Campbell Barton [Fri, 9 Nov 2018 00:49:49 +0000 (11:49 +1100)]
readme: use name 'macOS'

2 years agoFix build on 32bit after Embree changes.
Brecht Van Lommel [Thu, 8 Nov 2018 13:48:54 +0000 (14:48 +0100)]
Fix build on 32bit after Embree changes.

2 years agobuild: add proper embree support to platform_win32.cmake
Ray Molenkamp [Thu, 8 Nov 2018 02:34:49 +0000 (19:34 -0700)]
build: add proper embree support to platform_win32.cmake

made the use of findpackage optional and add support for debug builds

2 years agobuild_environment: add debug libs for embree on windows
Ray Molenkamp [Thu, 8 Nov 2018 02:33:07 +0000 (19:33 -0700)]
build_environment: add debug libs for embree on windows

2 years agobuild_deps_windows: add option to to only create project files.
Ray Molenkamp [Thu, 8 Nov 2018 02:18:53 +0000 (19:18 -0700)]
build_deps_windows: add option to to only create project files.

2 years agoCycles: Write Cryptomatte metadata according to the specification
Lukas Stockner [Wed, 7 Nov 2018 03:05:47 +0000 (04:05 +0100)]
Cycles: Write Cryptomatte metadata according to the specification

Reviewers: brecht, sergey, swerner

Subscribers: creamsurfer, Tanguy, Noss, SteffenD

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

2 years agoRender API: Support arbitrary length for custom image metadata fields
Lukas Stockner [Thu, 8 Nov 2018 00:05:55 +0000 (01:05 +0100)]
Render API: Support arbitrary length for custom image metadata fields

2 years agoCleanup: minor simplification to user-addon check
Campbell Barton [Wed, 7 Nov 2018 22:54:13 +0000 (09:54 +1100)]
Cleanup: minor simplification to user-addon check

2 years agoinstall_deps: Added optional build of Embree to install_deps.sh, turned off by default.
Stefan Werner [Wed, 7 Nov 2018 19:36:03 +0000 (20:36 +0100)]
install_deps: Added optional build of Embree to install_deps.sh, turned off by default.

2 years agoCycles: Rearranged macros in kernel_types.h to fix Embree build.
Stefan Werner [Wed, 7 Nov 2018 14:20:24 +0000 (15:20 +0100)]
Cycles: Rearranged macros in kernel_types.h to fix Embree build.

2 years agoFix build with OSL, remove unneeded file after Embree changes.
Brecht Van Lommel [Wed, 7 Nov 2018 12:29:20 +0000 (13:29 +0100)]
Fix build with OSL, remove unneeded file after Embree changes.

2 years agoCycles: Fixed a warning.
Stefan Werner [Wed, 7 Nov 2018 13:04:22 +0000 (14:04 +0100)]
Cycles: Fixed a warning.

2 years agoCycles: Fixed OpenCL render after the Embree checkin.
Stefan Werner [Wed, 7 Nov 2018 12:53:56 +0000 (13:53 +0100)]
Cycles: Fixed OpenCL render after the Embree checkin.

2 years agoCycles: Added Embree as BVH option for CPU renders.
Stefan Werner [Wed, 7 Nov 2018 11:58:12 +0000 (12:58 +0100)]
Cycles: Added Embree as BVH option for CPU renders.

Note that this is turned off by default and must be enabled at build time with the CMake WITH_CYCLES_EMBREE flag.
Embree must be built as a static library with ray masking turned on, the `make deps` scripts have been updated accordingly.
There, Embree is off by default too and must be enabled with the WITH_EMBREE flag.

Using Embree allows for much faster rendering of deformation motion blur while reducing the memory footprint.

TODO: GPU implementation, deduplication of data, leveraging more of Embrees features (e.g. tessellation cache).

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

2 years agoCleanup: use STRPREFIX for mount point checks
Campbell Barton [Wed, 7 Nov 2018 02:37:42 +0000 (13:37 +1100)]
Cleanup: use STRPREFIX for mount point checks

From D3846 by @kostex

2 years agoCleanup: use BLI_compiler_compat.h for BLI_INLINE
Campbell Barton [Wed, 7 Nov 2018 01:17:58 +0000 (12:17 +1100)]
Cleanup: use BLI_compiler_compat.h for BLI_INLINE

2 years agoCleanup: renmae ePaintTexture(Projective) -> 3D
Campbell Barton [Wed, 7 Nov 2018 00:44:51 +0000 (11:44 +1100)]
Cleanup: renmae ePaintTexture(Projective) -> 3D

Matches ePaintTexture2D, less verbose.

2 years agoFix T56055: color discrepancy between viewport and render for Filmic transforms.
Troy Sobotka [Tue, 6 Nov 2018 18:35:50 +0000 (19:35 +0100)]
Fix T56055: color discrepancy between viewport and render for Filmic transforms.

2 years agoFix T57388: Blender Internal + Freestyle viewport render wrongly using FSAA.
Irie Shinsuke [Sun, 4 Nov 2018 19:34:02 +0000 (20:34 +0100)]
Fix T57388: Blender Internal + Freestyle viewport render wrongly using FSAA.

2 years agoFix assert rendering hair tests on some systems.
Brecht Van Lommel [Sun, 4 Nov 2018 19:25:57 +0000 (20:25 +0100)]
Fix assert rendering hair tests on some systems.

2 years agoFix assert rendering with denoising, after recent changes.
Brecht Van Lommel [Sun, 4 Nov 2018 19:13:55 +0000 (20:13 +0100)]
Fix assert rendering with denoising, after recent changes.

2 years agoFix ghash masking out upper bits on 64bit systems
Campbell Barton [Sun, 4 Nov 2018 05:44:28 +0000 (16:44 +1100)]
Fix ghash masking out upper bits on 64bit systems

The code this was taken from assumes a 'size_t' result,
which isn't the case here.

In practice the bucket distribution wasn't bad,
even so this was a nop so best fix.

2 years agoFix T57529: 2D image paint fill tool not taking into account alpha.
Brecht Van Lommel [Thu, 1 Nov 2018 11:06:04 +0000 (12:06 +0100)]
Fix T57529: 2D image paint fill tool not taking into account alpha.

2 years agoCleanup: move progress utility module into bpy_extras
Campbell Barton [Thu, 1 Nov 2018 05:17:40 +0000 (16:17 +1100)]
Cleanup: move progress utility module into bpy_extras

Try avoid having too many toplevel modules with generic names.

2 years agoCycles: Fix wrong BVH used when disabling AVX2 in debug settings
Sergey Sharybin [Wed, 31 Oct 2018 10:46:52 +0000 (11:46 +0100)]
Cycles: Fix wrong BVH used when disabling AVX2 in debug settings

Mainly useful for debugging. Previously, when AVX2 was disabled
in the debug panel but BVH layout was kept on BVH8 nothing was
rendered.

Needed to make it so supported BVH layout mask for devices is
queried in "dynamic", so it is possible to use DebugFlags there.

2 years agomake.bat: fix unquoted variables.
Ray Molenkamp [Tue, 30 Oct 2018 23:36:36 +0000 (17:36 -0600)]
make.bat: fix unquoted variables.

causing build issues for some users.

2 years agoFix build error on Windows 32bit, alignment was wrong.
Brecht Van Lommel [Tue, 30 Oct 2018 10:39:44 +0000 (11:39 +0100)]
Fix build error on Windows 32bit, alignment was wrong.

2 years agoUI: add uiItemMenuFN which frees it's argument
Campbell Barton [Mon, 29 Oct 2018 23:46:29 +0000 (10:46 +1100)]
UI: add uiItemMenuFN which frees it's argument

2 years agoCycles: Support generating Denoising passes without actually denoising
Lukas Stockner [Mon, 29 Oct 2018 14:45:58 +0000 (15:45 +0100)]
Cycles: Support generating Denoising passes without actually denoising

Needed for the animation denoiser since the denoising filter is done separately there.

Reviewers: brecht, sergey

Reviewed By: brecht

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

2 years agoCycles: more detailed tooltips for cryptomatte options.
Brecht Van Lommel [Mon, 29 Oct 2018 12:05:29 +0000 (13:05 +0100)]
Cycles: more detailed tooltips for cryptomatte options.

2 years agoFix assert weight painting after undo
Campbell Barton [Mon, 29 Oct 2018 04:21:25 +0000 (15:21 +1100)]
Fix assert weight painting after undo

2 years agoModifier: mask threshold option
Campbell Barton [Mon, 29 Oct 2018 02:01:48 +0000 (13:01 +1100)]
Modifier: mask threshold option

D3834 by @Allosteric

2 years agoFix snaps appearing in system bookmarks on Linux.
Roel Koster [Sun, 28 Oct 2018 12:03:50 +0000 (13:03 +0100)]
Fix snaps appearing in system bookmarks on Linux.

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

2 years agoFix Linux build after Cryptomatte commit.
Brecht Van Lommel [Sun, 28 Oct 2018 13:53:08 +0000 (14:53 +0100)]
Fix Linux build after Cryptomatte commit.

2 years agoCycles: Added Cryptomatte output.
Stefan Werner [Sun, 28 Oct 2018 09:37:41 +0000 (05:37 -0400)]
Cycles: Added Cryptomatte output.

This allows for extra output passes that encode automatic object and material masks
for the entire scene. It is an implementation of the Cryptomatte standard as
introduced by Psyop. A good future extension would be to add a manifest to the
export and to do plenty of testing to ensure that it is fully compatible with other
renderers and compositing programs that use Cryptomatte.

Internally, it adds the ability for Cycles to have several passes of the same type
that are distinguished by their name.

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

2 years agoFix T57393: Cycles OSL bevel and AO not working after OSL upgrade.
Brecht Van Lommel [Fri, 26 Oct 2018 17:26:06 +0000 (19:26 +0200)]
Fix T57393: Cycles OSL bevel and AO not working after OSL upgrade.

2 years agoCycles: Expose noisy image pass by default when rendering with denoiser
Lukas Stockner [Thu, 30 Aug 2018 21:28:10 +0000 (23:28 +0200)]
Cycles: Expose noisy image pass by default when rendering with denoiser

Apparently quite a few users would like to have the noisy pass available when using the denoiser, and since it's being generated anyways we might as well expose it by default.

Reviewers: brecht

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

2 years agoCycles: Overhaul ensure_valid_reflection to fix issues with normal- and bumpmapping
Lukas Stockner [Sun, 21 Oct 2018 01:41:31 +0000 (03:41 +0200)]
Cycles: Overhaul ensure_valid_reflection to fix issues with normal- and bumpmapping

This function is supposed to prevent the black artifacts caused by strong normal- or bumpmapping, but failed in some cases.

Now the code correctly handles all test files and previous issues I am aware of and also has extensive comments describing
the algorithm and the math behind it.

Basically, the main problem was that there can be multiple valid solutions that fulfil the reflection angle criterium,
but I had assumed that only one would exist and therefore simply picked the first solution with a positive term in srqt().
Now, the code uses additional validity checks and a simple heuristic to pick the best valid solution.

Additionally, the code messed up very shallow reflections even if the normal map strength was zero due to the constant
limit for the outgoing ray angle, which caused shallow incoming rays to fail the initial test even when reflected directly
on Ng. Now, the code accounts for this by reducing the threshold in the case of a shallow incoming ray, ensuring that at
least N=Ng is always a valid solution.

Reviewers: brecht

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

2 years agoWM: minor changes to cursor API
Campbell Barton [Thu, 25 Oct 2018 04:18:24 +0000 (15:18 +1100)]
WM: minor changes to cursor API

2 years agoCleanup: unused vars, correct bad (unused) logic
Campbell Barton [Thu, 25 Oct 2018 01:24:38 +0000 (12:24 +1100)]
Cleanup: unused vars, correct bad (unused) logic

2 years agoFix (unreported) bad halding of ID usercounts when fully copying a scene.
Bastien Montagne [Wed, 24 Oct 2018 06:43:20 +0000 (08:43 +0200)]
Fix (unreported) bad halding of ID usercounts when fully copying a scene.

2 years agoI18n: tweak/fix exception catching code of pgettex() wrapper.
Bastien Montagne [Wed, 24 Oct 2018 06:23:14 +0000 (08:23 +0200)]
I18n: tweak/fix exception catching code of pgettex() wrapper.

Related to T57066, rather unlikely to fix core of the issue, but may
solve crash itself.

Same as rBf22385f28ec8 (did it by mistake in 2.8 first :/ ).

2 years agoBMesh: inline index lookups
Campbell Barton [Wed, 24 Oct 2018 01:54:12 +0000 (12:54 +1100)]
BMesh: inline index lookups

For release builds this is now the same as indexing the array directly.

2 years agoWindows: Enable python debugging in Visual Studio.
Ray Molenkamp [Mon, 22 Oct 2018 16:17:08 +0000 (10:17 -0600)]
Windows: Enable python debugging in Visual Studio.

see D3817 for technical details, and https://wiki.blender.org/wiki/Tools/Debugging/Python_Visual_Studio for a end user quick-start guide.

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

2 years agoTentative fix for T57066: Daily build of Blend 2.79 crashes on OSX Mojave.
Bastien Montagne [Mon, 22 Oct 2018 08:39:57 +0000 (10:39 +0200)]
Tentative fix for T57066: Daily build of Blend 2.79 crashes on OSX Mojave.

Looks like we need to explicitly set i18n language to default value on
some OSs... Unless that 'need to create new translated-name IDs in
versionning code for startup file' situation is really seldom.

Anyway, hopefully that will fix the crash.

2 years agoPrevent G.fileflags changes when WM_OT_save_mainfile() is called from script
Campbell Barton [Mon, 22 Oct 2018 04:08:26 +0000 (15:08 +1100)]
Prevent G.fileflags changes when WM_OT_save_mainfile() is called from script

This is to solve an issue where a blend file could be compressed
unbeknownst to the artist. This happened in the following situtation:

- Artist edits an uncompressed blend file.
- Some script saves a compressed blendfile to a separate location.
- When the artist saves the file (s)he is editing (File>Save, or Ctrl+S),
  it was silently compressed.

Cherry pick from: cd3b313d5f44a10a1150bf1ddb560775d1bcd827

2 years agoFix T57328: 'Save As Copy' prints warning
Campbell Barton [Mon, 22 Oct 2018 03:51:06 +0000 (14:51 +1100)]
Fix T57328: 'Save As Copy' prints warning

2 years agoCycles: Enable shadow information in requested features when denoising is used
Lukas Stockner [Sun, 21 Oct 2018 22:14:22 +0000 (00:14 +0200)]
Cycles: Enable shadow information in requested features when denoising is used

The shadow information isn't only used for shadowcatchers, but also to generate the shadowing feature pass of the denoiser.

2 years agobuild_depenencies: Fix url for openal.
Ray Molenkamp [Fri, 19 Oct 2018 15:09:06 +0000 (09:09 -0600)]
build_depenencies: Fix url for openal.

2 years agoFix T57284: poor result UV unwrapping concave n-gon.
Brecht Van Lommel [Fri, 19 Oct 2018 12:42:27 +0000 (14:42 +0200)]
Fix T57284: poor result UV unwrapping concave n-gon.

2 years agoFix error disabling all addons
Campbell Barton [Fri, 19 Oct 2018 06:49:16 +0000 (17:49 +1100)]
Fix error disabling all addons

2 years agoFix Copy Selection to Buffer breaking library paths.
Brecht Van Lommel [Thu, 18 Oct 2018 17:51:34 +0000 (19:51 +0200)]
Fix Copy Selection to Buffer breaking library paths.

This is a bug experienced by animators in the Blender Studio that developers
have been trying to fix for a /long/ time.

What happens is that partial file writing extracts the needed datablocks from
the main list of datablocks into a smaller one. Afterwards they are added back
to the main list, but in some cases not exactly in the same order.

There is file path remapping code that depends on the datablocks being in
exactly the same order as before, and when this was not the case filepaths
would get swapped between datablocks

The reason datablocks are not restored in the same order is because the sorting
of datablocks by name is a) case insensitive and b) undefined if there are
multiple datablocks with the same name from different libraries. This should
be made well defined, but the fix in this commit is simpler.

The way animators ran into this bug is that they use the Copy Attributes addon
a lot, which has as the first item in the menu Copy Selection to Buffer. In
some cases this would be clicked accidentally when menu is near the edge of the
window, breaking the library paths which would only be noticed a much later on
file save and reload.

The way this bug was finally tracked down is that it was suspected that the
undo system was the cause, and so Bastien added library validation for undo.
When Hjalti then did undo and noticed the error, he remembered accidentally
clicking Copy Selection to Buffer just before, and we could finally reproduce
the bug.

2 years agoDEBUG_IO: add sanity check on libdata in undo step as well.
Bastien Montagne [Wed, 17 Oct 2018 14:43:02 +0000 (16:43 +0200)]
DEBUG_IO: add sanity check on libdata in undo step as well.

There are serious suspicions that weird corruptions faced by studio
artists may happen in undo/redo code, so let's see whether that's the
case.

With this, and when --debug-io arg is passed on startup, the whole lib
data are checked at every undo. This makes undo slower (from two to
three times slower), but it could help us spot better what happens...

2 years agoExpose 'debug_io' flag in bpy.app
Bastien Montagne [Wed, 17 Oct 2018 14:42:36 +0000 (16:42 +0200)]
Expose 'debug_io' flag in bpy.app

2 years agoMinor style cleanup.
Bastien Montagne [Wed, 17 Oct 2018 14:42:18 +0000 (16:42 +0200)]
Minor style cleanup.

2 years agoFix cmake not triggering rebuild on .glsl changes
Dalai Felinto [Tue, 16 Oct 2018 19:54:59 +0000 (16:54 -0300)]
Fix cmake not triggering rebuild on .glsl changes

At least on windows we do not re-run datatoc when the .glsl files change.

To test is simple, just change edit_mesh_overlay_common_lib.glsl
remove lines, write plain text, ..., now rebuild and go in edit mode
with the default cube.

I also had to remove the entry in gpu/CMakeLists.txt for
gpu_shader_material.glsl since this was being tracked directly, as well
as running data_to_c_simple (otherwise CMake raises an error for
duplicated entries).

We probably want to do the same for the other datatoc functions.

Reviewers: LazyDodo, brecht
Differential Revision: https://developer.blender.org/D3803

2 years agoFix incorrect strncpy use
Campbell Barton [Wed, 10 Oct 2018 22:36:43 +0000 (09:36 +1100)]
Fix incorrect strncpy use

Didn't ensure null terminated.

2 years agoCleanup: style (pointers)
Campbell Barton [Wed, 10 Oct 2018 21:49:28 +0000 (08:49 +1100)]
Cleanup: style (pointers)

2 years agoCleanup: spelling
Campbell Barton [Mon, 8 Oct 2018 22:28:36 +0000 (09:28 +1100)]
Cleanup: spelling

2 years agoCycles: Fix NLM denoising kernels zeroing the wrong buffer on OpenCL
Lukas Stockner [Mon, 8 Oct 2018 22:03:47 +0000 (00:03 +0200)]
Cycles: Fix NLM denoising kernels zeroing the wrong buffer on OpenCL

Since my temporary buffer commit (about a month ago), the OpenCL device was zeroing the wrong buffer, leading to
completely wrong filtered feature passes and therefore significantly lower-quality results than CPU and CUDA.

2 years agoCleanup: style
Campbell Barton [Mon, 8 Oct 2018 20:58:06 +0000 (07:58 +1100)]
Cleanup: style

2 years agoFix T57103: Subdivide smooth results in NAN verts
Campbell Barton [Mon, 8 Oct 2018 20:47:35 +0000 (07:47 +1100)]
Fix T57103: Subdivide smooth results in NAN verts

2 years agoCycles: Clean up extra minus in previous commit
Lukas Stockner [Mon, 8 Oct 2018 20:22:05 +0000 (22:22 +0200)]
Cycles: Clean up extra minus in previous commit

Forgot to add that change, sorry for the noise.

2 years agoCycles: Reuse existing buffer in the NLM denoising kernels on CPU
Lukas Stockner [Mon, 8 Oct 2018 20:17:06 +0000 (22:17 +0200)]
Cycles: Reuse existing buffer in the NLM denoising kernels on CPU

2 years agoCycles: Use existing shared temporary memory in reconstruction step of the denoiser
Lukas Stockner [Mon, 8 Oct 2018 20:13:40 +0000 (22:13 +0200)]
Cycles: Use existing shared temporary memory in reconstruction step of the denoiser

Previously the code allocated its own temporary memory, but it's possible to just use the existing shared one instead.

2 years agoTests: Support parallel execution of render tests
Lukas Stockner [Sat, 6 Oct 2018 20:12:28 +0000 (22:12 +0200)]
Tests: Support parallel execution of render tests

Previously, parallel tests would overwrite each others temporary outputs.

2 years agoCycles: Implement vectorized NLM kernels for faster CPU denoising
Lukas Stockner [Sat, 6 Oct 2018 18:39:01 +0000 (20:39 +0200)]
Cycles: Implement vectorized NLM kernels for faster CPU denoising