Commit Graph

94241 Commits

Author SHA1 Message Date
Omar Emara
6cb0a122df Realtime Compositor: Implement bokeh image node
This patch implements the bokeh image node for the realtime compositor.

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

Reviewed By: Clement Foucault
2022-08-18 11:53:08 +02:00
Campbell Barton
0aaff9a07d WM: optimize adding notifier duplication check
Use a GSet to check for duplicate notifiers, for certain Python scripts
checking for duplicate notifiers added considerable overhead.

This is an alternative to D15129 with fewer chances to existing logic.
2022-08-18 15:55:45 +10:00
Campbell Barton
7be1c8bbae Cleanup: de-duplicate notifier add function 2022-08-18 14:45:49 +10:00
Campbell Barton
fcd72756ab Cleanup: early return, reduce right-shift 2022-08-18 14:45:47 +10:00
Colin Basnett
f5234474bd Fix T97618: Clipped text labels intermittently missing ellipses
The offending line was attempting to artificially add width to the
length of the string in order to "avoid ellipsing text that nearly
fits". The line doesn't actually appear to do anything beneficial, and
it causes the nasty text bug.

Old:
{F13029695}

New:
{F13327308}

Reviewed By: campbellbarton

Ref D15585
2022-08-18 11:01:53 +10:00
Campbell Barton
cfe5bf4b22 Cleanup: spelling, format 2022-08-18 08:46:24 +10:00
listout
f197b1a1f1 CMake: support building with musl libc
Instead of using macros like GLIBC we can use the CMake build
systems internal functions to check if some header or functions are
present on the running system's libc.

Add ./build_files/cmake/have_features.cmake to add checks for
platform features which can be used to set defines for source
files that require them.

Reviewed By: campbellbarton

Ref D15696
2022-08-18 08:12:56 +10:00
Hans Goudey
0a84cc691d Cleanup: Move subdiv_mesh.c to C++ 2022-08-17 18:11:01 -04:00
Pablo Vazquez
f60b47f2c8 UI: Fix inconsistency use of uppercase/capitalization
Since VBO stands for vertex buffer object it should always be uppercase.

"Vertex" in "vertex buffer object" should only be capitalized at the
beginning of a sentence.
2022-08-17 22:23:48 +02:00
Julian Eisel
0be6427429 Outliner: Compile outliner tree-hashing files in C++
Some performance issues were found here with a heavy production file and
we want to look into using some C++ to improve things for this ancient
code.
2022-08-17 21:00:22 +02:00
Julian Eisel
d8223bdc38 Cleanup: Improvements to Outliner tree writing code, add assert
Comments there weren't really helpful, took me a while to get what they
try to say. This attempts to add a better explanation. Also add an
assert for a previous, implicit (but commented) assumption, and some
minor cleanups.
2022-08-17 20:27:52 +02:00
Julian Eisel
ecf4a7835d Outliner: Avoid unnecessary Outliner storage copy
Was always creating a copy of `SpaceOutliner`, even though it's only
needed for one conditional branch. This is a shallow copy, so shouldn't
be that expensive, still trivial to avoid.
2022-08-17 20:27:52 +02:00
Hans Goudey
31279d522b Fix: Compiler warning in macro after recent C++ conversion
The iterator parameters struct should be initialized to zero in both
C and C++. Using memset seems to be the only reliable way to do that.
2022-08-17 13:16:48 -04:00
Hans Goudey
27f2ff6b5b Cleanup: Remove redundant use of evaluated non-mesh objects
Metaball, curve, text, and surface objects use the geometry component
system to add evaluated mesh object instances to the dependency graph
"for render engine" iterator. Therefore it is unnecessary to process
those object types in these loops-- it would either be redundant work
or a no-op.
2022-08-17 13:02:45 -04:00
Bastien Montagne
04a04e9f69 Merge branch 'blender-v3.3-release' 2022-08-17 18:08:37 +02:00
Bastien Montagne
244ef1f0f5 LibOverride: Remove the 'make all editable' user preferences.
This behavior is now implicitely controlled by the 'Make' operations,
based either on context or selected items.
2022-08-17 18:08:18 +02:00
Hans Goudey
9a67aac8d7 Cleanup: Fix outdated comment 2022-08-17 12:05:20 -04:00
Hans Goudey
a73cc81646 Cleanup: Remove unused function
Also remove two DispList references I missed in the previous commit.
2022-08-17 12:03:26 -04:00
Hans Goudey
6718afdc8a Cleanup: Fix outdated comments referring to DispList 2022-08-17 11:57:21 -04:00
Hans Goudey
316194c384 Merge branch 'blender-v3.3-release' 2022-08-17 11:13:13 -04:00
Hans Goudey
92493a5fa7 Fix: Node editor context path for curves objects
The object data path item wasn't added properly.
Also remove some of the unnecessary variables and forward declarations.
2022-08-17 11:11:28 -04:00
Hans Goudey
eaa87101cd Metaball: Evaluate metaball objects as mesh components
With the ultimate goal of simplifying drawing and evaluation,
this patch makes the following changes and removes code:
- Use `Mesh` instead of `DispList` for evaluated basis metaballs.
- Remove all `DispList` drawing code, which is now unused.
- Simplify code that converts evaluated metaballs to meshes.
- Store the evaluated mesh in the evaluated geometry set.

This has the following indirect benefits:
- Evaluated meshes from metaball objects can be used in geometry nodes.
- Renderers can ignore evaluated metaball objects completely
- Cycles rendering no longer has to convert to mesh from `DispList`.
- We get closer to removing `DispList` completely.
- Optimizations to mesh rendering will also apply to metaball objects.

The vertex normals on the evaluated mesh are technically invalid;
the regular calculation wouldn't reproduce them. Metaball objects
don't support modifiers though, so it shouldn't be a problem.
Eventually we can support per-vertex custom normals (T93551).

Differential Revision: https://developer.blender.org/D14593
2022-08-17 10:20:25 -04:00
Julian Eisel
71f091a631 Cleanup: Remove unused Outliner search element storage
This is old code to keep track of an active search element, so you could
step through the search results. This isn't used anymore, and not needed
since searching now filters the tree to only show matches. If we ever
wanted to have support for stepping through elements again, that should be
done via the active element instead.
2022-08-17 16:15:03 +02:00
Hans Goudey
db054b447d Cleanup: Move view3d_select.c to C++
Almost entirely adding casting and standard clang tidy changes.
Also switch to `blender::Vector` instead of the macro-based `BLI_array`.
2022-08-17 09:54:01 -04:00
Omar Emara
923e10d751 Fix: Crash if Movie Clip node has an empty movie
The movie clip GPU texture free function doesn't do null checks, so make
sure the movie clip is not null before freeing.
2022-08-17 15:11:35 +02:00
Philipp Oeser
1e427e224b Merge branch 'blender-v3.3-release' 2022-08-17 14:15:33 +02:00
Philipp Oeser
224869acc5 Use report warning opening file written by newer Blender binary
handle_subversion_warning() was reporting with RPT_ERROR type, replaced
with RPT_WARNING.

RPT_ERROR would stop python scripts opening files written by newer
Blender binary with bpy.ops.wm.open_mainfile(), preventing further code
from running. This does not seem right since Blender itself still loads
the files.

Ran into this checking T100446 in 2.93.

Differential Revision: https://developer.blender.org/D15712
2022-08-17 14:11:51 +02:00
Campbell Barton
517d622057 Cleanup: conversion warnings in GCC 2022-08-17 21:34:13 +10:00
Bastien Montagne
6ab5bced61 Merge branch 'blender-v3.3-release' 2022-08-17 13:01:09 +02:00
Bastien Montagne
fec2543648 LibOverride: Add Make/Reset/Clear entries to IDTemplate contextual menu.
Matches main operations exposed in View3D and the Outliner.
2022-08-17 12:10:31 +02:00
Campbell Barton
a078262804 Merge branch 'blender-v3.3-release' 2022-08-17 17:07:31 +10:00
Campbell Barton
839ece6477 Fix T100411: Invert Axis Pan option ignored for Lock Camera Pan/Zoom 2022-08-17 17:06:09 +10:00
Campbell Barton
b1d3097fa9 WM: update comment about window redraw for thumbnails 2022-08-17 15:56:00 +10:00
Campbell Barton
e52fd904e8 Merge branch 'blender-v3.3-release' 2022-08-17 15:45:25 +10:00
Campbell Barton
288cd705eb Merge branch 'blender-v3.3-release' 2022-08-17 15:44:30 +10:00
Campbell Barton
95fd163074 Cleanup: spelling in comments 2022-08-17 15:43:17 +10:00
Campbell Barton
a1f10b10b6 Fix freed memory access checking events with debug builds
Pressing escape when rendering a viewport animation would
access the freed even and crash (with ASAN enabled).

Always check the context's window before the event as this is a signal
a file was loaded or the window was closed (and it's events freed).
2022-08-17 15:33:30 +10:00
Ray Molenkamp
04dba9349d Fix: build issue with MSVC
empty initializers are not allowed in C99
introduced by rB2481be90e38d36abc06501c395105fa1833baf1c
2022-08-16 22:09:58 -06:00
Richard Antalik
5fab3bc630 Merge branch 'blender-v3.3-release' 2022-08-17 05:12:34 +02:00
Richard Antalik
06a01168f6 Fix T100079: Encoding with DNxHD fails due to bad parameters
Constant_rate_factor mode was not updated when choosing DNxHD codec in
RNA update function.

Ensure `FFM_CRF_NONE` is set.
2022-08-17 04:58:45 +02:00
Campbell Barton
48da8c4040 Fix T98462: Save Screenshot (glReadPixels) fails under Wayland
Use an off-screen buffer for the screen-shot operator.

Reading from the front-buffer immediately after calling swap-buffers
failed for GHOST/Wayland in some cases.
While EGL can request to preserve the front-buffer while drawing,
this isn't always supported. So workaround the problem by avoiding
use of the front-buffer entirely.
2022-08-17 12:58:17 +10:00
Campbell Barton
54827bb7cd Cleanup: shadow warning 2022-08-17 12:57:30 +10:00
Campbell Barton
2481be90e3 WM: ensure AlembicImportParams are always initialized
Initialize all members before assignment, ensuring newly added
members are never left uninitialized.
2022-08-17 12:51:07 +10:00
Campbell Barton
1f2a5fea87 Cleanup: strip blank lines around comment blocks 2022-08-17 12:51:07 +10:00
Campbell Barton
9d2136f272 Cleanup: add missing doxy sections 2022-08-17 12:51:07 +10:00
Campbell Barton
26d6b27ebc Cleanup: quiet shadow warning 2022-08-17 12:51:07 +10:00
Chris Blackbourn
836c07f29c UV: grab tool supports live unwrap
Differential Revision: https://developer.blender.org/D15709
2022-08-17 14:47:35 +12:00
Chris Blackbourn
74ea0bee9c UV: add geometry driven uv relax brush
Differential Revision: https://developer.blender.org/D15530
2022-08-17 14:11:57 +12:00
Campbell Barton
29c1d736c4 Cleanup: compiler warnings, clang-tidy 2022-08-17 11:57:53 +10:00
Hans Goudey
413c399ab8 Cleanup: Move view layer array utils from macros to functions
These macros don't compile in C++ because of taking an address of a
temporary and use of designated initializers. Besides that, using
functions can improve debugging and type safety.

Differentil Revision: https://developer.blender.org/D15693
2022-08-16 21:25:14 -04:00