Commit Graph

75472 Commits

Author SHA1 Message Date
Brecht Van Lommel
012a44cff1 Fix T57640: UV unwrap packing not working without sync selection. 2018-12-07 13:54:59 +01:00
Dalai Felinto
cc61b21dff Partial fix to T58917 - No valid cage
The fix itself simply is to store the cage object as a pointer instead
of a string/name.

That said baking with or without cage is yielding very different results
than in 2.7.
2018-12-07 10:44:19 -02:00
Charlie Jolly
ad47b0236e GP: Refactor coordinates to float
See: D4030

Differential Revision: https://developer.blender.org/D4036
2018-12-07 11:45:48 +00:00
Sergey Sharybin
942e9835a9 Fix/workaround crash opening almost any Spring file
The issue was caused mpoly array urequired by the cache filling,
but the pointer was never set when preparing render data.

Seems this change is safe enough, in terms it shouldn't be
causing slowdown, since the assignment of mpoly is cheap, but
hard to tell if there is anything else affected by thing underneath.
2018-12-07 12:41:46 +01:00
Sergey Sharybin
fff5df8108 Depsgraph: Make data allocation dependency more robust
This fix aims to fix crash/assert failure related on wrong
evaluation order which happens when there is a cyclic
dependency involved.

The rationality of this change is that we can allow use
of uninitialized scalar value, but memory is better be
allocated.

This might not be ideal still, but worth a try.
2018-12-07 11:37:44 +01:00
Sergey Sharybin
89121253db Depsgraph: Use shorter relation name
It is clear enough already that it goes From to To.
2018-12-07 11:37:38 +01:00
Sergey Sharybin
5c9a67c63b Depsgraph: Cleanup, line length 2018-12-07 11:37:38 +01:00
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
Antonioya
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
mano-wii
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
mano-wii
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