5 years agoBuildbot: attempt to solve packing on windows
Sergey Sharybin [Thu, 3 Dec 2015 11:48:14 +0000 (16:48 +0500)]
Buildbot: attempt to solve packing on windows

5 years agoBuildbot: Disable tests on Linux builders
Sergey Sharybin [Thu, 3 Dec 2015 11:44:44 +0000 (16:44 +0500)]
Buildbot: Disable tests on Linux builders

No idea why they works on windows, but points are:

- libs/tests folder is NOT checked out on any platforms
- render_povray addon does mkdir on a path which might not have parents

There might be some other issues, but those are kinda stoppers for us.

5 years agoFix isect_point_tri_v3 w/ degenerate faces
Campbell Barton [Thu, 3 Dec 2015 11:32:01 +0000 (22:32 +1100)]
Fix isect_point_tri_v3 w/ degenerate faces

Ensure point_in_slice returns false when zero area faces are passed.

5 years agoCleanup: change `WM_key_event_operator_id` to `WM_key_event_operator` and make it...
Bastien Montagne [Thu, 3 Dec 2015 11:38:13 +0000 (12:38 +0100)]
Cleanup: change `WM_key_event_operator_id` to `WM_key_event_operator` and make it return kmi pointer directly.

All three usages of this func were only using kmi_id to find again kmi itself, pretty dumb!

5 years agoBuildbot: Fix typo
Sergey Sharybin [Thu, 3 Dec 2015 11:37:17 +0000 (16:37 +0500)]
Buildbot: Fix typo

What a shame..

5 years agoBuildbot: Make sure install directory always exists
Sergey Sharybin [Thu, 3 Dec 2015 11:35:04 +0000 (16:35 +0500)]
Buildbot: Make sure install directory always exists

5 years agoBuildbot: Make sure is created in the right place
Sergey Sharybin [Thu, 3 Dec 2015 11:30:21 +0000 (16:30 +0500)]
Buildbot: Make sure is created in the right place

5 years agoFix T46918: - Cleanup - FileBrowser - get rid of useless operators and update a bit...
Bastien Montagne [Thu, 3 Dec 2015 11:21:57 +0000 (12:21 +0100)]
Fix T46918: - Cleanup - FileBrowser - get rid of useless operators and update a bit keymap.

Looks like FILE_OT_hidedot was actually the only one to remove here.

Also, added more common parentdir/previousdir/nextdir shortcuts, and R for reload.

5 years agoBuildbot: Fix wrong builder name check
Sergey Sharybin [Thu, 3 Dec 2015 11:15:37 +0000 (16:15 +0500)]
Buildbot: Fix wrong builder name check

5 years agoCMake: Use implicit compiler library paths to find OpenMP library
Sergey Sharybin [Thu, 3 Dec 2015 10:34:41 +0000 (15:34 +0500)]
CMake: Use implicit compiler library paths to find OpenMP library

Was lost since the original patch sent to Cambo, didn't notice the failure before
because had it applied locally.

Without this flag certain configuration wouldn't fins libgomp.

5 years agoBuildbot: Switch Linux builders to the cmake ones
Sergey Sharybin [Thu, 3 Dec 2015 10:19:02 +0000 (15:19 +0500)]
Buildbot: Switch Linux builders to the cmake ones

There'll still need to be some tweaks to be done, but it's required first step.

5 years agoBuildbot: Always expect to be in install/ folder
Sergey Sharybin [Thu, 3 Dec 2015 10:15:38 +0000 (15:15 +0500)]
Buildbot: Always expect to be in install/ folder

This we we don't have difference between builders on different platforms.

5 years agoBuildbot: De-duplicate some path definitions in pack target
Sergey Sharybin [Thu, 3 Dec 2015 10:08:36 +0000 (15:08 +0500)]
Buildbot: De-duplicate some path definitions in pack target

Should be no functional changes.

5 years agoExpose flush edits as an operator (for Py access)
Campbell Barton [Thu, 3 Dec 2015 09:18:32 +0000 (20:18 +1100)]
Expose flush edits as an operator (for Py access)

5 years agoFix crash w/ metaball undo & track last-selected
Campbell Barton [Thu, 3 Dec 2015 08:38:39 +0000 (19:38 +1100)]
Fix crash w/ metaball undo & track last-selected

Meta-balls would access freed memory on undo.
This fixes the bug and stores the active-meta in the undo state.

5 years agoFix T46913: Crash adding hook to linked mesh dupli
Campbell Barton [Wed, 2 Dec 2015 23:44:27 +0000 (10:44 +1100)]
Fix T46913: Crash adding hook to linked mesh dupli

Follow up to T46738, we need to tag the object data for recalculation.

5 years agoCleanup: remove unused struct
Campbell Barton [Wed, 2 Dec 2015 23:03:33 +0000 (10:03 +1100)]
Cleanup: remove unused struct

5 years agoFix T46899 sculpt normals not getting updated after exiting sculpt mode.
Antony Riakiotakis [Wed, 2 Dec 2015 23:13:45 +0000 (00:13 +0100)]
Fix T46899 sculpt normals not getting updated after exiting sculpt mode.

Habit is a bad thing: Update polys, not tessfaces.

5 years agoError in own recent commit, (left in debug test)
Campbell Barton [Wed, 2 Dec 2015 21:08:39 +0000 (08:08 +1100)]
Error in own recent commit, (left in debug test)

5 years agoBuildbot: Attempt to resolve wrong path to the
Sergey Sharybin [Wed, 2 Dec 2015 18:39:08 +0000 (23:39 +0500)]
Buildbot: Attempt to resolve wrong path to the

It is expected to be in the build folder for the cmake.

Ideally it should be build/<builder> or install/<builder> but that's a bit more
involved change. Will look into it later.

5 years agoBuildbot: Attempt to fix cpack target on windows
Sergey Sharybin [Wed, 2 Dec 2015 18:30:33 +0000 (23:30 +0500)]
Buildbot: Attempt to fix cpack target on windows

Was using wrong working directory.

5 years agoBuildbot: Don't specify install directory for Windows builds
Sergey Sharybin [Wed, 2 Dec 2015 17:55:42 +0000 (22:55 +0500)]
Buildbot: Don't specify install directory for Windows builds

Installation is to happen within the build folder, no special folder for
this is required.

5 years agoBMesh Decimate: don't collapse zero weighted edges
Campbell Barton [Wed, 2 Dec 2015 13:18:59 +0000 (00:18 +1100)]
BMesh Decimate: don't collapse zero weighted edges

5 years agoFix T46905: UV/Image Editor - Can't add shortcut to Mirror / X Axis menu item
Bastien Montagne [Wed, 2 Dec 2015 13:18:59 +0000 (14:18 +0100)]
Fix T46905: UV/Image Editor - Can't add shortcut to Mirror / X Axis menu item

Yet another Space/NoSpace mismatch when searching keymaps in WM_keymap_guess_opname().

Spent again some time trying to chase those, was the only one I found...

5 years agoBuildbot: Fix typo
Sergey Sharybin [Wed, 2 Dec 2015 13:18:58 +0000 (18:18 +0500)]
Buildbot: Fix typo

5 years agoBuildbot: Initial work to move linux build environment to CMake
Sergey Sharybin [Wed, 2 Dec 2015 13:09:06 +0000 (18:09 +0500)]
Buildbot: Initial work to move linux build environment to CMake

This is so called "seems to work in dry tests" commit which is aimed to switch
linux release environment to CMake.

Some notes:

- There's no special handle of libstdc++, but it wasn't really static for quite
  some time in SCons configuration and nobody really complained.

- It was quite tricky to get OpenMP linked statically with just using some
  configuration so we went ahead and added a special option to CMake now which is
  only exist on Linux and advertised as shouldn't be used.

- Packing is happening manually in This is because we have to add
  some really special files to the archive (mesa libraries for example) which we
  can't really handle from CMake/CPack in a nice generic way.

  Don't think it's bad approach, at least crappynness is localized and it's not
  _that_ crappy anyway.

- Windows buildbot should keep working, but needs doublechecing. It's just a
  build folder changed, but you never know what it might imply.

- Some further tweaks are likely needed to ensure all builders are working.

Thanks Campbell for assistance in this patch!

5 years agoCMake: Enable Cycles OSL for the full blender configuration
Sergey Sharybin [Wed, 2 Dec 2015 11:20:20 +0000 (16:20 +0500)]
CMake: Enable Cycles OSL for the full blender configuration

5 years agoCycles: Avoid recursion when doing constant fold
Sergey Sharybin [Wed, 2 Dec 2015 11:19:39 +0000 (16:19 +0500)]
Cycles: Avoid recursion when doing constant fold

This reduces stress on the the stack memory which could be really handy
on certain operation systems which applies strict limits on the stack.

Reviewers: brecht, juicyfruit, dingto

Reviewed By: brecht, juicyfruit, dingto

Differential Revision:

5 years agoCycles: Fix SSS object not properly reflected in glossy object with indirect clamping
Sergey Sharybin [Wed, 2 Dec 2015 10:59:12 +0000 (15:59 +0500)]
Cycles: Fix SSS object not properly reflected in glossy object with indirect clamping

This fixes remained issues reported in T46908.

5 years agoFix T46815: Changing playback setting makes blender crash
Jörg Müller [Wed, 2 Dec 2015 07:57:48 +0000 (08:57 +0100)]
Fix T46815: Changing playback setting makes blender crash

Copied the fix from upstream audaspace.

5 years agoCleanup: ignore unused args in stubs
Campbell Barton [Wed, 2 Dec 2015 08:26:07 +0000 (19:26 +1100)]
Cleanup: ignore unused args in stubs

5 years agoUsing term 'origin' for mathutils.bvhtree docs
Campbell Barton [Wed, 2 Dec 2015 08:25:08 +0000 (19:25 +1100)]
Using term 'origin' for mathutils.bvhtree docs

Matches rna ray-cast API

5 years agoUpdate template for changes in ray-cast
Campbell Barton [Wed, 2 Dec 2015 08:18:30 +0000 (19:18 +1100)]
Update template for changes in ray-cast

5 years agoPyAPI: Change ray_cast to fix & improve behavior
Campbell Barton [Wed, 2 Dec 2015 08:07:24 +0000 (19:07 +1100)]
PyAPI: Change ray_cast to fix & improve behavior

- It wasn't possible to know when Object.ray_cast was successful
  in the case when it hit a face with no original index.
- Take (ray_start, ray_direction) vectors.
- Take an optional distance argument.
- Scene/Object.ray_cast now use matching arguments & return values.

See D1650 (own patch)

5 years agoTransform Snap: add optional face index arg
Campbell Barton [Wed, 2 Dec 2015 07:46:14 +0000 (18:46 +1100)]
Transform Snap: add optional face index arg

5 years agoCleanup: transform snap arguments
Campbell Barton [Wed, 2 Dec 2015 07:08:48 +0000 (18:08 +1100)]
Cleanup: transform snap arguments

This was getting very hard to follow,

- mixing input/output args.
- mixing arg order between functions.
- arg names (mode, snap_mode) rename to (snap_to, snap_select)

5 years agoCleanup: double-conversion warnings
Campbell Barton [Wed, 2 Dec 2015 04:52:47 +0000 (15:52 +1100)]
Cleanup: double-conversion warnings

5 years agoCleanup: warnings & spelling
Campbell Barton [Wed, 2 Dec 2015 02:15:52 +0000 (13:15 +1100)]
Cleanup: warnings & spelling

5 years agoFix T46909: Text strip not themeable
Julian Eisel [Tue, 1 Dec 2015 22:56:48 +0000 (23:56 +0100)]
Fix T46909: Text strip not themeable

Normally we don't allow adding new theme options if we can avoid it, but this is a legit exception since all other strips are themeable.

Default color for text strip is now yellow-ish. Not nice but there are also not many other colors left.

5 years agoCycles: Fix wrong SSS intersection refinement when this option is disabled
Sergey Sharybin [Tue, 1 Dec 2015 22:14:54 +0000 (03:14 +0500)]
Cycles: Fix wrong SSS intersection refinement when this option is disabled

The code is disabled by default, but we'd better keep it all correct.

5 years agoCycles: Fix wrong SSS on scaled instanced objects
Sergey Sharybin [Tue, 1 Dec 2015 22:13:19 +0000 (03:13 +0500)]
Cycles: Fix wrong SSS on scaled instanced objects

Was a mistake on searching refined position form ray and hit distance.

Remember kids: SSS distance is in the object space!

5 years agoCycles: Remove TODO, it is possible there'll be more intersections recorded
Sergey Sharybin [Tue, 1 Dec 2015 21:39:57 +0000 (02:39 +0500)]
Cycles: Remove TODO, it is possible there'll be more intersections recorded

It's just only few of them will be stored in the intersection array, nothing
wrong with that what's so ever.

5 years agoCleanup: Remove some more code for BVH cache. I missed that somehow.
Thomas Dinges [Tue, 1 Dec 2015 17:17:28 +0000 (18:17 +0100)]
Cleanup: Remove some more code for BVH cache. I missed that somehow.

5 years agoComment assert in id_us_min, currently we can get zero user count at this point.
Bastien Montagne [Tue, 1 Dec 2015 14:45:44 +0000 (15:45 +0100)]
Comment assert in id_us_min, currently we can get zero user count at this point.

5 years agoOutliner: add an option to "delete" libraries.
Bastien Montagne [Tue, 1 Dec 2015 14:33:44 +0000 (15:33 +0100)]
Outliner: add an option to "delete" libraries.

Caminandes team request. In current master it's not possible to do this in a total
clean way, so we are simply setting all user counts of given lib's datablocks to zero
(similar to rna_ID_user_clear()'s doing).

This is a bit crappy because it still lets datablocks floating around (with invalid
user count values), and requires a save & reload cycle to be finalized. But for now
it should be good enough. Propper implementation will be added to id-remap.

5 years agoFix T46906: Cycles syntax error while compiling OpenCL kernels
Lukas Stockner [Tue, 1 Dec 2015 12:53:29 +0000 (13:53 +0100)]
Fix T46906: Cycles syntax error while compiling OpenCL kernels

The safe normalization was using a float as a condition, now the intended non-zero test is explicit.

5 years agoFix auto-merge loosing edge/faces selection
Campbell Barton [Tue, 1 Dec 2015 11:09:45 +0000 (22:09 +1100)]
Fix auto-merge loosing edge/faces selection

5 years agoReport error when removing presets fails
Campbell Barton [Tue, 1 Dec 2015 09:02:43 +0000 (20:02 +1100)]
Report error when removing presets fails

5 years agoFix T46898: OpenCL Fails to compile after recent SSS changes
Sergey Sharybin [Tue, 1 Dec 2015 07:54:40 +0000 (12:54 +0500)]
Fix T46898: OpenCL Fails to compile after recent SSS changes

5 years agoFix out-of-bounds access in recent shader updates
Campbell Barton [Tue, 1 Dec 2015 08:39:43 +0000 (19:39 +1100)]
Fix out-of-bounds access in recent shader updates

5 years agoFix minor order of init error w/ text draw
Campbell Barton [Tue, 1 Dec 2015 08:00:55 +0000 (19:00 +1100)]
Fix minor order of init error w/ text draw

5 years agoCleanup: use more logical names for View3D.around
Campbell Barton [Tue, 1 Dec 2015 07:52:24 +0000 (18:52 +1100)]
Cleanup: use more logical names for View3D.around

D1651 (own patch)

5 years agoFix T39935: Duplicate looses active curve spline
Kevin Mackay [Tue, 1 Dec 2015 06:38:45 +0000 (17:38 +1100)]
Fix T39935: Duplicate looses active curve spline

5 years agominor error in recent text-draw commit
Campbell Barton [Tue, 1 Dec 2015 06:37:32 +0000 (17:37 +1100)]
minor error in recent text-draw commit

5 years agoUI: mono-space font user preference
Campbell Barton [Tue, 1 Dec 2015 05:57:52 +0000 (16:57 +1100)]
UI: mono-space font user preference

5 years agoPython Console: store font id in a drawing context
Campbell Barton [Tue, 1 Dec 2015 04:49:52 +0000 (15:49 +1100)]
Python Console: store font id in a drawing context

5 years agoText Editor: store font id in a drawing context
Campbell Barton [Tue, 1 Dec 2015 04:31:42 +0000 (15:31 +1100)]
Text Editor: store font id in a drawing context

5 years agoCleanup: struct declarations
Campbell Barton [Tue, 1 Dec 2015 01:55:57 +0000 (12:55 +1100)]
Cleanup: struct declarations

5 years agoCleanup: Collada: make gcc (partially) happy.
Bastien Montagne [Tue, 1 Dec 2015 00:09:03 +0000 (01:09 +0100)]
Cleanup: Collada: make gcc (partially) happy.

Still grumpy about using tmpnam... ;)

5 years agoFix T46900: Inset Faces Thickness & Depth Do Not Use Scene Units (i.e. Imperial).
Bastien Montagne [Mon, 30 Nov 2015 23:58:09 +0000 (00:58 +0100)]
Fix T46900: Inset Faces Thickness & Depth Do Not Use Scene Units (i.e. Imperial).

Was the case of several Mesh operators actually (and probably others, but cannot check
everything). Added `RNA_def_property_float_distance` helper, avoids having to
set PROP_DISTANCE subtype explicitly each time...

5 years agoAdd shortcuts for copying data path from RNA
Campbell Barton [Mon, 30 Nov 2015 11:53:36 +0000 (22:53 +1100)]
Add shortcuts for copying data path from RNA

- Ctrl-Shift-C: copy-data-path
- Ctrl-Shift-Alt-C: copy-full-path

5 years agoRNA: de-duplciate rna-path create in tooltip code
Campbell Barton [Mon, 30 Nov 2015 11:38:39 +0000 (22:38 +1100)]
RNA: de-duplciate rna-path create in tooltip code

5 years agoCMake: Add some missing license files in the install target
Sergey Sharybin [Mon, 30 Nov 2015 16:29:08 +0000 (21:29 +0500)]
CMake: Add some missing license files in the install target

5 years agoLibquery: fix double-handling of object pointer in scene's basact base.
Bastien Montagne [Mon, 30 Nov 2015 14:34:56 +0000 (15:34 +0100)]
Libquery: fix double-handling of object pointer in scene's basact base.

Looping twice on same ID pointer may not be an issue in master currently, but with work done in id-remap
branch this should be avoided as much as possible, so for now assuming we do not need this here.

Note: if we really need this and have to add it back, then please at least use IDWALK_USER, and not

5 years add libsndfile (seems to be mandatory for correct flac export?)
Bastien Montagne [Mon, 30 Nov 2015 13:40:34 +0000 (14:40 +0100)] add libsndfile (seems to be mandatory for correct flac export?)

Related to T46886.

5 years agoFix T46628: Strips overlapping in VSE
Julian Eisel [Mon, 30 Nov 2015 13:12:31 +0000 (14:12 +0100)]
Fix T46628: Strips overlapping in VSE

Caused by rB27b2ab8cf4ae (although patch D1096 was correct).

5 years agoBuildbot: Enable sndfile library
Sergey Sharybin [Mon, 30 Nov 2015 10:15:12 +0000 (15:15 +0500)]
Buildbot: Enable sndfile library

It was enabled for other platforms already and this could fix some of the
reported bugs.

5 years agoFix T46891: Error removing PropertyGroup
Campbell Barton [Mon, 30 Nov 2015 00:03:32 +0000 (11:03 +1100)]
Fix T46891: Error removing PropertyGroup

5 years agoPyAPI: expose low level RNA to bpy.types
Campbell Barton [Mon, 30 Nov 2015 00:02:09 +0000 (11:02 +1100)]
PyAPI: expose low level RNA to bpy.types

5 years agoCleanup: warning w/ unknown define
Campbell Barton [Sun, 29 Nov 2015 23:09:44 +0000 (10:09 +1100)]
Cleanup: warning w/ unknown define

5 years agoFix T38245: render slot getting lost when switching slots while compositing.
Brecht Van Lommel [Sun, 29 Nov 2015 23:51:30 +0000 (00:51 +0100)]
Fix T38245: render slot getting lost when switching slots while compositing.

5 years agoFix T46896: Outliner group 'hide' doesn't update viewport render
Campbell Barton [Sun, 29 Nov 2015 22:23:58 +0000 (09:23 +1100)]
Fix T46896: Outliner group 'hide' doesn't update viewport render

5 years agoCleanup: sync edgehash w/ ghash remove logic
Campbell Barton [Sun, 29 Nov 2015 06:49:56 +0000 (17:49 +1100)]
Cleanup: sync edgehash w/ ghash remove logic

5 years agoCleanup: rename `hash` -> `bucket_index`, edgehash API
Campbell Barton [Sun, 29 Nov 2015 06:11:40 +0000 (17:11 +1100)]
Cleanup: rename `hash` -> `bucket_index`, edgehash API

Was confusing since a hash isn't typically used as an index on its own.

Also C99 for loop for bucket resize loop.

5 years agoCleanup: ghash/edgehash style
Campbell Barton [Sun, 29 Nov 2015 05:52:05 +0000 (16:52 +1100)]
Cleanup: ghash/edgehash style

Call functions on own lines (nicer for debugging)

5 years always give py version arg to cmake/scons (same as we already do...
Bastien Montagne [Sat, 28 Nov 2015 18:49:03 +0000 (19:49 +0100)] always give py version arg to cmake/scons (same as we already do with llvm).

This should avoid 'casual builders' to have issues when we switch py versions.

5 years agoMove linux's scons to py3.5 too!
Bastien Montagne [Sat, 28 Nov 2015 18:43:59 +0000 (19:43 +0100)]
Move linux's scons to py3.5 too!

5 years agoUI: More minor UI cleanups for keymap editor
Julian Eisel [Sat, 28 Nov 2015 17:15:56 +0000 (18:15 +0100)]
UI: More minor UI cleanups for keymap editor

Place non-editor related keymaps together, place animation editor keymaps together, move 'Header' keymap (which had exactly 1 entry) into 'Screen' keymap, move SCREEN_OT_header (for showing/hiding header) into 'Header' keymap.

Again, this shouldn't break any key configs, but key configs that contain SCREEN_OT_header will add an entry for this under 'Screen' again. Just a very minor glitch.

5 years agoRender pipeline: Remove dead code
Sergey Sharybin [Sat, 28 Nov 2015 17:07:43 +0000 (22:07 +0500)]
Render pipeline: Remove dead code

Remained since some rather recent render speedup commits.

5 years agoUI Cleanup: Mask keymap shouldn't be part of Clip Editor keymap
Julian Eisel [Sat, 28 Nov 2015 16:44:34 +0000 (17:44 +0100)]
UI Cleanup: Mask keymap shouldn't be part of Clip Editor keymap

Also removed unrelated comment (copied & pasted from a few lines above I guess).
Shouldn't break any custom key configs.

5 years agoCleanup: 'area' vs 'region'
Julian Eisel [Sat, 28 Nov 2015 16:14:45 +0000 (17:14 +0100)]
Cleanup: 'area' vs 'region'

Apparently this is the result of some sloppiness during 2.5 project and since then it confused people who were trying to understand the area-region relation (myself included).

Sorry if this causes merge conflicts for anyone, but at some point we really had to do it :/

5 years agoC++ RNA: Pass structures by reference
Sergey Sharybin [Sat, 28 Nov 2015 16:20:30 +0000 (21:20 +0500)]
C++ RNA: Pass structures by reference

C++ structures might be rather big and passing them by value is not really
optimal. There should be no functional changes apart from better memory
access pattern when synchronizing huge scenes to Cycles.

5 years agoCycles: Avoid having two consequence getenv() calls
Sergey Sharybin [Sat, 28 Nov 2015 16:05:12 +0000 (21:05 +0500)]
Cycles: Avoid having two consequence getenv() calls

5 years agoCycles: Fix wrong volume stack after SSS bounce
Sergey Sharybin [Sat, 28 Nov 2015 15:06:44 +0000 (20:06 +0500)]
Cycles: Fix wrong volume stack after SSS bounce

Was introduced by a recent fixes, now it should be all correct and additionally
it solves the TODO mentioned in the code.

5 years agoCycles: Fix wrong original ray used for SSS baking
Sergey Sharybin [Sat, 28 Nov 2015 14:43:54 +0000 (19:43 +0500)]
Cycles: Fix wrong original ray used for SSS baking

Also de-duplicated some code by moving to an utility function.

5 years agoCycles: Set of fixes for delayed SSS ray tracing
Sergey Sharybin [Sat, 28 Nov 2015 14:30:35 +0000 (19:30 +0500)]
Cycles: Set of fixes for delayed SSS ray tracing

There were multiple issues which are solved now:

- It was possible that ray wouldn't be bounced off the BSSRDF, for example
  when PDF or shader eval is zero. In this case PathState might have been
  left in pre-bounced state which would have been gave incorrect shading

  This is solved by having separate PathState for each of the hits.

- Path radiance summing wasn't happening correct as well, indirect rays
  were using wrong path radiance in the case when there were more than
  one hit recorded.

  This is now using a bit trickier state machine which calculates path
  radiance for just SSS (both direct and indirect) and then sums it back
  to the final radiance.

- Previous commit wasn't totally correct either and was an induced bug
  due to wrong path state left from the "un-happened" ray bounce.

  There should be no special case happening here, BSSRDFs will be replaced
  with diffuse ones due to PATH_RAY_DIFFUSE_ANCESTOR flag.

- Merged back codebases for "delayed" and "immediate" indirect SSS ray
  tracing, hopefully making it easier to maintain the codebase.

Sure this changes brings memory usage back by about 4-5%, but overall
it's still about 2x memory reduction for the experimental kernel here.

Thanks Brecht for the review!

5 years agoCycles: Fallback to diffuse BSDF for the indirect SSS rays when BSSRDF is hit
Sergey Sharybin [Sat, 28 Nov 2015 10:38:12 +0000 (15:38 +0500)]
Cycles: Fallback to diffuse BSDF for the indirect SSS rays when BSSRDF is hit

This is actually how it was intended to work, just didn't notice it wasn't
really happening in the main ray loop.

Solves some memory issues reported in T46880.

5 years agoCycles: Fix missing indirect subsurface initialization in the bake code
Sergey Sharybin [Sat, 28 Nov 2015 10:36:42 +0000 (15:36 +0500)]
Cycles: Fix missing indirect subsurface initialization in the bake code

5 years agoOpenGL: remove unnecessarily paranoid bound texture preservation.
Brecht Van Lommel [Sat, 28 Nov 2015 00:45:23 +0000 (01:45 +0100)]
OpenGL: remove unnecessarily paranoid bound texture preservation.

5 years agoOpenGL: assume GL_TEXTURE_ENV_MODE GL_MODULATE is the default state.
Brecht Van Lommel [Sat, 28 Nov 2015 00:09:13 +0000 (01:09 +0100)]
OpenGL: assume GL_TEXTURE_ENV_MODE GL_MODULATE is the default state.

5 years agoOpenGL: set OpenGL lights through simple shader API.
Brecht Van Lommel [Fri, 27 Nov 2015 20:08:48 +0000 (21:08 +0100)]
OpenGL: set OpenGL lights through simple shader API.

5 years agoOpenGL: update simple shader API.
Brecht Van Lommel [Fri, 27 Nov 2015 20:06:23 +0000 (21:06 +0100)]
OpenGL: update simple shader API.

Restore fixed function lighting code for now and control use of GLSL shader
with a variable, make light types more clear, reduce state changes, some other
minor tweaks.

5 years agoOpenGL: rename GPU_enable_material to better indicate it's binding shaders.
Brecht Van Lommel [Mon, 23 Nov 2015 20:42:17 +0000 (21:42 +0100)]
OpenGL: rename GPU_enable_material to better indicate it's binding shaders.

5 years agoFix a regression introduced by on video playing
Ulysse Martin [Sat, 28 Nov 2015 13:55:38 +0000 (14:55 +0100)]
Fix a regression introduced by on video playing

Fix a regression introduced by on video playing

Look at @mariomey example file.

Reviewers: panzergame

Subscribers: mariomey

Projects: #game_engine

Differential Revision:

5 years agoFix possible hang on buffer allocation failure. Reported by coverity
Antony Riakiotakis [Sat, 28 Nov 2015 08:29:57 +0000 (09:29 +0100)]
Fix possible hang on buffer allocation failure. Reported by coverity
scan, thanks...errr.

5 years agoBMesh: pass loops instead of edges/verts to filter funcs
Campbell Barton [Sat, 28 Nov 2015 02:40:18 +0000 (13:40 +1100)]
BMesh: pass loops instead of edges/verts to filter funcs

This allows to check the source face we're walking over.

5 years agoBMesh: use typed filter callbacks (const args too)
Campbell Barton [Sat, 28 Nov 2015 02:37:02 +0000 (13:37 +1100)]
BMesh: use typed filter callbacks (const args too)

5 years agoOpenGL: fix cycles texture draw mode not respecting double sided lighting.
Brecht Van Lommel [Fri, 27 Nov 2015 01:29:57 +0000 (02:29 +0100)]
OpenGL: fix cycles texture draw mode not respecting double sided lighting.

5 years agoFix T46883: VSE Meta Strip crash on leaving Meta editing (tab).
Bastien Montagne [Fri, 27 Nov 2015 20:38:03 +0000 (21:38 +0100)]
Fix T46883: VSE Meta Strip crash on leaving Meta editing (tab).

Own stupid copy/paste error in recent commit.

5 years agoFix T46827: Appending Specific Groups Doesn't Work on Windows.
Bastien Montagne [Fri, 27 Nov 2015 20:15:00 +0000 (21:15 +0100)]
Fix T46827: Appending Specific Groups Doesn't Work on Windows.

Issue was with datablocks which names would include '/', new filebrowser filelisting code
would cleanup the entire filepath, hence giving invalid filename in this case.

That 'path separator in ID names' bit us already in lib/datatype/datablock separating func,
this is really stupid to allow that in something handled as a filepath imho, but well...

Note: would have break the same under *nix with '\' char.