Commit Graph

95381 Commits

Author SHA1 Message Date
Pablo Dobarro
7c9c8cee7b Fix T76397: Missing value property on Clear Mask pie menu
Without this value defined it was reusing the same 1.0 value after using
fill mask, so it was not working.

Reviewed By: jbakker

Maniphest Tasks: T76397

Differential Revision: https://developer.blender.org/D7699
2020-05-19 01:07:38 +02:00
Ray Molenkamp
497cd3d7dd Fix: T71040 / T58983 Ocean Modifier crashes at high resolutions
This is not as much a fix as a work around, but given the real
involves replacing how we build fftw, it is not eligible for 2.83
which is in BCON3 already.

The root of the issue lies with (how we build) fftw3

The first issue is: fftw does not build with MSVC, there are other
dependencies that are not compatible with MSVC and for those we
build the libraries required with mingw64, same for fftw

The second issue is: for reasons unknown we really really really
liked all deps to link statically so wherever possible we did so.

Now during the building of the fftw it linked a few symbols from
libgcc (which we do not ship) like __chkstk_ms, for which we passed
some flags to stop generating calls to it. Problem solved! There
is no way this could possibly turn around and bite us in the rear.

fast forward to today mystery crashes that look like a race condition.

What is happening is, we tell the linker that each thread will require
a 2-megabyte stack, now if every thread immediately allocated 2 megs,
that be 'rough' on the memory usage. So, what happens is (for all apps
not just blender), 2 megs are reserved but not backed by any real memory
and the first page is allocated for use by the stack, now as the stack
grows, it will eventually grow out of that first page, and end up in
an area that has not been allocated yet, to deal with that the allocated
page is followed by a guard page, someone touches the guard page it's
time to grow the stack!

Meanwhile in FFTW is it's doing substantial allocation using alloca
(up to 64 kb) on the stack, jumping over the guard page, and ending
up in reserved but not yet committed memory, causing an access violation.

Now if you think, that doesn't sound right! something should have
protected us from that! You are correct! That thing was __chkstk_ms
which we disabled.

Given we do not want a dependency on libgcc while building with MSVC
the proper solution is to build fftw as a shared library which will
statically link any bits and pieces it needs, however that change
is a little bit too big to be doing in BCON3.

So as a work around, we change the size the stack grows from 8k to
68k which gives fftw a little bit more wiggle room to keep it out
of trouble most of the time.

Note this only sidesteps the issue, this may come up again if the
conditions are just right, and a proper solution will need to be
implemented for 2.90.
2020-05-18 16:35:53 -06:00
Brecht Van Lommel
c4ee94328f Fix invalid bit shift when GPU shader attribute is not found 2020-05-18 21:22:02 +02:00
Brecht Van Lommel
0bdb827bdf Fix NULL pointer access reported by ASAN (harmless in practice but still weak) 2020-05-18 21:20:10 +02:00
Brecht Van Lommel
e0ae229acb Fix potential crash due to dyntopo GPU buffer invalid memory access
When the number of triangles in a node became zero, the wireframe batch was
not freed along with the triangles batch and could still reference a freed
vertex buffer.

Ref T76858
2020-05-18 21:01:41 +02:00
Bastien Montagne
46a4a53824 Outliner: Fix (unreported) more data-changing operators missing undo. 2020-05-18 17:56:33 +02:00
Brecht Van Lommel
20b94257dc Fix part of T76544: dyntopo sculpt undo stack memory leak 2020-05-18 17:25:09 +02:00
Sebastián Barschkis
9bc7ea5496 Fix T76814: [Mantaflow] Surface Tension always works
Initialize the curvature grid and compute the laplacian only if the diffusion flag is set.
2020-05-18 17:19:51 +02:00
Jacques Lucke
fa116a9bbe Fix T76795: Missing node tree update after remove-on-cancel
Reviewers: brecht

Differential Revision: https://developer.blender.org/D7775
2020-05-18 17:08:57 +02:00
Antonio Vazquez
0d57ab611c Fix T76851: GPencil brush is reset after change mode
This was introduced by commit rBe58525706328

Now, the brush is not changed when change mode.

Thanks @Alaska for helping with this bug.
2020-05-18 17:04:17 +02:00
Clément Foucault
6eb00fb02e Fix T76730 DRW: Sorting of empty shading groups.
This is to fix an assert in EEVEE caused by a transparent shading group
that is create but not populated by any drawcall.
2020-05-18 16:59:04 +02:00
Clément Foucault
cb8d8335b2 Fix T76828 Grease Pencil: Toggle Caps doesn't work
This was a logic error.
2020-05-18 16:01:07 +02:00
Clément Foucault
19413c4a82 Cleanup: GPencil: Fix float double promotion 2020-05-18 16:01:07 +02:00
Bastien Montagne
121b2c0424 Fix T76799: Crash from undoing the copy-pasting of multiple data blocks.
Bug was actually in outliner code, paste operator would not generate any
undo step...

This was not correct ever, but with new undo code this has become a
critical issue, it cannot survive a situation where current main data
has been changed without a proper undo push.

This illustrates again how much of a catastrophic mess the 'tools'
callbacks of the outliner are currently, it has already caused us quiet
some pain in the past, and will keep doing so until this is fully
sanitized am afraid.

Would strongly suggest getting rid of thosw nasty mix of custom
callbacks requiring manual undo pushes, I do not see the added value of
this compared to regular menus calling regular operators. It only adds
confusion and extra code for nothing...
2020-05-18 15:47:03 +02:00
Campbell Barton
b487ef6116 Fix T76593: Coordinate limit of 10,000 units
This is no longer needed for number button dragging to work properly.
2020-05-18 21:16:00 +10:00
Jacques Lucke
b75ce05c3b Fix T75292: File-select events not handled while modal handler is active
Reviewers: Severin

Differential Revision: https://developer.blender.org/D7720
2020-05-18 11:59:53 +02:00
Campbell Barton
008e964940 Fix T76852: Breakdowner remembers limits last used 2020-05-18 18:49:40 +10:00
Sergey Sharybin
04d15f1625 Fix T76573: Make links with Multires leading to crash 2020-05-18 10:48:45 +02:00
Campbell Barton
52d8b3a014 Fix T76849: Duplicate templates show in the New menu 2020-05-18 17:59:52 +10:00
Campbell Barton
98e18c41b6 Cleanup: unused warning in last commit 2020-05-18 17:11:48 +10:00
Campbell Barton
2a3797b109 Cleanup: remove NULL checks from object mode switching take #2
Re-apply changes from 54ea3562406c633dc69f59697cca3cd1cded3bcd,
with a poll function that uses the same active object as the operator,
matching other mode switching functions.
2020-05-18 17:07:23 +10:00
Jeroen Bakker
ff144edd8c Revert "Cleanup: remove redundant active object NULL check & poll"
This reverts commit 54ea3562406c633dc69f59697cca3cd1cded3bcd it
introduced crashes when trying to go to edit mode when the active
object was hidden.

Fix T76837
2020-05-18 08:32:07 +02:00
Campbell Barton
cfea716128 Fix error mixing incompatible enums when generating the proxy name 2020-05-18 16:12:17 +10:00
Campbell Barton
9af72792a3 Cleanup: quiet enum conversion warning 2020-05-18 14:36:02 +10:00
Philipp Oeser
e5ace51295 Fix T76734: Changing Envelope FModifier controlpoints missing update
Issue is that update functions defined in
`rna_def_fmodifier_envelope_ctrl` (namely `rna_FModifier_update`) are
actually never called.

This is because UI code for FCurve modifiers often does not use RNA
buttons but uses custom update functions (or non at all). For example,
rB9a88bd55903a did this for the generators, envelope control points did
not have this at all.

This is now changed to use RNA buttons for the envelope control points,
this could done for other non-RNA buttons as well to get rid of
'validate_fmodifier_cb()'.

Maniphest Tasks: T76734

Differential Revision: https://developer.blender.org/D7732
2020-05-15 19:29:33 +02:00
Philipp Oeser
abcb23f5a3 Fix T76698: Movie clip stabilize display ignore footage colorspace
settings

Stabilized ImBuf just needs to use the same colorspace and alpha
settings as the original one.

Maniphest Tasks: T76698

Differential Revision: https://developer.blender.org/D7713
2020-05-15 19:08:58 +02:00
Robert Guetzkow
001d70eb2b Fix T76277: Remove wrong cast in rna_NodeTree_update
This patch fixes T76277 by removing the incorrect cast from
`ptr->data` to `bNode`. The address of `ptr->owner_id` and
`ptr->data` both point to the node tree. Passing the node tree
incorrectly as a node into the `ED_node_tag_update_nodetree`
corrupts the data, because it attempts to set flags on the
node.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7747
2020-05-15 18:29:42 +02:00
Bastien Montagne
9632a06201 Fix embedded IDs not being enough/properly initialized.
Among other things, they were missing library pointer, session uuid
initialization, etc.

Fix T74546: Corrupted nodegroups crash blender when copy pasting or
appending them.

Fix (unreported) asserts when undoing some production scenes (from
coffee run e.g.).

Initialy caused by rB0aac74f18f2d.
2020-05-15 17:57:13 +02:00
Bastien Montagne
0541906162 Cleanup: rename readfile utils dealing with embedded IDs to proper name. 2020-05-15 16:54:03 +02:00
Antonio Vazquez
1cad0a627e GPencil: Fix unreported missing Sculpt/Vertex/Weight paint brushes
This error was introduced wit the change in commit https://developer.blender.org/rB6a850f3cc840

As the brushes were not created, all modes except Edit were broken. 

Now, the brushes and palette are not created when load the file in versioning code, but when the mode is enabled.

Also, if the brush already exist, the parameters are not reset as it was done in the versioning code in order to keep user settings.

The same logic is used for the default palette.
2020-05-15 16:50:38 +02:00
Philipp Oeser
a269761ec1 Cleanup: clang format
Sorry for the noise, somehow missed that in rB0a32f6c8686c.
2020-05-15 16:31:18 +02:00
Philipp Oeser
266caa1820 Fix T76755: texture paint on udims crash
Caused by rB5593efec01c2.

Use first texture if we dont have an ImageUser (instead of multiview
one). Same fix as in rB9ace7e243978 / T74925.

Maniphest Tasks: T76755

Differential Revision: https://developer.blender.org/D7743
2020-05-15 15:56:35 +02:00
Campbell Barton
fe0036c586 Fix T76563: Transforming an auto-aligned point won't set it aligned
When local origins are used or a single control point is selected,
change the handle types from auto to aligned.
2020-05-15 23:13:57 +10:00
Philipp Oeser
0a32f6c868 Fix T76710: objects get lost in linked/overridden collections
Right now:
- drag-drop in the Outliner prevents dropping inside linked collections
- drag-drop in the Outliner allows dropping inside overridden
collections (should not be the case)
- `Object Properties` > `Collections` panel allows to add to overridden
collection (should not be the case)
- `Object Properties` > `Collections` panel filters out non-local
collections (so adding to linked collections is forbidden)
- `bpy collection.objects.link()` allows to add to linked collections
(should not be the case)
- `bpy collection.objects.link()` allows to add to overridden
collections (should not be the case)

While this might be supported in the future for overriden collections,
these cases should not be allowed atm. since objects get lost on file
reload.

Note: for the case of the `Object Properties` > `Collections` panel,
this could be improved further to filter out overridden collections as
well.

Reviewers: mont29, brecht

Subscribers:
2020-05-15 13:32:15 +02:00
0ae64a9945 Fix T76695: Not exporting normals properly in Alembic format
When auto-smooth enabled, but no custom normals layer present, the Alembic
exporter would incorrectly assume the mesh was shaded smooth. This is now
corrected, and normals are always written when auto-smooth is enabled.
2020-05-15 12:58:48 +02:00
7049d2dc58 Fix T76778: Dopesheet "Show Errors" affects timeline
Since the timeline is a variation of the dopesheet, it also respects
some of the dopesheet settings.

The "Selected Only" setting is overridden from a scene property (since
rB4904eadc0f38) and the "Display Hidden" dopesheet setting seems to be
ignored.

This commit adds the remaining "Show Errors" setting to the menu,
allowing it to be updated from the timeline.
2020-05-15 11:54:17 +02:00
Bastien Montagne
19d822c677 Fix T76740: Static Override - Library Override Crash
Missing proper tagging of 'backward' pointer from fcurve to its group in
RNA would lead to infinite loop...

Issue was triggered by override, but crash could be generated from other
places as well (like from py console), on any action actually...
2020-05-15 10:46:55 +02:00
Campbell Barton
3c0fd51cf4 Fix T76738: Duplicate brushes cause assertion on undo 2020-05-15 17:45:41 +10:00
Campbell Barton
6a850f3cc8 Fix duplicate ID's being created when appending/linking
This removes grease pencil brush creation/dat-block delete on load,
since this causes duplicate data-blocks.

Add assert to prevent this happening in the future
since the error is isn't obvious.
2020-05-15 17:42:01 +10:00
Campbell Barton
c361f911f9 Fix error versioning paint-slots pre-2.80 2020-05-15 16:51:33 +10:00
Campbell Barton
4ce1829289 Cleanup: don't check flags as booleans
Causes unexpected behavior when adding new flags.
2020-05-15 12:47:47 +10:00
Antonio Vazquez
f716bb3b71 GPencil: Add licence text at header 2020-05-14 21:49:44 +02:00
Clément Foucault
6716baa1f7 Fix T76476 EEVEE: Invalid Vector to Float conversion for nodegroups
The previous code only handled the RGBA socket case. For vectors, we simply
use the average of the 3 compoments. This is done using a temp Vector Math
node using the dot operation.
2020-05-14 19:57:51 +02:00
Antonio Vazquez
5f31e5031c GPencil: Fix unreported problem filling textured strokes
The internal image used for filling was not correct when the texture was used in stroke and this makes impossible get a right filling.
2020-05-14 19:53:55 +02:00
Tautvydas Andrikys
33ce0cb5a1 Fix T63588: Cycles unnecessarily updates background importance sampling map 2020-05-14 17:56:50 +02:00
Clément Foucault
5940485369 Fix T76168 Workbench: Shadows behind a culled backface are inverted 2020-05-14 17:41:05 +02:00
Brecht Van Lommel
16d8a683be Fix T73984: unnecessary Cycles viewport updates with object texture coordinates
Remove old code that added extra updates for shaders that have a dependency on
objects. The dependency graph can now tell Cycles when a material is affected by
an object transform.
2020-05-14 17:39:37 +02:00
Dalai Felinto
72492eb2a2 Update RNA Manual References after camera fix
There was no link to the base camera* properties (e.g., lens).
2020-05-14 17:13:52 +02:00
Pablo Dobarro
78e3b7c28d Sculpt: Render Face Sets always as flat shading
This removes the smooth shading rendering from the face set overlay when
smooth shading is enabled.

Reviewed By: jbakker

Maniphest Tasks: T74906, T74622, T75331, T76530

Differential Revision: https://developer.blender.org/D7105
2020-05-14 16:47:50 +02:00
Antonio Vazquez
e585257063 GPencil: Changes in 2D template
Differential Revision: https://developer.blender.org/D7619
2020-05-14 16:31:51 +02:00