Commit Graph

66665 Commits

Author SHA1 Message Date
Sergey Sharybin 79312c1912 Depsgraph: Remove duplicated sets of recalc/update flags
There were at least three copies of those:

- OB_RECALC* family of flags, which are rudiment of an old
  dependency graph system.
- PSYS_RECALC* which were used by old dependency graph system
  as a separate set since the graph itself did not handle
  particle systems.
- DEG_TAG_* which was used to tag IDs.

Now there is a single set, which defines what can be tagged
and queried for an update. It also has some aggregate flags
to make queries simpler.

Lets once and for all solve the madness of those flags, stick
to a single set, which will not overlap with anything or require
any extra conversion.

Technically, shouldn't be measurable user difference, but some
of the agregate flags for few dependency graph components did
change.

Fixes T58632: Particle don't update rotation settings
2018-12-07 11:37:38 +01:00
Bastien Montagne 989fbff16f Cleanup/refactor binding code for MeshDeform modifier.
We had two different ways of doing it, SurfaceDeform and LaplacianDeform
would do it through a special modifier stack evaluation triggered from
binding operator, while MeshDeform would do it through a regular
depsgraph update/eval (also triggered from its binding op).

This enforces the later to search back for orig modifier data inside
modifier code (to apply binding on that one, and not on useless CoW
one).

Besides the question of safety about modifying orig data from threaded
despgraph (that was *probably* OK, but think it's bad idea in general),
it's much better to have a common way of doing that kind of things.

For now it remains rather dodgy, but at least it's reasonably consistent
and safe now.

This commit also fixes a potential memleak from binding process of
MeshDeform, and does some general cleanup a bit.
2018-12-07 11:22:31 +01:00
Philipp Oeser 41e4059f3c Fix T58046: Crash when changing Particle type, when Hair has dynamics
thx @sergey for checking
2018-12-07 10:54:44 +01:00
Campbell Barton 999b466784 Cleanup: split mixed_bones_object_selectbuffer
Split basic object picking logic out into it's own function.
2018-12-07 20:49:11 +11:00
Campbell Barton b48156d012 Cleanup: style 2018-12-07 20:48:56 +11:00
Antonio Vazquez 20261a7581 Fix T58913 Won't focus on Grease Pencil
When the datablock was empty, the center was not calculated. Now it uses the object location.
2018-12-07 10:42:14 +01:00
Campbell Barton 32aefb6fba Fix T58911: Picking objects fails in pose mode 2018-12-07 19:10:08 +11:00
Campbell Barton 10540822dc Fix T58811: Scale bezier handle uses tip as origin 2018-12-07 18:22:14 +11:00
Campbell Barton 136e88f4ea Merge branch 'master' into blender2.8 2018-12-07 17:11:28 +11:00
Campbell Barton 52824f008e Cleanup: redundant counter 2018-12-07 17:06:21 +11:00
Campbell Barton 606223f6a6 Merge branch 'master' into blender2.8 2018-12-07 15:54:17 +11:00
Campbell Barton d6d76759f8 Fix error in Main cleanup
See 481cdb08ed
2018-12-07 15:42:34 +11:00
Clément Foucault 0c6d5232a3 DRW: Remove the use of GPUTexture buffers for edit wire rendering
See previous commit for detail as why.
2018-12-07 05:33:53 +01:00
Clément Foucault e929cad706 DRW: Rework wireframe overlay implementation
The shader is way simpler and run way faster on lower end hardware
(2x faster on intel HD5000) but did not notice any improvement on AMD Vega.

This also adds a few changes to the way the wireframes are drawn:
- the slider is more linearly progressive.
- optimize display shows all wires and progressively decrease "inner" wires
  intensity. This is subject to change in the future.
- text/surface/metaballs support is pretty rough. More work needs to be done.

This remove the optimization introduced in f1975a4639.
This also removes the GPU side "sharpness" calculation which means that
animated meshes with wireframe display will update slower.
The CPU sharpness calculation has still room for optimization. Also
it is not excluded that GPU calculation can be added back as a
separate preprocessing pass (saving the computation result [compute or
feedback]).

The goal here was to have more speed for static objects and remove
the dependency of having buffer textures with triangle count. This is
preparation work for multithreading the whole DRW manager.
2018-12-07 05:33:53 +01:00
Clément Foucault 9f5a27c5be GPU: Remove EXT and add assert
Some drivers accept shaders with only vertex stage, but some just silently
fails.
2018-12-07 05:33:46 +01:00
Clément Foucault fe20aa1edf GPU: Add GPU_vertformat_triple_load to load next vertices attrib
Right now does not add padding at the end of the buffer.

This seems not necessary but may cause problem on some platform. If needed
we will add this padding (only 2 more vertices).
2018-12-07 05:33:17 +01:00
Clément Foucault 88d36e6456 DRW: Add Provoking vertex state. 2018-12-07 05:33:17 +01:00
Campbell Barton 58398acc68 Fix crash recovering last session 2018-12-07 15:04:57 +11:00
Campbell Barton a304ed1b01 WM: alternate fix for T58904
Use messages instead of notifiers.
2018-12-07 14:07:05 +11:00
Campbell Barton 2fefbfd2d0 Revert "Fix T58904: Side tabs disappear when creating new View Layer"
This reverts commit 892a104d2c.
2018-12-07 13:49:00 +11:00
Campbell Barton 0d4ec8a7a9 Fix T58905: Knife project redo fails 2018-12-07 13:33:58 +11:00
Campbell Barton 341d5b08b0 Fix adding objects in local view 2018-12-07 13:01:26 +11:00
Dalai Felinto a48bd6cc74 Fix T58871: New Scene Collection Does Not Create A New Collection 2018-12-06 23:59:11 -02:00
Dalai Felinto 892a104d2c Fix T58904: Side tabs disappear when creating new View Layer
Using listener here, although I suspect we should be using message
subscriber only. That said, this mimics the behaviour of the buttons
main region.

As for the original bug report what was happening was that when
switching between viewlayers (or when creating one) we may not get the
same active object. So the context breadcrumbs are different.

And the bug itself was that we were missing a redraw on view layer
change.
2018-12-06 23:40:29 -02:00
Sebastian Parborg 497a9ef7a3 Fix T58750: missing fallof power tooltip.
Differential Revision: https://developer.blender.org/D4042
2018-12-07 01:15:02 +01:00
Dalai Felinto 3cce7b7ab9 Fix T58325: Local view Bug
Aka all the thousand of reports duplicated here.
I should have seen this coming, since I had to add a hack in the first
place because things were "not working".

I should have figured out earlier that COW handles base in a really
special way, with its own special object_runtime_backup hack.
2018-12-06 22:06:05 -02:00
Brecht Van Lommel 27e77d4f9c Fix Alembic indexed UVs being merged for different vertices.
Other software uses this to define UV islands, so we can't just merge
any UVs with the same coordinate. They have to share a vertex too.

Contributed by Maxime Robinot, with changes by me.

Differential Revision: https://developer.blender.org/D4006
2018-12-07 00:19:53 +01:00
Campbell Barton 7e722afc62 3D View: hide pose bones w/o overlays
Part of T58690
2018-12-07 09:28:32 +11:00
Campbell Barton 6aad5de58b Docs: hint to why we have option to toggle bones
Without this, it might seem redundant since there is an option
to toggle armature object display.
2018-12-07 08:49:01 +11:00
Jacques Lucke 50d26e7c78 Speedup: optimize DNA_elem_array_size to speedup file loading
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4037
2018-12-06 15:50:01 +01:00
Germano Cavalcante 39efb58446 GPU Framebuffer: simplify gpu_framebuffer_update_attachments_and_fill_empty_slots func 2018-12-06 11:47:37 -02:00
Sergey Sharybin c8467ccc8d Fix T58310: Crash when removing multires modifier from sculpt object 2018-12-06 15:22:21 +01:00
Clément Foucault b0726b31e6 DRW: Mesh: Make uvs use the final mesh display 2018-12-06 14:43:09 +01:00
Clément Foucault b576e14902 DRW: Fix Uvs not working in solid mode + edit mesh 2018-12-06 14:42:25 +01:00
Germano Cavalcante da7f00b9c9 GPU Extensions: unused_fb_slot_workaround: Compare only the driver.
Dozens of renderes are included.
2018-12-06 10:05:42 -02:00
Philipp Oeser 32d50858c3 Fix T58663: UV Align Auto does nothing
one case was missing in cleanup commit rB8fc6609cc008
2018-12-06 13:18:13 +01:00
Sebastian Parborg e850ae14ee Fix T58659: absolute grid snapping wrong with custom grid scale.
Differential Revision: https://developer.blender.org/D4039
2018-12-06 13:06:00 +01:00
Sergey Sharybin 50b0448bd3 Fix T58840: SHIFT+K in vertex paint doesn't update 2018-12-06 13:00:31 +01:00
Sergey Sharybin 4c336f034e Draw manager: Use render view transform as default 2018-12-06 12:31:58 +01:00
Sergey Sharybin 7ed8e9167d Color management: Use default view with no extra transform when not specified 2018-12-06 12:31:50 +01:00
Sergey Sharybin 005e6274ad Color management: Cleanup, make function name more clear
The idea is to reflect that the view settings are the best
for cases when one wants to see things as if they are a
render result.
2018-12-06 12:31:50 +01:00
Sergey Sharybin ca2680aaeb Update relations when modifier texture changes 2018-12-06 09:09:21 +01:00
Campbell Barton 1f5dd9c437 Fix T58788: Apply Visual Geometry crash 2018-12-06 18:28:32 +11:00
Campbell Barton 285b06da51 Fix multi-object edit state on load
Objects selected on save would enter edit-mode on file load.
2018-12-06 17:53:59 +11:00
Campbell Barton aeffaf75ab Fix knife project, add to mesh menu 2018-12-06 16:52:49 +11:00
Campbell Barton c39bb6bd58 Fix T58836: Shift-C doesn't update the view 2018-12-06 15:52:12 +11:00
Campbell Barton 45afcd6b86 Merge branch 'master' into blender2.8 2018-12-06 15:08:42 +11:00
Campbell Barton d24cfa329b Fix T58832: Spin tool creates duplicate faces 2018-12-06 14:52:55 +11:00
Campbell Barton 1cc0705062 Armature: support select-linked deselection
Matches edit-mesh mode.
2018-12-06 14:00:07 +11:00
Campbell Barton 8afc4cf3ea Fix crazyspace transform w/ armatures 2018-12-06 13:05:35 +11:00