115010 Commits

Author SHA1 Message Date
Campbell Barton
c8edc458d1 PyDoc: support building full API docs on macOS & WIN32
Accessing context members depended on `ctypes` to access symbols
which were hidden for macOS & WIN32.

Add an API call that doesn't require the symbols to be exported.

This allows most symbols to be hidden on Linux, see D14971.
2022-05-18 17:06:03 +10:00
Campbell Barton
88fbe94d70 Merge branch 'blender-v3.2-release' 2022-05-18 15:34:39 +10:00
Campbell Barton
77f2cb1686 Fix T98192: Crash when apply transforms after deleting an object 2022-05-18 15:33:44 +10:00
Campbell Barton
5d1cab0c2f Merge branch 'blender-v3.2-release' 2022-05-18 14:42:55 +10:00
Campbell Barton
d7053ba030 Fix T98191: Alt-LMB for node detach fails with RMB select
Regression caused by [0] which changed node selection to use
PRESS for selection and CLICK_DRAG to transform the selection.

This conflicted with Alt-LMB which would select the node then
pass-though to node.background_sample, preventing the drag event
from being activated.

Resolve by only activating background-sample when the cursor
isn't over a node or socket.

[0]: 4c3e91e5f565b81dd79b5d42f55be5b93662d410
2022-05-18 14:39:48 +10:00
Campbell Barton
0af772ef8a Merge branch 'blender-v3.2-release' 2022-05-18 12:19:02 +10:00
Campbell Barton
ffbeb34f5f Cleanup: format 2022-05-18 12:17:42 +10:00
Chris Blackbourn
c38187393a Fix T98214: UV selection crash with wire edges
Regression in ffaaa0bcbf477c30cf3665b9330bbbb767397169
which removed the NULL pointer check.
2022-05-18 12:15:56 +10:00
Campbell Barton
ebb492a389 Python: log the status of '--python-use-system-env' on initialization
Report when the PYTHONPATH is expected to be used to help debug Python
initialization issues (see T98131).
2022-05-18 11:37:53 +10:00
Richard Antalik
df26f4f63a Merge branch 'blender-v3.2-release' 2022-05-17 21:23:55 +02:00
Richard Antalik
35e73aa347 Fix T98021: Crash when using scene strip as sequencer input
Issue was caused by treating such strip as meta and using
`seq->channels` directly, which is not valid for scene strips.

Pointer to channels is now provided by function
`SEQ_get_seqbase_from_sequence`.
2022-05-17 21:22:21 +02:00
Olivier Maury
b48adbc9d7 Fix T97921: Cycles MNEE issue with light path nodes
Ensure the correct total/diffuse/transmission depth is set when evaluating
shaders for MNEE, consistent with regular light shader evaluation.

Differential Revision: https://developer.blender.org/D14902
2022-05-17 21:07:49 +02:00
Bastien Montagne
b3b5d4cabb Merge branch 'blender-v3.2-release' 2022-05-17 17:34:51 +02:00
Bastien Montagne
83349294b1 Fix T98201: Corrution of filepaths in some case during 'make relative' process.
We need to ensure `Main.filepath` is consistent with the current path
where we are saving the .blend file, otherwise some path processing code
can produce invalid results (happens with e.g. the code syncing the two
path storages in Library IDs).
2022-05-17 17:32:23 +02:00
Brecht Van Lommel
8fdd3aad9b Fix T98163: Cycles OSL rendering normal maps differently
Match SVM and ensure valid reflection when setting up BSDFs.
2022-05-17 16:46:37 +02:00
Brecht Van Lommel
0609b4bb49 Fix T98052: Eevee / Workbench background render crash with GPU subdivision
The problem is that depsgraph evaluation happens before the OpenGL context
is initialized, and so modifier evaluation happens without GPU subdivision.
Later the BKE_subsurf_modifier_can_do_gpu_subdiv test in the draw code gives
a different result.

This just checks if the mesh has information for GPU subdivision in the draw
code, and if so uses it. This is only set if the test for supported GPU
subdivision passes in the modifier evaluation.

Additionally it may be good to perform OpenGL context initialization earlier
so background render can take advantage of GPU subdivision, but this is more
complicated.

Differential Revision: https://developer.blender.org/D14969
2022-05-17 16:14:15 +02:00
Bastien Montagne
8c9805fc62 Revert "Outliner: Remove the 'Remap data-block usages' operation."
This reverts commit 30534deced8dad16c566dd82db3edd462283de13.

After discussion and feedback from users, it's better to keep this tool
available until there is time to properly re-think the whole Outliner's
contextual menu.
2022-05-17 16:09:28 +02:00
Bastien Montagne
939c2387a1 Cleanup: blendloader: add logger to writefile.c, remove some asserts.
Properly use CLOG to report info or errors in `writefile.c`, instead of
printf's.

And remove some assert when logging error reports and the issue is not
critical.
2022-05-17 16:06:54 +02:00
Bastien Montagne
b759a3eac0 Cleanup: Remove asserts when logging error messages.
If we produce CLOG_ERROR messages and the error is not actually
critical, there is no point in asserting too.

Mainly related to ID user counts, and a few other ID management areas.
2022-05-17 16:06:54 +02:00
Bastien Montagne
7a31229011 Cleanup: Use BLI_assert_unreachable() as example in comment of _BLI_assert_abort.
Using `BLI_assert(0)` should typically be avoided now that we have
`BLI_assert_unreachable`...
2022-05-17 16:06:54 +02:00
Bastien Montagne
fb2ae6b8c5 Cleanup: Use switch and BLI_assert_unreachable() more.
Replace some `if/else if` chains by proper `switch` statement.

Replace some `BLI_assert(0)` calls by `BLI_assert_unreachable()` ones.
2022-05-17 16:06:54 +02:00
Bastien Montagne
9a4cb7a732 Cleanup: Use switch and BLI_assert_unreachable() more.
Replace some `if/else if` chains by proper `switch` statement.

Replace some `BLI_assert(0)` calls by `BLI_assert_unreachable()` ones.
2022-05-17 16:06:54 +02:00
Bastien Montagne
6d42cd8ff9 Cleanup: Use switch and BLI_assert_unreachable() more.
Replace some `if/else if` chains by proper `switch` statement.

Replace some `BLI_assert(0)` calls by `BLI_assert_unreachable()` ones.
2022-05-17 16:06:54 +02:00
Bastien Montagne
22bf263269 Cleanup: Use switch and BLI_assert_unreachable() more.
Replace some `if/else if` chains by proper `switch` statement.

Replace some `BLI_assert(0)` calls by `BLI_assert_unreachable()` ones.
2022-05-17 16:06:54 +02:00
Bastien Montagne
c6e3242e18 Cleanup: Use switch and BLI_assert_unreachable() more.
Replace some `if/else if` chains by proper `switch` statement.

Replace some `BLI_assert(0)` calls by `BLI_assert_unreachable()` ones.
2022-05-17 16:06:54 +02:00
Bastien Montagne
ff2d6c2ba8 Cleanup: Use switch and BLI_assert_unreachable() more.
Replace some `if/else if` chains by proper `switch` statement.

Replace some `BLI_assert(0)` calls by `BLI_assert_unreachable()` ones.
2022-05-17 16:06:54 +02:00
Antonio Vazquez
c8b740cc00 Merge branch 'blender-v3.2-release' 2022-05-17 16:06:27 +02:00
Aleš Jelovčan
dbc439e41a Fix unreported: GPencil Time offset modifier Reverse only plays 2 times
This patch fixes long standing issue of reverse mode only performing loop 2 times and then stops displaying.

Differential revision: https://developer.blender.org/D14921
2022-05-17 15:59:11 +02:00
Brecht Van Lommel
dbb6016e94 Cleanup: fix compiler warning 2022-05-17 15:36:22 +02:00
Hans Goudey
200e63b0bf Fix: Copy and paste error in curves RNA
Use a similar solution for meshes for curves symmetry updating.
2022-05-17 14:59:31 +02:00
Hans Goudey
ed62b65474 Cleanup: Use const in curves sculpt code
This makes it much clearer what data is supposed to be modified
and what data is just used to influence the operation. The new
`BKE_paint_brush_for_read` function isn't great design, but it
can be removed or renamed if similar changes are applied to
more places.

Also pass pointers explicitly to `sample_curves_3d_brush` rather
than reusing the `bContext`. This makes it clearer what data the
function actually needs.

Differential Revision: https://developer.blender.org/D14967
2022-05-17 13:06:14 +02:00
Hans Goudey
3ad5510427 Cleanup: Order return arguments last 2022-05-17 13:02:41 +02:00
Clément Foucault
af6765a49c EEVEE-Next: Fix missing break in switch statement 2022-05-17 12:49:00 +02:00
Clément Foucault
3ccdc362da EEVEE-Next: Add camera module 2022-05-17 12:39:02 +02:00
Clément Foucault
46114f0a36 DRW: Add DRW_view_camtexco_get() 2022-05-17 12:34:35 +02:00
Clément Foucault
c7033bdf26 DRWWrapper: Add StorageFlexibleBuffer
This buffer resizes on access.
2022-05-17 12:34:35 +02:00
Clément Foucault
65fa34f63f DRW: Add SwapChain container to allow easier usage of double buffering
The template also takes the length of the chain to allow triple buffering.
2022-05-17 12:34:35 +02:00
Sergey Sharybin
f9ed31b15d Merge branch 'blender-v3.2-release' 2022-05-17 11:31:59 +02:00
Sergey Sharybin
4301b6c896 Fix console errors about missing properties in circle select
A regression since 113b8030ced9: circle selection operators does not
define properties like deselect_all and a special name callback is to
be used for those.

This is what was already done for circle select in the 3D viewport.
Some other spaces were using the generic pick operator for the circle
selection which causes error prints in the console.
2022-05-17 11:23:04 +02:00
Sybren A. Stüvel
f752eaadbd Remove incorrect poll method from object.instance_offset_from_cursor
Remove poll method from the `OBJECT_OT_instance_offset_from_cursor`
operator. It was checking for `context.active_object`, but not even doing
anything with the active object. It'll get in the way of exposing this
operator in another area of the interface, though.
2022-05-17 11:00:04 +02:00
Campbell Barton
c582a2dbd9 Merge branch 'blender-v3.2-release' 2022-05-17 18:12:41 +10:00
Jeroen Bakker
eddfa811da Preferences: Moved Sculpt texture paint to prototypes.
Sculpt texture paint should not be considered as a new feature just yet. There
are many designs still missing that could drive changes.
2022-05-17 10:12:22 +02:00
Campbell Barton
bdb5a50682 Update tests to account for Text.as_string not adding a trailing newline
Regression in tests from [0] tests were written to assume a newline was
added to the result of Text.as_string which is no longer the case.

[0]: f4ff36431ccfac2f0a99fc23c18fe0d9de38b36d
2022-05-17 18:11:16 +10:00
Campbell Barton
080e506e28 Merge branch 'blender-v3.2-release' 2022-05-17 17:50:50 +10:00
Campbell Barton
fcc3a68cac Merge branch 'blender-v3.2-release' 2022-05-17 17:50:45 +10:00
Campbell Barton
a4ed0f51c1 Fix click detection for simulated events
Refactoring event click-drag detection broke click detection for
simulated events. Resolve this by sharing logic for update previous
values in `wmWindow.eventstate` for regular event handling
(no functional changes for non-simulated events). Failure to detect
clicks for simulated events broke the undo test
`test_undo.view3d_multi_mode_select` in `../lib/tests/ui_simulate/run.py`.
All undo tests now pass.
2022-05-17 17:49:40 +10:00
Campbell Barton
f4ff36431c Fix text.as_string() adding a trailing new-line
Moving Text.as_string() from Python to C [0] added an extra new-line
causing a round-trip from_string/to_string to add a new-line,
this also broke the undo test `test_undo.text_editor_simple` in
`../lib/tests/ui_simulate/run.py`.

[0]: 231eac160ee394d41c84e0cc36845facb7594ba5
2022-05-17 17:49:32 +10:00
Hans Goudey
f11401d32a Cleanup: Deduplicate Alembic procedural bounding box mesh creation
This removes the manual construction of a box mesh in the mesh sequence
cache modifier when the Alembic procedural is enabled. It also removes
the use of `BKE_object_boundbox_get` which doesn't make sense on a
non-evaluated object.

Differential Revision: https://developer.blender.org/D14958
2022-05-17 09:41:32 +02:00
Jesse Yurkovich
51195c17ac Merge remote-tracking branch 'origin/blender-v3.2-release' 2022-05-17 00:30:54 -07:00
Jesse Yurkovich
210d0f1b80 Fix T96414: Stencil mapping is incorrect for UDIMs
When texture painting, brush textures and brush texture masks were not
transformed to account for UDIM tiles.

Differential Revision: https://developer.blender.org/D14671
2022-05-17 00:27:23 -07:00