1
1
Commit Graph

123051 Commits

Author SHA1 Message Date
176abe3488 Merge branch 'main' into asset-browser-grid-view 2023-04-06 11:57:20 +02:00
e927791dbf Cleanup: Clang-format 2023-04-06 11:55:19 +02:00
bd319f6561 Texture Paint: always respect edit mode hiding
Since e3801a2bd4, we would always respect
hiding for vertex paint and weight paint (drawing code and stroke based
painting), leaving an inconsistency between the different paintmodes.

To rectify this, now also always respect edit mode hiding for projection
painting as well.

Some feedback was gathered in #sculpt-paint-texture-module to ensure
this is desired behavior.

Note: this does not change the (experimental) texture painting in
sculptmode [this already respects hiding via PBVH, albeit in a manner
that bleeds into hidden faces if the brush center is over visible faces]

ref #106354

Pull Request: blender/blender#106544
2023-04-06 09:28:25 +02:00
ce9be92adf Fix 106278: Intel iGPU Crashes When Switching to Eevee
After investigating the crash logs it looked like the macro
unrolling wasn't working on Windows systems with these GPUs.

Macro unrolling was changed in order to cross compile to Metal and
in the future to Vulkan. The macro unrolling in OpenGL can be removed
by using a different naming scema.

This PR removes the macro unrolling by changing the generated GLSL
code:

**Before**
```
layout(std140) uniform _probe_block
{
  ProbeBlock probe_block;
};
```

**After**
```
layout(std140) uniform probe_block
{
  ProbeBlock _probe_block;
};
```

Some tweaks had to be done to the Eevee-shaders to make sure that
the macro unrolling is done correctly and could be compiled using
legacy opengl drivers.

Fix: #106278
Fix: #106555
(and others)

Pull Request: blender/blender#106535
2023-04-06 08:03:25 +02:00
Jon Denning
bbf756ddf1 Text Editor: update syntax highlighting for different Python strings
Python has several different string types [0], each using a prefix to
indicate the type. Presently Blender's Text Editor / syntax highlighting
does not include the prefix as part of the string, which makes the
prefix appear as a syntax error. This patch looks for these prefixes,
and includes them with the string highlighting.

Note: prefixes can appear in either case (ex: f and F mean the same
thing), and some prefixes can be combined (ex: fr is a raw f-string).

[0]: https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals

Ref D14739
2023-04-06 14:01:54 +10:00
68092297ca Cleanup: Remove unused DerivedMesh edges/corners code
The edge hash is only needed for the corner edge array,
and the mloop_index variable is unused.
2023-04-05 22:35:26 -04:00
d727f64ad2 PyAPI DocS: Fix source code link markup
FIxes blender/blender#106212#
2023-04-05 22:27:51 -04:00
a2b259aa2c Fix: Wrong attribute name used for corner edges array
My regex to check for this didn't catch the mistake because
the repetition was split between two lines.
2023-04-05 22:18:30 -04:00
63c0e1be31 UV: paste-uvs will return OPERATOR_CANCELLED if uvs were unchanged 2023-04-06 13:48:29 +12:00
6e1c048250 Fix #106314: warn user when paste-uvs fails to find a match
Pull Request: blender/blender#106606
2023-04-06 03:36:57 +02:00
2e878690e5 WM: include the GHOST backend in bug report when non-default
It wasn't possible to know if users were running X11/Wayland.
The field is omitted for WIN32 & APPLE.
2023-04-06 10:29:44 +10:00
d34abea26a Cleanup: format 2023-04-06 11:02:47 +12:00
b626f1fd18 Cleanup: use ".cc" & ".hh" extensions for intern/ghost 2023-04-06 08:29:57 +10:00
d1bbb32cb4 Fix #106602: Cyclic link in versioning code
Fix link from capture_node to node.

Pull Request: blender/blender#106605
2023-04-06 00:11:12 +02:00
302e858273 Fix #104507: Show Splash if New Version
Show Splash screen if there are no Preferences found even if we are
launched with a filename, so that users can migrate old settings.

Pull Request: blender/blender#105863
2023-04-05 22:35:05 +02:00
8f8548e964 Fix libs harvesting for Embree as a dynamic library
libembree4.so was missing from make deps target location.
2023-04-05 22:13:02 +02:00
70edef1311 Cycles: Fix Metal use-after-free bug
`entryPoint` was being used unsafely following its release.

Pull Request: blender/blender#106572
2023-04-05 21:50:14 +02:00
92c9c1d400 Fix #106568: Overlay: Resolve motion path rendering in Metal
Resolve small indexing issue in Metal implementation
of motion path line rendering.

Authored by Apple: Michael Parkin-White

Pull Request: blender/blender#106595
2023-04-05 20:55:14 +02:00
6cb5b14f16 Fix #106598: Cone primitive crash after MPoly removal
The sizes of the bottom faces weren't filled.
2023-04-05 14:11:18 -04:00
b288c4004e Cleanup: fix various Cycles compilar warnings
Mainly for the build configuration of the Hydra render delegate and
standalone repo.
2023-04-05 19:48:19 +02:00
920ffd3253 Cleanup: fix clang 10 compiler warning 2023-04-05 19:48:19 +02:00
73d7bde25c Increase size of catalog navigation bar
Use same size as File Browser, this is a bit too tight.
2023-04-05 19:03:40 +02:00
a34ac195ac Fix now unnecessary FIXME comment
This C++ incompatibility is solved in the main branch now.
2023-04-05 19:01:32 +02:00
f5f95f5a03 Fix compile errors, adapt to changes in master 2023-04-05 18:52:24 +02:00
81f00c4cc1 Merge branch 'main' into asset-browser-grid-view 2023-04-05 18:51:27 +02:00
42a9c62bff Fix #106584: Active/default UV map legacy conversion with name conflict
The legacy conversion from MLoopUV to generic attributes used the
active and default layer names to copy the active/render status to the
new layers. But sometimes the names can change, and they weren't
updated in that case. Instead, store the active status with an index
into the names array (use an array instead of Vector for clarity).
2023-04-05 11:46:35 -04:00
18ad154cf9 Fix CUdeviceptr and hipDeviceptr_t build error on ppc64le architecture
Pull Request: blender/blender#106575
2023-04-05 17:42:01 +02:00
892f985227 Fix mismatch in Sequencer preview region versioning
Make the versioning for the sequencer preview region match the state of
new sequencers, the zooming range would be different.
2023-04-05 17:21:11 +02:00
56640440f0 Fix crash loading pre 2.5 test file (Cycles test failure)
fa0f295b53 exposed that there was a region missing because of some
faulty versioning.

The `fluid_motion_blur.blend` Cycles test file was crashing. Seems like
this is a pre 2.5 file that was resaved in newer versions, but the
preview region for the Sequencer was missing. Before mentioned commit,
the region would be broken when activating the preview view mode in the
Sequencer, now it would crash even on startup.

Ensure the region exists, as expected.
2023-04-05 16:57:56 +02:00
68ec019a40 Fix: Typos, grammar, writing style in UI messages
Issues reported by Joan Pujolar:

See the pull request for a full list of reasoning.

Pull Request: blender/blender#106580
2023-04-05 16:40:16 +02:00
4c66e0fe61 Fix windows tests failing due to comparison with NaN
which returns false on other platforms but true on windows with fast math
2023-04-05 16:00:03 +02:00
d17b1da572 Fix FindEmbree.cmake
When EMBREE_INCLUDE_DIR was cached, it ended up wrongly assuming it
was Embree 4.
2023-04-05 15:53:20 +02:00
8f0829f2a0 Cleanup: Remove accidentally committed TODO comment
Committed in fa0f295b53 but not necessary anymore. The regions are
creating in versioning already now.
2023-04-05 15:46:25 +02:00
ad031029cf Fix #106467: Crash when loading files with custom node groups
Loading a blend file containing custom material node groups crashed Blender.
See #106467 for more information.

Pull Request: blender/blender#106559
2023-04-05 15:36:24 +02:00
fa0f295b53 UI: Region polling support
Introduces *ARegionType.poll()* as a way to dynamically add/remove a region. The region is still there internally, but is not accessible to the user.

Previously editors would to this manually, by either removing/adding regions altogether, or hiding them, unsetting their alignment (so no AZones are added I assume) and removing their event handlers. Polling makes this much simpler.

We plan to use this in #102879.

This patch refactors multiple editors to use region polling:
- File Browser
- Sequencer
- Clip Editor
- Preferences

Notes:
- Previously, editors would lazy-create some of the regions. Versioning is added here to ensure they are always there. Could be a separate patch.
- Some editors reuse a region in different display modes, and so additional work needs to be done to reinit regions they become available or the mode changes. Typically `V2D_IS_INIT` is unset for that, which isn't great. Could be improved, but not a new issue.

Behavior change:
- When the Preferences are opened as a regular editor, the "execution" region in the preferences that displays the *Save Preferences* button would still be there, but empty with a scrollbar.
  This patch makes it disappear entirely.

## Implementation

- Introduces `ARegionType.poll()`
- Before a window is drawn, all contained regions have their poll checked, and the result is stored in a flag (`RGN_FLAG_POLL_FAILED` - runtime-only flag).
- If the result of the poll changes, the area is re-initialized and event handlers are added/removed.
- UI code checks the flag as needed.

Pull Request: blender/blender#105088
2023-04-05 15:30:32 +02:00
075d92184b Cleanup: correct comment, quiet warnings 2023-04-05 20:11:08 +10:00
a76bf65c9d Cycles: Refactored GPU denoising code
To prepare for OIDN2 with GPU support, some of the code that was exclusive to the OptiXDenoiser is being moved to the DenoiserGPU superclass.

Co-authored-by: Stefan Werner <stefan.werner@intel.com>
Pull Request: blender/blender#106496
2023-04-05 11:19:15 +02:00
9e9baa9085 Cycles: Upgrade to new Embree 4 while staying compatible with Embree 3
For more information about Embree 3->4 API changes:
https://github.com/embree/embree/blob/master/doc/src/api.md#upgrading-from-embree-3-to-embree-4

This is not yet enabling HW RT on Arc GPUs using Embree, which is worked on in blender/blender#106266

Co-authored-by: Nikita Sirgienko <nikita.sirgienko@intel.com>
Co-authored-by: Stefan Werner <stefan.werner@intel.com>
Pull Request: blender/blender#105974
2023-04-05 11:03:06 +02:00
2c446d2de3 Cleanup: use bool for render pipeline & related API's
Also add doc-string for RenderEngine::reports.
2023-04-05 17:52:28 +10:00
7e99470a85 Fix headless render silently failing when called from Python
Any errors from calling `bpy.ops.render.render(write_still=True)` would
be suppressed, making it impossible to know what went wrong.

Now the operator now reports errors when run via `exec` which mainly
occurs when the operator is called from scripts.

Interactively rendering via `invoke` is left as-is since users can see
the error in the UI and showing a popup error is disruptive.
2023-04-05 17:42:19 +10:00
a245e294a3 Fix missing assets in the source archive
The assets are required to build proper Blender release, so they can not be
skipped from packing.

The packing ignores the `working` directory as it seems to be big and sounds
that it is not needed for the release.

The assets are bundled under the `release/datafiles/assets` folder in the
blender sources. This is where they will reside after switch to the Git LFS.

Pull Request: blender/blender#106536
2023-04-05 09:27:42 +02:00
440cccecdc Cleanup: spelling in comments 2023-04-05 14:39:51 +10:00
d683665095 Cleanup: compiler warnings 2023-04-05 14:23:54 +10:00
8216623e25 Build: bump wayland to v1.22
Use the latest Wayland version, resolves inverted track-pad scroll
direction #104272 by adding support for physical scroll direction.
Updates to GHOST/Wayland have already been made.
2023-04-05 14:04:18 +10:00
dec9c593cb Cleanup: Use generic index copying utility for normals 2023-04-04 17:22:14 -04:00
f594e951e0 Cleanup: Use generic mesh corner to poly map utility 2023-04-04 17:01:19 -04:00
e785d956c4 Fix: Crash loading autosave/last session file after MPoly removal
We need to check CustomData for the MPoly layer rather
than the deprecated mesh customdata pointer.
2023-04-04 16:13:39 -04:00
4b2ea18ec9 Cleanup: Deduplicate OffsetIndices utility for meshes and curves
The "reverse map" of corners to faces and points to curves is the same
for meshes and curves now. Move it to the offset indices header to
reflect this.

This unification can go further in the future, but I'd rather wait
until the design is clearer for now.

Pull Request: blender/blender#106570
2023-04-04 22:12:17 +02:00
8d0920ec6d Cycles: Optimize extraction of Blender attributes
Similar to 4bcd59d644. This probably got worse recently with
the generic attribute refactors for `Mesh`, but the final performance is
probably much better than older versions too.

Timings extracting attributes from a 16 million vertex grid (seconds):
- Corner float attribute: 0.72 -> 0.19
- Face float attribute: 0.60 -> 0.07
- UV map: 3.18 -> 0.05
2023-04-04 15:38:12 -04:00
6652d2ee9b Cleanup: Remove unused DerivedMesh vert normals calculation 2023-04-04 14:52:41 -04:00