blender.git
19 months agoMerge branch 'master' into blender2.8
Bastien Montagne [Fri, 16 Feb 2018 10:51:41 +0000 (11:51 +0100)]
Merge branch 'master' into blender2.8

19 months agoFix bplayer (c)
Bastien Montagne [Fri, 16 Feb 2018 09:42:43 +0000 (10:42 +0100)]
Fix bplayer (c)

19 months agoFix part II of T53977: Severe problem with multiple instances of a library (save...
Bastien Montagne [Fri, 16 Feb 2018 09:31:03 +0000 (10:31 +0100)]
Fix part II of T53977: Severe problem with multiple instances of a library (save and reload).

Once 'losing lib' issue is fixed (in previous commit), we have new issue
that this could lead to several copies of the same linked data-block in
.blend file. Which is not good. At all.

So had to add a GHash-based check in libraries reading code to ensure we
only load a same ID from a same lib once.

19 months agoFix part I of T53977: Severe problem with multiple instances of a library (save and...
Bastien Montagne [Tue, 13 Feb 2018 19:58:40 +0000 (20:58 +0100)]
Fix part I of T53977: Severe problem with multiple instances of a library (save and reload).

The issue was that when a same lib was found several times in loaded
.blend, we'd only keep the first occurence. But since Blender expects
next data-blocks to belong to last found library, we could actually
be adding data-blocks assigned to copies of the duplicated lib to
another, totally unrelated lib.

Those data-blocks were then obviously not found when actually loading
libs content, and lost.

Note that this only fix one part of the issue, current code can
generate several copies of same linked data-block now, will fix in
another commit.

19 months agoMetalball drawing: rename mball helpers to handles
Germano [Fri, 16 Feb 2018 04:01:09 +0000 (02:01 -0200)]
Metalball drawing: rename mball helpers to handles

and also rename some related functions

19 months agoCleanup: quiet warning
Campbell Barton [Thu, 15 Feb 2018 22:14:25 +0000 (09:14 +1100)]
Cleanup: quiet warning

19 months agoGWN: Fix ubo debug printf
Clément Foucault [Thu, 15 Feb 2018 18:15:11 +0000 (19:15 +0100)]
GWN: Fix ubo debug printf

19 months agoGWN: Fix attrib arrays giving incorrect name depending on the platform.
Clément Foucault [Thu, 15 Feb 2018 18:14:46 +0000 (19:14 +0100)]
GWN: Fix attrib arrays giving incorrect name depending on the platform.

It seems that some opengl implementations are returning "[0]" after array names but some others dont.

Remove the "[0]" so everything is consistent.

19 months agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Thu, 15 Feb 2018 17:15:00 +0000 (18:15 +0100)]
Merge branch 'master' into blender2.8

19 months agoCode cleanup: simplify switch statement, ensure we catch missing enums.
Brecht Van Lommel [Thu, 15 Feb 2018 17:13:07 +0000 (18:13 +0100)]
Code cleanup: simplify switch statement, ensure we catch missing enums.

19 months agoFix T54073: crash and uninitialized memory in Cycles displacement hashing.
Brecht Van Lommel [Thu, 15 Feb 2018 14:28:34 +0000 (15:28 +0100)]
Fix T54073: crash and uninitialized memory in Cycles displacement hashing.

19 months agoFix crash reading deg_point_cache_transform.blend test, saved with 2.8.
Brecht Van Lommel [Thu, 15 Feb 2018 15:25:37 +0000 (16:25 +0100)]
Fix crash reading deg_point_cache_transform.blend test, saved with 2.8.

In general 2.8 files may not be readable in master, but might as well fix
this case so all the lib/tests can be opened still.

19 months agoCleanup: Remove debug-only code
Sergey Sharybin [Thu, 15 Feb 2018 16:57:44 +0000 (17:57 +0100)]
Cleanup: Remove debug-only code

19 months agoFix T54076: MCE in Graph mode - clip.graph_select_border does not work by header...
Sergey Sharybin [Thu, 15 Feb 2018 15:56:49 +0000 (16:56 +0100)]
Fix T54076: MCE in Graph mode - clip.graph_select_border does not work by header menu

While the script should be using INVOKE_PREVIEW for operators in clip view,
window manager was lacking some switch statements.

Thanks Brecht fore review!

19 months agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 15 Feb 2018 14:17:43 +0000 (01:17 +1100)]
Merge branch 'master' into blender2.8

19 months agoCleanup: rename BLI_thread.h API
Campbell Barton [Thu, 15 Feb 2018 14:13:46 +0000 (01:13 +1100)]
Cleanup: rename BLI_thread.h API

- Use BLI_threadpool_ prefix for (deprecated)
  thread/listbase API.
- Use BLI_thread as prefix for other functions.

See P614 to apply instead of manually resolving conflicts.

19 months agoMerge branch 'master' into blender2.8
Sergey Sharybin [Thu, 15 Feb 2018 13:15:55 +0000 (14:15 +0100)]
Merge branch 'master' into blender2.8

19 months agoCleanup: use '_len' instead of '_size' w/ BLI API
Campbell Barton [Thu, 15 Feb 2018 12:36:11 +0000 (23:36 +1100)]
Cleanup: use '_len' instead of '_size' w/ BLI API

- When returning the number of items in a collection use BLI_*_len()
- Keep _size() for size in bytes.
- Keep _count() for data structures that don't store length
  (hint this isn't a simple getter).

See P611 to apply instead of manually resolving conflicts.

19 months agoCleanup: Style, braces with macros
Sergey Sharybin [Thu, 15 Feb 2018 11:41:35 +0000 (12:41 +0100)]
Cleanup: Style, braces with macros

See https://wiki.blender.org/index.php/Dev:Doc/Code_Style#Braces_with_Macros

19 months agoCleanup: Remove BLI_ prefix from listbase macro
Sergey Sharybin [Thu, 15 Feb 2018 11:38:21 +0000 (12:38 +0100)]
Cleanup: Remove BLI_ prefix from listbase macro

This is kind of doesn't matter where macro itself is defined.

We should stick to the following:

- If some macro is actually more an inline function, follow regular
  function name conventions.
- If macro is a macro, type it in capitals. Use module prefix if that
  helps readability or it if helps avoiding accidents.

19 months agoMerge branch 'master' into blender2.8
Sergey Sharybin [Thu, 15 Feb 2018 11:33:44 +0000 (12:33 +0100)]
Merge branch 'master' into blender2.8

19 months agoSimple hair children: Make twist affected by texture
Sergey Sharybin [Thu, 15 Feb 2018 10:22:44 +0000 (11:22 +0100)]
Simple hair children: Make twist affected by texture

This completes twist feature, which is now possible to also control by
texture. Since textures can not easily contain negative values as well,
same trick with 0.5 neutral as vertex groups is used.

All in all, this twist features allows to do following things.

Original hair:

{F2287535}

Hair with scientifically calculated twist value of 0.5:

{F2287540}

And we can also twist braids in opposite directions dependent on left/right
side:

{F2287548}

19 months agoFix T54078: Adding subsurf prior to particle system breaks simple children vgroups...
Sergey Sharybin [Thu, 15 Feb 2018 09:27:39 +0000 (10:27 +0100)]
Fix T54078: Adding subsurf prior to particle system breaks simple children vgroups and textures

cpa->num points to a face index on BASE mesh, but get_child_modifier_parameters()
expects index on a FINAL dm. So wrong index was used here.

19 months agoSimple hair children: Make twist affected by vertex group
Sergey Sharybin [Wed, 14 Feb 2018 15:46:29 +0000 (16:46 +0100)]
Simple hair children: Make twist affected by vertex group

The idea is to give a control over direction of twist, and maybe amount of
twist as well. More concrete example: make braids on left and right side of
character head to be twisting opposite directions.

Now, tricky part: we need some negative values to flip direction, but weights
can not be negative. So we use same trick as displacement map and tangent normal
maps, where 0.5 is neutral, values below 0.5 are considered negative and values
above 0.5 are considered positive.

19 months agoSimple hair children: Initial implementation of twist control
Sergey Sharybin [Wed, 14 Feb 2018 13:33:53 +0000 (14:33 +0100)]
Simple hair children: Initial implementation of twist control

It allows to have children hair to be twisted around parent curve, which is
quite an essential feature when creating hair braids.

There are currently two controls:

- Number of turns around parent children.
- Influence curve, which allows to modify "twistness" along the strand.

19 months agoBlenlib: Assert when attempting to rotate point around vector and store result in...
Sergey Sharybin [Wed, 14 Feb 2018 13:29:37 +0000 (14:29 +0100)]
Blenlib: Assert when attempting to rotate point around vector and store result in the point

This isn't supported since there are subsequent reads to all point coordinates
after modification started.

Probably we need to create a temp copy of point, but that's like extra CPU
ticks.

19 months agoParticles: Wrap insane amount of arguments to child modifier evaluation
Sergey Sharybin [Wed, 14 Feb 2018 11:33:34 +0000 (12:33 +0100)]
Particles: Wrap insane amount of arguments to child modifier evaluation

Use single structure. It seems we will need to pass more information soon,
so better to do it via the structure.

19 months agoAvoid unnecessary sqrt calls
Campbell Barton [Thu, 15 Feb 2018 10:38:24 +0000 (21:38 +1100)]
Avoid unnecessary sqrt calls

19 months agoFix crash when rendering particles with cycles
Mai Lavelle [Tue, 13 Feb 2018 07:26:07 +0000 (02:26 -0500)]
Fix crash when rendering particles with cycles

view_layer is NULL when the render engine is created, this gets passed
around and ends up in this code causing a crash. This should be reverted
after the render engine api is updated to set view_layer.

19 months agoMake particle edit draw mode a noop
Mai Lavelle [Tue, 13 Feb 2018 07:11:23 +0000 (02:11 -0500)]
Make particle edit draw mode a noop

Seems this was just a template, but that template painted everything
green. Not sure what this draw mode should do really.

19 months agoFix lack of particles updates and disappearing particles
Mai Lavelle [Sat, 10 Feb 2018 07:40:41 +0000 (02:40 -0500)]
Fix lack of particles updates and disappearing particles

The conditionals in particle code are... some sort of madness... I'm not
even sure what the correct behavior should be from looking at it.

In this case the path cache generation was being skipped in edit mode.

19 months agoTag update when using particle edit brushes
Mai Lavelle [Fri, 9 Feb 2018 02:37:03 +0000 (21:37 -0500)]
Tag update when using particle edit brushes

19 months agoFix crash with particle cut brush and other brushes
Mai Lavelle [Thu, 8 Feb 2018 05:15:09 +0000 (00:15 -0500)]
Fix crash with particle cut brush and other brushes

Why is bedit->data.context NULL?

19 months agoStart bringing back particle edit
Mai Lavelle [Thu, 8 Feb 2018 03:18:38 +0000 (22:18 -0500)]
Start bringing back particle edit

Its kind of broken, but have to start somewhere

19 months agoAdd versioning code to make particles with default size visible again
Mai Lavelle [Wed, 7 Feb 2018 03:55:15 +0000 (22:55 -0500)]
Add versioning code to make particles with default size visible again

Due to changes in draw code particles from old files that may have had a
default draw size of 0 will not be visible. Old draw code would check
for this and adjust the size, however the unit for draw size has changed
from pixels to BU, and it no longer makes sense to have such checks.

This patch is to ensure particles from such files remain visible.

19 months agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 15 Feb 2018 07:05:02 +0000 (18:05 +1100)]
Merge branch 'master' into blender2.8

19 months agoCleanup: style, warning
Campbell Barton [Thu, 15 Feb 2018 07:03:55 +0000 (18:03 +1100)]
Cleanup: style, warning

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

19 months agoCleanup: style
Campbell Barton [Thu, 15 Feb 2018 00:13:54 +0000 (11:13 +1100)]
Cleanup: style

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

19 months agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Wed, 14 Feb 2018 20:49:13 +0000 (21:49 +0100)]
Merge branch 'master' into blender2.8

19 months agoCycles: restore Particle Info Index for now, keep it next to Random.
Brecht Van Lommel [Wed, 14 Feb 2018 16:02:28 +0000 (17:02 +0100)]
Cycles: restore Particle Info Index for now, keep it next to Random.

It seems to be useful still in cases where the particle are distributed in
a particular order or pattern, to colorize them along with that. This isn't
really well defined, but might as well avoid breaking backwards compatibility
for now.

19 months agoEevee: Fix broken AO and Contact shadows on certain platform.
Clément Foucault [Wed, 14 Feb 2018 18:02:03 +0000 (19:02 +0100)]
Eevee: Fix broken AO and Contact shadows on certain platform.

This was caused by ce0f70fbd62fc812a2508c27a2f392cde0acbdfa

19 months agoDRW: Refactor: Less feature duplication with Gwn.
Clément Foucault [Wed, 14 Feb 2018 17:59:15 +0000 (18:59 +0100)]
DRW: Refactor: Less feature duplication with Gwn.

This removes the need of custom attribs for instancing.
Instancing works fully with dynamic batches & Gwn_VertFormat now.

This is in prevision of the VAO manager patch.

19 months agoDRW: Add instance buffer manager.
Clément Foucault [Wed, 14 Feb 2018 17:16:52 +0000 (18:16 +0100)]
DRW: Add instance buffer manager.

This manager allows to distribute existing batches for instancing
attributes. This reduce the number of batches creation.
Querying a batch is done with a vertex format. This format should
be static so that it's pointer never changes (because we are using
this pointer as identifier [we don't want to check the full format
that would be too slow]).

This might make the original Instance Data manager useless but it's currently used by DRW_object_engine_data_ensure().

19 months agoGWN: Add new dynamic type of batches and remove
Clément Foucault [Wed, 14 Feb 2018 16:59:48 +0000 (17:59 +0100)]
GWN: Add new dynamic type of batches and remove

Theses batches keeps their memory chuck allocated after transfer to be reused and updated very often.

NOTE: This commit break instancing in DRW. (it's fixed in the next commit)

19 months agoGWN: Add GWN_batch_draw_procedural
Clément Foucault [Wed, 14 Feb 2018 16:55:01 +0000 (17:55 +0100)]
GWN: Add GWN_batch_draw_procedural

This allow to drawn large amounts of primitives without any memory footprint.

19 months agoGWN: Allow drawing instances without batch_instancing
Clément Foucault [Wed, 14 Feb 2018 16:52:19 +0000 (17:52 +0100)]
GWN: Allow drawing instances without batch_instancing

19 months agoDRW: Refactor: Make use of the new Gawain long attrib support.
Clément Foucault [Sun, 11 Feb 2018 15:15:46 +0000 (16:15 +0100)]
DRW: Refactor: Make use of the new Gawain long attrib support.

19 months agoGWN: Extend support for multiple of 4 components in batches.
Clément Foucault [Sun, 11 Feb 2018 14:33:39 +0000 (15:33 +0100)]
GWN: Extend support for multiple of 4 components in batches.

19 months agoGWN: Fix style and line of code that does nothing!
Clément Foucault [Sun, 11 Feb 2018 04:15:26 +0000 (05:15 +0100)]
GWN: Fix style and line of code that does nothing!

19 months agoGWN: Add support for 4x4 Matrices and instancing attributes.
Clément Foucault [Sun, 11 Feb 2018 04:14:35 +0000 (05:14 +0100)]
GWN: Add support for 4x4 Matrices and instancing attributes.

Only support float matrices specifically for code simplicity.

19 months agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Wed, 14 Feb 2018 14:16:50 +0000 (15:16 +0100)]
Merge branch 'master' into blender2.8

19 months agoCycles: change Index output of Hair and Particle Info to Random, in 0..1 range.
Brecht Van Lommel [Wed, 14 Feb 2018 13:32:38 +0000 (14:32 +0100)]
Cycles: change Index output of Hair and Particle Info to Random, in 0..1 range.

These are used for randomization, so it's convenient if the index is already
hashed and consistent with the Object Info node.

19 months agoGPU: use alpha blend that works for drawing to transparent buffer.
Brecht Van Lommel [Wed, 14 Feb 2018 00:01:29 +0000 (01:01 +0100)]
GPU: use alpha blend that works for drawing to transparent buffer.

It's unlikely to ever be intentional to square the source alpha, as happens
with glBlendFunc, so this changes the blending throughout the code.

19 months agoGPU: don't use multisample for entire window, only for offscreen 3D viewport.
Brecht Van Lommel [Tue, 13 Feb 2018 18:15:34 +0000 (19:15 +0100)]
GPU: don't use multisample for entire window, only for offscreen 3D viewport.

Now that the new 3D viewport draws to a multisample offscreen buffer, there is
no good reason anymore to create an entire multisample window and pay the
performance/memory cost for other regions that don't need it.

GL_MULTISAMPLE now only gets enabled for offscreen buffers, so we don't need
to check for it throughout the UI code anymore.

Differential Revision: https://developer.blender.org/D3062

19 months agoFix incorrect RNA path to view_render settings.
Brecht Van Lommel [Wed, 14 Feb 2018 12:31:16 +0000 (13:31 +0100)]
Fix incorrect RNA path to view_render settings.

19 months agoCode cleanup: simplify subwindow code.
Brecht Van Lommel [Wed, 14 Feb 2018 02:08:58 +0000 (03:08 +0100)]
Code cleanup: simplify subwindow code.

19 months agoParticles: Avoid multiple function declarations in multiple places
Sergey Sharybin [Wed, 14 Feb 2018 10:52:58 +0000 (11:52 +0100)]
Particles: Avoid multiple function declarations in multiple places

This makes it really hard to spot errors when function signature changes.

19 months agoParticles: Cleanup, remove trailign whitespace
Sergey Sharybin [Wed, 14 Feb 2018 10:46:33 +0000 (11:46 +0100)]
Particles: Cleanup, remove trailign whitespace

19 months agoHair child: Use clamp function to clamp curve evaluation
Sergey Sharybin [Wed, 14 Feb 2018 10:36:46 +0000 (11:36 +0100)]
Hair child: Use clamp function to clamp curve evaluation

Avoids redundant calls to the curve evaluation.

19 months agoMath utils: Add clamping functions
Sergey Sharybin [Wed, 14 Feb 2018 10:21:27 +0000 (11:21 +0100)]
Math utils: Add clamping functions

19 months agoCMake: Expose Cycles devices support as CMake option
Sergey Sharybin [Wed, 14 Feb 2018 09:31:04 +0000 (10:31 +0100)]
CMake: Expose Cycles devices support as CMake option

Handy to disable GPU based devices when it's needed to run Valgrind.

19 months agoCMake: Fix cimpilation error when CUDA dynload is disabled but toolkit is not installed
Sergey Sharybin [Wed, 14 Feb 2018 09:20:26 +0000 (10:20 +0100)]
CMake: Fix cimpilation error when CUDA dynload is disabled but toolkit is not installed

19 months agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 14 Feb 2018 05:04:07 +0000 (16:04 +1100)]
Merge branch 'master' into blender2.8

19 months agoCleanup: use prefix for tests
Campbell Barton [Wed, 14 Feb 2018 05:02:21 +0000 (16:02 +1100)]
Cleanup: use prefix for tests

Allows for running all `bmesh_*` or `object_*` tests.

19 months agoObject Mode: remove Scene.obedit
Campbell Barton [Tue, 13 Feb 2018 21:39:10 +0000 (08:39 +1100)]
Object Mode: remove Scene.obedit

This means we can support having the same scene in different windows
with different edit-objects.

19 months agoGPU: add offscreen buffer drawing utility functions.
Brecht Van Lommel [Tue, 13 Feb 2018 17:18:04 +0000 (18:18 +0100)]
GPU: add offscreen buffer drawing utility functions.

19 months agoCode cleanup: stop using rectangle textures in window draw, simplify code.
Brecht Van Lommel [Tue, 13 Feb 2018 17:09:58 +0000 (18:09 +0100)]
Code cleanup: stop using rectangle textures in window draw, simplify code.

19 months agoCode cleanup: fix incorrect reading of GL scissor coordinates.
Brecht Van Lommel [Mon, 12 Feb 2018 20:32:45 +0000 (21:32 +0100)]
Code cleanup: fix incorrect reading of GL scissor coordinates.

These are often the same as the viewport, but not always.

19 months agoCode cleanup: remove unneeded gla* 2D drawing functions.
Brecht Van Lommel [Tue, 13 Feb 2018 02:57:28 +0000 (03:57 +0100)]
Code cleanup: remove unneeded gla* 2D drawing functions.

19 months agoFix blenderplayer build.
Brecht Van Lommel [Tue, 13 Feb 2018 19:01:46 +0000 (20:01 +0100)]
Fix blenderplayer build.

19 months agoMerge branch 'master' into blender2.8
Campbell Barton [Tue, 13 Feb 2018 14:06:41 +0000 (01:06 +1100)]
Merge branch 'master' into blender2.8

19 months agoAdd ED_object_editmode_exit_ex
Campbell Barton [Tue, 13 Feb 2018 13:38:13 +0000 (00:38 +1100)]
Add ED_object_editmode_exit_ex

Allow exiting editmode from non-active scene.

19 months agoCycles: Implement index output for hair node
Sergey Sharybin [Tue, 13 Feb 2018 13:20:47 +0000 (14:20 +0100)]
Cycles: Implement index output for hair node

This is like the only way to add variety to hair which is created
using simple children. Used here for the hair.

Maybe not ideal, but the time will show.

19 months agoFix T54064: Can't create new Cycles materials
Mai Lavelle [Tue, 13 Feb 2018 11:57:57 +0000 (06:57 -0500)]
Fix T54064: Can't create new Cycles materials

Was caused by object mode removal

19 months agoObject Mode: remove Scene.obedit for RNA
Campbell Barton [Tue, 13 Feb 2018 10:06:51 +0000 (21:06 +1100)]
Object Mode: remove Scene.obedit for RNA

19 months agoObject Mode: Loop over objects for ED_editors_exit
Campbell Barton [Tue, 13 Feb 2018 10:00:26 +0000 (21:00 +1100)]
Object Mode: Loop over objects for ED_editors_exit

We could loop over active objects but this ensures don't miss any
and avoids complicated context checks.

19 months agoObject Mode: remove Scene.obedit
Campbell Barton [Tue, 13 Feb 2018 09:35:29 +0000 (20:35 +1100)]
Object Mode: remove Scene.obedit

Add ED_screen_window_find, BKE_workspace_edit_object

19 months agoObject Mode: remove Scene.obedit for 3D View
Campbell Barton [Tue, 13 Feb 2018 08:29:08 +0000 (19:29 +1100)]
Object Mode: remove Scene.obedit for 3D View

19 months agoObject Mode: pass edit-object to outliner drawing
Campbell Barton [Tue, 13 Feb 2018 07:44:53 +0000 (18:44 +1100)]
Object Mode: pass edit-object to outliner drawing

Also add 'OBEDIT_FROM_EVAL_CTX' macro.

19 months agoObject Mode: pass edit-object to UV API
Campbell Barton [Tue, 13 Feb 2018 07:29:49 +0000 (18:29 +1100)]
Object Mode: pass edit-object to UV API

19 months agoObject Mode: remove Scene.obedit in draw manager
Campbell Barton [Tue, 13 Feb 2018 07:15:47 +0000 (18:15 +1100)]
Object Mode: remove Scene.obedit in draw manager

Part of larger change to remove this variable entirely.

19 months ago(Nodes) Display image name if any in the Cycles Image and Environment Texture node...
Ines Almeida [Mon, 12 Feb 2018 23:58:26 +0000 (00:58 +0100)]
(Nodes) Display image name if any in the Cycles Image and Environment Texture node title

19 months agoFix random walk SSS issues with different base and subsurface color.
Brecht Van Lommel [Mon, 12 Feb 2018 20:08:59 +0000 (21:08 +0100)]
Fix random walk SSS issues with different base and subsurface color.

Burley SSS uses a bit of strange thing where the albedo and closure weight are
different, which makes the subsurface color act a bit like a subsurface radius
indirectly by the way the Burley SSS profile works.

This can't work for random walk SSS though, and it's not clear to me that this
is actually a good idea since it's really the subsurface radius that is supposed
to control this. For now I'll leave Burley SSS working the same to not break
backwards compatibility.

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

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

19 months agoBuildbot: Remove usage of deprecated chroot
Sergey Sharybin [Mon, 12 Feb 2018 16:55:38 +0000 (17:55 +0100)]
Buildbot: Remove usage of deprecated chroot

19 months agoAdd boolean regression test.
Howard Trickey [Mon, 12 Feb 2018 12:23:23 +0000 (07:23 -0500)]
Add boolean regression test.

19 months agoFix T54032: Adding torus test fails
Campbell Barton [Mon, 12 Feb 2018 08:39:52 +0000 (19:39 +1100)]
Fix T54032: Adding torus test fails

rna_LayerObjects_active_object_update used wrong viewlayer.

Regression in 345c6298e99

19 months agoMerge branch 'master' into blender2.8
Campbell Barton [Mon, 12 Feb 2018 06:57:46 +0000 (17:57 +1100)]
Merge branch 'master' into blender2.8

19 months agoError in last commit, disable cycles when not enabled
Campbell Barton [Mon, 12 Feb 2018 06:56:14 +0000 (17:56 +1100)]
Error in last commit, disable cycles when not enabled

Would only disable when loading old preferences.

19 months agoMerge branch 'master' into blender2.8
Campbell Barton [Mon, 12 Feb 2018 06:39:58 +0000 (17:39 +1100)]
Merge branch 'master' into blender2.8

19 months agoDisable cycles when WITH_CYCLES=OFF
Campbell Barton [Mon, 12 Feb 2018 06:37:39 +0000 (17:37 +1100)]
Disable cycles when WITH_CYCLES=OFF

19 months agoBKE_addon: new/free/ensure functions
Campbell Barton [Mon, 12 Feb 2018 06:24:18 +0000 (17:24 +1100)]
BKE_addon: new/free/ensure functions

19 months agoGHOST: Optimize and simplify the creation of a GHOST_Context on Windows
Germano [Sat, 10 Feb 2018 02:32:13 +0000 (00:32 -0200)]
GHOST: Optimize and simplify the creation of a GHOST_Context on Windows

Instead of cloning the window to create dummyHWNDs and dummyHDCs to avoid calling the SetPixelFormat more than once in the same window, use the original window and HDC and do not call the SetPixelFormat again.

In addition to avoiding a lot of unnecessary calls, it simplifies the code and makes it match the others OS

19 months agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Fri, 9 Feb 2018 19:36:37 +0000 (20:36 +0100)]
Merge branch 'master' into blender2.8

19 months agoEevee: Film filter default to 1.5 instead of 1.0
Dalai Felinto [Fri, 9 Feb 2018 19:05:43 +0000 (17:05 -0200)]
Eevee: Film filter default to 1.5 instead of 1.0

Cycles already uses 1.5 as default. BI original 1.0 filter doesn't look good for
Eevee. The ideal scenario would be for both Cycles AND Eevee to use the same DNA
setting.

But for now it is nice to at least have Eevee renders to look better by default.

Note: This handles doversion for 2.7x files only. Files previously created in
2.8 need to be manually corrected.

19 months agoCycles: add random walk subsurface scattering to Principled BSDF.
Brecht Van Lommel [Thu, 8 Feb 2018 15:19:04 +0000 (16:19 +0100)]
Cycles: add random walk subsurface scattering to Principled BSDF.

Differential Revision: https://developer.blender.org/D3054

19 months agoCycles: random walk subsurface scattering.
Brecht Van Lommel [Sun, 21 Jan 2018 13:04:22 +0000 (14:04 +0100)]
Cycles: random walk subsurface scattering.

It is basically brute force volume scattering within the mesh, but part
of the SSS code for faster performance. The main difference with actual
volume scattering is that we assume the boundaries are diffuse and that
all lighting is coming through this boundary from outside the volume.

This gives much more accurate results for thin features and low density.
Some challenges remain however:

* Significantly more noisy than BSSRDF. Adding Dwivedi sampling may help
  here, but it's unclear still how much it helps in real world cases.
* Due to this being a volumetric method, geometry like eyes or mouth can
  darken the skin on the outside. We may be able to reduce this effect,
  or users can compensate for it by reducing the scattering radius in
  such areas.
* Sharp corners are quite bright. This matches actual volume rendering
  and results in some other renderers, but maybe not so much real world
  objects.

Differential Revision: https://developer.blender.org/D3054

19 months agoMerge branch 'master' into blender2.8
Bastien Montagne [Fri, 9 Feb 2018 16:24:23 +0000 (17:24 +0100)]
Merge branch 'master' into blender2.8