15 months agoFix T54360: FFMPEG bitrate not editable for all codecs v2.79b
Sybren A. Stüvel [Thu, 22 Mar 2018 14:10:42 +0000 (15:10 +0100)]
Fix T54360: FFMPEG bitrate not editable for all codecs

The bitrate selection was hidden when a CRF mode was chosen and then
switched to a codec that doesn't support CRF.

15 months agoFix compilation error
Sergey Sharybin [Thu, 22 Mar 2018 08:56:06 +0000 (09:56 +0100)]
Fix compilation error

Recent fix was assuming some cleanup is done.

15 months agoUpdate addons submodule hash
Sergey Sharybin [Thu, 22 Mar 2018 08:50:55 +0000 (09:50 +0100)]
Update addons submodule hash

15 months agoFix T54234, add BLENDER_VERSION_CHAR to .plist
Arto Kitula [Tue, 6 Mar 2018 00:36:29 +0000 (02:36 +0200)]
Fix T54234, add BLENDER_VERSION_CHAR to .plist

15 months agoFixed: cache clearing when using multiple Alembic files.
Sybren A. Stüvel [Tue, 20 Mar 2018 11:54:48 +0000 (12:54 +0100)]
Fixed: cache clearing when using multiple Alembic files.

15 months agoCleanup: Use more python way of checking boolean
Sergey Sharybin [Thu, 22 Mar 2018 08:31:33 +0000 (09:31 +0100)]
Cleanup: Use more python way of checking boolean

15 months agoTracking: Make object created form tracks active and selected
Sergey Sharybin [Wed, 21 Mar 2018 11:33:04 +0000 (12:33 +0100)]
Tracking: Make object created form tracks active and selected

15 months agoTracking: Warn when no tracks are selected when creating mesh
Sergey Sharybin [Wed, 21 Mar 2018 11:30:50 +0000 (12:30 +0100)]
Tracking: Warn when no tracks are selected when creating mesh

Makes it more clear why mesh was not created this way.

Fixes T54368: 3D markers to mesh In MovieClipEditor Not working.

15 months agoFix T54348: Bone dissolve gives invalid hierarchy
Campbell Barton [Thu, 22 Mar 2018 06:50:58 +0000 (07:50 +0100)]
Fix T54348: Bone dissolve gives invalid hierarchy

Disconnected bones weren't handled correctly.

15 months agoFix bone dissolve using wrong envelope radius
Campbell Barton [Thu, 22 Mar 2018 06:42:17 +0000 (07:42 +0100)]
Fix bone dissolve using wrong envelope radius

Also correctly copy bone tip selection when dissolving.

15 months agoFix T53478, T53430: Sequencer cut edge case fails
Campbell Barton [Mon, 5 Mar 2018 05:00:27 +0000 (16:00 +1100)]
Fix T53478, T53430: Sequencer cut edge case fails

Previous fix for T53430 caused T54200.

The edge case for soft & hard cuts weren't working,
where the strip used start/end-still & the frame was placed exactly on
the start/end of of the sequence content.

T54200 fixed the end-still case but broke hard-cuts for all other cases.

This fixes the case for soft/hard cuts with/without start/end-still.

15 months agoRevert "Fix T53430: Cut at the strip end fails w/ endstill"
Campbell Barton [Mon, 5 Mar 2018 04:11:33 +0000 (15:11 +1100)]
Revert "Fix T53430: Cut at the strip end fails w/ endstill"

This reverts commit 855799ecc1c5e53d9fbfe520fd5402bc0138f674.

Caused T54200

15 months agoError passing context arg to marker menu
Campbell Barton [Mon, 5 Mar 2018 03:10:43 +0000 (14:10 +1100)]
Error passing context arg to marker menu

own mistake in 6981861fcfd

15 months agoAPI generating script: give better version for releases builds.
Bastien Montagne [Tue, 13 Mar 2018 18:49:39 +0000 (19:49 +0100)]
API generating script: give better version for releases builds.

Was giving '2.62.1 <sha1>' even for releases, now rather giving nicer
'2.62a <sha1>' in that case.

15 months agoFix T54206: bevel and inset operations repeat did not remember offset.
Brecht Van Lommel [Wed, 7 Mar 2018 21:19:56 +0000 (22:19 +0100)]
Fix T54206: bevel and inset operations repeat did not remember offset.

Now repeating the operator will use the previously chosen offset, either with
the modal operator or typed in. The modal operator will still start at zero.

15 months agoFix T54204: Wrong selection on Clean Tracks (Motion Tracking)
Sergey Sharybin [Mon, 5 Mar 2018 11:00:25 +0000 (12:00 +0100)]
Fix T54204: Wrong selection on Clean Tracks (Motion Tracking)

A mistake in a fix for T53612.

Regression in 2.79a, candidate for 2.79b :S

15 months agoFix T54003: Particles - Size and random size not present in "physics" tab in Advanced...
Mai Lavelle [Tue, 6 Feb 2018 01:15:53 +0000 (20:15 -0500)]
Fix T54003: Particles - Size and random size not present in "physics" tab in Advanced mode

The check to see if `use_advanced_hair` was enabled was actually in two places
(render panel `draw` function and physics panel `poll` function). As these
properties are only in one place now the check in `draw` isn't needed anymore.

Related: T53513, a6c69ca57f661a8538

15 months agoBl;ender 2.79b: Begin 2.79b release cycle
Sergey Sharybin [Mon, 19 Mar 2018 10:33:15 +0000 (11:33 +0100)]
Bl;ender 2.79b: Begin 2.79b release cycle

16 months agoVSE: skip non image/movie w/ proxy dir storage blender-v2.79a-release v2.79a
Campbell Barton [Wed, 21 Feb 2018 07:13:40 +0000 (18:13 +1100)]
VSE: skip non image/movie w/ proxy dir storage

This would use uninitialized filename variable,
looked into supporting this however generating proxies currently only
works for movies.

16 months agoDepsgraph: Fix crash using --debug-depsgraph and --debug-depsgraph-no-threads
Sergey Sharybin [Wed, 21 Feb 2018 09:42:22 +0000 (10:42 +0100)]
Depsgraph: Fix crash using --debug-depsgraph and --debug-depsgraph-no-threads

Was accessing past the array boundaries.

Should be safe for 2.79a.

16 months agoFix T53032: Image sequence works bad with Displace modifier
Sergey Sharybin [Mon, 19 Feb 2018 13:33:48 +0000 (14:33 +0100)]
Fix T53032: Image sequence works bad with Displace modifier

We shouldn't mix image pool acuisition with and without user provided,
the fact that internally image.c uses last frame from Image datablock
confuses the logic.

16 months agoBlender 2.79a: Update submodules hash for addons
Sergey Sharybin [Mon, 19 Feb 2018 10:32:56 +0000 (11:32 +0100)]
Blender 2.79a: Update submodules hash for addons

16 months agoBlender 2.79a: Prepare for release
Sergey Sharybin [Mon, 19 Feb 2018 09:49:46 +0000 (10:49 +0100)]
Blender 2.79a: Prepare for release

Enter release state and make spacing to "a" more sane.

There is still at least one fix we want to get in, before declaring we are
ready for release.

16 months agoFix T54075: Align Objects fails w/ empty mesh
Campbell Barton [Thu, 15 Feb 2018 00:33:47 +0000 (11:33 +1100)]
Fix T54075: Align Objects fails w/ empty mesh

16 months agoCleanup: Python context access
Campbell Barton [Wed, 7 Feb 2018 04:47:54 +0000 (15:47 +1100)]
Cleanup: Python context access

Avoid access from bpy when it's already declared.

16 months agoFix T54072: Crash splitting edges
Campbell Barton [Wed, 14 Feb 2018 23:48:12 +0000 (10:48 +1100)]
Fix T54072: Crash splitting edges

16 months agoFix T53958: Sequencer zoom 1:1 fails
Campbell Barton [Fri, 9 Feb 2018 02:39:47 +0000 (13:39 +1100)]
Fix T53958: Sequencer zoom 1:1 fails

16 months agoMinor change to last commit
Campbell Barton [Mon, 5 Feb 2018 06:56:09 +0000 (17:56 +1100)]
Minor change to last commit

Keep mode checks simple, nest other checks in their body.

16 months agoFix T53986: Crash saving during sculpt stroke
Campbell Barton [Mon, 5 Feb 2018 06:53:30 +0000 (17:53 +1100)]
Fix T53986: Crash saving during sculpt stroke

Also remove unused struct member.

16 months agoFix: msvc build error with bli_fileops.h
Ray Molenkamp [Thu, 1 Feb 2018 14:58:06 +0000 (07:58 -0700)]
Fix: msvc build error with bli_fileops.h

bli_fileops.h was using uint64_t without including the proper header.

issue triggered by rBb0af44fa4d7a2e134b315c49a4fbdf573f781004

16 months agoFix T50630: Fluid fails on win32 w/ unicode paths
Campbell Barton [Tue, 30 Jan 2018 03:30:28 +0000 (14:30 +1100)]
Fix T50630: Fluid fails on win32 w/ unicode paths

Allow overriding gzip open w/ elbeem.

16 months agoFix navmesh creation w/ multiple objects
Campbell Barton [Fri, 26 Jan 2018 02:10:02 +0000 (13:10 +1100)]
Fix navmesh creation w/ multiple objects

D2976 by @dertom

16 months agoDocs: invoke_search_popup uses bl_property
Campbell Barton [Fri, 26 Jan 2018 00:52:01 +0000 (11:52 +1100)]
Docs: invoke_search_popup uses bl_property

Also add code example in docs.

16 months agoFix part of T53080: don't use current scene world for icon previews.
Brecht Van Lommel [Mon, 12 Feb 2018 19:08:50 +0000 (20:08 +0100)]
Fix part of T53080: don't use current scene world for icon previews.

This can be very slow if it contains a big texture, and it's not
necessarily setup in a useful way anyway, and materials can be used
in multiple scenes.

16 months agoFix (unreported) crash when duplicating a FileBrowser window in preview draw mode.
Bastien Montagne [Fri, 9 Feb 2018 15:13:13 +0000 (16:13 +0100)]
Fix (unreported) crash when duplicating a FileBrowser window in preview draw mode.

We did not clear preview or smoothscroll timers pointers in copy code...

16 months agoFix missing group duplicated by hair in render
Sergey Sharybin [Tue, 6 Feb 2018 14:36:49 +0000 (15:36 +0100)]
Fix missing group duplicated by hair in render

Was happening when viewport visibility on the particle system is disabled.
This became an issue after c45afcf, but the actual issue goes a bit deeper
and the following aspects were involved:

- Relations builder for particle system was ignoring particle system if
  it's visibility is not enabled for viewport. This is something what
  shouldn't have been done -- depsgraph relations are supposed to be the
  same no matter if it's viewport or render.

- Relation builder was only dealing with duplication set to object, but
  was ignoring group duplication.

This is NOT a regression since 2.79, but a regression since 2.79a-rc1.

16 months agoFix T53686: VSE Render crash when zooming timeline.
Bastien Montagne [Thu, 1 Feb 2018 14:53:49 +0000 (15:53 +0100)]
Fix T53686: VSE Render crash when zooming timeline.

Epic fail from recent 'security' fixes (rBe04d7c49dca9). ;)

To be backported to 2.79a!

16 months agoFix T53962: Cycles OpenCL compile error in some scenes.
Brecht Van Lommel [Wed, 31 Jan 2018 13:42:30 +0000 (14:42 +0100)]
Fix T53962: Cycles OpenCL compile error in some scenes.

This part of 212a8d9e needed to be ported over for 2ca933f to work.

16 months agoFix possible concurency issue in mesh normals computation.
Bastien Montagne [Wed, 31 Jan 2018 11:30:39 +0000 (12:30 +0100)]
Fix possible concurency issue in mesh normals computation.

Failure in own code from last December, thanks @sergey for finding it.

To be backported to 2.79a.

16 months agoFix T52634: EditMesh Remove doubles could hang
Campbell Barton [Sun, 3 Sep 2017 13:13:20 +0000 (23:13 +1000)]
Fix T52634: EditMesh Remove doubles could hang

A single diagonal axis was used for sorting coordinates,
the algorithm relied on users not having vertices axis aligned.

Use BLI_kdtree to remove doubles instead.

Overall speed varies, it's more predictable than the previous method.
Some typical tests gave speedup of ~1.4x - 1.7x.

16 months agoBLI_kdtree: utility function to remove doubles
Campbell Barton [Sun, 3 Sep 2017 12:34:49 +0000 (22:34 +1000)]
BLI_kdtree: utility function to remove doubles

16 months agoIMB: Add asserts that returned fps and fps base are strictly positives.
Bastien Montagne [Fri, 26 Jan 2018 14:13:35 +0000 (15:13 +0100)]
IMB: Add asserts that returned fps and fps base are strictly positives.

Forgot to add that in previous commit, also related to T53003.

16 months agoRelated to T53003: tweak scene fps range.
Bastien Montagne [Fri, 26 Jan 2018 14:08:58 +0000 (15:08 +0100)]
Related to T53003: tweak scene fps range.

Move restricted 'reasonable' range to ui_range, and allow wider values
for manual settings.

16 months agoFix T53003: IMB: Invalid framerate handling due to short integer overflow.
Bastien Montagne [Fri, 26 Jan 2018 13:59:16 +0000 (14:59 +0100)]
Fix T53003: IMB: Invalid framerate handling due to short integer overflow.

FFMPEG uses int for the numerator, while Blender uses a short. So in
cases people gave weird exotic framerate values and we cannot reduce
enough the numerator, we'd get totally weird values (even negative frame
rates sometimes!)

Now we add checks for short overflow and approximate as best as possible
in that case (error should not matter unless you have shots of at least
several hundreds of hours ;) ).

16 months agoFix part of T53080: all material previews re-rendering after undo.
Brecht Van Lommel [Fri, 26 Jan 2018 06:54:09 +0000 (07:54 +0100)]
Fix part of T53080: all material previews re-rendering after undo.

This reverts commit dc2617130b2e1d7d2b9892fbd7c6e7b60caafb66, which disabled
writing of previews for undo. While this uses some memory, re-rendering all
previews is very expensive, especially if for example you have lots of materials
using high-res image textures.

17 months agoFix T53593: sculpt brush rake spacing bug after recent bugfix.
Brecht Van Lommel [Wed, 24 Jan 2018 13:25:59 +0000 (14:25 +0100)]
Fix T53593: sculpt brush rake spacing bug after recent bugfix.

17 months agoCycles: Fix bug in user preferences with factory startup
Sergey Sharybin [Tue, 23 Jan 2018 15:16:09 +0000 (16:16 +0100)]
Cycles: Fix bug in user preferences with factory startup

Namely, the issue would happen when CPU device was never used before.
Issue with wrong merge conflict resolution.

17 months agoBlender 2.79a: Use latest dev-tools
Sergey Sharybin [Mon, 22 Jan 2018 14:47:41 +0000 (15:47 +0100)]
Blender 2.79a: Use latest dev-tools

This way release checker used by Linux release environment is corrected.

17 months agoBlender 2.79a: Show both version char and rc text on splash
Sergey Sharybin [Mon, 22 Jan 2018 13:41:22 +0000 (14:41 +0100)]
Blender 2.79a: Show both version char and rc text on splash

17 months agoBlender 2.79a: Use proper version char
Sergey Sharybin [Mon, 22 Jan 2018 13:38:57 +0000 (14:38 +0100)]
Blender 2.79a: Use proper version char

17 months agoBlender 2.79a: Point submodules to updated hash
Sergey Sharybin [Mon, 22 Jan 2018 13:31:20 +0000 (14:31 +0100)]
Blender 2.79a: Point submodules to updated hash

17 months agoTask scheduler: Start with suspended pool to avoid threading overhead on push
Sergey Sharybin [Mon, 22 Jan 2018 11:57:08 +0000 (12:57 +0100)]
Task scheduler: Start with suspended pool to avoid threading overhead on push

The idea is to avoid any threading overhead when we start pushing tasks in a
loop. Similarly to how we do it from the new dependency graph. Gives couple of
percent of speedup here, but also improves scalability.

17 months agoTask scheduler: Clarify why do we need an atomic add of 0
Sergey Sharybin [Mon, 22 Jan 2018 11:56:35 +0000 (12:56 +0100)]
Task scheduler: Clarify why do we need an atomic add of 0

17 months agoCycles: Fix crash opening user preferences after adding extra GPU
Sergey Sharybin [Mon, 22 Jan 2018 11:54:00 +0000 (12:54 +0100)]
Cycles: Fix crash opening user preferences after adding extra GPU

We can not store pointers to elements of collection property in the
case we modify that collection. This is like storing pointers to
elements of array before calling realloc().

17 months agoCycles tests: Add extra image tests
Sergey Sharybin [Mon, 22 Jan 2018 11:38:59 +0000 (12:38 +0100)]
Cycles tests: Add extra image tests

17 months agoFix T53012: Shadow catcher creates artifacts on contact area
Sergey Sharybin [Mon, 22 Jan 2018 11:38:27 +0000 (12:38 +0100)]
Fix T53012: Shadow catcher creates artifacts on contact area

The issue was caused by light sample being evaluated to nan at some point.
This is root of the cause which is to be fixed, but is very hard to trace down
especially via ssh (the issue only happens on AVX2 release build). Will give it
a closer look when back to my AVX2 machine.

For until then this is a good check to have anyway, it corresponds to what's
happening in regular radiance sum.

17 months agoFix retro-futuristical atempt to include some keymaps for non-backported feature...
Bastien Montagne [Mon, 22 Jan 2018 11:32:08 +0000 (12:32 +0100)]
Fix retro-futuristical atempt to include some keymaps for non-backported feature from 

Was making unittests unhappy.

17 months agoRevert "Node selection: Stop operator when mouse selection selected a node"
Sergey Sharybin [Mon, 22 Jan 2018 11:22:44 +0000 (12:22 +0100)]
Revert "Node selection: Stop operator when mouse selection selected a node"

This reverts commit bf58ec9265eef8c6cd3dc350557829151995ef28.

17 months agoCycles: Fix difference in image Clip extension method between CPU and GPU
Sergey Sharybin [Mon, 22 Jan 2018 11:20:51 +0000 (12:20 +0100)]
Cycles: Fix difference in image Clip extension method between CPU and GPU

Our own implementation was behaving different comparing to OSL and GPU,
namely on the border pixels OSL and CUDA was doing interpolation with
black, but we were clamping coordinate.

This partially fixes issue reported in T53452.

Similar change should also be done for 3D interpolation perhaps, but this
is to be investigated separately.

17 months agoFix T53850: Lock to Cursor breaks 3D manipulators
Campbell Barton [Mon, 22 Jan 2018 09:11:34 +0000 (20:11 +1100)]
Fix T53850: Lock to Cursor breaks 3D manipulators

17 months agoFix manual lookups (data is now lowercase)
Campbell Barton [Sun, 21 Jan 2018 22:50:41 +0000 (09:50 +1100)]
Fix manual lookups (data is now lowercase)

17 months agoFix old files with changed node socket type not loading correctly.
Brecht Van Lommel [Sat, 20 Jan 2018 00:04:07 +0000 (01:04 +0100)]
Fix old files with changed node socket type not loading correctly.

This would lead to sock.default_value pointing to the wrong data type,
possibly causing crashes. Unfortunately, this bug will still exist for
older Blender versions that try to load newer files, which makes
changing the type of a node socket problematic.

17 months agoFix T53823: Particle weight brush crash
Campbell Barton [Fri, 19 Jan 2018 01:25:09 +0000 (12:25 +1100)]
Fix T53823: Particle weight brush crash

Entering particle edit mode w/ the weight brush enabled crashed
on non-hair particle systems.

17 months agoFix T53832: Particle weight paint crash
Campbell Barton [Fri, 19 Jan 2018 01:07:14 +0000 (12:07 +1100)]
Fix T53832: Particle weight paint crash

Drawing hair weights read before the hair array start.
This code could be improved since it currently copy-pastes,
from do_particle_interpolation, but this would need larger changes.

For now just correct existing logic.

17 months agoFix memory leak in recent curve refactor
Campbell Barton [Thu, 18 Jan 2018 09:54:49 +0000 (20:54 +1100)]
Fix memory leak in recent curve refactor


17 months agoFix buffer overflow vulnerability in curve, font, particles code.
Brecht Van Lommel [Mon, 15 Jan 2018 05:57:26 +0000 (06:57 +0100)]
Fix buffer overflow vulnerability in curve, font, particles code.

Solves these security issues from T52924:

While the specific overflow issue may be fixed, loading the repro .blend
files may still crash because they are incomplete and corrupt. The way
they crash may be impossible to exploit, but this is difficult to prove.

Differential Revision:

17 months agoFix buffer overflow vulnerabilities in mesh code.
Brecht Van Lommel [Sun, 14 Jan 2018 21:14:20 +0000 (22:14 +0100)]
Fix buffer overflow vulnerabilities in mesh code.

Solves these security issues from T52924:

While the specific overflow issue may be fixed, loading the repro .blend
files may still crash because they are incomplete and corrupt. The way
they crash may be impossible to exploit, but this is difficult to prove.

Differential Revision:

17 months agoFix Linux/GCC compiler warning in recent fixes.
Brecht Van Lommel [Wed, 17 Jan 2018 20:11:59 +0000 (21:11 +0100)]
Fix Linux/GCC compiler warning in recent fixes.

17 months agoFix buffer overflow vulernability in thumbnail file reading.
Brecht Van Lommel [Sun, 14 Jan 2018 22:26:31 +0000 (23:26 +0100)]
Fix buffer overflow vulernability in thumbnail file reading.

Fixes CVE-2017-2908 from T52924.

Differential Revision:

17 months agoFix buffer overflows in TIFF, PNG, IRIS, DPX, HDR and AVI loading.
Brecht Van Lommel [Sun, 14 Jan 2018 13:19:57 +0000 (14:19 +0100)]
Fix buffer overflows in TIFF, PNG, IRIS, DPX, HDR and AVI loading.

Solves these security issues from T52924:

Differential Revision:

17 months agoMemory: add MEM_malloc_arrayN() function to protect against overflow.
Brecht Van Lommel [Sun, 14 Jan 2018 20:53:32 +0000 (21:53 +0100)]
Memory: add MEM_malloc_arrayN() function to protect against overflow.

Differential Revision:

17 months agoFix T53810: Crash removing a scene used in render
Campbell Barton [Tue, 16 Jan 2018 23:00:14 +0000 (10:00 +1100)]
Fix T53810: Crash removing a scene used in render

Header drawing accesses the scene too.

17 months agoRevert "Fix T53752: Draw curve fails w/ stylus"
Bastien Montagne [Tue, 16 Jan 2018 16:19:17 +0000 (17:19 +0100)]
Revert "Fix T53752: Draw curve fails w/ stylus"

This reverts commit d0e0f33f57b02fecf75c08f3c144d07915367781.

Requested by author, since it raised new issues, better not have it in
bugfix release!

17 months agoFix T53772: Presets don't support colons
Campbell Barton [Sun, 14 Jan 2018 03:31:39 +0000 (14:31 +1100)]
Fix T53772: Presets don't support colons

17 months agoFix T47212: Luminance Key not working with HDR and out-of-gamut ranges.
Aaron Carlisle [Sat, 6 Jan 2018 15:23:58 +0000 (16:23 +0100)]
Fix T47212: Luminance Key not working with HDR and out-of-gamut ranges.

Differential Revision:

17 months agoFix T53567: Negative pixel values causing artifacts with denoising
Lukas Stockner [Thu, 21 Dec 2017 13:24:23 +0000 (14:24 +0100)]
Fix T53567: Negative pixel values causing artifacts with denoising

Now negative color values are clamped to zero before the actual denoising.

17 months agoCycles: Fixed compilation of CUDA kernels. Follow-up fix for my last commit.
Stefan Werner [Tue, 21 Nov 2017 09:43:40 +0000 (10:43 +0100)]
Cycles: Fixed compilation of CUDA kernels. Follow-up fix for my last commit.

17 months agoCycles: Workaround for performance loss with the CUDA 9.0 SDK.
Stefan Werner [Tue, 21 Nov 2017 09:29:11 +0000 (10:29 +0100)]
Cycles: Workaround for performance loss with the CUDA 9.0 SDK.

CUDA 9.0.176 apparently caused some slow down on high-end Pascal cards that can be mitigated by increasing the number of registers. See for a detailed comparison.

17 months agoFix T53692: OpenCL multi GPU rendering not using all GPUs.
Brecht Van Lommel [Thu, 4 Jan 2018 22:29:06 +0000 (23:29 +0100)]
Fix T53692: OpenCL multi GPU rendering not using all GPUs.

Ensure each OpenCL device has a unique ID even if the hardware ID is not
unique for some reason.

17 months agoFix T53755: Cycles OpenCL lamp shaders have incorrect normal.
Brecht Van Lommel [Thu, 11 Jan 2018 07:42:57 +0000 (08:42 +0100)]
Fix T53755: Cycles OpenCL lamp shaders have incorrect normal.

17 months agoCleanup: SGI format, remove unused struct members
Campbell Barton [Sun, 17 Sep 2017 07:55:04 +0000 (17:55 +1000)]
Cleanup: SGI format, remove unused struct members

17 months agoFix SGI foramt reader CVE-2017-2901
Campbell Barton [Sun, 17 Sep 2017 06:22:56 +0000 (16:22 +1000)]
Fix SGI foramt reader CVE-2017-2901

Integer Overflow Code Execution Vulnerability.

Reader no longer crashes on corrupt images (from own fuzz testing).

17 months agoCleanup: SGI format, avoid overflow
Campbell Barton [Sun, 17 Sep 2017 06:19:07 +0000 (16:19 +1000)]
Cleanup: SGI format, avoid overflow

Harmless but causes warnings

17 months agoCleanup: SGI format, use uint/short/char types
Campbell Barton [Sun, 17 Sep 2017 06:14:59 +0000 (16:14 +1000)]
Cleanup: SGI format, use uint/short/char types

17 months agoFix bmesh.utils.face_join arg parsing
Campbell Barton [Fri, 12 Jan 2018 03:51:15 +0000 (14:51 +1100)]
Fix bmesh.utils.face_join arg parsing

17 months agoFix T53311: transform edge/normal orientation
Campbell Barton [Thu, 11 Jan 2018 08:09:45 +0000 (19:09 +1100)]
Fix T53311: transform edge/normal orientation

When the edge is aligned with it's own normals,
transform orientation wasn't aligned with the edge.

17 months agoFix background_job template
Campbell Barton [Wed, 10 Jan 2018 06:49:20 +0000 (17:49 +1100)]
Fix background_job template

Update attribute and use empty file operator

17 months agoFix T53752: Draw curve fails w/ stylus
Philipp Oeser [Wed, 10 Jan 2018 23:22:08 +0000 (10:22 +1100)]
Fix T53752: Draw curve fails w/ stylus

17 months agoAdditional fix after cherry-picking rB870840e8b7dd (in rB72151f3e36b).
Bastien Montagne [Tue, 9 Jan 2018 13:31:20 +0000 (14:31 +0100)]
Additional fix after cherry-picking rB870840e8b7dd (in rB72151f3e36b).

17 months agoAdd an 'atomic cas' wrapper for pointers.
Bastien Montagne [Mon, 25 Sep 2017 08:40:50 +0000 (10:40 +0200)]
Add an 'atomic cas' wrapper for pointers.

Avoids having to repeat obfuscating castings everywhere...

17 months agoFix scalability issue in threaded code of Mesh normals computation.
Bastien Montagne [Fri, 22 Dec 2017 21:12:23 +0000 (22:12 +0100)]
Fix scalability issue in threaded code of Mesh normals computation.

We tried to do as much as possible in a single threaded callback, which
lead to using some nasty tricks like fake atomic-based spinlocks to
perform some operations (like float addition, which has no atomic

While OK with 'standard' low number of working threads (8-16), because
collision were rather rare and implied memory barrier not *that* much
overhead, this performed poorly with more powerful systems reaching the
100 of threads and beyond (like workstations or render farm hardware).

There, both memory barrier overhead and more frequent collisions would
have significant impact on performances.

This was addressed by splitting further the process, we now have three
loops, one over polys, loops and vertices, and we added an intermediate
storage for weighted loop normals. This allows to avoid completely any
atomic operation in body of threaded loops, which should fix scalability
issues. This costs us slightly higher temp memory usage (something like
50Mb per million of polygons on average), but looks like acceptable

Further more, tests showed that we could gain an additional ~7% of speed
in computing normals of heavy meshes, by also parallelizing the last two
loops (might be 1 or 2% on overall mesh update at best...).

Note that further tweaking in this code should be possible once Sergey
adds the 'minimum batch size' option to threaded foreach API, since very
light loops like the one on loops (mere v3 addition) require much bigger
batches than heavier code (like the one on polys) to keep optimal

17 months agoSubsurf: Avoid possible use of partially initialized edge hash
Sergey Sharybin [Fri, 22 Dec 2017 11:50:06 +0000 (12:50 +0100)]
Subsurf: Avoid possible use of partially initialized edge hash

17 months agoSubsurf: Avoid global lock for loops and orig index layers
Sergey Sharybin [Fri, 22 Dec 2017 11:45:06 +0000 (12:45 +0100)]
Subsurf: Avoid global lock for loops and orig index layers

This is a bit annoying to have per-DM locking, but it's way better (as in, up to
4 times better) for playback speed when having lots of subsurf objects,

17 months agoinstall_deps: Fix OCIO always re-cloning its whole git repository.
Bastien Montagne [Mon, 8 Jan 2018 15:33:56 +0000 (16:33 +0100)]
install_deps: Fix OCIO always re-cloning its whole git repository.

17 months agoNo groping in Blender's Tracker!
Sebastian Koenig [Mon, 8 Jan 2018 13:11:43 +0000 (14:11 +0100)]
No groping in Blender's Tracker!

This a small cleanup of something which I think is just a typo anyway.

With all the recent talks of harrassment and groping, I think we better avoid
that within our source code! :)

Reviewers: sergey

Reviewed By: sergey

Tags: #motion_tracking

Differential Revision:

17 months agoFix T53612: Blender crashes on CleanTracks with 'DELETE_SEGMENTS' and a disabled...
Sergey Sharybin [Mon, 8 Jan 2018 13:10:50 +0000 (14:10 +0100)]
Fix T53612: Blender crashes on CleanTracks with 'DELETE_SEGMENTS' and a disabled marker

Simple fix, which is totally safe for 2.79a!

17 months agoFix T53509: Datablock ID Properties attached to bpy.types.Material are not loaded.
Bastien Montagne [Mon, 8 Jan 2018 08:37:56 +0000 (09:37 +0100)]
Fix T53509: Datablock ID Properties attached to bpy.types.Material are not loaded.

Stupid mistake in material reading code, thanks to Simon Wendsche (@BYOB) for the investigation and fix!

To be backported to 2.79a.

17 months ago(Nodes) Display image name if any in the Image and Texture Image node title
Ines Almeida [Sun, 7 Jan 2018 21:29:25 +0000 (22:29 +0100)]
(Nodes) Display image name if any in the Image and Texture Image node title

17 months agoFix T53650: remove hard limits on force field size and max distance.
Philipp Oeser [Sat, 6 Jan 2018 04:12:24 +0000 (05:12 +0100)]
Fix T53650: remove hard limits on force field size and max distance.

Differential Revision:

17 months agoFix leak when rendering OpenGL animations
Dalai Felinto [Thu, 4 Jan 2018 17:56:41 +0000 (15:56 -0200)]
Fix leak when rendering OpenGL animations

We were duplicating rectf twice :/

Patch by Clément Foucault.