Commit Graph

62122 Commits

Author SHA1 Message Date
Campbell Barton c44acc7fb8 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.
2018-06-06 16:33:34 +02:00
Bastien Montagne 0ee4785675 Cleanup: get rid of just-added G.main usage.
Was just added to ease merging of master, proper code now!
2018-06-06 16:32:09 +02:00
Bastien Montagne bb7202495a 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
2018-06-06 16:25:28 +02:00
Jeroen Bakker 19d651ca9a View3DShading popover: Naming + alignment 2018-06-06 16:17:07 +02:00
Brecht Van Lommel d706101559 Depsgraph: remove legacy code for dupli group updates.
This caused crashes in some cases, and should be fully handled by
the depsgraph now.
2018-06-06 16:00:25 +02:00
Brecht Van Lommel bb09556be5 UI: sub panel titles draw smaller and indented. 2018-06-06 16:00:25 +02:00
Brecht Van Lommel f55f418867 Fix incorrect double checked lock in collection object cache. 2018-06-06 16:00:25 +02:00
Sybren A. Stüvel f884ba02a2 Merge branch 'master' into blender2.8 2018-06-06 15:58:18 +02:00
Sybren A. Stüvel de702a4803 Alembic export: only free duplilists when not NULL 2018-06-06 15:54:03 +02:00
Bastien Montagne 48e871ab1d Cleanup: Nuke moar G.main usages... 2018-06-06 15:50:24 +02:00
Jeroen Bakker 89042f576e LookDev: When HDRI could not be reloaded we should switch to world
Thanks for reporting sergey!
2018-06-06 15:26:09 +02:00
Campbell Barton 7fee5f5643 Fix object-dupli selection w/ COW 2018-06-06 15:24:27 +02:00
Jeroen Bakker f1fd5ed74f 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
2018-06-06 14:51:18 +02:00
Sybren A. Stüvel 4a52531a11 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.
2018-06-06 14:38:17 +02:00
Sybren A. Stüvel 4c4fa3d49b 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.
2018-06-06 14:38:17 +02:00
Sergey Sharybin a8ae68aa5c Fix crash when file is saved in particle edit mode
Depsgraph is not available on file load yet.
2018-06-06 14:13:46 +02:00
Sergey Sharybin b58e5d4f2c Particle edit: Fix missing hair with new oarticle system added 2018-06-06 13:54:39 +02:00
Sergey Sharybin 1295e85de0 Particle edit: Fix crash when trying to edit particles without cache
Particles in EMITTER mode needs to have cache.
2018-06-06 13:54:39 +02:00
Bastien Montagne 528cdf9b50 Fix update issue in VPaint mode.
Need to flush the changes through DEG CoW, otherwise drawing code would
not see them in some cases...
2018-06-06 12:42:01 +02:00
Sergey Sharybin e3324c3a8e Depsgraph: Silence relations builder errors
Were caused by depsgraph trying to create relations between objects
which are coming from restricted collection.
2018-06-06 12:36:52 +02:00
Sergey Sharybin 22370929fe Depsgraph: Expand object data datablocks for drivers
Drivers can reference object data datablock directly, and if there
was no object in the scene with that datablock, blender will crash.
2018-06-06 12:36:52 +02:00
Sergey Sharybin 7810c60fe3 Depsgraph: Handle key->object relations from object builder 2018-06-06 12:36:51 +02:00
Sergey Sharybin 695747aad1 Depsgraph: Object data separation, armature 2018-06-06 12:36:51 +02:00
Sergey Sharybin 5a14af62d0 Depsgraph: Object data separation, geometry 2018-06-06 12:36:51 +02:00
Sergey Sharybin 82ec06cbfa Depsgraph: Object data separation, camera 2018-06-06 12:36:51 +02:00
Sergey Sharybin ca7de1ff22 Depsgraph: Object data separation, lamp 2018-06-06 12:36:51 +02:00
Sergey Sharybin 1a0cb28ae2 Depsgraph: Object data separation, light probes
This is a beginning of series of commits which will clearly separate
building IDs which are used as object data from object building.

The goal is to be able to always build whatever ID. Required to make
driver targets to work reliably with copy-on-write concept.
2018-06-06 12:36:51 +02:00
Sergey Sharybin 180e8f8bfb Depsgraph: Remove confusing metaball logic
DATA datablock must evaluation must never depend on object it is
used for. If there is something what depends on an object, it must
be done on object level.

At least the actual callback was empty.
2018-06-06 12:36:51 +02:00
Clément Foucault 9f255db4fe Wireframe: Fix do_version. 2018-06-06 12:32:30 +02:00
Sybren A. Stüvel 7a76223f1f Ensure BKE_mesh_new_nomain_from_template() always has valid mxxx pointers
When the source mesh doesn't have the primary layers (CD_VERT for vdata,
etc.) the returned mesh also didn't have those layers, even when non-zero
elements were requested (for example requesting 4 vertices would still
result in mvert = NULL).
2018-06-06 12:27:25 +02:00
Sybren A. Stüvel 8a0e6a3143 Consolidated custom data layer initialisation
Code shared between BKE_mesh_new_nomain() and
BKE_mesh_new_nomain_from_template() is now in separate functions, instead
of copy-pasted.
2018-06-06 12:27:25 +02:00
Sybren A. Stüvel 5e180ebffc Set mesh->totface in nomain-mesh creation
The totxxx fields should match the number of elements in their respective
custom data layers.
2018-06-06 12:27:25 +02:00
Brecht Van Lommel c4ce4034e6 Fix T55344: linked collection instance has user count 0. 2018-06-06 11:22:17 +02:00
Brecht Van Lommel 1d86bdf16b Cleanup: fix compiler warning. 2018-06-06 11:22:17 +02:00
Sybren A. Stüvel 03b8e4f608 Fix importing temporary screens
Apparently Blender 2.79 could save temporary screens; those should not be
converted to workspaces.
2018-06-06 11:13:11 +02:00
Sybren A. Stüvel 23db3a5ade Renamed BKE_nomain_mesh_xxx → BKE_mesh_nomain_xxx
This maintains the `BKE_mesh_` prefix for the mesh-related BKE functions.
2018-06-06 10:30:24 +02:00
Sybren A. Stüvel 783d31c3a3 DerivedMesh deprecation: Removed some functions in displist.c
Those functions were using DerivedMesh but are not called from anywhere.
As a result, they cannot be tested after porting DerivedMesh to Mesh.
2018-06-06 10:11:31 +02:00
Sybren A. Stüvel abccde4d68 DerivedMesh deprecation: marked no-longer-in-use function
Functions that are no longer in use can be marked as such, so that later
we can easily remove them.
2018-06-06 10:11:31 +02:00
Sybren A. Stüvel 5f543915e8 Modifiers: ported curve_calc_modifiers_post() internals from DerivedMesh → Mesh
The function still returns a DerivedMesh, but internally it uses Mesh
now.
2018-06-06 10:11:31 +02:00
Campbell Barton 274453ef73 Error in recent popover keep_open option 2018-06-06 09:43:03 +02:00
Campbell Barton a9f9236670 Merge branch 'master' into blender2.8 2018-06-06 09:39:35 +02:00
Campbell Barton bfbd85e9d6 Fix error using freed bmain
Regression in 481cdb08ed
2018-06-06 09:36:50 +02:00
Campbell Barton ab375079df Cleanup: rename WITH -> USE for internal defines 2018-06-06 09:29:54 +02:00
Campbell Barton 6ff89166a8 Cleanup: USE_UI_* prefix for UI defines
Otherwise there is no quick way to see where this comes from.
2018-06-06 09:27:23 +02:00
Campbell Barton 52502ad0a4 UI: WM_OT_call_panel option to keep popovers open 2018-06-06 09:24:51 +02:00
Jeroen Bakker 14251d4615 Workbench: Speed up fo scene with many duplis
The ObjectID pass was generating per material per dupli a specific
number for the outline what results in a GPU context switch. In spring scene
01-050 a scene with many trees (duplis) generated 28000 GPU materials.

Now only new materials are created when objectid pass is enabled. Also
added a hard limit to the number of objects for the objectid pass (255)
Basically the outline between objects will not be drawn, but it will be
very hard to detect them also.

Also fixed for XRay mode.
2018-06-06 08:50:12 +02:00
Campbell Barton 1889eec918 UI: use regular size icons for toolbar popup
Test this since the popup feels disruptive/flashing when its too large
when set smaller it looks closer to a menu w/ key-accelerators which is
the intention in this case.

It's also more likely the active tool can be placed under the cursor.
2018-06-06 08:32:25 +02:00
Campbell Barton c1a880bc5e Fix object selection w/ COW 2018-06-06 08:20:05 +02:00
Campbell Barton 3c9e2e82fa Cleanup: style 2018-06-05 21:32:49 +02:00
Clément Foucault 851829c1fb Eevee: Improve load time.
Only generate shadow store shaders on demand and create a simpler shader
for small blur radius.
2018-06-05 21:02:57 +02:00