Commit Graph

103392 Commits

Author SHA1 Message Date
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
Philipp Oeser
c604fd56a7 Merge branch 'blender-v2.92-release' 2021-01-27 18:44:59 +01:00
Philipp Oeser
37e60289c2 Fix T85110: moving markers num input confuses time vs frames
Looks like a typo in rB66b84ad1592d.

Maniphest Tasks: T85110

Differential Revision: https://developer.blender.org/D10225
2021-01-27 18:40:07 +01:00
Hans Goudey
4c4ccdfa36 RNA: Add warning to float percentage property definition
As a followup to rBc71a8e837616159735, add a debug-only check for
incorrect range, when the percentage and factor functions were likely
confused.
2021-01-27 11:22:55 -06:00
Hans Goudey
c71a8e8376 UI: Fix incorrect RNA percentage property definitions
In two cases the percentage property was actually used incorrectly, as
pointed out in T82070. The range was [0, 1], but the properties were still
displayed as percentages.

There is a preference to control whether to display factors or
percentages, so it usually doesn't make sense to manually define
properties as percentages.

Resolves T82070

Differential Revision: https://developer.blender.org/D9344
2021-01-27 11:19:54 -06:00
Brecht Van Lommel
0e39c526d8 Fix RNA debug build error after recent Sky texture altitude change
Reduce step size within the allowed range.
2021-01-27 17:54:38 +01:00
Sergey Sharybin
ded4940901 Fix possible dereference of nullptr mask 2021-01-27 16:54:29 +01:00
Marco
0af512abdf Sky Texture: change Nishita Altitude to use unit system
Differential Revision: https://developer.blender.org/D9968
2021-01-27 16:48:50 +01:00
Jeroen Bakker
97e646b54a Documented color management issue.
When using the viewport render animation and saving to an 8 bit
image/movie file, the color management is applied twice. Once on the GPU
and once when saving to disk. Removing this option currently leads to
incorrect Scene strip rendering so needs more research.
2021-01-27 16:07:17 +01:00
Jeroen Bakker
a4d07bafc6 Cleanup: Moved update ratio stretching overlay to cache_finish 2021-01-27 16:07:17 +01:00
Jeroen Bakker
f83aa830cd Fix T83187: Unselected UVs shows selected on linked meshes.
When uv editing objects that share the same mesh only the selection
state can get confused. The cause is that the UV editor uses a
particular order of objects and store its state in the first object of a
mesh it hasn't handled. During drawing this state is updated into the
GPU buffers. In the case of linked meshes it can happen that the GPU
buffers are updated based on the object that does not have the correct
selection state making th selection VBOs incorrect.

This patch adds a work around that uses the order that the UV editor is
also using so the GPU buffers are built with the right data.
2021-01-27 16:07:17 +01:00
Patrick Mours
9b80291412 Merge branch 'blender-v2.92-release' 2021-01-27 15:29:39 +01:00
James Horsley
4fbeb3e6be Fix T85089: Crash when rendering scene that does not fit into GPU memory with CUDA/OptiX
The "cuda_mem_map_mutex" was potentially being locked recursively during the call to
"CUDADevice::move_textures_to_host", which crashed. This moves around the locking and
unlocking of "cuda_mem_map_mutex", so that it doesn't call a function that locks it while
still holding the lock.

Reviewed By: pmoursnv

Maniphest Tasks: T85089, T84734

Differential Revision: https://developer.blender.org/D10219
2021-01-27 15:27:57 +01:00
Germano Cavalcante
6f7e2bf170 Fix T84329: Crash when loading the blender with deprecated graphics driver
Add the driver `4.5.13467` related to `Radeon R5 Graphics` to the
workaround list.
2021-01-27 10:52:40 -03:00
Sergey Sharybin
8e52d76bcd Merge branch 'blender-v2.92-release' 2021-01-27 14:25:28 +01:00
Sergey Sharybin
cd24712c2c Fix T84717: Missing viewport update after shading changes
Revert "Fix T83411: Crash when using a workspace/layout data path in a driver"

The fix for the crash exposed design violation in the viewport shading updates,
which is for some reason relying on dependency graph tag of interface data.

The viewport module did not respond to the issue in 2 weeks, and the architect
considered missing update for multiple users a more serious issue than a crash
in a very specific case.

This reverts commit 0f95f51361.
2021-01-27 14:20:31 +01:00
Sergey Sharybin
c92b5622ad CMake: Detect Clang-Tidy 11 and 12 2021-01-27 13:01:01 +01:00
Campbell Barton
3f8816eb6a Merge branch 'blender-v2.92-release' 2021-01-27 20:26:22 +11:00
Campbell Barton
75c426a60a Merge branch 'blender-v2.92-release' 2021-01-27 20:26:19 +11:00
Campbell Barton
ea01c8c5f6 Fix T84402: Off-screen rendering works only once from Python
Off-screen drawing doesn't work once the 'bgl' workaround is enabled.
Disable this for off-screen drawing.
2021-01-27 20:23:00 +11:00
Campbell Barton
4b7b4efd5b Fix T81834: Images not properly duplicated in node_shader_utils
Oversight in fb10eaf6e8
2021-01-27 18:16:02 +11:00
Campbell Barton
fc669a4c3e Cleanup: spelling 2021-01-27 15:28:24 +11:00
Campbell Barton
6e03a66e78 Merge branch 'blender-v2.92-release' 2021-01-27 15:18:56 +11:00
Campbell Barton
abb2215061 Merge branch 'blender-v2.92-release' 2021-01-27 15:18:52 +11:00
Campbell Barton
fb10eaf6e8 UI: add ellipsis to batch rename menu item 2021-01-27 15:17:01 +11:00
Aaron Carlisle
7d24aa8aa8 RNA Manual Reference: Update Mappings 2021-01-26 17:19:03 -05:00