63118 Commits

Author SHA1 Message Date
Campbell Barton
37a2a3c8dc Fix RenderEngine API docs
Correct access to passes, D1779 by @levon.

Also use is_preview attr and use register/unregister functions.
2016-02-08 20:35:32 +11:00
Lukas Tönne
d8163a08fb Fix for non-bool return values of a few common RNA functions with declared boolean return.
Since rBbbc7dc169dc365889bad3f3aed7b868efb432710 bool-valued RNA functions are expected to
return only 0 or 1. For flag tests as in these functions the returned int value needs to be
explicitly converted to bool.
2016-02-08 10:13:09 +01:00
Campbell Barton
dc2a01ca05 Fix T47360: Image loading fails when accessible from the CWD 2016-02-08 18:21:20 +11:00
Campbell Barton
f77110e789 Fix T47347: Z-pass defaults to zero
Use the same default value for Z-depth in the compositor as everywhere else.
2016-02-08 13:36:41 +11:00
Campbell Barton
ba1ca9148d Fix T47353: Project paint ignores small faces
When zoomed out - faces < 0.5 pixels across a diagonal aren't so rare,
so culling them can ignore small faces.
2016-02-08 11:48:03 +11:00
Campbell Barton
ce6ba15727 Image Editor: use shift+home to fit the frame
FKey conflicts with painting.
2016-02-08 08:38:48 +11:00
Campbell Barton
c7608ef359 Fix T47337: BVHTree.find_nearest missing
Method wasn't named as documented.
2016-02-08 08:29:46 +11:00
Martijn Berger
715410c2fd CMake OpenVDB support on OS X
Reviewers: kevindietrich, sergey

Differential Revision: https://developer.blender.org/D1773
2016-02-06 04:26:57 -08:00
Brecht Van Lommel
dd185bf5b8 Fix T47336: compositor color balance offset/slope/power incorrectly clamps HDR colors. 2016-02-07 16:41:41 +01:00
Brecht Van Lommel
8f6912392d Fix T47342: hang with freestyle viewport render and animation playback.
Not sure why I made the logic so complicated before, this change should solve
the deadlock when the render thread tries to acquire the main thread lock while
the main thread is waiting for threads to finish.
2016-02-07 16:38:48 +01:00
Brecht Van Lommel
72dd1ba3fe Fix T47349: incorrect Cycles fresnel and layer weight with GLSL materials.
Patch by Ralf Hölzemer.
2016-02-07 14:45:39 +01:00
Brecht Van Lommel
bd0223b8fe Fix T47351: slow rigid body sim bake after recent changes to use jobs system.
The bake system had a 200ms sleep for each frame substep, to give the UI time
to redraw. I don't think there is a good reason to have this, with fair thread
scheduling this will give UI thread 2x more time at best, and the UI doesn't
need to be that responsive during bake.
2016-02-07 14:35:21 +01:00
Campbell Barton
77197b26fa Cleanup: line width 2016-02-07 22:56:20 +11:00
Campbell Barton
8be34580c1 move windows out of source dir 2016-02-07 20:58:58 +11:00
Sergey Sharybin
578f70f288 Cycles: Fix access uninitialized light after recent refactor/fixes 2016-02-07 06:20:06 +05:00
Joshua Leung
76eac1ae70 Motion Paths: Use custom poll functions for "Update" operator 2016-02-07 13:32:13 +13:00
Joshua Leung
7320df2e61 Motion Paths: Show "Update" button in the toolbox too 2016-02-07 13:32:12 +13:00
Joshua Leung
4e3d6725c4 Clear motionpaths for all objects and bones instead of only selected ones
With the old behaviour, it was too easy to get old paths hanging around because you
forgot to go through and select a few bones that still had them.
2016-02-07 13:32:12 +13:00
Joshua Leung
9eca281e88 Added Context.editable_objects/bases
This is useful when you want visible + editable objects, but you don't
want to require the items to be selected as well.
2016-02-07 13:32:11 +13:00
Sergey Sharybin
e360080a04 Cycles: Refactor the way how we exclude light from the device
This unifies things around ignoring light due to lack of scene
contribution or due to other optimization tricks.
2016-02-07 02:21:38 +05:00
Brecht Van Lommel
7faa9d1304 Fix T46550: Cycles combined baking black in some cases.
Now pass_filter is modified to have exactly the flags for the light components
that need to be baked, based on the shader type. This simplifies the logic.
2016-02-06 21:02:02 +01:00
Sergey Sharybin
c502114ee1 Cycles: Solve issues with auto-disabled MIS
There were two issues:

1. Memory leak: std:;erase does not call delete on the
   pointer (which is actually a good idea),

2. After MIS was disabled in viewport render there was
   no way to bring MIS back.

Now instead of removing light from the scene data we
kind of tagging it for an ignore. Possible cleanup
would be to add Light::is_enabled and use that instead
of passing weird and wonderful function arguments.
2016-02-06 20:43:44 +01:00
Sergey Sharybin
f25f7c8030 Cycles: Re-implement some utilities to avoid use of boost
The title says it all actually, the idea is to make Cycles
only requiring Boost via 3rd party dependencies like OIIO
and OSL.

So now there are only few places which still uses Boost:

- Foreach, function bindings and threading primitives.

  Those we can easily get rid with C++11 bump (which seems
  inevitable sooner or later if we'll want ot use newer
  LLVM for OSL),

- Networking devices

  There's no quick solution for those currently, but there
  are some patches around which improves serialization.

Reviewers: juicyfruit, mont29, campbellbarton, brecht, dingto

Reviewed By: brecht, dingto

Differential Revision: https://developer.blender.org/D1764
2016-02-06 19:19:20 +01:00
Sergey Sharybin
7623d3e071 Cycles: Add some utility tests using GTests
This is an initial move to have unittests to at least cover
utility functions, which then could be extended further to
test such areas as shader optimization and such.

Currently only based on initial "infrastructure" layout and
writing tests needed to test the no-boost patch.

Note: This patch starts to use "<dir>/<header>.h" notation
for the include statements which i just got used to do in
other projects. Something what would be cool to use globally
in the code eventually.

Reviewers: dingto, juicyfruit, lukasstockner97, brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D1770
2016-02-06 19:19:20 +01:00
Brecht Van Lommel
3867bef904 Fix T47320: Cycles baking in edit mode uses outdated mesh. 2016-02-06 19:14:04 +01:00
Sergey Sharybin
2dba2b3d71 Fix gtests on Windows/MSVC
There were some missing stubs and some tests were specifically
written for Linux. Also, apparently MSVC has a limit of 64K for
the insource strings..
2016-02-06 21:21:55 +05:00
Sergey Sharybin
5508cc2d63 Fix typo in 32bytes aligned malloc test 2016-02-06 16:42:19 +01:00
Sergey Sharybin
a90d5cd692 Cycles: Remove workaround for MSVC2010 and Boost
We've upgraded to Boost-1.60 and MSVC2013 since the workaround
was originally committed. After checks with current compiler and
libraries the original bug is no longer happening.

This will make string comparison much faster in Windows, solving
synchronization bottlenecks of fewzillion objects.

Thanks Martin Felke (aka scorpion81) for the tests!
2016-02-06 15:56:47 +01:00
Sergey Sharybin
e1f5b2b4c1 Fix GTests compilations on Windows
Unfortunately this doesn't make all tests compilable due
to all sort of weird and wonderful bad levels includes
on Windows (G referenced from bf_blenlib) but at least
allows to selectively build tests for now.
2016-02-06 15:12:28 +01:00
Sergey Sharybin
d978f23f71 CMake: Remove mention of extern_redcode, it was removed 2016-02-06 14:37:29 +01:00
Brecht Van Lommel
6081f6c387 Fix T47204: selection failing directly after disabling multisample in user prefs.
Now store the multisample setting each window was created with.
2016-02-06 12:21:41 +01:00
Brecht Van Lommel
e602fe60c0 Code cleanup: resolve minor Cycles todo's. 2016-02-06 11:56:37 +01:00
Brecht Van Lommel
d5e929a9d3 Code cleanup: remove unused Cycles code from BVH cache. 2016-02-06 11:55:35 +01:00
Brecht Van Lommel
4443bb8922 Fix Burley BSSRDF NaNs and fireflies.
Explicitly truncate to Rm same way as the Gaussian BSSRDF, and use safe_sqrtf()
to be sure in case of float precision issues.
2016-02-06 11:52:43 +01:00
Thomas Dinges
a6ca8a1b73 Cleanup: Remove support for OSL versions < 1.6.
We can get rid of more ifdefs once all platforms are on OSL 1.7 soon.
2016-02-06 00:07:20 +01:00
Thomas Dinges
66a9698978 Cycles: Change several default values (second batch).
This change the following values:
- World settings:
	- Use MIS: On
	- MIS Samples: 1
	- MIS Resolution: 1024

Enabling World MIS per default won't make simple backgrounds (flat background color) slower,
see previous commit. This gets disabled internally if World MIS is not actually needed.
2016-02-05 22:45:36 +01:00
Thomas Dinges
469447f707 Cycles: Auto disable World MIS, if we only use a simple color.
When World MIS is enabled by the user, we now check if we actually need it.
In case of a simple node setup (no procedurals, no HDRs..) we auto disable MIS internally to save render time.

This change is important for upcoming default changes.
2016-02-05 22:13:51 +01:00
Thomas Dinges
ca88bc5ac1 Cleanup: Rename has_heterogeneous_volume variable.
No functional changes, this change is done for consistency of upcoming changes.
2016-02-05 21:33:37 +01:00
Bastien Montagne
2685d45fa2 Fix error in last commit.
treedata could have a non-initialized tree in case of edge_snapping, leading to segfault.

Spotted by @mano-wii, thanks.
2016-02-05 18:48:15 +01:00
Bastien Montagne
3ad0344171 Fix T47326: Snap to vertices not working properly in orthogonal view mode.
Same causes as when snapping to faces, so same solution: in case of ortho view,
offset start of ray to be just slightly outside of the target's bbox, to avoid
too much far away start point that generate floating point computation instability
in BVH raycasting.

Note that this lead to some refactoring, to avoid duplicating too much of code.

For now, edge snapping seems to behave OK (uses different logic), so not touched.

Based on patch by Germano Cavalcante (@mano-wii), thanks!
2016-02-05 18:18:27 +01:00
Sergey Sharybin
d3889e2cad Fix T47329: Compositing fails to render unless each included scene was rendered since opening 2016-02-05 14:58:15 +01:00
Joshua Leung
c4dc14b079 Fix T45915: Cannot select keyframes in summary channels in Dope Sheet in TweakMode
When in TweakMode on NLA strips that had an offset, it was not possible to select
those keyframes in the Summary Channel in the Dope Sheet.

The main gist of it is that the current code is from before the summary track was
introduced, and so could assume that ANIM_nla_mapping_get() would work for all channels
present. Thus, simply converting the clicked frame to nla-mapped time once would be
enough. However, for summary channels, nla-mapping_get() doesn't do anything, since
we can potentially include keyframes from several different objects!
2016-02-06 02:40:43 +13:00
Joshua Leung
c105c59bb4 Fix T46037: Moving keys in NLA tweak mode on offset actions results in Bezier handles getting stretched unreasonably
Patch by Alexander Gavrilov (angavrilov)

Reviewed by Joshua Leung (aligorith)
2016-02-06 02:40:43 +13:00
Sergey Sharybin
c53c8df6d9 Cycles: ifdef some extra code when building split kernels 2016-02-05 14:11:16 +01:00
Sergey Sharybin
24ae7b9035 Cycles: Don't gray out integrator settings when userprefs are set to OpenCL but scene is set to CPU 2016-02-05 13:40:51 +01:00
Bastien Montagne
3758828d33 Install_deps: update magic build numbers of OIIO and OSL.
Please remember to change those each time you update building code and there is no version change.
Otherwise poeple re-running the script won't get the updated builds.
2016-02-05 12:03:58 +01:00
Sergey Sharybin
e688a62712 Cycles: Fix for initial guess of the radius for Burley BSSRDF
The value was too high, causing bad Newton iteration step.
Now the value is not so good, but it's still within 9 iterations
and those high number of iterations are only happening in
approx 1% of input values.
2016-02-05 10:06:08 +01:00
Thomas Dinges
da7ddb69e9 Cycles / OSL: Updare stdosl.h to 1.7.1.
This updates our file to OSL 1.7.1, which comes with some new inbuilt
features:

- linearstep()
- smooth_linearstep()

- hash()
- getchar()
2016-02-05 00:05:26 +01:00
Thomas Dinges
208a49b1c3 Install Deps: Use SSE2 optimizations for OIIO and OSL. 2016-02-04 23:42:39 +01:00
Thomas Dinges
fc3db32f04 Cleanup: Update BSSRDF code comment. 2016-02-04 22:42:55 +01:00