2 years agoFix T52473: blender internal Fresnel and Layer Weight only work with linked normal.
Brecht Van Lommel [Sun, 20 Aug 2017 22:05:07 +0000 (00:05 +0200)]
Fix T52473: blender internal Fresnel and Layer Weight only work with linked normal.

Please backport this to 2.79.

2 years agoRevert "Cycles: remove square samples option."
Brecht Van Lommel [Sun, 20 Aug 2017 21:46:05 +0000 (23:46 +0200)]
Revert "Cycles: remove square samples option."

This reverts commit 757c24b6bceaeeae95f743b72b6a7040880a0ebf.

We'll revisit this when doing deeper sampling changes.

2 years agoFix T52470: cycles OpenCL hair rendering not working after recent changes.
Brecht Van Lommel [Sun, 20 Aug 2017 21:16:25 +0000 (23:16 +0200)]
Fix T52470: cycles OpenCL hair rendering not working after recent changes.

2 years agoCode cleanup: deduplicate some bsdf node methods.
Brecht Van Lommel [Sun, 20 Aug 2017 15:36:16 +0000 (17:36 +0200)]
Code cleanup: deduplicate some bsdf node methods.

2 years agoFix T52439: Crash after adjusting lenght of hair particles.
Bastien Montagne [Sun, 20 Aug 2017 15:16:58 +0000 (17:16 +0200)]
Fix T52439: Crash after adjusting lenght of hair particles.

Regression from rBfed853ea78221, calling this inside thread worker was
not really good idea anyway, and we already have all the code we need in
pre-threading init function, was just disabled for vertex particles

To be backported to 2.79.

2 years agoCycles: support baking normals plugged into BSDFs, averaged with closure weight.
Brecht Van Lommel [Sun, 20 Aug 2017 01:25:13 +0000 (03:25 +0200)]
Cycles: support baking normals plugged into BSDFs, averaged with closure weight.

2 years agoCode cleanup: remove copy of shader graph for bump, no longer needed.
Brecht Van Lommel [Sun, 20 Aug 2017 12:02:16 +0000 (14:02 +0200)]
Code cleanup: remove copy of shader graph for bump, no longer needed.

2 years agoReplace BLI_INLINE w/ Py_LOCAL_INLINE for Python
Campbell Barton [Sun, 20 Aug 2017 11:14:33 +0000 (21:14 +1000)]
Replace BLI_INLINE w/ Py_LOCAL_INLINE for Python

Recent inclusion caused build error with the BGE.

2 years agoFix bpy library load: invalid function signature
Campbell Barton [Sun, 20 Aug 2017 09:04:16 +0000 (19:04 +1000)]
Fix bpy library load: invalid function signature

2 years agoPyAPI: Make use of PyC_LongAs... API
Campbell Barton [Sun, 20 Aug 2017 05:44:54 +0000 (15:44 +1000)]
PyAPI: Make use of PyC_LongAs... API

Avoids setting exceptions inline,
also use Matrix_ParseAny for bmesh.ops.

Some inline exceptions are kept because they show useful details.

2 years agoPyAPI: Integer conversion functions
Campbell Barton [Sun, 20 Aug 2017 05:39:08 +0000 (15:39 +1000)]
PyAPI: Integer conversion functions

Python's C-API doesn't provide functions to get
int's at specific integer sizes.

Leaving the caller to check for overflow,
which ended up being ignored in practice.

Add API functions that convert int/uint 8/16/32/64, also bool.
Raising overflow exception for unsupported ranges.

2 years agoPyAPI: avoid redundant PyLong_AsLong call
Campbell Barton [Sun, 20 Aug 2017 05:28:06 +0000 (15:28 +1000)]
PyAPI: avoid redundant PyLong_AsLong call

Assigning to an RNA array converted from Python to C twice.

2 years ago[windows/make.bat] add option to automatically download libs.
Ray Molenkamp [Sat, 19 Aug 2017 18:00:30 +0000 (12:00 -0600)]
[windows/make.bat] add option to automatically download libs.

The thing that most often still goes wrong for new users building blender on windows is checking out the libraries, some skip over the wiki, some check out to the wrong folder, in an effort to reduce the time i spend on this, I added detection of svn and misisng libs to make.bat .

When the user has svn installed, and the libdir is missing he'll be asked if he wants to download them

if svn is not installed, or the user chooses 'no' the current error message is shown.

Reviewers: Blendify, sergey, juicyfruit

Reviewed By: sergey

Differential Revision:

2 years agoFix T52452: OSL trace broken after shadow catcher recent changes.
Brecht Van Lommel [Sat, 19 Aug 2017 13:42:43 +0000 (15:42 +0200)]
Fix T52452: OSL trace broken after shadow catcher recent changes.

We should only early out with any hit in BVH traversal if the only visibility
bits used are opaque shadow. Not when opaque shadow is one of multiple bits.

2 years agoCycles tests: pass Blender custom arguments from CYCLESTEST_ARGS.
Brecht Van Lommel [Sat, 19 Aug 2017 10:09:28 +0000 (12:09 +0200)]
Cycles tests: pass Blender custom arguments from CYCLESTEST_ARGS.

This is useful for testing with different devices, split kernel, OSL,
impact of integrator settings, etc.

2 years agoCode cleanup: move rng into path state.
Brecht Van Lommel [Sat, 19 Aug 2017 02:11:25 +0000 (04:11 +0200)]
Code cleanup: move rng into path state.

Also pass by value and don't write back now that it is just a hash for seeding
and no longer an LCG state. Together this makes CUDA a tiny bit faster in my
tests, but mainly simplifies code.

2 years agoPyAPI: expose matrix parsing function
Campbell Barton [Sat, 19 Aug 2017 11:36:50 +0000 (21:36 +1000)]
PyAPI: expose matrix parsing function

2 years agoFix T52443: Cycles OpenCL build error after recent mesh lights changes.
Brecht Van Lommel [Fri, 18 Aug 2017 21:50:54 +0000 (23:50 +0200)]
Fix T52443: Cycles OpenCL build error after recent mesh lights changes.

2 years agoCycles tests: add light type tests.
Brecht Van Lommel [Fri, 18 Aug 2017 15:09:12 +0000 (17:09 +0200)]
Cycles tests: add light type tests.

2 years agoCycles tests: make page less wide, use relative URLs for serving through http.
Brecht Van Lommel [Thu, 17 Aug 2017 22:37:45 +0000 (00:37 +0200)]
Cycles tests: make page less wide, use relative URLs for serving through http.

2 years agoPyAPI: Fix memory leak w/ empty, allocated enums
Campbell Barton [Fri, 18 Aug 2017 08:29:27 +0000 (18:29 +1000)]
PyAPI: Fix memory leak w/ empty, allocated enums

2 years agoFix leak in Python BGE filter & image types
Campbell Barton [Thu, 17 Aug 2017 14:52:45 +0000 (00:52 +1000)]
Fix leak in Python BGE filter & image types

2 years agoCycles: Fix for a division by zero that could happen with solid angle triangle light...
Stefan Werner [Thu, 17 Aug 2017 13:05:48 +0000 (15:05 +0200)]
Cycles: Fix for a division by zero that could happen with solid angle triangle light sampling

2 years agoFix T52401: "Export Keying Set" operator generated incorrect ID's for shapekeys
Joshua Leung [Thu, 17 Aug 2017 13:03:28 +0000 (01:03 +1200)]
Fix T52401: "Export Keying Set" operator generated incorrect ID's for shapekeys

To be backported.

2 years agoImproved triangle sampling for mesh lights
Stefan Werner [Thu, 17 Aug 2017 10:44:09 +0000 (12:44 +0200)]
Improved triangle sampling for mesh lights

This implements Arvo's "Stratified sampling of spherical triangles". Similar to how we sample rectangular area lights, this is sampling triangles over their solid angle. It does significantly improve sampling close to the triangle, but doesn't do much for more distant triangles. So I added a simple heuristic to switch between the two methods. Unfortunately, I expect this to add render time in any case, even when it does not make any difference whatsoever. It'll take some benchmarking with various scenes and hardware to estimate how severe the impact is and if it is worth the change.

Reviewers: #cycles, brecht

Reviewed By: #cycles, brecht

Subscribers: Vega-core, brecht, SteffenD

Tags: #cycles

Differential Revision:

2 years agoCycles: Calculate correct remaining time when using a larger pixel size
Lukas Stockner [Wed, 16 Aug 2017 23:58:48 +0000 (01:58 +0200)]
Cycles: Calculate correct remaining time when using a larger pixel size

2 years agoRemove unnecessary #include "ED_transform.h"
mano-wii [Wed, 16 Aug 2017 22:08:52 +0000 (19:08 -0300)]
Remove unnecessary #include "ED_transform.h"

2 years agoTransform: remove unused function
mano-wii [Wed, 16 Aug 2017 21:55:55 +0000 (18:55 -0300)]
Transform: remove unused function

2 years agoTransform: Move enum `SnapSelect` to `ED_transform_snap_object_context`
mano-wii [Wed, 16 Aug 2017 17:16:30 +0000 (14:16 -0300)]
Transform: Move enum `SnapSelect` to `ED_transform_snap_object_context`

2 years agoSupport MSVSC 2017 15.3.0 (compiler 19.11)
Antonioya [Wed, 16 Aug 2017 13:58:09 +0000 (15:58 +0200)]
Support MSVSC 2017 15.3.0 (compiler 19.11)

The compiler version has changed in the last VS2017 update to 1911 and the old 1910 version is not working anymore.

2 years agoFix T52414: Blender 2.79 crash on object duplication via menu.
Bastien Montagne [Wed, 16 Aug 2017 08:49:02 +0000 (10:49 +0200)]
Fix T52414: Blender 2.79 crash on object duplication via menu.

Caused by own recent changes in handling of verts/edges/etc. arrays storage
for raycasting (rBe324172d9ca6690e8).

Issue was actually even weirder - there is absolutely no reason at all to
release DM here, those finaldm are stored in Object or EditMesh structs and
handled by general update system, other code shall never try to release them!

2 years agomacOS build: simplify python install for new 10.9 libraries.
Brecht Van Lommel [Tue, 15 Aug 2017 13:47:48 +0000 (15:47 +0200)]
macOS build: simplify python install for new 10.9 libraries.

We stop using the .zip file and just have all files now in
lib/darwin/python/lib, along with numpy, numpy headers and requests.
This makes it consistent with Linux and simplifies code.

For old libraries the .zip stays, code for that gets removed when we
fully switch to new libraries.

2 years agoFix Cycles presets after recent removal of some settings.
Brecht Van Lommel [Mon, 14 Aug 2017 10:27:10 +0000 (12:27 +0200)]
Fix Cycles presets after recent removal of some settings.

2 years agoAlembic import: report object name in face color index out of bounds error
Sybren A. Stüvel [Tue, 15 Aug 2017 10:43:17 +0000 (12:43 +0200)]
Alembic import: report object name in face color index out of bounds error

2 years agoAlembic import: fix crash when face color index is out of bounds.
Sybren A. Stüvel [Tue, 15 Aug 2017 10:34:40 +0000 (12:34 +0200)]
Alembic import: fix crash when face color index is out of bounds.

This can happen with Alembic files exported from Maya. I'm unsure as to the
root cause, but at least this fixes the crash itself.

Thanks to @looch for reporting this with a test file. The test file has to
remain confidential, though, so it's on my workstation only.

2 years ago[deps_build/macOS] Fix FFMPEG & VPX configure command
Arto Kitula [Tue, 15 Aug 2017 09:26:33 +0000 (12:26 +0300)]
[deps_build/macOS] Fix FFMPEG & VPX configure command

FFMPEG & VPX don't handle target with --build parameter, so we need to make sure use of plain configure command

Reviewed by: Brecht Van Lommel
Differential Revision:

2 years agoCycles/BI: Add a pixel size option for speeding up viewport rendering
Lukas Stockner [Mon, 14 Aug 2017 22:11:52 +0000 (00:11 +0200)]
Cycles/BI: Add a pixel size option for speeding up viewport rendering

This patch adds "Pixel Size" to the performance options, which allows to render
in a smaller resolution, which is especially useful for displays with high DPI.

Reviewers: Severin, dingto, sergey, brecht

Reviewed By: brecht

Subscribers: Severin, venomgfx, eyecandy, brecht

Differential Revision:

2 years ago[build_deps/Windows] Add numpy headers to the python include folder on windows, requi...
Ray Molenkamp [Mon, 14 Aug 2017 21:21:36 +0000 (15:21 -0600)]
[build_deps/Windows] Add numpy headers to the python include folder on windows, required for D2716

2 years ago[depsbuilder] fix outdated python patch on windows.
Ray Molenkamp [Mon, 14 Aug 2017 21:11:44 +0000 (15:11 -0600)]
[depsbuilder] fix outdated python patch on windows.

2 years ago[depsbuilder] Fix broken osl flags on windows.
Ray Molenkamp [Mon, 14 Aug 2017 21:11:05 +0000 (15:11 -0600)]
[depsbuilder] Fix broken osl flags on windows.

2 years agoCycles: Fixed broken camera motion blur when motion was not set to center on frame
Stefan Werner [Sat, 12 Aug 2017 20:04:42 +0000 (22:04 +0200)]
Cycles: Fixed broken camera motion blur when motion was not set to center on frame

Reviewers: #cycles, sergey

Reviewed By: #cycles, sergey

Subscribers: sergey

Differential Revision:

2 years agoFix T52331: Motion blur shutter length not keyable
Sergey Sharybin [Mon, 14 Aug 2017 14:38:50 +0000 (16:38 +0200)]
Fix T52331: Motion blur shutter length not keyable

The only reason shutter time was marked as non-animatable is because Blender
Internal render does not support such animation. But this is something what
users are keeping asking for and now Blender Internal is on it's way out.

Enabled animation of this property, but noted in tooltip that Blender Internal
does not support animation of this property.

2 years agoFix T52391: Crash on duplicating material.
Bastien Montagne [Mon, 14 Aug 2017 13:40:54 +0000 (15:40 +0200)]
Fix T52391: Crash on duplicating material.

Bug in new ID copying code, thanks once again to stupid nodetrees, we
ended up wrongly remapping MA node->id pointers to NodeTree when copying
materials using node trees...

2 years agoCleanup: confusing naming in BKE_node_tree_copy_data().
Bastien Montagne [Mon, 14 Aug 2017 13:40:11 +0000 (15:40 +0200)]
Cleanup: confusing naming in BKE_node_tree_copy_data().

2 years agoNew ID Copying code: fix node_tree_copy_data still potentially increasing usercount...
Bastien Montagne [Mon, 14 Aug 2017 13:15:57 +0000 (15:15 +0200)]
New ID Copying code: fix node_tree_copy_data still potentially increasing usercount of its gpencil pointer.

_copy_data() functions of datablocks shall never handle that, it's done
by generic calling code in library.c.

2 years agoCycles: Guard memcpy to potentially re-allocating memory with lock
Sergey Sharybin [Mon, 14 Aug 2017 12:55:47 +0000 (14:55 +0200)]
Cycles: Guard memcpy to potentially re-allocating memory with lock

Basically, make re-alloc and memcpy from the same lock, otherwise one
thread might be re-allocating thread while another one is trying to
copy data there.

Reported by Mohamed Sakr in IRC, thanks!

2 years agoTracking: Fix missing checks in operator poll functions
Sergey Sharybin [Mon, 14 Aug 2017 09:46:00 +0000 (11:46 +0200)]
Tracking: Fix missing checks in operator poll functions

Reported by Vuk Gardašević (lijenstina) in IRC, thanks!

2 years agoFix T51850: Motion tracking - poor performance with keyframe matching on large video
Sergey Sharybin [Mon, 14 Aug 2017 09:41:12 +0000 (11:41 +0200)]
Fix T51850: Motion tracking - poor performance with keyframe matching on large video

Enabled cache for frame accessor and tweaked policy so we guarantee keyframed
images to be always in the cache. The logic might fail in some real corner case
(for example, when doing multiple tracks at once on a system where we can not
fit 2 clip frames in cache) but things are much better now for regular use.

2 years agoTracking: Make frame accessor cache safe for threading
Sergey Sharybin [Mon, 14 Aug 2017 09:28:58 +0000 (11:28 +0200)]
Tracking: Make frame accessor cache safe for threading

2 years agoTracking: Cleanup, newlines and comments
Sergey Sharybin [Mon, 14 Aug 2017 09:19:06 +0000 (11:19 +0200)]
Tracking: Cleanup, newlines and comments

2 years agoTracking: Cleanup, de-duplicate code
Sergey Sharybin [Mon, 14 Aug 2017 09:16:08 +0000 (11:16 +0200)]
Tracking: Cleanup, de-duplicate code

2 years agoTrackign: Add some basic logging about caching in frame accessor
Sergey Sharybin [Mon, 14 Aug 2017 09:10:45 +0000 (11:10 +0200)]
Trackign: Add some basic logging about caching in frame accessor

2 years agoTracking: Make frame access cache aware of region
Sergey Sharybin [Mon, 14 Aug 2017 09:06:22 +0000 (11:06 +0200)]
Tracking: Make frame access cache aware of region

Cache is still kept disabled, need to think of a policy for cache cleanup.

2 years agoTracking: Correct comparison in cache keys
Sergey Sharybin [Mon, 14 Aug 2017 08:37:36 +0000 (10:37 +0200)]
Tracking: Correct comparison in cache keys

This code wasn't uses, but the key comparison was totally wrong.

2 years agoTracking: Cleanup and some comments
Sergey Sharybin [Mon, 14 Aug 2017 08:23:29 +0000 (10:23 +0200)]
Tracking: Cleanup and some comments

2 years agoMove back master to BCon1 (aka alpha) status.
Bastien Montagne [Mon, 14 Aug 2017 08:44:19 +0000 (10:44 +0200)]
Move back master to BCon1 (aka alpha) status.

Forgot to do that the other week, master is no more 2.79 RC!

2 years ago[build_deps/Windows] Prevent writing of any files into the source tree.
Ray Molenkamp [Sun, 13 Aug 2017 19:02:15 +0000 (13:02 -0600)]
[build_deps/Windows] Prevent writing of any files into the source tree.

2 years agoCode cleanup: make L_transparent part of PathRadiance.
Brecht Van Lommel [Sat, 12 Aug 2017 21:15:58 +0000 (23:15 +0200)]
Code cleanup: make L_transparent part of PathRadiance.

2 years agoCode cleanup: make DebugData part of PathRadiance.
Brecht Van Lommel [Sat, 12 Aug 2017 19:07:55 +0000 (21:07 +0200)]
Code cleanup: make DebugData part of PathRadiance.

2 years agoCode cleanup: make it easier to test only Sobol, CMJ or Pseudorandom.
Brecht Van Lommel [Sat, 12 Aug 2017 21:04:58 +0000 (23:04 +0200)]
Code cleanup: make it easier to test only Sobol, CMJ or Pseudorandom.

2 years agoCycles: optimize CPU split kernel data init.
Brecht Van Lommel [Sun, 6 Aug 2017 15:17:40 +0000 (17:17 +0200)]
Cycles: optimize CPU split kernel data init.

2 years agoCode cleanup: remove unused Cycles random number code.
Brecht Van Lommel [Sun, 6 Aug 2017 19:14:58 +0000 (21:14 +0200)]
Code cleanup: remove unused Cycles random number code.

2 years agoFix T52372: CUDA build error after recent changes.
Brecht Van Lommel [Sat, 12 Aug 2017 18:36:48 +0000 (20:36 +0200)]
Fix T52372: CUDA build error after recent changes.

2 years agoWM: load UI for new file, even when pref disabled
Campbell Barton [Sat, 12 Aug 2017 15:05:10 +0000 (01:05 +1000)]
WM: load UI for new file, even when pref disabled

Loading startup file always loads the UI now.

2 years agoFix T52368: OSL trace() crash after recent changes.
Brecht Van Lommel [Sat, 12 Aug 2017 12:32:52 +0000 (14:32 +0200)]
Fix T52368: OSL trace() crash after recent changes.

2 years agoFix T52298: hidden lamps still compute shadow buffers in viewport.
Brecht Van Lommel [Sat, 12 Aug 2017 11:22:26 +0000 (13:22 +0200)]
Fix T52298: hidden lamps still compute shadow buffers in viewport.

2 years agoCode cleanup: fix warning and improve terminology.
Brecht Van Lommel [Fri, 11 Aug 2017 12:21:34 +0000 (14:21 +0200)]
Code cleanup: fix warning and improve terminology.

2 years agoFix T52329: Boolean with aligned shapes failed
Campbell Barton [Sat, 12 Aug 2017 08:14:50 +0000 (18:14 +1000)]
Fix T52329: Boolean with aligned shapes failed

Creating ngons with multiple axis aligned shapes in the middle of a
single face would fail in some cases.

This exposed multiple problems in BM_face_split_edgenet_connect_islands

- Islands needed to be sorted on Y axis when X was aligned.
- Checking edge intersections needed increased endpoint bias.
- BVH epsilon needed to be increased.

2 years agoMath Lib: add isect_seg_seg_v2_point_ex
Campbell Barton [Sat, 12 Aug 2017 08:12:29 +0000 (18:12 +1000)]
Math Lib: add isect_seg_seg_v2_point_ex

This exposes end-point bias argument, needed in rare cases.

2 years agoFix width estimation for buttons with short labels in pie menus
Aleksandr Zinovev [Sat, 12 Aug 2017 08:00:19 +0000 (11:00 +0300)]
Fix width estimation for buttons with short labels in pie menus

Differential Revision:

To be backported to 2.79 branch

2 years agoCleanup: whitespace
Campbell Barton [Sat, 12 Aug 2017 03:37:34 +0000 (13:37 +1000)]
Cleanup: whitespace

2 years agoiFix T52050: Empty VSE preview for scene strips with OpenGL preview + Rendered settings.
Bastien Montagne [Fri, 11 Aug 2017 16:02:54 +0000 (18:02 +0200)]
iFix T52050: Empty VSE preview for scene strips with OpenGL preview + Rendered settings.

'OpenGL Preview' checkbox was redundant now, just use seq_prev_type
value only.

Might be OK for 2.79, but should be double-checked first...

2 years agoFix T52149: LoopTriArray computation was not correctly protected against concurrency.
Bastien Montagne [Fri, 11 Aug 2017 14:51:19 +0000 (16:51 +0200)]
Fix T52149: LoopTriArray computation was not correctly protected against concurrency.

Note: this commit seems to work as expected (also with transform
snapping etc.). However, it is rather unsafe - not enough for 2.79 at
least, unless we get much more testing on it. It also depends on three
previous ones.

Note that using a global lock here is far from ideal, we should rather
have a lock per DM, but that will do for now, whole DM thing is doomed
to oblivion anyway in 2.8.

Also, we may need a `DM_DIRTY_LOOPTRIS` dirty flag at some point. Looks
like we can survive without it for now though... Probably because cached
looptris are never copied accross DM's?

2 years agoCleanup: remove useless `DM_ensure_looptri()`.
Bastien Montagne [Fri, 11 Aug 2017 14:18:01 +0000 (16:18 +0200)]
Cleanup: remove useless `DM_ensure_looptri()`.

That one was doing exactly same thing as `dm->getLoopTriArray()`, no
point in having twice the same code here...

2 years agoFix transform snap code using 'allocated' flags to get verts/edges/etc. arrays again...
Bastien Montagne [Fri, 11 Aug 2017 13:53:38 +0000 (15:53 +0200)]
Fix transform snap code using 'allocated' flags to get verts/edges/etc. arrays again from DM.

This was... horribly wrong, CDDM will often *not* need to allocate
anything to return arrays of mesh items! Just check whether array
pointer is NULL.

Also, remove `DM_get_looptri_array`, that one is useless currently,
`dm->getLoopTriArray` will always return cached array (computing it if

2 years agoCleanup: deduplicate DM's getLoopTriArray() callback.
Bastien Montagne [Fri, 11 Aug 2017 13:41:53 +0000 (15:41 +0200)]
Cleanup: deduplicate DM's getLoopTriArray() callback.

All three functions were doing exactly the same thing, simpler to only
have one in that case!

2 years agoFix T52346: Alt-I (Delete Keyframes) on a NlaStrip's Extrapolate property would crash
Joshua Leung [Fri, 11 Aug 2017 13:52:51 +0000 (01:52 +1200)]
Fix T52346: Alt-I (Delete Keyframes) on a NlaStrip's Extrapolate property would crash

2 years agoFix T52327: Entering/Exiting NLA Tweakmode disables Scene -> Only Keyframes from...
Joshua Leung [Fri, 11 Aug 2017 13:40:28 +0000 (01:40 +1200)]
Fix T52327: Entering/Exiting NLA Tweakmode disables Scene -> Only Keyframes from Selected Channels

The tweakmode flag and the selected-channels flag accidentally
used the same value, due to confusion over where these flags were
supposed to be set. The selected-channels flag has now been moved
to use a different value, so that there shouldn't be any further

To be ported to 2.79.

2 years agoFix bevel clamping bugs T51247 and T50819.
Howard Trickey [Fri, 11 Aug 2017 13:13:27 +0000 (09:13 -0400)]
Fix bevel clamping bugs T51247 and T50819.

Old bevel 'Clamp overlap' code was very naive: just limit amount
to half edge length. This uses more accurate (but not perfect)
calculations for the max amount before (many) geometry collisions
happen. This is not a backward compatible change - meshes that
have modifiers with 'Clamp overlap' will likely have larger allowed
bevel widths now. But that can be fixed by turning off clamp overlap
and setting the amount to the desired value.

2 years agoObject Apply Transform: option to apply properties
Campbell Barton [Fri, 11 Aug 2017 12:16:44 +0000 (22:16 +1000)]
Object Apply Transform: option to apply properties

In some cases users may want to disable this option
to avoid changing other properties besides vertex locations.

2 years agoFix T52344: Softbody on Text.
Bastien Montagne [Fri, 11 Aug 2017 12:25:36 +0000 (14:25 +0200)]
Fix T52344: Softbody on Text.

Own previous fix (rBd5d626df236b) was not valid, curves are actually
supported by SoftBodies. It was rather a mere UI bug, which was not
including Surfaces and Font obect types in those valid for softbody UI.

Thanks to @brecht for the head up!

Also, fix safe for 2.79, btw.

2 years agoCycles: Clarify new argument in PathRadiance
Sergey Sharybin [Fri, 11 Aug 2017 10:46:09 +0000 (12:46 +0200)]
Cycles: Clarify new argument in PathRadiance

2 years agoCycles tests: Draw images on top of checkerboard
Sergey Sharybin [Fri, 11 Aug 2017 07:34:34 +0000 (09:34 +0200)]
Cycles tests: Draw images on top of checkerboard

This way it's easier to see alpha-channel only images, such as shadow catcher
images on transparent film.

2 years agoFix T52229: Shadow Catcher artifacts when under transparency
Sergey Sharybin [Fri, 11 Aug 2017 07:33:18 +0000 (09:33 +0200)]
Fix T52229: Shadow Catcher artifacts when under transparency

Added some extra tirckery to avoid background being tinted dark with transparent
surface. Maybe a bit hacky, but seems to work fine.

2 years agoPie menu's sub-rows ignore 'EXPAND' flag
Aleksandr Zinovev [Fri, 11 Aug 2017 10:18:30 +0000 (13:18 +0300)]
Pie menu's sub-rows ignore 'EXPAND' flag

Regression, to be backported in 2.79.

2 years agoRNA: Operators were excluded from struct map
Campbell Barton [Fri, 11 Aug 2017 10:09:22 +0000 (20:09 +1000)]
RNA: Operators were excluded from struct map

Recent changes meant structs that were registered without a name
wouldn't get added to the map.
Now assigning identifiers manages the struct-map.

2 years agoGHash: note that 'deprecated' is used for private
Campbell Barton [Fri, 11 Aug 2017 09:04:41 +0000 (19:04 +1000)]
GHash: note that 'deprecated' is used for private

2 years agoError in last commit, problems with unregister
Campbell Barton [Fri, 11 Aug 2017 09:09:03 +0000 (19:09 +1000)]
Error in last commit, problems with unregister

We can't free the identifier before its used when
removing from the ghash.

2 years agoFix T52344: Softbody on Text.
Bastien Montagne [Fri, 11 Aug 2017 08:24:57 +0000 (10:24 +0200)]
Fix T52344: Softbody on Text.

For some reasons (c) softbody modifier was marked as compatible with
curves... Would need much more work though, so for now just removing
that flag!

2 years agoRNA: Use hash lookups for structs
Campbell Barton [Fri, 11 Aug 2017 07:51:38 +0000 (17:51 +1000)]
RNA: Use hash lookups for structs

Adding structs was checking for duplicates
causing approx 75k string comparisons on startup.

While overall speedup is minimal,
Python access to `bpy.types` will now use a hash lookup
instead of a full linked list search.

See D2774

2 years agoWM: don't load preferences on 'File -> New'
Campbell Barton [Thu, 10 Aug 2017 23:29:25 +0000 (09:29 +1000)]
WM: don't load preferences on 'File -> New'

User preferences are now only loaded on...

- Initial startup.
- Factory-settings.
- Setting app-templates.

2 years agoCycles: remove square samples option.
Brecht Van Lommel [Wed, 2 Aug 2017 13:39:02 +0000 (15:39 +0200)]
Cycles: remove square samples option.

It doesn't seem that useful in practice, was mostly added to match some
other renderers but also seems to be causing user confusing and accidental
long render times. So let's just keep the UI simple and remove this.

Differential Revision:

2 years agoCycles: change defaults for filter glossy, clamp and branched path AA.
Brecht Van Lommel [Wed, 2 Aug 2017 13:29:08 +0000 (15:29 +0200)]
Cycles: change defaults for filter glossy, clamp and branched path AA.

We're adding some bias by default, which now I think is the right thing
to do from a usability point of view since you really need to use those
options anyway to get clean renders in a practical time.

Differential Revision:

2 years agoCycles: add denoising tests, keep new image even if no reference exists.
Brecht Van Lommel [Thu, 10 Aug 2017 22:38:39 +0000 (00:38 +0200)]
Cycles: add denoising tests, keep new image even if no reference exists.

2 years agoFix T52322: denoiser broken on Windows after recent changes.
Brecht Van Lommel [Thu, 10 Aug 2017 21:38:20 +0000 (23:38 +0200)]
Fix T52322: denoiser broken on Windows after recent changes.

It's not clear why this only happened on Windows, but the code
was wrong and should do a bitcast here instead of conversion.

2 years agoFix crash checking for Blender version 10+
Campbell Barton [Thu, 10 Aug 2017 22:56:57 +0000 (08:56 +1000)]
Fix crash checking for Blender version 10+

PyAPI could trigger this, for now just truncate.

2 years agoCleanup: redundant 'static' variable
Campbell Barton [Thu, 10 Aug 2017 22:48:15 +0000 (08:48 +1000)]
Cleanup: redundant 'static' variable

Also use BLI_snprintf.

2 years agoFix OSX duplicate path in Python's sys.path
Campbell Barton [Thu, 10 Aug 2017 22:42:27 +0000 (08:42 +1000)]
Fix OSX duplicate path in Python's sys.path

The '..' in the path caused simple comparisons to fail.

D2780 by @akitula

2 years agoCleanup: whitespace
Campbell Barton [Thu, 10 Aug 2017 22:32:05 +0000 (08:32 +1000)]
Cleanup: whitespace

2 years agoCMake: only build msgfmt if international is used
Campbell Barton [Thu, 10 Aug 2017 22:13:16 +0000 (08:13 +1000)]
CMake: only build msgfmt if international is used

Changes to BLI would always rebuild msgfmt.