blender.git
2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Fri, 8 Jun 2018 06:02:50 +0000 (08:02 +0200)]
Merge branch 'master' into blender2.8

2 years agoFix recently added drag events closing menus
Campbell Barton [Fri, 8 Jun 2018 06:01:43 +0000 (08:01 +0200)]
Fix recently added drag events closing menus

2 years agoTransform: fix non-3D view editmode assert
Campbell Barton [Fri, 8 Jun 2018 04:31:40 +0000 (06:31 +0200)]
Transform: fix non-3D view editmode assert

2 years agoKeymap: continued testing/development
Campbell Barton [Thu, 7 Jun 2018 18:46:12 +0000 (20:46 +0200)]
Keymap: continued testing/development

After testing in the studio and extending the event system for
drag events, we've agreed on adjustments to the new keymap,
see: T55162

- Tab: Edit-mode toggle.
- Tab + Cursor Drag: mode switching pie menu.
- Accent/Grave: for 3D view pie menu.
- F3: Search
- 1..3, Shift-1..3: Edit mesh vertex/edge/face toggle.

Other minor changes were made, however they aren't part of the design.

- Ctrl-Shift-S: Image editor Save-As (was F3)
- Ctrl-Alt-R: Repeat history (was F3)

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 7 Jun 2018 18:41:10 +0000 (20:41 +0200)]
Merge branch 'master' into blender2.8

2 years agoWM: fix drag events applying after release
Campbell Barton [Thu, 7 Jun 2018 18:37:28 +0000 (20:37 +0200)]
WM: fix drag events applying after release

2 years agoGHOST/X11: Xinput/XIM support caused double key-up
Campbell Barton [Thu, 7 Jun 2018 18:32:51 +0000 (20:32 +0200)]
GHOST/X11: Xinput/XIM support caused double key-up

All keyboard events were sending double key events (including modifiers)
when xinput was enabled with gnome (causing much confusion!).

I cant test if XIM works,
but this isn't useful to send double events, so disabling for now.

2 years agoUniform Buffer Objects: Simplification refactor
Dalai Felinto [Thu, 7 Jun 2018 18:02:34 +0000 (20:02 +0200)]
Uniform Buffer Objects: Simplification refactor

Since we are only creating this and never updating, there is no need for
the original approach with the individual data to be updated.

Note we only populate the GPU data when binding the UBO, so we can in the
future easily create the UBOs in a separate thread than the main drawing one.

Also at the moment animated materials are not working. To fix that we need
to free/tag for free the GPUMaterials in BKE_material_eval.

2 years agoUniform Buffer Object: No more dirty tagging calls/check
Dalai Felinto [Thu, 7 Jun 2018 17:42:00 +0000 (19:42 +0200)]
Uniform Buffer Object: No more dirty tagging calls/check

2 years agoRename GPU_material_create_uniform_buffer > GPU_material_uniform_buffer_create
Dalai Felinto [Thu, 7 Jun 2018 17:40:47 +0000 (19:40 +0200)]
Rename GPU_material_create_uniform_buffer > GPU_material_uniform_buffer_create

2 years agoGLSL: No need to extract the UBO dynamic inputs
Dalai Felinto [Thu, 7 Jun 2018 17:40:08 +0000 (19:40 +0200)]
GLSL: No need to extract the UBO dynamic inputs

2 years agoDon't tag UBO as dirty anymore otherwise it still crashes on render
Dalai Felinto [Thu, 7 Jun 2018 17:19:37 +0000 (19:19 +0200)]
Don't tag UBO as dirty anymore otherwise it still crashes on render

2 years agoBKE_world_eval: cleanup
Dalai Felinto [Thu, 7 Jun 2018 17:15:36 +0000 (19:15 +0200)]
BKE_world_eval: cleanup

2 years agoNo more need to tag sss as dirty for EEVEE
Dalai Felinto [Thu, 7 Jun 2018 17:13:06 +0000 (19:13 +0200)]
No more need to tag sss as dirty for EEVEE

And for the records, this shoudn't have been added to the
GPU_material_uniform_buffer_tag_dirty function since they are unrelated.

2 years agoRemove more printfs ....
Clément Foucault [Thu, 7 Jun 2018 17:06:50 +0000 (19:06 +0200)]
Remove more printfs ....

2 years agoAlembic export: use depsgraph to get evaluated mesh/object
Sybren A. Stüvel [Thu, 7 Jun 2018 16:49:56 +0000 (18:49 +0200)]
Alembic export: use depsgraph to get evaluated mesh/object

2 years agoAlembic export: no need to check particle's mesh_final on export
Sybren A. Stüvel [Thu, 7 Jun 2018 16:35:07 +0000 (18:35 +0200)]
Alembic export: no need to check particle's mesh_final on export

Hair writing is still not working properly, though, but at least now
samples are written at all.

2 years agoAlembic import: don't crash Blender when reading invalid samples
Sybren A. Stüvel [Thu, 7 Jun 2018 16:34:05 +0000 (18:34 +0200)]
Alembic import: don't crash Blender when reading invalid samples

2 years agoAlembic hair writer: avoid double-free
Sybren A. Stüvel [Thu, 7 Jun 2018 15:55:13 +0000 (17:55 +0200)]
Alembic hair writer: avoid double-free

2 years agoAlembic export: cleaned up multiply-passed depsgraph & scene
Sybren A. Stüvel [Thu, 7 Jun 2018 15:54:36 +0000 (17:54 +0200)]
Alembic export: cleaned up multiply-passed depsgraph & scene

Those can now solely be found in the ExportSettings object.

2 years agoEevee: Fix hair not rendering.
Clément Foucault [Thu, 7 Jun 2018 16:58:06 +0000 (18:58 +0200)]
Eevee: Fix hair not rendering.

2 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Thu, 7 Jun 2018 16:45:45 +0000 (18:45 +0200)]
Merge branch 'master' into blender2.8

Conflicts:
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/sculpt_paint/sculpt_undo.c

2 years agoRemove printfs
Clément Foucault [Thu, 7 Jun 2018 16:44:37 +0000 (18:44 +0200)]
Remove printfs

... it's getting late here.

2 years agoFix crash cause by SSS referencing Material Nodetree data.
Clément Foucault [Thu, 7 Jun 2018 16:43:43 +0000 (18:43 +0200)]
Fix crash cause by SSS referencing Material Nodetree data.

2 years agoFix memleak with GPUhairs.
Clément Foucault [Thu, 7 Jun 2018 16:43:10 +0000 (18:43 +0200)]
Fix memleak with GPUhairs.

2 years agoCleanup: typo, and 0 -> false for booleans.
Bastien Montagne [Thu, 7 Jun 2018 16:35:37 +0000 (18:35 +0200)]
Cleanup: typo, and 0 -> false for booleans.

2 years agoWireframe: Fix edges or non manifold meshes not showing.
Clément Foucault [Thu, 7 Jun 2018 16:01:29 +0000 (18:01 +0200)]
Wireframe: Fix edges or non manifold meshes not showing.

This will show the associated edges to the vertices but that's the only
workaround I can think of right now.

2 years agoWireframe: Change / Optimize the limited wireframe visibility option.
Clément Foucault [Thu, 7 Jun 2018 14:55:41 +0000 (16:55 +0200)]
Wireframe: Change / Optimize the limited wireframe visibility option.

This make the limited wireframe not a performance problem anymore.

However, this does change the number of edges displayed as the threshold
is now computed per vertex instead of per edges.

For this reason we extended (internaly) the range of the slider so that the
users can hide more edge.

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 7 Jun 2018 15:08:55 +0000 (17:08 +0200)]
Merge branch 'master' into blender2.8

2 years agoWM: add support for drag events
Campbell Barton [Thu, 7 Jun 2018 15:05:49 +0000 (17:05 +0200)]
WM: add support for drag events

This allows for a single key to be mapped to both release and drag,
useful for pie menus to share a key with a different action.

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 7 Jun 2018 14:53:31 +0000 (16:53 +0200)]
Merge branch 'master' into blender2.8

2 years agoFix key repeat events resetting the click timer
Campbell Barton [Thu, 7 Jun 2018 14:51:03 +0000 (16:51 +0200)]
Fix key repeat events resetting the click timer

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 7 Jun 2018 14:45:10 +0000 (16:45 +0200)]
Merge branch 'master' into blender2.8

2 years agoCleanup: trailing space for windowmanager
Campbell Barton [Thu, 7 Jun 2018 14:43:52 +0000 (16:43 +0200)]
Cleanup: trailing space for windowmanager

2 years agoDraw: Fix crash when tryign to get procedural textures with modifier disabled
Sergey Sharybin [Thu, 7 Jun 2018 14:38:52 +0000 (16:38 +0200)]
Draw: Fix crash when tryign to get procedural textures with modifier disabled

Maybe disabled modifier check should be done higher in the call hierarchy.

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 7 Jun 2018 14:32:40 +0000 (16:32 +0200)]
Merge branch 'master' into blender2.8

2 years agoFix T55126: COW problem: there is an active object even if unselectable
Sergey Sharybin [Thu, 7 Jun 2018 14:30:19 +0000 (16:30 +0200)]
Fix T55126: COW problem: there is an active object even if unselectable

2 years agoWM: check for release instead of not pressed
Campbell Barton [Thu, 7 Jun 2018 14:19:59 +0000 (16:19 +0200)]
WM: check for release instead of not pressed

Makes reasoning about events more predictable.

2 years agoCleanup: typo.
Bastien Montagne [Thu, 7 Jun 2018 14:02:55 +0000 (16:02 +0200)]
Cleanup: typo.

2 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Thu, 7 Jun 2018 13:41:57 +0000 (15:41 +0200)]
Merge branch 'master' into blender2.8

Conflicts:
source/blender/editors/transform/transform_generics.c

2 years agoFix crash due to missing init of new bAnimContext bmain member in transform code.
Bastien Montagne [Thu, 7 Jun 2018 13:38:31 +0000 (15:38 +0200)]
Fix crash due to missing init of new bAnimContext bmain member in transform code.

From own previous G.main-busting commit.

2 years agoFix sculpt mode undo (COW update needed)
Campbell Barton [Thu, 7 Jun 2018 13:15:54 +0000 (15:15 +0200)]
Fix sculpt mode undo (COW update needed)

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 7 Jun 2018 12:58:57 +0000 (14:58 +0200)]
Merge branch 'master' into blender2.8

2 years agoFix double free in dyntopo-sculpt mode undo
Campbell Barton [Thu, 7 Jun 2018 12:54:09 +0000 (14:54 +0200)]
Fix double free in dyntopo-sculpt mode undo

2 years agoWireframe: Frustum cull them.
Clément Foucault [Thu, 7 Jun 2018 12:49:54 +0000 (14:49 +0200)]
Wireframe: Frustum cull them.

2 years agoDepsgraph: Ensure collections are up to date after modifications
Sergey Sharybin [Thu, 7 Jun 2018 12:39:58 +0000 (14:39 +0200)]
Depsgraph: Ensure collections are up to date after modifications

Before that copied collection in copy-on-write were running out
of sync with original ones. This was causing crash with the
following scenario:

- Delete some objects from scene
- Add particle system to an object
- Change particle mode to Hair

Thanks Dalai for debug session! Pair programming ftw!

2 years agoDepsgraph: Use more proper relations for scene relation
Sergey Sharybin [Thu, 7 Jun 2018 10:57:09 +0000 (12:57 +0200)]
Depsgraph: Use more proper relations for scene relation

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 7 Jun 2018 11:41:32 +0000 (13:41 +0200)]
Merge branch 'master' into blender2.8

2 years agoFix sculpt assert on initialization
Campbell Barton [Thu, 7 Jun 2018 11:38:46 +0000 (13:38 +0200)]
Fix sculpt assert on initialization

2 years agoArmature: Fix flickering outline on planar custom bones.
Clément Foucault [Thu, 7 Jun 2018 11:38:10 +0000 (13:38 +0200)]
Armature: Fix flickering outline on planar custom bones.

2 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Thu, 7 Jun 2018 11:04:16 +0000 (13:04 +0200)]
Merge branch 'master' into blender2.8

 Conflicts:
source/blender/editors/animation/anim_deps.c
source/blender/editors/animation/keyframing.c
source/blender/editors/animation/keyingsets.c
source/blender/editors/armature/pose_edit.c
source/blender/editors/armature/pose_transform.c
source/blender/editors/gpencil/gpencil_convert.c
source/blender/editors/include/ED_anim_api.h
source/blender/editors/include/ED_keyframing.h
source/blender/editors/interface/interface_anim.c
source/blender/editors/space_action/action_edit.c
source/blender/editors/space_graph/graph_edit.c
source/blender/editors/space_outliner/outliner_draw.c
source/blender/editors/transform/transform_conversions.c
source/blender/makesrna/intern/rna_armature.c
source/blender/makesrna/intern/rna_pose.c
source/blender/python/intern/bpy_rna_anim.c
source/blenderplayer/bad_level_call_stubs/stubs.c
source/gameengine/Converter/KX_BlenderSceneConverter.cpp

2 years agoArmature: Fix missing loose edges on custom bone shapes.
Clément Foucault [Thu, 7 Jun 2018 10:58:14 +0000 (12:58 +0200)]
Armature: Fix missing loose edges on custom bone shapes.

2 years agoFix T55062: Depsgraph: Crash with COW with EEVEE viewport
Dalai Felinto [Thu, 7 Jun 2018 10:47:16 +0000 (12:47 +0200)]
Fix T55062: Depsgraph: Crash with COW with EEVEE viewport

We now remove the shader for every update.

So at the moment the whole point of UBO (Uniform Buffer Objects) is that they
are more efficient than individual uniforms.

Next steps is a harmless refactor to stopping UBO from referring to original
data in the UBO, and simply copying it.

It would also be interesting to make the final shader more granular as far as
the library and required functions are concerned. Even if this doesn't impact
performance, it should give us smaller easy to debug shaders
(a simple shader now has > 5k lines!).

If performance for animated values is measureable slower after this commit we
can port the shader creation CPU side to the depsgraph - localizing the tree,
hashing, lookup, ...

Additionally we can stick to update the UBO when the material changes but not
its topology. This is very trick because of localized trees. So we will only
re-visit this if profiling hints at any benefit from it.

2 years agoCleanup: remove moar G.main usages.
Bastien Montagne [Thu, 7 Jun 2018 10:47:00 +0000 (12:47 +0200)]
Cleanup: remove moar G.main usages.

Notes:
* Really need to address RNA setters case, end up adding way too much
G.main here these days... :/
* Added Main pointer into bAnimContext, helps a lot in anim code ;)

2 years agoFixed deadlock on viewlayer update when there are drivers
Sybren A. Stüvel [Thu, 7 Jun 2018 10:37:48 +0000 (12:37 +0200)]
Fixed deadlock on viewlayer update when there are drivers

When calling the bpy.ops.poselib.apply_pose() operator from Python, Blender
would deadlock when the rig has drivers.

Similar BPy_{BEGIN,END}_ALLOW_THREADS calls were already in place in the
rna_Scene_update_tagged() function.

2 years agoRename "Viewport Display SSAO" sub-panel name to Screen Space Ambient Occlusion
Pablo Vazquez [Thu, 7 Jun 2018 10:08:32 +0000 (12:08 +0200)]
Rename "Viewport Display SSAO" sub-panel name to Screen Space Ambient Occlusion

Since it is already a sub-panel of Viewport Display anyway

2 years agoGPUPass: Refactor gpupass caching system to allow fast gpumaterial creation.
Clément Foucault [Thu, 7 Jun 2018 09:58:15 +0000 (11:58 +0200)]
GPUPass: Refactor gpupass caching system to allow fast gpumaterial creation.

This is part of the work needed to refactor the material parameters update.

Now the gpupass cache is polled before adding the gpumaterial to the
deferred compilation queue.

We store gpupasses in a single linked list grouped based on their hashes.
This is not the most efficient way but it can be improved upon later.

2 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Thu, 7 Jun 2018 10:01:09 +0000 (12:01 +0200)]
Merge branch 'master' into blender2.8

2 years agoRevert "Cycles: Cleanup: Don't use return on function returning void"
Sergey Sharybin [Thu, 7 Jun 2018 09:57:57 +0000 (11:57 +0200)]
Revert "Cycles: Cleanup: Don't use return on function returning void"

Not sure why exactly it is called a cleanup, the code was much more clear
and robust against possible missing return statements which are MANDATORY.

Missing return statement will:

- Cause two different BVH traversals to be run.

  Not is happening currently, but if more BVH layouts are added, it will
  become a problem.

- It is already causing assert() statements to fail, since functions are
  no longer returning when they are supposed to.

If there is any measurable reason to keep this change, let me know.
Otherwise just stick to reliable/tested/robust code.

This reverts commit ba65f7093b39a8e5f1fb869cbc347fb810a05ab9.

2 years agoParticle mode: Support children drawing
Sergey Sharybin [Thu, 7 Jun 2018 09:25:13 +0000 (11:25 +0200)]
Particle mode: Support children drawing

The issue is that children drawing is done by object mode,
which operates with data from evaluated context. But that
data needs edit mode's cache to be properly updated first.

2 years agoDraw: Don't take cache existence into account for draw type
Sergey Sharybin [Thu, 7 Jun 2018 08:15:10 +0000 (10:15 +0200)]
Draw: Don't take cache existence into account for draw type

2 years agoDraw: Use proper continue when psys is disabled
Sergey Sharybin [Thu, 7 Jun 2018 08:12:47 +0000 (10:12 +0200)]
Draw: Use proper continue when psys is disabled

2 years agoParticle edit: Simplify code by benefiting from single edit context
Sergey Sharybin [Wed, 6 Jun 2018 13:48:30 +0000 (15:48 +0200)]
Particle edit: Simplify code by benefiting from single edit context

Makes ADD brush to work.

At some point children particles draw got broken, children are not
visible for until first stroke is done. Still looking into it.

2 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Thu, 7 Jun 2018 09:22:11 +0000 (11:22 +0200)]
Merge branch 'master' into blender2.8

 Conflicts:
source/blender/collada/ArmatureExporter.cpp
source/blender/collada/ArmatureExporter.h
source/blender/collada/DocumentExporter.cpp
source/blender/collada/DocumentExporter.h
source/blender/collada/SceneExporter.cpp
source/blender/collada/SceneExporter.h
source/blender/collada/collada.cpp
source/blender/collada/collada.h
source/blender/editors/armature/armature_edit.c
source/blender/editors/armature/pose_transform.c
source/blender/editors/include/ED_armature.h
source/blender/editors/include/ED_object.h
source/blender/editors/include/ED_screen.h
source/blender/editors/io/io_collada.c
source/blender/editors/object/object_transform.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/screen/screen_ops.c
source/blender/windowmanager/intern/wm.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_window.c
source/blenderplayer/bad_level_call_stubs/stubs.c

2 years agoCleanup: Nuke moar G.main usages...
Bastien Montagne [Wed, 6 Jun 2018 13:50:24 +0000 (15:50 +0200)]
Cleanup: Nuke moar G.main usages...

2 years agoMinor comment on possible TODO while validating paint ops for CoW...
Bastien Montagne [Thu, 7 Jun 2018 08:58:52 +0000 (10:58 +0200)]
Minor comment on possible TODO while validating paint ops for CoW...

2 years agoAlembic export: CoW/Depsgraph fixes
Sybren A. Stüvel [Wed, 6 Jun 2018 13:43:10 +0000 (15:43 +0200)]
Alembic export: CoW/Depsgraph fixes

2 years agoAlembic export: port DerivedMesh → Mesh
Sybren A. Stüvel [Wed, 6 Jun 2018 12:16:44 +0000 (14:16 +0200)]
Alembic export: port DerivedMesh → Mesh

2 years agoAlembic import: port DerivedMesh → Mesh
Sybren A. Stüvel [Wed, 6 Jun 2018 09:06:11 +0000 (11:06 +0200)]
Alembic import: port DerivedMesh → Mesh

2 years agoBone selection: user control contrast
Jeroen Bakker [Thu, 7 Jun 2018 07:18:57 +0000 (09:18 +0200)]
Bone selection: user control contrast

Experiment: let the user be in control of the alpha channel as some rigs
are hard too see during bone selection. Especially rigs that were
designed for 2.79 wireframe mode.

2 years agoWorkbench: respect the duplication visibility flag
Jeroen Bakker [Thu, 7 Jun 2018 06:25:22 +0000 (08:25 +0200)]
Workbench: respect the duplication visibility flag

2 years agoFix T55348: Renaming a marker can't cancel
Campbell Barton [Thu, 7 Jun 2018 06:54:47 +0000 (08:54 +0200)]
Fix T55348: Renaming a marker can't cancel

Regression in a14005c070a1f

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 7 Jun 2018 06:15:11 +0000 (08:15 +0200)]
Merge branch 'master' into blender2.8

2 years agoPython API: Initial 'imbuf' API
Campbell Barton [Thu, 7 Jun 2018 05:41:49 +0000 (07:41 +0200)]
Python API: Initial 'imbuf' API

Support only basic operations new/load/write & resize.

Add now so we can extend as needed & more easily accept patches.

2 years agoCleanup: style
Campbell Barton [Wed, 6 Jun 2018 20:17:06 +0000 (22:17 +0200)]
Cleanup: style

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 6 Jun 2018 17:52:20 +0000 (19:52 +0200)]
Merge branch 'master' into blender2.8

2 years agoFix BLI_ASSERT_UNIT macro w/ non-finite numbers
Campbell Barton [Wed, 6 Jun 2018 17:49:27 +0000 (19:49 +0200)]
Fix BLI_ASSERT_UNIT macro w/ non-finite numbers

2 years agoUI: NLA: Influence should be a factor (RNA)
Aaron Carlisle [Wed, 6 Jun 2018 16:00:04 +0000 (12:00 -0400)]
UI: NLA: Influence should be a factor (RNA)

2 years agoFix broken auto-keying after copy/paste of poses.
Bastien Montagne [Wed, 6 Jun 2018 15:17:08 +0000 (17:17 +0200)]
Fix broken auto-keying after copy/paste of poses.

That bug was also likely affecting other cases - basically it was making
auto-keying always key from evaluated ('visual') values, never base,
data values... Added a flag, in some cases we do want evaluated values
here, obviously.

2 years agoCycles: use viewport duplicator visibility on preview
Dalai Felinto [Wed, 6 Jun 2018 14:43:37 +0000 (16:43 +0200)]
Cycles: use viewport duplicator visibility on preview

2 years agoDepsgraph: Expose (evaluation) mode in rna
Dalai Felinto [Wed, 6 Jun 2018 14:38:10 +0000 (16:38 +0200)]
Depsgraph: Expose (evaluation) mode in rna

2 years agoDepsgraph iterator: Remove explicit mode
Dalai Felinto [Wed, 6 Jun 2018 14:01:51 +0000 (16:01 +0200)]
Depsgraph iterator: Remove explicit mode

We can get the mode from the depsgraph itself.

2 years agoFix T55350: Cycles: instanced hair with hidden emitter is invisible when rendering
Dalai Felinto [Wed, 6 Jun 2018 13:18:45 +0000 (15:18 +0200)]
Fix T55350: Cycles: instanced hair with hidden emitter is invisible when rendering

2 years agoCleanup: unused function
Campbell Barton [Wed, 6 Jun 2018 14:36:00 +0000 (16:36 +0200)]
Cleanup: unused function

2 years agoFix view_layer update function
Campbell Barton [Wed, 6 Jun 2018 14:31:05 +0000 (16:31 +0200)]
Fix view_layer update function

This was no longer working, now this works the same way as
scene.update(), only it applied to the current view layer.

Caused crash running alembic export from Python.

2 years agoCleanup: get rid of just-added G.main usage.
Bastien Montagne [Wed, 6 Jun 2018 14:32:09 +0000 (16:32 +0200)]
Cleanup: get rid of just-added G.main usage.

Was just added to ease merging of master, proper code now!

2 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Wed, 6 Jun 2018 14:25:28 +0000 (16:25 +0200)]
Merge branch 'master' into blender2.8

 Conflicts:
source/blender/collada/ArmatureExporter.cpp
source/blender/collada/ArmatureExporter.h
source/blender/collada/DocumentExporter.cpp
source/blender/collada/DocumentExporter.h
source/blender/collada/SceneExporter.cpp
source/blender/collada/SceneExporter.h
source/blender/collada/collada.cpp
source/blender/collada/collada.h
source/blender/editors/armature/armature_edit.c
source/blender/editors/armature/editarmature_retarget.c
source/blender/editors/armature/pose_transform.c
source/blender/editors/include/ED_armature.h
source/blender/editors/include/ED_object.h
source/blender/editors/include/ED_screen.h
source/blender/editors/io/io_collada.c
source/blender/editors/object/object_transform.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/screen/screen_ops.c
source/blender/windowmanager/intern/wm.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_window.c
source/blenderplayer/bad_level_call_stubs/stubs.c

2 years agoView3DShading popover: Naming + alignment
Jeroen Bakker [Wed, 6 Jun 2018 14:16:06 +0000 (16:16 +0200)]
View3DShading popover: Naming + alignment

2 years agoDepsgraph: remove legacy code for dupli group updates.
Brecht Van Lommel [Wed, 6 Jun 2018 12:39:05 +0000 (14:39 +0200)]
Depsgraph: remove legacy code for dupli group updates.

This caused crashes in some cases, and should be fully handled by
the depsgraph now.

2 years agoUI: sub panel titles draw smaller and indented.
Brecht Van Lommel [Wed, 6 Jun 2018 11:28:40 +0000 (13:28 +0200)]
UI: sub panel titles draw smaller and indented.

2 years agoFix incorrect double checked lock in collection object cache.
Brecht Van Lommel [Wed, 6 Jun 2018 10:18:41 +0000 (12:18 +0200)]
Fix incorrect double checked lock in collection object cache.

2 years agoMerge branch 'master' into blender2.8
Sybren A. Stüvel [Wed, 6 Jun 2018 13:58:18 +0000 (15:58 +0200)]
Merge branch 'master' into blender2.8

2 years agoAlembic export: only free duplilists when not NULL
Sybren A. Stüvel [Wed, 6 Jun 2018 13:42:20 +0000 (15:42 +0200)]
Alembic export: only free duplilists when not NULL

2 years agoCleanup: Nuke moar G.main usages...
Bastien Montagne [Wed, 6 Jun 2018 13:50:24 +0000 (15:50 +0200)]
Cleanup: Nuke moar G.main usages...

2 years agoView3D: Shading Popup
Jeroen Bakker [Wed, 6 Jun 2018 13:44:00 +0000 (15:44 +0200)]
View3D: Shading Popup

- layout so cavity options are better visible
- fixed issues showing wrong options in Material mode
- added labels + seperators

2 years agoLookDev: When HDRI could not be reloaded we should switch to world
Jeroen Bakker [Wed, 6 Jun 2018 13:25:05 +0000 (15:25 +0200)]
LookDev: When HDRI could not be reloaded we should switch to world

Thanks for reporting sergey!

2 years agoFix object-dupli selection w/ COW
Campbell Barton [Wed, 6 Jun 2018 13:19:16 +0000 (15:19 +0200)]
Fix object-dupli selection w/ COW

2 years agoT55333 Workbench: Cavity Shader
Jeroen Bakker [Wed, 6 Jun 2018 12:47:54 +0000 (14:47 +0200)]
T55333 Workbench: Cavity Shader

A cavity shader based on SSAO. Works on all workbench deferred passes.

Per 3d viewport the cavity shader options can be set as different
shading needed different options. Some global options are in the
Viewport Display of the scene like num samples and distance.

Experimental: Naming of Ridges and Valleys

2 years agoAlembic: Fix double-free of mutex
Sybren A. Stüvel [Wed, 6 Jun 2018 10:45:14 +0000 (12:45 +0200)]
Alembic: Fix double-free of mutex

The mutex was shared between CoW copies of the CacheFile datablock, and
as a result also freed multiple times. It is now only freed when the
original datablock is freed; the CoW copies share the same mutex.

2 years agoFix double-free of custom data
Sybren A. Stüvel [Wed, 6 Jun 2018 12:37:30 +0000 (14:37 +0200)]
Fix double-free of custom data

This causes a temporary spike in memory usage when creating a copy; the
entire copy will be removed anyway when DerivedMesh is removed.