Commit Graph

103517 Commits

Author SHA1 Message Date
Campbell Barton cba5d38256 Merge branch 'blender-v2.92-release' 2021-01-29 11:44:13 +11:00
Campbell Barton 3e5091bb21 Merge branch 'blender-v2.92-release' 2021-01-29 11:44:08 +11:00
Campbell Barton b2ce1b0758 Cleanup: rename variables for gizmo templates
The abbreviation was from 'manipulator',
which was changed to gizmo during development.

Also correct operator description.
2021-01-29 11:43:19 +11:00
Campbell Barton 82b06f3112 PyAPI: Add error when registering a 3D gizmo into a 2D gizmo group
Address issue raised in T85145.
2021-01-29 11:43:14 +11:00
Campbell Barton f560dc6892 Cleanup: rename variables for gizmo templates
The abbreviation was from 'manipulator',
which was changed to gizmo during development.

Also correct operator description.
2021-01-29 11:33:54 +11:00
Campbell Barton b0ab4b815a PyAPI: Add error when registering a 3D gizmo into a 2D gizmo group
Address issue raised in T85145.
2021-01-29 11:12:57 +11:00
Campbell Barton 213f8294b5 Fix T84906: Loop select can fail when starting from an ngon
When stepping over an ngon's edges, check the number of edges & faces,
to ensure the topology connected to the ngon would be walked along.
2021-01-29 10:06:56 +11:00
Campbell Barton 1e355b0992 Docs: add diagrams describing the purpose of BMwEdgeLoopWalker.f_hub
Without this the purpose of this feature isn't clear.

While 01b3e9cc9f linked to an image,
add inline ascii diagrams with detailed explanations.
2021-01-29 10:06:52 +11:00
Hans Goudey 92b0803f35 Merge branch 'blender-v2.92-release' 2021-01-28 16:25:59 -06:00
Hans Goudey 71cb6923f5 Fix T83988: Active modifier outline uses search theme color
The outline for the active modifier was abusing the property search
match theme color, as noted in a comment. This commit adds a new
theme color in RNA specifically for the active modifier outline.
2021-01-28 16:16:24 -06:00
Dalai Felinto 323b7ad9cd Merge remote-tracking branch 'origin/blender-v2.92-release' 2021-01-28 22:59:18 +01:00
Dalai Felinto 2f60e5d1b5 Cleanup: Move geonodes object info RNA enum
This enum is only used by the node. So it does not need to be declared outside
the scope of its function.

Originally I thought this may be relevant to the collection info node as well,
but the patch for it is defining its own enums.
2021-01-28 22:44:20 +01:00
Hans Goudey 7a62574338 Cleanup: Reduce variable scope
Also some minimal white space changes
2021-01-28 13:52:39 -06:00
Jacques Lucke fcb7b0adcc Fix T85157: join node not working when the second mesh is empty
The issue was that the `offset` in `dst_span[offset]` was out of bounds
when the domain size is 0. The fix is to simply skip copying attributes
in that case.
2021-01-28 17:03:34 +01:00
Brecht Van Lommel 133966423a Revert "Depsgraph: Remove redundant copy-on-write operations"
This reverts commit 76fd41e9db. This should have
been reverted along with 0f95f51361, since this
change by itself is causing crashes when the depsgraph accesses a non-existent
copy-on-write component.

Ref T84717
2021-01-28 13:16:49 +01:00
Brecht Van Lommel a51ff5208b Fix alpha transparency slider range being influenced by RGB values
For buttons that edit array properties, the soft min/max and slider ranges are
based on the range of all values in the array. However for alpha this does not
make much sense, the only reasonable range is 0..1 even when there are RGB
values larger than 1. So treat alpha as an individual property.
2021-01-28 13:16:49 +01:00
Alexander Gavrilov 3c7d5ec829 Surface Deform: fix binding vertex artifacts causing spikes.
There are two issues here. First, like in T81988 there are cases
where the modifier would deform some vertices immediately after
bind. This is caused by wrong assumptions in the code about the
possible relative angles between various vectors, which can cause
negative weights that don't blend correctly to appear.

Specifically, it seems originally the code assumes that the
centroid-point vector in the polygon plane lies somewhere
between the mid-edge vectors. This is however not necessarily
the case for distant vertices, because the polygon is not
guaranteed to be truly planar, so normal projection may be
a bit off. The code has to use signed angles and checks to
support all possible angular arrangements.

The second issue is very thin and long triangles, which tend
to be very spatially unstable in their thin dimension, resulting
in excess deformation. The code was weighting distance using
the distances between the centroid and the mid-edge points, which
in this case end up as nearly opposite vectors of sizable length
and don't correctly represent how thin the triangle actually is.
It is thus better to use centroid-to-line distances, and an
additional even stricter value for the midpoint that will use
only 3 vertices at evaluation time.

Differential Revision: https://developer.blender.org/D10065
2021-01-28 14:42:53 +03:00
Julian Eisel a6b31af37e Merge branch 'blender-v2.92-release' 2021-01-28 12:36:13 +01:00
Yevgeny Makarov 3726aa68c3 Fix T83935: Superimposed icon's hotspot is misaligned
Now the icon's rect are drawn wider than it should be, and with
overlapping, probably in order to compensate for the icon's offsets
inside the rect. The solution is to draw icon's rect of the correct
size and center the icon itself.

And make the hotspot exactly match the icon's rect. The last/right
button's hotspot also covers the extra padding on the right.

Differential Revision: https://developer.blender.org/D9936

Reviewed by: Julian Eisel
2021-01-28 12:36:00 +01:00
Yevgeny Makarov 6f054f5ac7 Fix T83935: Superimposed icon's hotspot is misaligned
Now the icon's rect are drawn wider than it should be, and with
overlapping, probably in order to compensate for the icon's offsets
inside the rect. The solution is to draw icon's rect of the correct
size and center the icon itself.

And make the hotspot exactly match the icon's rect. The last/right
button's hotspot also covers the extra padding on the right.

Differential Revision: https://developer.blender.org/D9936

Reviewed by: Julian Eisel
2021-01-28 12:33:46 +01:00
Julian Eisel c0d2b10c59 Fix T69001: Custom icons won't load while using workbench engine
Preview icons (e.g. material preview or other data-block previews) use the same
background-job code as deferred loading of custom icons/previews. There was a
check to skip preview generation if the render engine does not support preview
rendering mode, which workbench doesn't. However this check should only be used
when actually rendering a preview, not when doing deferred loading.
2021-01-28 12:23:15 +01:00
Campbell Barton 0bd2f18a85 Merge branch 'blender-v2.92-release' 2021-01-28 22:11:20 +11:00
Campbell Barton 07e66f58cc Fix T85121: Sequencer key conflict with Lock & Select Linked
"Lock Strips" (Shift-L), conflicted with "Select Pick Linked".

Use Ctrl-H, Ctrl-Alt-H for lock & unlock since selected linked
uses bindings which are used in other parts of Blender.
2021-01-28 22:06:05 +11:00
Campbell Barton a64a8d2b79 Cleanup: spelling
Also remove replace 'playblast' with terminology used in Blender's UI.
2021-01-28 22:02:11 +11:00
Campbell Barton dfcfc8ee95 Merge branch 'blender-v2.92-release' 2021-01-28 21:56:10 +11:00
Campbell Barton 8948f73784 Fix T81334: Python view-port drawing depth-test regression
Since 216d78687d the depth function
(glDepthFunc) was left in an undefined state for drawing callbacks that
use the `bgl` module.

This meant enabling depth-test from Python's bgl module also needed
to set the depth function (which previously wasn't necessary).

Set the depth function as part of GPU_bgl_start
2021-01-28 21:53:56 +11:00
Sergey Sharybin bf721fb679 Fix panning with Lock-to-Selection and no selection in Clip Editor
Rather self-explanatory. Never worked since the initial implementation.
It is possible to preserve lock-to-selection option with no selection
nowadays (since the fix for T84850). So now the Lock-to-Selection option
is fully under user control. Surely, the panning and zooming is also
properly supported now in the described scenario.

Differential Revision: https://developer.blender.org/D10226
2021-01-28 11:34:53 +01:00
Bastien Montagne 3b66f40d40 Fix T85124: Undo assert changing property in redo panel.
Logical mistake in recent refactor (rB2a8122fb65c5).
2021-01-28 11:33:37 +01:00
Sergey Sharybin 573bda1fae Fix unused result from mmap() call
The unused result was reported by Clang-Tidy 11.

It does make sense to check for the failed mmap() calls rather than
quietly suppress errors.

In this change failures are reported, but application execution is
not aborted. This is a bit disputable, but it feels to be a safer
thing to do now.

It is unclear how to test the code though, as we don't have any
tools in-place to simulate read errors.

Differential Revision: https://developer.blender.org/D10223
2021-01-28 11:05:38 +01:00
Antonio Vazquez 92567c072a Cleanup: Fix clang format
Due a problem in the mergetool, the clang format was totally wrong in the previous commit.
2021-01-28 11:02:49 +01:00
Sergey Sharybin 8214a63493 Merge branch 'blender-v2.92-release' 2021-01-28 10:54:20 +01:00
Habib Gahbiche 51c8d53a7d Fix T84512: Crash if size input of Blur node is too large
Gaussian filter with a too large kernel doesn't make much sense.
This commit caps the Gaussian function radius to MAX_GAUSSTAB_RADIUS.

Reviewed By: sergey

Maniphest Tasks: T84512

Differential Revision: https://developer.blender.org/D10122
2021-01-28 10:43:46 +01:00
Antonio Vazquez 7000eb00f8 Merge branch 'blender-v2.92-release' 2021-01-28 10:37:19 +01:00
Antonio Vazquez b379f626ce Fix T85035: Gpencil render in background render wrong frame
Due a thread priority, the calculation of the current frame is not done before the frames are available. This produces wrong render frames.

The solution is verify the current frame before doing the real render. This adds only a few milliseconds, but it assures the frame is correct.

As the problem is only when render in background, the recalculation of the frame is only necessary when do real render and not a viewport render, so there is no impact in the animation FPS.
2021-01-28 10:36:05 +01:00
Sergey Sharybin 9fdb32bf51 Merge branch 'blender-v2.92-release' 2021-01-28 10:34:33 +01:00
Sergey Sharybin 61d1fd7e2f Fix T85142: BMW scene quits Blender
Technically, the crash was caused by revert which happened in
rBcd24712c2c5: it reverted some code which is essential for
rB76fd41e9db1.

Bring back the essential code for the removal of un-needed
Copy-on-Write operations, so that the crash doesn't happen.

What was causing the crash is the ID tag assuming Copy-on-Write
operation always exists.
2021-01-28 10:34:18 +01:00
Campbell Barton 39cfc95c2c Merge branch 'blender-v2.92-release' 2021-01-28 18:54:45 +11:00
Campbell Barton 78f7377c88 Fix T85107: Active tool doesn't update when mouse is already over it 2021-01-28 18:53:03 +11:00
Campbell Barton fcda0c7eb9 Merge branch 'blender-v2.92-release' 2021-01-28 18:27:53 +11:00
Campbell Barton 9509e18564 Fix T82785: Setting Image.alpha_mode clears generated image data 2021-01-28 18:27:25 +11:00
Campbell Barton c1c77b7b9a Merge branch 'blender-v2.92-release' 2021-01-28 16:23:01 +11:00
Campbell Barton 10e093b30d Fix T83539: 'activate_init' fails with buttons that have popups
Activating buttons was running too early, before the popup was
positioned on the screen,
causing data-selectors to be positioned incorrectly.

As the early button activation isn't needed, remove this call.

Ensure this doesn't happen again with an assert.
2021-01-28 16:12:43 +11:00
Campbell Barton 862aa2a66b Merge branch 'blender-v2.92-release' 2021-01-28 14:59:27 +11:00
Campbell Barton e6a5e33c09 Merge branch 'blender-v2.92-release' 2021-01-28 14:59:24 +11:00
Campbell Barton 057859620d Merge branch 'blender-v2.92-release' 2021-01-28 14:59:20 +11:00
Campbell Barton 93412cb4e7 Fix jpeg200 4k cinema preset
Used the wrong define, also remove local defines.
2021-01-28 14:50:46 +11:00
Campbell Barton 87d3f4aff3 Fix T82675: Crash on exit when Blender is built as a Python module 2021-01-28 14:38:08 +11:00
Campbell Barton 198980693b Fix T84931: Keys that open menus can also activate menu items
Disable key-accelerators for key-repeat events.

When a key was held it could open the menu and activate the menu
item associated with that key.

With the RMB select option: edit-meshes & edge-selection caused
holding W to open & activate "Edge Bevel Weight".
2021-01-28 10:50:47 +11:00
Campbell Barton df135b74fc PyAPI: use PYTHONUTF8/Py_UTF8Mode on all platforms
System encoding issues have been a paint-point for us with Python 3,
since Blender always uses UTF-8 which might not be the case for the OS.

While the Py_SetStandardStreamEncoding was already set to utf-8,
the file-system could still have an incompatible encoding.

See PEP-540 for details.
2021-01-28 09:47:05 +11:00
Hans Goudey e285765a6b Fix incorrect RNA enum default
Also another copy and paste error in the attribute compare node.
2021-01-27 12:48:10 -06:00