blender.git
2 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Fri, 9 Nov 2018 14:22:21 +0000 (15:22 +0100)]
Merge branch 'master' into blender2.8

2 years agoCycles: Cleanup, remove unused method declaration
Sergey Sharybin [Fri, 9 Nov 2018 14:21:19 +0000 (15:21 +0100)]
Cycles: Cleanup, remove unused method declaration

Was never defined. If it's really needed, consider using `const string&`.

2 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Fri, 9 Nov 2018 13:34:33 +0000 (14:34 +0100)]
Merge branch 'master' into blender2.8

2 years agoFix crash when renaming metaballs
Dalai Felinto [Fri, 9 Nov 2018 12:59:12 +0000 (10:59 -0200)]
Fix crash when renaming metaballs

This handles both renaming via outliner and rna.

Metaballs as we all know have their geometry based on the metaballs that
share the same name with them.

Changing the name of a metaball without tagging its geometry to change
is asking for trouble.

2 years agoBKE_id_is_in_gobal_main > BKE_id_is_in_global_main
Dalai Felinto [Fri, 9 Nov 2018 12:44:02 +0000 (10:44 -0200)]
BKE_id_is_in_gobal_main > BKE_id_is_in_global_main

2 years agoGreasepencil: double promotion cleanup and related
Dalai Felinto [Fri, 9 Nov 2018 12:01:22 +0000 (10:01 -0200)]
Greasepencil: double promotion cleanup and related

2 years agoGreasePencil: division by zero when stroke has one point
Dalai Felinto [Fri, 9 Nov 2018 11:57:37 +0000 (09:57 -0200)]
GreasePencil: division by zero when stroke has one point

Error "runtime error: division by zero" when opening:
"Sketch 1 demo by Brain Graft.blend"

2 years agoImprovements on CURVE_OT_select_similar: SIMCURHAND_DIRECTION
Habib Gahbiche [Fri, 9 Nov 2018 11:25:14 +0000 (09:25 -0200)]
Improvements on CURVE_OT_select_similar: SIMCURHAND_DIRECTION

Consider rotation and scale when calculating direction in world space.

Reviewers: dfelinto
Maniphest Tasks: T56948

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

2 years agoUI: Fix checking for sequences.
Pablo Vazquez [Fri, 9 Nov 2018 11:39:17 +0000 (12:39 +0100)]
UI: Fix checking for sequences.

2 years agoCycles; Cleanup, line length
Sergey Sharybin [Fri, 9 Nov 2018 11:31:46 +0000 (12:31 +0100)]
Cycles; Cleanup, line length

There are some more sanitization which would be cool to be done
in the neighbourhood of those functions, but that could also happen
later.

2 years agoCycles: Cleanup, move Embree BVH logic to own file
Sergey Sharybin [Fri, 9 Nov 2018 11:28:55 +0000 (12:28 +0100)]
Cycles: Cleanup, move Embree BVH logic to own file

There is no way we can keep generic entry point functions easy to
follow if we start adding actual logic in them.

2 years agoCycles: Cleanup, indentation in preprocessor
Sergey Sharybin [Fri, 9 Nov 2018 11:12:11 +0000 (12:12 +0100)]
Cycles: Cleanup, indentation in preprocessor

2 years agoCycles: Cleanup, indentation
Sergey Sharybin [Fri, 9 Nov 2018 11:10:48 +0000 (12:10 +0100)]
Cycles: Cleanup, indentation

2 years agoCycles: Cleanup, space after (void)
Sergey Sharybin [Fri, 9 Nov 2018 11:08:51 +0000 (12:08 +0100)]
Cycles: Cleanup, space after (void)

It was used in like 95% of places.

2 years agoPy API Docs: Warnings for some properties that are slower to access than expected.
Jacques Lucke [Fri, 9 Nov 2018 11:06:29 +0000 (12:06 +0100)]
Py API Docs: Warnings for some properties that are slower to access than expected.

2 years agoCycles: Cleanup, don't use strict C prototypes
Sergey Sharybin [Fri, 9 Nov 2018 11:01:38 +0000 (12:01 +0100)]
Cycles: Cleanup, don't use strict C prototypes

Those are more like a legacy of language, which is not
needed in C++.

2 years agoCycles: Cleanup, split array from vector
Sergey Sharybin [Fri, 9 Nov 2018 10:54:24 +0000 (11:54 +0100)]
Cycles: Cleanup, split array from vector

Those are similar but different types, no reason to keep
their definitions in a single file.

2 years agoUI: Fix bug when no sequencer strips were selected on a new scene.
Pablo Vazquez [Fri, 9 Nov 2018 10:53:09 +0000 (11:53 +0100)]
UI: Fix bug when no sequencer strips were selected on a new scene.

Reported by Tintwotin on DevTalk. Thanks!

2 years agoCycles: Cleanup, some documentation
Sergey Sharybin [Fri, 9 Nov 2018 10:46:09 +0000 (11:46 +0100)]
Cycles: Cleanup, some documentation

2 years agoCycles: Cleanup, remove unneeded manual constructors specification
Sergey Sharybin [Fri, 9 Nov 2018 10:44:33 +0000 (11:44 +0100)]
Cycles: Cleanup, remove unneeded manual constructors specification

2 years agoCycles: Cleanup, remove unneeded method from vector
Sergey Sharybin [Fri, 9 Nov 2018 10:37:56 +0000 (11:37 +0100)]
Cycles: Cleanup, remove unneeded method from vector

Since we've defaulted to C++11, no need to override this
method manually anymore.

2 years agoCycles: Cleanup, spacing after preprocessor
Sergey Sharybin [Fri, 9 Nov 2018 10:34:54 +0000 (11:34 +0100)]
Cycles: Cleanup, spacing after preprocessor

It is supposed to be two spaces before comment stating which if
else/endif statements corresponds to. Was mainly violated in the
header guards.

2 years agoCleanup, indentation
Sergey Sharybin [Thu, 8 Nov 2018 17:37:01 +0000 (18:37 +0100)]
Cleanup, indentation

2 years agoCorrect error in last commit
Campbell Barton [Fri, 9 Nov 2018 06:48:08 +0000 (17:48 +1100)]
Correct error in last commit

2 years agoIcons: rename gpencil
Campbell Barton [Fri, 9 Nov 2018 06:40:00 +0000 (17:40 +1100)]
Icons: rename gpencil

2 years agoIcons: update to r62155
Campbell Barton [Fri, 9 Nov 2018 06:31:09 +0000 (17:31 +1100)]
Icons: update to r62155

- Tweaked GP toolbar icons and added Line, Rectangle & Circle.
- Added the remaining toolbar icons for all our paint & sculpt modes.
- Made all the toolbar icons the same simple style.

2 years agoCleanup: de-duplicate poll function
Campbell Barton [Fri, 9 Nov 2018 06:18:38 +0000 (17:18 +1100)]
Cleanup: de-duplicate poll function

2 years agoTool System: add grease pencil primitive tool
Campbell Barton [Fri, 9 Nov 2018 06:05:32 +0000 (17:05 +1100)]
Tool System: add grease pencil primitive tool

2 years agoUI: Decrease the fade in/out time of regions with region overlap on.
Pablo Vazquez [Fri, 9 Nov 2018 02:26:42 +0000 (03:26 +0100)]
UI: Decrease the fade in/out time of regions with region overlap on.

2 years agoUI: tweak object type active state
Campbell Barton [Fri, 9 Nov 2018 02:18:50 +0000 (13:18 +1100)]
UI: tweak object type active state

The state of the objects visibility should only impact
the 'active' display of the select icon, not it's self.

2 years agoCleanup: use proportional edit template for keymap
Campbell Barton [Fri, 9 Nov 2018 02:07:01 +0000 (13:07 +1100)]
Cleanup: use proportional edit template for keymap

2 years agoCleanup: use tuple instead of dict
Campbell Barton [Fri, 9 Nov 2018 02:14:16 +0000 (13:14 +1100)]
Cleanup: use tuple instead of dict

This just loops over pairs so no mapping is needed.

2 years agoUI: Tweaks to Object Types Visibility popover.
Pablo Vazquez [Fri, 9 Nov 2018 01:58:25 +0000 (02:58 +0100)]
UI: Tweaks to Object Types Visibility popover.

Replace checkbox for visibility with eye icon instead.
Thanks a.monti and zebus3d for the help.

Closes T57714
Part of UI Paper Cuts T56950

2 years agoCleanup: de-duplicate keymap items
Campbell Barton [Fri, 9 Nov 2018 01:13:59 +0000 (12:13 +1100)]
Cleanup: de-duplicate keymap items

2 years agoUI: Name added LightProbe objects after their type.
Pablo Vazquez [Fri, 9 Nov 2018 01:16:26 +0000 (02:16 +0100)]
UI: Name added LightProbe objects after their type.

Just like Light objects do.

Thanks ThinkingPolygons from DevTalk forums for suggesting this!

See T56950

2 years agoreadme: remove 'game creation'.
Campbell Barton [Fri, 9 Nov 2018 00:51:40 +0000 (11:51 +1100)]
readme: remove 'game creation'.

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Fri, 9 Nov 2018 00:51:14 +0000 (11:51 +1100)]
Merge branch 'master' into blender2.8

2 years agoreadme: use name 'macOS'
Campbell Barton [Fri, 9 Nov 2018 00:49:49 +0000 (11:49 +1100)]
readme: use name 'macOS'

2 years agoKeymap: skip loading the keymap preset in background mode
Campbell Barton [Fri, 9 Nov 2018 00:43:45 +0000 (11:43 +1100)]
Keymap: skip loading the keymap preset in background mode

Caused a crash on exit and isn't needed.

2 years agoKeymap: move builtin keymaps from C to Python
Brecht Van Lommel [Thu, 8 Nov 2018 04:59:51 +0000 (15:59 +1100)]
Keymap: move builtin keymaps from C to Python

This should be purely an implementation change,
for end users there should be no functional difference.

The entire key configuration is in one file with ~5000 lines of code.
Mostly avoiding code duplication and preserve comments and utility
functions from the C code.
It's a bit long but for searching and editing it's also convenient to
have it all in one file.

Notes:

- Actual keymap is shared by blender / blender_legacy
  and stored in `keymap_data/blender_default.py`

  This only generates JSON-like data to be passed into
  `keyconfig_import_from_data`, allowing other presets to load and
  manipulate the default keymap.

- Each preset defines 'keyconfig_data'
  which can be shared between presets.

- Some of the utility functions for generating keymap items still
  need to be ported over to Python.

- Some keymap items can be made into loops (marked as TODO).

See: D3907

2 years agoEevee: Fix broken Vector Transform node
Clément Foucault [Thu, 8 Nov 2018 20:50:17 +0000 (21:50 +0100)]
Eevee: Fix broken Vector Transform node

The Camera to Object space matrix was not implemented in gpu_codegen.

2 years agoEevee: Add partial support for the Light Path Node
Clément Foucault [Thu, 8 Nov 2018 18:17:41 +0000 (19:17 +0100)]
Eevee: Add partial support for the Light Path Node

This makes it possible to tweak indirect lighting in the shader.

Only a subset of the outputs is supported and the ray depth has not exactly
the same meaning:

Is Camera : Supported.
Is Shadow : Supported.
Is Diffuse : Supported.
Is Glossy : Supported.
Is Singular : Not supported. Same as Is Glossy.
Is Reflection : Not supported. Same as Is Glossy.
Is Transmission : Not supported. Same as Is Glossy.
Ray Length : Not supported. Defaults to 1.0.
Ray Depth : Indicate the current bounce when baking the light cache.
Diffuse Depth : Same as Ray Depth but only when baking diffuse light.
Glossy Depth : Same as Ray Depth but only when baking specular light.
Transparent Depth : Not supported. Defaults to 0.
Transmission Depth : Not supported. Same as Glossy Depth.

Caveat: Is Glossy does not work with Screen Space Reflections but does work
with reflection planes (when used with SSR or not).
We have to render the world twice for that to work.

2 years agoEevee: Fix geometry node for environments and support true_normal
Clément Foucault [Thu, 8 Nov 2018 12:16:06 +0000 (13:16 +0100)]
Eevee: Fix geometry node for environments and support true_normal

Also minor cleanup for the Bump node.

2 years agoEevee: Fix refraction materials
Clément Foucault [Thu, 8 Nov 2018 12:07:22 +0000 (13:07 +0100)]
Eevee: Fix refraction materials

Fix refraction depth not working without ScreenSpace Refraction.
Fix ScreenSpace Refraction masking reflections.

2 years agoFix wrong selectability icon in viewport menu.
Brecht Van Lommel [Thu, 8 Nov 2018 18:06:42 +0000 (19:06 +0100)]
Fix wrong selectability icon in viewport menu.

2 years agoFix X-Ray option showing in LookDev mode, where it does nothing.
Brecht Van Lommel [Thu, 8 Nov 2018 17:58:00 +0000 (18:58 +0100)]
Fix X-Ray option showing in LookDev mode, where it does nothing.

2 years agoFix depsgraph console warning after recent changes.
Brecht Van Lommel [Thu, 8 Nov 2018 17:53:30 +0000 (18:53 +0100)]
Fix depsgraph console warning after recent changes.

2 years agoFix Cycles viewport render info overlapping other text.
Brecht Van Lommel [Thu, 25 Oct 2018 09:47:37 +0000 (11:47 +0200)]
Fix Cycles viewport render info overlapping other text.

Now it shows more compact info below the view/object name. Render time and
memory usage is left out, as in most cases this is not so important. These
could be added back optionally if needed.

2 years agoUI: Tweaks to Add menu in Video Sequencer Editor.
Pablo Vazquez [Thu, 8 Nov 2018 15:01:02 +0000 (16:01 +0100)]
UI: Tweaks to Add menu in Video Sequencer Editor.

Mainly organization and bringing it closer to the Add menu in the 3D Viewport.

* Icons for most top-level items when available.
* New Transitions menu for Cross, Gamma Cross and Wipe.
* Move Color and Text to top level. These options are used way too often to be in a submenu.
Having a menu with 2 entries defeats the purpose, so I've removed it for now. I checked if
add-ons used it and apparently not. It can be brought back if needed.
* Avoid empty dropdown in Scene/Mask/Clip. Solution is ugly for now and should be improved in C.
* Some effects couldn't be used without 1 or 2 strips selected, now the menu entry is grayed out accordingly.
* Some more icons for other menus.

2 years agoUI: Some icons for Image menu in Image editor.
Pablo Vazquez [Wed, 7 Nov 2018 17:16:04 +0000 (18:16 +0100)]
UI: Some icons for Image menu in Image editor.

2 years agoFix T57689: world nodes / texture not updating for Eevee.
Brecht Van Lommel [Thu, 8 Nov 2018 14:56:56 +0000 (15:56 +0100)]
Fix T57689: world nodes / texture not updating for Eevee.

Only do GPU material updates through depsgraph evaluation now. This was
already happening for material, just missing for the world.

2 years agoCleanup, compiler warnings in release mode
Sergey Sharybin [Thu, 8 Nov 2018 14:49:25 +0000 (15:49 +0100)]
Cleanup, compiler warnings in release mode

2 years agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Thu, 8 Nov 2018 14:13:43 +0000 (15:13 +0100)]
Merge branch 'master' into blender2.8

2 years agoCleanup, spelling
Sergey Sharybin [Wed, 7 Nov 2018 16:22:02 +0000 (17:22 +0100)]
Cleanup, spelling

2 years agoFix build on 32bit after Embree changes.
Brecht Van Lommel [Thu, 8 Nov 2018 13:48:54 +0000 (14:48 +0100)]
Fix build on 32bit after Embree changes.

2 years agoFix: show options of image empty only for image empties
Jacques Lucke [Thu, 8 Nov 2018 13:30:27 +0000 (14:30 +0100)]
Fix: show options of image empty only for image empties

2 years agoRNA: tag animation update when changing Action Extrapolation/Blend/etc.
Alexander Gavrilov [Thu, 8 Nov 2018 10:56:57 +0000 (13:56 +0300)]
RNA: tag animation update when changing Action Extrapolation/Blend/etc.

These fields affect the final result when using NLA.

2 years agoRNA API: ViewLayers: add name to LayerCollection struct.
Bastien Montagne [Thu, 8 Nov 2018 10:34:18 +0000 (11:34 +0100)]
RNA API: ViewLayers: add name to LayerCollection struct.

Just use Collection name (same as for material slots e.g.).

That way, one can access those by their names as well, in
LayerCollection.children ... collection property (yeah, collection,
collection, and moar collection).

2 years agoUI: fix glitch showing the redo panel
Campbell Barton [Thu, 8 Nov 2018 04:43:42 +0000 (15:43 +1100)]
UI: fix glitch showing the redo panel

2 years agobuild: add proper embree support to platform_win32.cmake
Ray Molenkamp [Thu, 8 Nov 2018 02:34:49 +0000 (19:34 -0700)]
build: add proper embree support to platform_win32.cmake

made the use of findpackage optional and add support for debug builds

2 years agobuild_environment: add debug libs for embree on windows
Ray Molenkamp [Thu, 8 Nov 2018 02:33:07 +0000 (19:33 -0700)]
build_environment: add debug libs for embree on windows

2 years agobuild_deps_windows: add option to to only create project files.
Ray Molenkamp [Thu, 8 Nov 2018 02:18:53 +0000 (19:18 -0700)]
build_deps_windows: add option to to only create project files.

2 years agoCycles: Write Cryptomatte metadata according to the specification
Lukas Stockner [Wed, 7 Nov 2018 03:05:47 +0000 (04:05 +0100)]
Cycles: Write Cryptomatte metadata according to the specification

Reviewers: brecht, sergey, swerner

Subscribers: creamsurfer, Tanguy, Noss, SteffenD

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

2 years agoRender API: Support arbitrary length for custom image metadata fields
Lukas Stockner [Thu, 8 Nov 2018 00:05:55 +0000 (01:05 +0100)]
Render API: Support arbitrary length for custom image metadata fields

2 years agoUI: hide bundled addons which haven't been updated
Campbell Barton [Wed, 7 Nov 2018 23:10:08 +0000 (10:10 +1100)]
UI: hide bundled addons which haven't been updated

All are displayed when '--debug' is set, see: T56351

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 7 Nov 2018 22:56:22 +0000 (09:56 +1100)]
Merge branch 'master' into blender2.8

2 years agoCleanup: minor simplification to user-addon check
Campbell Barton [Wed, 7 Nov 2018 22:54:13 +0000 (09:54 +1100)]
Cleanup: minor simplification to user-addon check

2 years agoRNA: Object.select_set use boolean, only select
Campbell Barton [Wed, 7 Nov 2018 21:51:03 +0000 (08:51 +1100)]
RNA: Object.select_set use boolean, only select

- Was setting active state, making it necessary to backup/restore
  active object in cases where this isn't needed.
  Existing scripts are explicitly setting the active object when needed.

- Use a boolean select arg (toggle selection wasn't used anywhere).

- Add an optional view layer argument since scripts should be able to
  operate outside the user context.

2 years agoCleanup: use explicit 'select_and_set_active' API name
Campbell Barton [Wed, 7 Nov 2018 21:15:22 +0000 (08:15 +1100)]
Cleanup: use explicit 'select_and_set_active' API name

Selection should be separated from active state and handled by higher
level code (operators/editors) instead of happening automatically.

2 years agoGPU: Cleanups: Remove GPUMatType, Vectorize / MADD some operations
Clément Foucault [Wed, 7 Nov 2018 21:16:03 +0000 (22:16 +0100)]
GPU: Cleanups: Remove GPUMatType, Vectorize / MADD some operations

2 years agoEevee: Add support for interpolation options for Environment Texture nodes
Clément Foucault [Wed, 7 Nov 2018 21:14:18 +0000 (22:14 +0100)]
Eevee: Add support for interpolation options for Environment Texture nodes

2 years agoEevee: Support for extension type in the Node Image Texture
Clément Foucault [Wed, 7 Nov 2018 18:40:24 +0000 (19:40 +0100)]
Eevee: Support for extension type in the Node Image Texture

This does not work with the box projection mode. Implementing for box
projection mode would be difficult, slow, and produce a lot of code
duplication. Also i'm not sure this is worth it, as it's not a common use
case.

2 years agoCleanup: style, use const args
Campbell Barton [Wed, 7 Nov 2018 21:02:02 +0000 (08:02 +1100)]
Cleanup: style, use const args

2 years agoCleanup: remove some useless BKE_library and BKE_main includes.
Bastien Montagne [Wed, 7 Nov 2018 17:00:24 +0000 (18:00 +0100)]
Cleanup: remove some useless BKE_library and BKE_main includes.

Makes it simpler to make some changes...

Also fix order of some includes (use alphabetical please).

2 years agoCleanup/Refactor: move Main stuff into BKE's new main.c file (and header).
Bastien Montagne [Wed, 7 Nov 2018 15:06:36 +0000 (16:06 +0100)]
Cleanup/Refactor: move Main stuff into BKE's new main.c file (and header).

We already had a BKE_main.h header, no reason not to put there
Main-specific functions, BKE_library has already more than enough to
handle with IDs and library management!

2 years agoCleanup: Remove 'BKE_library.h' include from 'BKE_main.h'
Bastien Montagne [Wed, 7 Nov 2018 14:37:31 +0000 (15:37 +0100)]
Cleanup: Remove 'BKE_library.h' include from 'BKE_main.h'

That kind of implicit includes should really only be done when totally,
absolutely necessary, and ideally only with rather simple 'second-level'
headers.

Otherwise not being explicit with includes always end up biting in
unexpected ways...

2 years agoFix dpesgraph wrongly refcounting NLA strip actions when duplicating IDs.
Bastien Montagne [Wed, 7 Nov 2018 12:55:29 +0000 (13:55 +0100)]
Fix dpesgraph wrongly refcounting NLA strip actions when duplicating IDs.

NLA strips are users of their action, so we need to pass along ID
management flags.

This commit also cleans up a bit things by passing along ID_CREATE/COPY
flags instead of dummy booleans...

2 years agoCycles: Fixed BVH UI options enabling/disabling when Embree is enabled.
Stefan Werner [Wed, 7 Nov 2018 19:50:45 +0000 (20:50 +0100)]
Cycles: Fixed BVH UI options enabling/disabling when Embree is enabled.

2 years agoMerge branch 'master' into blender2.8
Stefan Werner [Wed, 7 Nov 2018 19:44:40 +0000 (20:44 +0100)]
Merge branch 'master' into blender2.8

2 years agoinstall_deps: Added optional build of Embree to install_deps.sh, turned off by default.
Stefan Werner [Wed, 7 Nov 2018 19:36:03 +0000 (20:36 +0100)]
install_deps: Added optional build of Embree to install_deps.sh, turned off by default.

2 years agoNLA: use animsys_write_orig_anim_rna when applying NLA stack results.
Alexander Gavrilov [Wed, 7 Nov 2018 16:47:22 +0000 (19:47 +0300)]
NLA: use animsys_write_orig_anim_rna when applying NLA stack results.

Without this keyframing on top of an NLA stack is quite weirdly broken.

2 years agoDepsgraph: add proper handling of actions contained in NLA strips.
Alexander Gavrilov [Wed, 7 Nov 2018 15:14:00 +0000 (18:14 +0300)]
Depsgraph: add proper handling of actions contained in NLA strips.

2 years agoPy API Docs: improve 2D image example
Jacques Lucke [Wed, 7 Nov 2018 15:13:55 +0000 (16:13 +0100)]
Py API Docs: improve 2D image example

2 years agoGP: Show all objects sharing data in edit modes
Antonioya [Wed, 7 Nov 2018 15:13:21 +0000 (16:13 +0100)]
GP: Show all objects sharing data in edit modes

Only need hide particle objects

2 years agoPy API Docs: show gpu_extras module
Jacques Lucke [Wed, 7 Nov 2018 14:45:28 +0000 (15:45 +0100)]
Py API Docs: show gpu_extras module

2 years agoCycles: Rearranged macros in kernel_types.h to fix Embree build.
Stefan Werner [Wed, 7 Nov 2018 14:20:24 +0000 (15:20 +0100)]
Cycles: Rearranged macros in kernel_types.h to fix Embree build.

2 years agoDepsgraph: Ensure dependency cycle does not clear runtime memory
Sergey Sharybin [Wed, 7 Nov 2018 14:04:08 +0000 (15:04 +0100)]
Depsgraph: Ensure dependency cycle does not clear runtime memory

If there was a dependency cycle involved, it was possible that pchan
array will be freed before all bones are evaluated. Now clear is
done in a dedicated node, which is never a part of dependency cycle.

2 years agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Wed, 7 Nov 2018 13:54:32 +0000 (14:54 +0100)]
Merge branch 'master' into blender2.8

2 years agoFix T57390: properties editor crash creating new scene in some cases.
Brecht Van Lommel [Wed, 7 Nov 2018 13:51:06 +0000 (14:51 +0100)]
Fix T57390: properties editor crash creating new scene in some cases.

2 years agoFix build with OSL, remove unneeded file after Embree changes.
Brecht Van Lommel [Wed, 7 Nov 2018 12:29:20 +0000 (13:29 +0100)]
Fix build with OSL, remove unneeded file after Embree changes.

2 years agoMerge branch 'master' into blender2.8
Stefan Werner [Wed, 7 Nov 2018 13:27:41 +0000 (14:27 +0100)]
Merge branch 'master' into blender2.8

2 years agoPhysics baking: tag interface locked during backing
Sergey Sharybin [Wed, 7 Nov 2018 12:40:41 +0000 (13:40 +0100)]
Physics baking: tag interface locked during backing

This is a variation of older hach which was setting is_rendering
to truth to tell window manager to not do dependency graph update.

In the nowadays reality window manager is supposed to do dependency
graph update during rendering, that was the whole purpose of CoW
project. This works fine for rendering, since render engines has
their own dependency graphs.

Physics, on the other hand, is using same dependency graph as used
for the viewport, and what's worse: it modifies objects from it.
For example, in a single threaded evaluation ASAN instantly catches
case when cached BVH constructed by smoke is referencing looptri
layer which is freed by viewport's update.

Now we are locking interface, allowing only a subset of navigation
operators to run. This seems to be safest way of dealing with the
problem. There are following variations which we can consider
doing:

- Allow viewport navigation, which will require making it so draw
  manager does not write to the objects.

  A bit dangerous, since smoke simulation might in theory modify
  data which is also used by a draw manager.

- Make physics simulation to have own dedicated dependency graph,
  solving all threading conflicts all together.

This fixes crash when baking smoke. Steps to reproduce:

- Call "Quick Smoke"
- In smoke panel, click "Bake".

2 years agoCleanup, more meaningful and up to date comments
Sergey Sharybin [Wed, 7 Nov 2018 12:07:34 +0000 (13:07 +0100)]
Cleanup, more meaningful and up to date comments

2 years agoSkip dependency graph update when interface is locked
Sergey Sharybin [Wed, 7 Nov 2018 12:05:38 +0000 (13:05 +0100)]
Skip dependency graph update when interface is locked

This is a variation of legacy dependency graph update check based on
G.is_rendering. Now it is ensured, that locked interface does not
tempter around with the dependency graph.

2 years agoCleanup, indentation
Sergey Sharybin [Wed, 7 Nov 2018 12:03:14 +0000 (13:03 +0100)]
Cleanup, indentation

2 years agoCycles: Fixed a warning.
Stefan Werner [Wed, 7 Nov 2018 13:04:22 +0000 (14:04 +0100)]
Cycles: Fixed a warning.

2 years agoCycles: Fixed OpenCL render after the Embree checkin.
Stefan Werner [Wed, 7 Nov 2018 12:53:56 +0000 (13:53 +0100)]
Cycles: Fixed OpenCL render after the Embree checkin.

2 years agoFix 'Set and Use 3D Cursor' normal editing command.
Howard Trickey [Wed, 7 Nov 2018 12:40:26 +0000 (07:40 -0500)]
Fix 'Set and Use 3D Cursor' normal editing command.

Was missing a return of OPERATOR_RUNNING_MODAL for that subcommand.

2 years agoWorkbench: Scale shadowing based on density
Clément Foucault [Wed, 7 Nov 2018 12:24:58 +0000 (13:24 +0100)]
Workbench: Scale shadowing based on density

This makes previewing thick smoke a bit more plausible with better shadows.

The shadowing is clamped so that nothing is completely black. That said the
lower bound is pretty low.

This is not an option but could become one if users do not like it in
all situations.

2 years agoWorkbench: Add cubic filtering for smoke simulation
Clément Foucault [Wed, 7 Nov 2018 12:22:22 +0000 (13:22 +0100)]
Workbench: Add cubic filtering for smoke simulation

The option is per domain and only affects the solid / xray / wireframe view.

Eevee is not yet supported.