3 years agoadd openvdb to blender config (and buildbot)
Martijn Berger [Wed, 10 Feb 2016 13:04:05 +0000 (14:04 +0100)]
add openvdb to blender config (and buildbot)

3 years agoWindows MSVC allow building with openvdb / tbb
Martijn Berger [Wed, 10 Feb 2016 12:59:04 +0000 (13:59 +0100)]
Windows MSVC allow building with openvdb / tbb

3 years agoDocs: minor comment edits to smallhash
Campbell Barton [Wed, 10 Feb 2016 12:28:16 +0000 (23:28 +1100)]
Docs: minor comment edits to smallhash

3 years agoTweaks to the comments of smallhash
Sergey Sharybin [Wed, 10 Feb 2016 09:52:24 +0000 (10:52 +0100)]
Tweaks to the comments of smallhash

Collaboration between russki guy working from Netherlands and
ausie bloke working from Australia (not Austria).

3 years agoCycles: Fix an AttributeErro exceptionr on missing object context
Sergey Sharybin [Wed, 10 Feb 2016 09:34:19 +0000 (10:34 +0100)]
Cycles: Fix an AttributeErro exceptionr on missing object context

This happens when the properties panel is pinned to the material tab.

Patch by Ralf Hölzemer (aka cheleb), thanks!

Differential Revision:

3 years agoCleanup: double promotion
Campbell Barton [Wed, 10 Feb 2016 02:59:57 +0000 (13:59 +1100)]
Cleanup: double promotion

Also remove null checks from args with non-null attribute.

3 years agoFix screenshot adding image extension after .blend
Campbell Barton [Wed, 10 Feb 2016 02:57:54 +0000 (13:57 +1100)]
Fix screenshot adding image extension after .blend

3 years agoUpdate link to avoid redirect
Aaron Carlisle [Wed, 10 Feb 2016 00:01:53 +0000 (01:01 +0100)]
Update link to avoid redirect

3 years agoNode Editor: Another missing glLineWidth reset
Julian Eisel [Tue, 9 Feb 2016 23:41:45 +0000 (00:41 +0100)]
Node Editor: Another missing glLineWidth reset

Caused too thick outlines around nodes and around preview image in node.

3 years agoFix T47377: Newer file crashes at render on official 2.76b version
Sergey Sharybin [Tue, 9 Feb 2016 23:00:29 +0000 (04:00 +0500)]
Fix T47377: Newer file crashes at render on official 2.76b version

Really annoying bug, the code was not forward compatible at all and
resulted in crash. And it is really good to keep at least one release
forward compatibility so possible regressions could be verified easily.

The idea now is to use new property name for the pixel filter type,
but keep old property around for a couple of releases, so we have at
least some forward compatibility.

Don't like this situation at all, but seems it's least of the evil
we can choose.

Thanks Brecht for the review!

3 years agoFix manipulator drawing width controlled by gpencil thickness!1!!
Julian Eisel [Tue, 9 Feb 2016 23:01:25 +0000 (00:01 +0100)]
Fix manipulator drawing width controlled by gpencil thickness!1!!

3 years agoFix curves drawn with wrong line width
Julian Eisel [Tue, 9 Feb 2016 22:48:04 +0000 (23:48 +0100)]
Fix curves drawn with wrong line width

Selected/Active curves were drawn with too high line width in Object mode.

3 years agoCycles: Cleanp, avoid direct calls of RNA_enum_get, we've got utility for that
Sergey Sharybin [Tue, 9 Feb 2016 22:25:53 +0000 (03:25 +0500)]
Cycles: Cleanp, avoid direct calls of RNA_enum_get, we've got utility for that

3 years agoTypo: Open GL -> OpenGL
Aaron Carlisle [Tue, 9 Feb 2016 20:03:17 +0000 (21:03 +0100)]
Typo: Open GL -> OpenGL

3 years agoFix T47370: untranslateable bake panel strings.
Brecht Van Lommel [Tue, 9 Feb 2016 18:44:15 +0000 (19:44 +0100)]
Fix T47370: untranslateable bake panel strings.

Reorder buttons a bit so that these strings are not even needed, makes more
sense to have this grouped anyway.

3 years agoFix T47339: Unified color not used w/ radial control
Campbell Barton [Tue, 9 Feb 2016 14:48:02 +0000 (01:48 +1100)]
Fix T47339: Unified color not used w/ radial control

3 years agoFix T47366: Single slope linear curve was wrongly using vector handle
Sergey Sharybin [Tue, 9 Feb 2016 13:51:32 +0000 (14:51 +0100)]
Fix T47366: Single slope linear curve was wrongly using vector handle

Vector handle is only required for a symmetric curve to give nice a /\ shape.
Single slope curves better to use AUTO handle by default.

3 years agoFix make.bat checking 64bit systems
Campbell Barton [Tue, 9 Feb 2016 13:26:12 +0000 (00:26 +1100)]
Fix make.bat checking 64bit systems

3 years agoAdd BLI_bvhtree_walk_dfs utility function
Germano Cavalcante [Tue, 9 Feb 2016 11:12:05 +0000 (22:12 +1100)]
Add BLI_bvhtree_walk_dfs utility function

This generic function allows callers to walk the tree using callbacks to define behavior.

3 years agoBLI_kdopbvh: expose bvhtree_kdop_axes array
Campbell Barton [Tue, 9 Feb 2016 10:53:35 +0000 (21:53 +1100)]
BLI_kdopbvh: expose bvhtree_kdop_axes array

So future callbacks can make use of the axis index.

3 years agoFix T47371 - add access to 'static' enum items.
Bastien Montagne [Tue, 9 Feb 2016 11:44:06 +0000 (12:44 +0100)]
Fix T47371 - add access to 'static' enum items.

Some dynamic enums, which do not need a valid context pointer, have their 'itemf'
callback always called. This is annoying for introspection tools (like the ones generating
translations, or API documentation), because it means they never have access to all possible
options (enum items).

So now, there is also an `enum_items_static` accessor to get only statically-defined
enum items.

Note: only i18n tools take advantage of this currently, others are still to be updated.

Reviewers: campbellbarton, sergey

Differential Revision:

3 years agoAdd missing gl line width for curve normals
Campbell Barton [Tue, 9 Feb 2016 09:53:33 +0000 (20:53 +1100)]
Add missing gl line width for curve normals

3 years agoFix: Transform constraint/helper line drawing had incorrect thickness when GPencil...
Joshua Leung [Tue, 9 Feb 2016 08:54:44 +0000 (21:54 +1300)]
Fix: Transform constraint/helper line drawing had incorrect thickness when GPencil strokes are shown

3 years agoFix T47368: Crash re-linking object to scene
Campbell Barton [Tue, 9 Feb 2016 07:06:06 +0000 (18:06 +1100)]
Fix T47368: Crash re-linking object to scene

3 years agoDocs: correct description
Campbell Barton [Tue, 9 Feb 2016 05:29:16 +0000 (16:29 +1100)]
Docs: correct description

3 years agoFix T47367: Segfault in BIF_draw_manipulator() with "around active" and the active...
Joshua Leung [Tue, 9 Feb 2016 02:27:26 +0000 (15:27 +1300)]
Fix T47367: Segfault in BIF_draw_manipulator() with "around active" and the active object hidden

Accidentally left off null check when cleaning up the code there in
34993bf97dcbfd29289d14228ac10f1cfa206a15  (GPencil_Editing_Stage3 branch)

Thanks to Sami Pelkonen (pltsi) who reported this bug, along with
some nice and detailed backtraces which made it easy to locate
the problem :)

3 years agoSet clip alpha to small non-zero value
Campbell Barton [Tue, 9 Feb 2016 00:56:40 +0000 (11:56 +1100)]
Set clip alpha to small non-zero value

This amends 089d2a18 which was a known driver bug (T46962),
increasing the clipping to avoid precision issues.

3 years agoCycles: Fix Burley's CDF truncation after recent radius fix
Sergey Sharybin [Mon, 8 Feb 2016 20:49:59 +0000 (21:49 +0100)]
Cycles: Fix Burley's CDF truncation after recent radius fix

This is all not really ideal, but good enough for tonight.
More thoughts and investigation tomorrow!

3 years agoFix: Empty > Image not working in some hardwares
Dalai Felinto [Mon, 8 Feb 2016 17:12:11 +0000 (15:12 -0200)]
Fix: Empty > Image not working in some hardwares

Basically the default U.glalphaclip was 1.8367099231598242e-40 in some
computers (e.g., OSX 10.11, AMD Radeon HD 6750M) this value would need for bad
gl clipping.

The new default is 0.0. To test this before/after the fix, just run:

$ blender -b --factory-startup --python-expr "import bpy; print(bpy.context.user_preferences.system.gl_clip_alpha)"

3 years agoFix T47354: Garbage key events (UNKOWNKEY) would remain in backup event's keymodifier.
Bastien Montagne [Mon, 8 Feb 2016 14:41:39 +0000 (15:41 +0100)]
Fix T47354: Garbage key events (UNKOWNKEY) would remain in backup event's keymodifier.

For some reason, using 'dead keys' to compose some accentuated latin chars will generate
some 'unknown' key events, and in this case, direct `event.keymodifier` was correctly
cleared, but not its 'backup' version in `win->eventstate`, so all further events would
get an invalid modifier until some real one would be pressed again...

3 years agoFix T47356: Too sharp falloww with Burley BSSRDF
Sergey Sharybin [Mon, 8 Feb 2016 13:51:57 +0000 (14:51 +0100)]
Fix T47356: Too sharp falloww with Burley BSSRDF

After the clamping commit we need to bump BURLEY_TRUNCATE
constant a bit, otherwise mean free path does not really
match the disk radius needed for importance sampling.

3 years agoGPencil: Layers with alpha = 0 should not be editable
Joshua Leung [Mon, 8 Feb 2016 13:44:02 +0000 (02:44 +1300)]
GPencil: Layers with alpha = 0 should not be editable

* Added a new API function to test if a GPencil layer is visible or not
* Replaced all editability checks with this new "super check"
* Replaced all magic number thresholds for opacity visiblity with a single define

3 years agoCode Cleanup: Use bool instead of int for "setactive" param
Joshua Leung [Mon, 8 Feb 2016 13:22:16 +0000 (02:22 +1300)]
Code Cleanup: Use bool instead of int for "setactive" param

3 years agoFix: ANIM_animdata_update() was not handling post-edit updates on GP channels
Joshua Leung [Mon, 8 Feb 2016 13:18:05 +0000 (02:18 +1300)]
Fix: ANIM_animdata_update() was not handling post-edit updates on GP channels

This may have resulted in situations where the order of GP keyframes was
incorrect (leading to some frames not being able to be found), or in some
redraw problems when trying to delete GP keyframes (that I was getting earlier,
but can't seem to reproduce now)

TODO: We now need to hook up a proper api to do the GP key sorting

3 years agoFix: "Speaker" Icon for "Muting" in GPencil Dopesheet mode was confusing and used...
Joshua Leung [Mon, 8 Feb 2016 13:08:55 +0000 (02:08 +1300)]
Fix: "Speaker" Icon for "Muting" in GPencil Dopesheet mode was confusing and used incorrectly

In the other Dopesheet modes, the "Speaker" icon was used to refer to
"animation playback muting", while for GP layers, this was being incorrectly
abused for "layer visibility in viewport".

This commit fixes that by making the following changes:
* A new "eye" icon toggle is added for controlling GP Layer visibility
* The "speaker" icon toggle now controls "Lock Frame to Current" functionality,
  which functions more like the "animation playback muting" that is generally

3 years agoGPencil: Numpad 0 and Numpad view rotation keys now work in Continuous Drawing Mode
Joshua Leung [Mon, 8 Feb 2016 12:52:05 +0000 (01:52 +1300)]
GPencil: Numpad 0 and Numpad view rotation keys now work in Continuous Drawing Mode

When animating to the camera, and working in "Continuous Drawing Mode",
it be necessary to return to the active camera viewport, after briefly pivoting
the view using MMB (to check on perspective or something like that). However,
before this fix, you would have had to exit drawing mode to do this.

3 years agoGPencil Eraser: Do not allow eraser radius to get smaller than 1 pixel
Joshua Leung [Mon, 8 Feb 2016 12:47:32 +0000 (01:47 +1300)]
GPencil Eraser: Do not allow eraser radius to get smaller than 1 pixel

3 years agoGPencil UI: Show selection mask toggle in 3D view header to make it easier to access
Joshua Leung [Mon, 8 Feb 2016 11:51:07 +0000 (00:51 +1300)]
GPencil UI: Show selection mask toggle in 3D view header to make it easier to access

3 years agoGPencil UI: Expand Sculpt Settings panel by default
Joshua Leung [Mon, 8 Feb 2016 11:18:37 +0000 (00:18 +1300)]
GPencil UI: Expand Sculpt Settings panel by default

Sculpt settings are often quite handy to be able to easily access while drawing,
so make it easier to access these when drawing without having to first expand
the panel.

(On the other hand, the "Edit Strokes" panel contains tools already found in
various other places - menus,etc. - so no need to expand it by default)

3 years agoGPencil: If "onion skinning" toggle on header is enabled, new layers will have onions...
Joshua Leung [Mon, 8 Feb 2016 11:14:45 +0000 (00:14 +1300)]
GPencil: If "onion skinning" toggle on header is enabled, new layers will have onionskinning enabled too

3 years agoFix: Renaming Grease Pencil layers doesn't update the Dopesheet Channels Region
Joshua Leung [Mon, 8 Feb 2016 11:05:09 +0000 (00:05 +1300)]
Fix: Renaming Grease Pencil layers doesn't update the Dopesheet Channels Region

3 years agoFix group flipping when syncing mirror weights
Alexander Gavrilov [Mon, 8 Feb 2016 13:18:45 +0000 (00:18 +1100)]
Fix group flipping when syncing mirror weights

Corrects mirror syncing for invert, levels & smooth.

Note that the code changed to process mirroring even if both verts are selected,
since group flipping can mean that is still meaningful.

3 years agoCleanup: use doxy comments for deform.c
Campbell Barton [Mon, 8 Feb 2016 11:40:57 +0000 (22:40 +1100)]
Cleanup: use doxy comments for deform.c

3 years agoCLeanup: style
Campbell Barton [Mon, 8 Feb 2016 11:28:06 +0000 (22:28 +1100)]
CLeanup: style

3 years agoImprove make.bat final message
Campbell Barton [Mon, 8 Feb 2016 10:12:03 +0000 (21:12 +1100)]
Improve make.bat final message

3 years agoFix RenderEngine API docs
Campbell Barton [Mon, 8 Feb 2016 09:08:21 +0000 (20:08 +1100)]
Fix RenderEngine API docs

Correct access to passes, D1779 by @levon.

Also use is_preview attr and use register/unregister functions.

3 years agoFix for non-bool return values of a few common RNA functions with declared boolean...
Lukas Tönne [Mon, 8 Feb 2016 09:13:09 +0000 (10:13 +0100)]
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.

3 years agoFix T47360: Image loading fails when accessible from the CWD
Campbell Barton [Mon, 8 Feb 2016 07:19:50 +0000 (18:19 +1100)]
Fix T47360: Image loading fails when accessible from the CWD

3 years agoFix T47347: Z-pass defaults to zero
Campbell Barton [Mon, 8 Feb 2016 02:36:41 +0000 (13:36 +1100)]
Fix T47347: Z-pass defaults to zero

Use the same default value for Z-depth in the compositor as everywhere else.

3 years agoFix T47353: Project paint ignores small faces
Campbell Barton [Mon, 8 Feb 2016 00:48:03 +0000 (11:48 +1100)]
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.

3 years agoImage Editor: use shift+home to fit the frame
Campbell Barton [Sun, 7 Feb 2016 21:38:48 +0000 (08:38 +1100)]
Image Editor: use shift+home to fit the frame

FKey conflicts with painting.

3 years agoFix T47337: BVHTree.find_nearest missing
Campbell Barton [Sun, 7 Feb 2016 21:26:04 +0000 (08:26 +1100)]
Fix T47337: BVHTree.find_nearest missing

Method wasn't named as documented.

3 years agoCMake OpenVDB support on OS X
Martijn Berger [Sat, 6 Feb 2016 12:17:53 +0000 (04:17 -0800)]
CMake OpenVDB support on OS X

Reviewers: kevindietrich, sergey

Differential Revision:

3 years agoFix T47336: compositor color balance offset/slope/power incorrectly clamps HDR colors.
Brecht Van Lommel [Sun, 7 Feb 2016 15:41:41 +0000 (16:41 +0100)]
Fix T47336: compositor color balance offset/slope/power incorrectly clamps HDR colors.

3 years agoFix T47342: hang with freestyle viewport render and animation playback.
Brecht Van Lommel [Sun, 7 Feb 2016 15:17:02 +0000 (16:17 +0100)]
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.

3 years agoFix T47349: incorrect Cycles fresnel and layer weight with GLSL materials.
Brecht Van Lommel [Sun, 7 Feb 2016 13:45:39 +0000 (14:45 +0100)]
Fix T47349: incorrect Cycles fresnel and layer weight with GLSL materials.

Patch by Ralf Hölzemer.

3 years agoFix T47351: slow rigid body sim bake after recent changes to use jobs system.
Brecht Van Lommel [Sun, 7 Feb 2016 13:25:38 +0000 (14:25 +0100)]
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.

3 years agoCleanup: line width
Campbell Barton [Sun, 7 Feb 2016 11:56:20 +0000 (22:56 +1100)]
Cleanup: line width

3 years agomove windows out of source dir
Campbell Barton [Sun, 7 Feb 2016 09:58:58 +0000 (20:58 +1100)]
move windows out of source dir

3 years agoCycles: Fix access uninitialized light after recent refactor/fixes
Sergey Sharybin [Sun, 7 Feb 2016 01:18:51 +0000 (06:18 +0500)]
Cycles: Fix access uninitialized light after recent refactor/fixes

3 years agoMotion Paths: Use custom poll functions for "Update" operator
Joshua Leung [Sat, 6 Feb 2016 04:57:50 +0000 (17:57 +1300)]
Motion Paths: Use custom poll functions for "Update" operator

3 years agoMotion Paths: Show "Update" button in the toolbox too
Joshua Leung [Sat, 6 Feb 2016 00:09:59 +0000 (13:09 +1300)]
Motion Paths: Show "Update" button in the toolbox too

3 years agoClear motionpaths for all objects and bones instead of only selected ones
Joshua Leung [Sat, 6 Feb 2016 00:04:20 +0000 (13:04 +1300)]
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.

3 years agoAdded Context.editable_objects/bases
Joshua Leung [Fri, 5 Feb 2016 23:59:03 +0000 (12:59 +1300)]
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.

3 years agoCycles: Refactor the way how we exclude light from the device
Sergey Sharybin [Sat, 6 Feb 2016 21:21:38 +0000 (02:21 +0500)]
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.

3 years agoFix T46550: Cycles combined baking black in some cases.
Brecht Van Lommel [Sat, 6 Feb 2016 19:35:36 +0000 (20:35 +0100)]
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.

3 years agoCycles: Solve issues with auto-disabled MIS
Sergey Sharybin [Sat, 6 Feb 2016 19:43:44 +0000 (20:43 +0100)]
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.

3 years agoCycles: Re-implement some utilities to avoid use of boost
Sergey Sharybin [Fri, 5 Feb 2016 08:09:39 +0000 (09:09 +0100)]
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:

3 years agoCycles: Add some utility tests using GTests
Sergey Sharybin [Sat, 6 Feb 2016 18:09:44 +0000 (19:09 +0100)]
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:

3 years agoFix T47320: Cycles baking in edit mode uses outdated mesh.
Brecht Van Lommel [Sat, 6 Feb 2016 18:12:22 +0000 (19:12 +0100)]
Fix T47320: Cycles baking in edit mode uses outdated mesh.

3 years agoFix gtests on Windows/MSVC
Sergey Sharybin [Sat, 6 Feb 2016 16:19:47 +0000 (21:19 +0500)]
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..

3 years agoFix typo in 32bytes aligned malloc test
Sergey Sharybin [Sat, 6 Feb 2016 15:42:19 +0000 (16:42 +0100)]
Fix typo in 32bytes aligned malloc test

3 years agoCycles: Remove workaround for MSVC2010 and Boost
Sergey Sharybin [Sat, 6 Feb 2016 14:56:47 +0000 (15:56 +0100)]
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!

3 years agoFix GTests compilations on Windows
Sergey Sharybin [Sat, 6 Feb 2016 14:03:32 +0000 (15:03 +0100)]
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.

3 years agoCMake: Remove mention of extern_redcode, it was removed
Sergey Sharybin [Sat, 6 Feb 2016 13:37:29 +0000 (14:37 +0100)]
CMake: Remove mention of extern_redcode, it was removed

3 years agoFix T47204: selection failing directly after disabling multisample in user prefs.
Brecht Van Lommel [Thu, 4 Feb 2016 21:26:46 +0000 (22:26 +0100)]
Fix T47204: selection failing directly after disabling multisample in user prefs.

Now store the multisample setting each window was created with.

3 years agoCode cleanup: resolve minor Cycles todo's.
Brecht Van Lommel [Fri, 29 Jan 2016 19:10:38 +0000 (20:10 +0100)]
Code cleanup: resolve minor Cycles todo's.

3 years agoCode cleanup: remove unused Cycles code from BVH cache.
Brecht Van Lommel [Fri, 29 Jan 2016 19:01:35 +0000 (20:01 +0100)]
Code cleanup: remove unused Cycles code from BVH cache.

3 years agoFix Burley BSSRDF NaNs and fireflies.
Brecht Van Lommel [Thu, 4 Feb 2016 22:35:08 +0000 (23:35 +0100)]
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.

3 years agoCleanup: Remove support for OSL versions < 1.6.
Thomas Dinges [Fri, 5 Feb 2016 23:07:20 +0000 (00:07 +0100)]
Cleanup: Remove support for OSL versions < 1.6.

We can get rid of more ifdefs once all platforms are on OSL 1.7 soon.

3 years agoCycles: Change several default values (second batch).
Thomas Dinges [Fri, 5 Feb 2016 21:45:36 +0000 (22:45 +0100)]
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.

3 years agoCycles: Auto disable World MIS, if we only use a simple color.
Thomas Dinges [Fri, 5 Feb 2016 21:13:51 +0000 (22:13 +0100)]
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.

3 years agoCleanup: Rename has_heterogeneous_volume variable.
Thomas Dinges [Fri, 5 Feb 2016 20:33:37 +0000 (21:33 +0100)]
Cleanup: Rename has_heterogeneous_volume variable.

No functional changes, this change is done for consistency of upcoming changes.

3 years agoFix error in last commit.
Bastien Montagne [Fri, 5 Feb 2016 17:48:15 +0000 (18:48 +0100)]
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.

3 years agoFix T47326: Snap to vertices not working properly in orthogonal view mode.
Bastien Montagne [Fri, 5 Feb 2016 17:12:07 +0000 (18:12 +0100)]
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!

3 years agoFix T47329: Compositing fails to render unless each included scene was rendered since...
Sergey Sharybin [Fri, 5 Feb 2016 13:57:53 +0000 (14:57 +0100)]
Fix T47329: Compositing fails to render unless each included scene was rendered since opening

3 years agoFix T45915: Cannot select keyframes in summary channels in Dope Sheet in TweakMode
Joshua Leung [Fri, 5 Feb 2016 13:34:57 +0000 (02:34 +1300)]
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!

3 years agoFix T46037: Moving keys in NLA tweak mode on offset actions results in Bezier handles...
Joshua Leung [Fri, 5 Feb 2016 11:59:32 +0000 (00:59 +1300)]
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)

3 years agoCycles: ifdef some extra code when building split kernels
Sergey Sharybin [Fri, 5 Feb 2016 13:11:16 +0000 (14:11 +0100)]
Cycles: ifdef some extra code when building split kernels

3 years agoCycles: Don't gray out integrator settings when userprefs are set to OpenCL but scene...
Sergey Sharybin [Fri, 5 Feb 2016 12:40:51 +0000 (13:40 +0100)]
Cycles: Don't gray out integrator settings when userprefs are set to OpenCL but scene is set to CPU

3 years agoInstall_deps: update magic build numbers of OIIO and OSL.
Bastien Montagne [Fri, 5 Feb 2016 11:03:58 +0000 (12:03 +0100)]
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.

3 years agoCycles: Fix for initial guess of the radius for Burley BSSRDF
Sergey Sharybin [Fri, 5 Feb 2016 09:06:08 +0000 (10:06 +0100)]
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.

3 years agoCycles / OSL: Updare stdosl.h to 1.7.1.
Thomas Dinges [Thu, 4 Feb 2016 23:02:35 +0000 (00:02 +0100)]
Cycles / OSL: Updare stdosl.h to 1.7.1.

This updates our file to OSL 1.7.1, which comes with some new inbuilt

- linearstep()
- smooth_linearstep()

- hash()
- getchar()

3 years agoInstall Deps: Use SSE2 optimizations for OIIO and OSL.
Thomas Dinges [Thu, 4 Feb 2016 22:42:39 +0000 (23:42 +0100)]
Install Deps: Use SSE2 optimizations for OIIO and OSL.

3 years agoCleanup: Update BSSRDF code comment.
Thomas Dinges [Thu, 4 Feb 2016 21:42:55 +0000 (22:42 +0100)]
Cleanup: Update BSSRDF code comment.

3 years agoSupport for cubemap reflections in the viewport
Campbell Barton [Thu, 4 Feb 2016 17:28:16 +0000 (04:28 +1100)]
Support for cubemap reflections in the viewport

D1756 by @youle, uses existing texture mapping option.

3 years agoUpdate themes
Campbell Barton [Thu, 4 Feb 2016 16:57:58 +0000 (03:57 +1100)]
Update themes

Label text editing uses colors from text buttons

3 years agoInstall_deps: Disable building tests for OSL
Thomas Beck [Thu, 4 Feb 2016 17:10:20 +0000 (18:10 +0100)]
Install_deps: Disable building tests for OSL

Since we're now on 1.7 we can skip building the OSL testsuite. It was giving various compilation errors on different machines and we don't need them just disabling them in the script.

3 years agoFix T47324: Edit-text in list view theme glitch
Campbell Barton [Thu, 4 Feb 2016 15:57:53 +0000 (02:57 +1100)]
Fix T47324: Edit-text in list view theme glitch

Use existing text select colors when text matches select color.

3 years agoInstall_deps: tweak OSL build options.
Bastien Montagne [Thu, 4 Feb 2016 15:50:46 +0000 (16:50 +0100)]
Install_deps: tweak OSL build options.