Commit Graph

133203 Commits

Author SHA1 Message Date
Aras Pranckevicius e76b848697 Cleanup: Video: change bMovieHandle function to take ImBuf as input
Towards #118493: make movie writing functionality take ImBuf instead
of int* to pixel data.

While at it, make other bMovieHandle functions use "bool" return type
when it is strictly a success/failure result.

Pull Request: https://projects.blender.org/blender/blender/pulls/118559
2024-02-21 12:57:36 +01:00
Jason Fielder eac8c381a0 Metal: Fix EEVEE sync issue on render
When a sync primitive signal existed
in its own command buffer, the command
buffer execution was skipped as the empty
flag was previously still set to true.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/118557
2024-02-21 12:53:42 +01:00
Aras Pranckevicius 31869d6857 Cleanup: ImBuf: remove various unused functions
IMB_double_x, IMB_double_y, IMB_double_fast_x, IMB_double_fast_y,
imb_filterx are not used by anything. Looks like they all come
from "initial revision, 22 years ago" and probably unused for decades.
2024-02-21 13:47:50 +02:00
Philipp Oeser 11db0b9dad Fix #118524: Loopcut crashes when not near an edge
Caused by 1c0f374ec3

When `EDBM_edge_find_nearest_ex` does not find a nearest edge in
`loopcut_mouse_move`, then  `loopcut_update_edge` will set
`RingSelOpData` `ob` to nullptr (rightfully so).

This would then crash in `ringsel_draw` (because we are trying to call
`object_to_world()` on the nullptr).

Prior to 1c0f374ec3 this was also "wrong", but
`EDBM_preselect_edgering_draw` would early out before using garbage
data.

Now guard against this and dont call `EDBM_preselect_edgering_draw` at
all if we dont have valid input.

Pull Request: https://projects.blender.org/blender/blender/pulls/118549
2024-02-21 12:38:06 +01:00
Campbell Barton f6adf4b1c5 Extensions: support dropping file-paths
Dropping a zip file from the file-system now calls the drop function
which can use the "Install from Disk" logic.
2024-02-21 21:58:04 +11:00
Jeroen Bakker e6eecdf614 EEVEE-Next: Voronoi colors are pure emissive
The voronoi texture node only sets the first 3 components of the
color. The alpha value is never set. Normally this is covered
when using it in a shader node, but when directly connected to
the AOV output, the color was stored as a pure emissive color.

This resulted in incorrect colors in the viewport and image renders.

This is a partial fix for #118494

Pull Request: https://projects.blender.org/blender/blender/pulls/118497
2024-02-21 11:32:29 +01:00
Philipp Oeser a2a03252c6 Cleanup: remove references to FLUID from point_cache_ui
Fluid (Smoke/Liquid) has its own UI (uses `PHYSICS_PT_cache` in
`properties_physics_fluid.py`), does not use `point_cache_ui` at all.

It seems 4235fe37d6 should have done this already.

Afaict, this is also not relevant for loading old (e.g. 2.79) files with
the old smoke system (since their caches wont be read anyways).

Pull Request: https://projects.blender.org/blender/blender/pulls/117404
2024-02-21 10:18:47 +01:00
Falk David 543194db70 CMake: Add build option to disable experimental features
This adds an option `WITH_EXPERIMENTAL_FEATURES` which is `ON` by default.
Sometimes it's usefull to be able to turn off all experimental features
during development for testing purposes. This option is still enforced to be
`OFF` for release cycles other than `alpha`.

Pull Request: https://projects.blender.org/blender/blender/pulls/118513
2024-02-21 09:57:40 +01:00
Omar Emara c409f2f7c6 Compositor: Unify Blur operation across CPU and GPU
This patch unifies the implementation of the separable Blur operation
across CPU and GPU. The difference is due to the fact that the CPU code
ignores pixels that are across the image boundary and adjusts the
weights accordingly, while the GPU code assumes extended boundaries.

Like the rest of the Blur nodes the CPU implementation is adjusted to
assume extended boundaries until an option to change the boundary
condition is added. The alpha version of this operation will be handled
in a separate patch.

Pull Request: https://projects.blender.org/blender/blender/pulls/118517
2024-02-21 07:31:14 +01:00
Omar Emara 69920a0680 Compositor: Use original hue in Hue Correct node
Currently, the Hue Correct node uses the adjusted hue when adjusting the
saturation and value of the input, so if the user adjusted the reds to
become blue, in order to change the saturation of the same area, one
would need to adjust the blues, which would overlap with the existing
blues.

This is contrary to how other compositing software like GIMP and Natron
do it, and it is less intuitive. So this patch changes the node to use
the original hue to the saturation and value curves as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/118487
2024-02-21 07:19:13 +01:00
Campbell Barton 01b1864604 Extensions: initialize default extensions repositories
Initialize a remote repository pointing to
https://extensions.blender.org and a local repository to use for
local (side-loaded) extensions installed from the file-system.
2024-02-21 16:15:03 +11:00
Campbell Barton f7927faa34 Extensions: support dropping URL's to install extensions
The dropped URL's must be known to Blender as one of the URL's
referenced by an online repository.
2024-02-21 15:48:46 +11:00
Campbell Barton 63f482d550 Merge branch 'blender-v4.1-release' 2024-02-21 14:10:00 +11:00
Campbell Barton 479b46ca93 Fix #117896: Key-modifiers on window activation fails under Wayland
Register the last held key when activating a window
(not only modifiers keys) under Wayland.

This resolves a bug where holding the D-key and clicking on a window
wouldn't activate grease pencil drawing.
2024-02-21 14:09:04 +11:00
Harley Acheson 67ae79cadc Merge branch 'blender-v4.1-release' 2024-02-20 18:05:21 -08:00
Harley Acheson 857341a7a7 Fix #118473: Glitches for Square Color Picker When Very Wide
When using a square color picker you can drag it very wide in an RGB
node. Once over a threshold the round cursor in the color canvas will
turn into a vertical bar. Caused by (dumb) proportion test. Replaced
with a proper check for gradient type.

Pull Request: https://projects.blender.org/blender/blender/pulls/118542
2024-02-21 03:03:48 +01:00
Harley Acheson af4b09a61c BLF: Utility to Wrap a String into Multiple Lines
Given a string, font id, and width, return a string vector with the string
wrapped to that width.

Pull Request: https://projects.blender.org/blender/blender/pulls/118436
2024-02-21 01:19:04 +01:00
Clément Foucault 8934633ecc EEVEE-Next: Add refraction roughness mapping
This allows better roughness approximation for glass
materials when not using raytracing.

The fit was done by rendering a checkerboard
with a refractive plane and an orthographic camera.
Same setup with a reflective plane gave the
reference roughness to match.
Rendering a few hundred of small images with
Cycles and then finding a curve fit manually
by matching blur level.

Rel #118256

Pull Request: https://projects.blender.org/blender/blender/pulls/118533
2024-02-21 00:52:09 +01:00
Campbell Barton f3753f9bcd CMake: add option to disable pre-compiled headers
./tools/utils_maintenance/code_clean failed to operate on any sources
that used pre-compiled headers.
2024-02-21 10:35:20 +11:00
Campbell Barton b6b00b61cb Cleanup: various non-functional changes for C++ 2024-02-21 10:33:56 +11:00
Campbell Barton b0fb693e1b Extensions: sort repositories based on type & name
The creation order was used which isn't especially meaningful.
Sort remote repositories first, then by name.
2024-02-21 09:59:47 +11:00
Dalai Felinto 4ceccb23df Extensions: change the icon of remote repositories
We were using the WORLD data-block icon before which is misleading.

Ref: !118521
2024-02-21 09:53:05 +11:00
Ray Molenkamp 95df77323f Make.bat: Only warn about python if the lib folder exists
People running `make update` first time, will not have a lib
folder yet, and get a warning about python being missing, this
sends some of them off onto somewhat of a wild goose chase
installing python when this is really not needed since it's
included in our libraries.

This change, changes the warning to only emit when the lib
folder exists, but python is missing in the lib folder and
there actually is likely an issue with the lib folder.
2024-02-20 12:03:11 -07:00
Hans Goudey de8d302e8b Cleanup: Use utility for finding index masks from group IDs
148cad93e3
2024-02-20 13:26:56 -05:00
Brecht Van Lommel c28038d970 Merge branch 'blender-v4.1-release' into main 2024-02-20 19:19:00 +01:00
Brecht Van Lommel a3ffb51da6 Tests: Silence unnecessary oiiotool warning messages 2024-02-20 19:18:22 +01:00
Brecht Van Lommel 6b0b3ccadc Fix: Missing include, causing error with a combination of build options 2024-02-20 19:18:22 +01:00
Jacques Lucke 4c15ce5ad5 Merge branch 'blender-v4.1-release' 2024-02-20 18:45:07 +01:00
Jacques Lucke ecc3e78d78 Fix #118402: support overaligned types in MEM_CXX_CLASS_ALLOC_FUNCS
Previously, the alignment of structs that use `MEM_CXX_CLASS_ALLOC_FUNCS`
were not taken into account when doing the allocation. This can cause some data
to be mis-aligned and leads to crashes when cpu instructions or code expect the
data to be aligned.

The fix is to provide an overload of `operator new` that accepts the alignment as parameter.

More info: https://en.cppreference.com/w/cpp/language/new (search for `align_val_t`).

Pull Request: https://projects.blender.org/blender/blender/pulls/118526
2024-02-20 18:44:26 +01:00
bonj fcc8a11370 Fix #118395: use copy instead of new for geometry nodes in modifiers list
Now it behaves the same as the materials list UI.

Pull Request: https://projects.blender.org/blender/blender/pulls/118420
2024-02-20 18:43:40 +01:00
Philipp Oeser 6b79f60885 Merge branch 'blender-v4.1-release' 2024-02-20 18:10:28 +01:00
Philipp Oeser d2f8af9b08 Fix #102930: crash loading a GP file with hook custom curve
The CurveMapping was just not initialized on file read (now done via
BKE_curvemapping_init).

Pull Request: https://projects.blender.org/blender/blender/pulls/118525
2024-02-20 18:09:41 +01:00
Sybren A. Stüvel 1c789199d5 Anim: Bone properties panel, add missing 'solo' property
Solo'ing bone collections was only possible from the Armature properties
panel. However, the bone collections shown on the Bone properties panel
should have the same functionality.

Pull Request: https://projects.blender.org/blender/blender/pulls/118512
2024-02-20 18:09:04 +01:00
Sybren A. Stüvel c120ead9df BLI: Clarify and test StringRefNull comparisons
Add some comments that clarify that `StringRefNull` can be compared with
other `StringRefNull` and with `StringRef` instances.

Add unit tests that cover these cases.

Pull Request: https://projects.blender.org/blender/blender/pulls/118515
2024-02-20 17:52:14 +01:00
Sybren A. Stüvel 5cd57c9eaa Merge remote-tracking branch 'origin/blender-v4.1-release' 2024-02-20 17:51:06 +01:00
Sybren A. Stüvel 490c183bfd Fix #95204: Custom properties not shown on pose bone hidden by collection
Work around the limitation that `context.active_pose_bone` is `None` when
the active bone is hidden.

This also fixes the issue that the bone custom properties panel was using
the global context (`bpy.context`) instead of the one passed to the
`draw()` and `poll()` functions.

Pull Request: https://projects.blender.org/blender/blender/pulls/118510
2024-02-20 17:44:22 +01:00
Christoph Lendenfeld a0fb1486be Fix #97973: Red underline in action editor is stale
When switching to an object with invalid channels,
the red underline would only appear on the second redraw.
Same when switching the other way around, then they would
stay until the next redraw.

The issue is that the logic to check if that line should be drawn
is checking the flag of the `bAnimListElem` which gets it from
the FCurve. But the FCurve is only checked later down the line
when getting the name.

Fix it by checking the flag on the FCurve directly.

Pull Request: https://projects.blender.org/blender/blender/pulls/118522
2024-02-20 17:33:39 +01:00
Jacques Lucke 0494605e7e Geometry Nodes: support group ids in Geometry Proximity node
This is the same 75e9056cac but for the Geometry Proximity node.

Pull Request: https://projects.blender.org/blender/blender/pulls/118467
2024-02-20 17:15:23 +01:00
Julian Eisel debdde985f Fix #108703: assert when loading "All" asset library
Error caused by attempting to register multiple catalogs with the same
catalog ID. This would happen when multiple asset libraries would use
the same catalog definition file, and the "All" library would attempt to
merge them all into one library.

Ignore duplicate catalogs, like we already do when reading individual
asset catalog definition files. Log an error instead, or a info log if
the catalog path matches as well (in which case the conflict can be
ignored as it won't be user visible).
2024-02-20 16:48:42 +01:00
Germano Cavalcante d7c728c2fb Cleanup: deduplicate code in 'knife_find_line_hits' 2024-02-20 11:25:54 -03:00
Julian Eisel 99673edd85 Cleanup: Add method to get UUID as std::string
Avoids having to use the C-style `BLI_uuid_format()` function with
manual buffer management, and makes it easy to get a `std::string` from
a UUID.
2024-02-20 15:20:11 +01:00
Aras Pranckevicius 447bb9a4b9 Cleanup: Move BKE_writeavi.h to C++ and rename to BKE_writemovie.hh
Pull Request: https://projects.blender.org/blender/blender/pulls/118506
2024-02-20 14:49:23 +01:00
Jacques Lucke 148cad93e3 BLI: simplify creating index masks from group ids
Pull Request: https://projects.blender.org/blender/blender/pulls/118498
2024-02-20 13:18:16 +01:00
Aras Pranckevicius f09c7dc4ba Video: Remove non-ffmpeg AVI support
Blender had a very limited (only uncompressed or MJPEG frames) .avi file
support, for both reading and writing. This is something that ffmpeg can
fully do.

This removes all of that. 3500 lines of code gone, primary motivations being:
- ffmpeg can read and write .avi files just fine, including ones with
  uncompressed or MJPEG frames.
- Blender's ffmpeg integration could also be taught to produce uncompressed or
  MJPEG .avi files, but TBH I don't see a particular reason to do that. Modern
  formats like H264 are better in every way, and already support "lossless"
  option if needed.
- The "Lite" blender build configuration was excluding both ffmpeg and avi
  anyway, so that config is something that can't read nor write any movies.

User visible changes:

- In scene image output type, under Video section now there's only Ffmpeg Video
  (AVI Raw and AVI JPEG are gone)
- Whenever loading an existing file, if output was one of AVI Raw / AVI JPEG,
  it is set to Ffmpeg Video.

Pull Request: https://projects.blender.org/blender/blender/pulls/118409
2024-02-20 13:15:50 +01:00
Pratik Borhade 6d88285cd2 Merge branch 'blender-v4.1-release' 2024-02-20 17:30:23 +05:30
bonj f5151bbbeb Fix #118116: Only hide solid mesh if overlays are enabled
When the retopology overlay is enabled, the edit mesh is not drawn
in solid mode. When you disabled overlays however, it would not be
drawn in any mode, which understandably confused users.
Now it checks whether overlays are enabled before it hides the solid mesh.

Pull Request: https://projects.blender.org/blender/blender/pulls/118422
2024-02-20 12:57:24 +01:00
Lukas Tönne a314bf7daf GPv3: Conversion function for the tint modifier
Adds a conversion function for the Tint modifier from GPv2.

Also added a unified function for converting the "influence" settings, which is shared between most grease pencil modifiers.
Modifier type casting was moved into the conversion functions for individual types to make the switch statement less verbose.

Pull Request: https://projects.blender.org/blender/blender/pulls/118465
2024-02-20 12:32:22 +01:00
Sergey Sharybin 43ed74f7a2 Fix crash in GPU compositor when running from command line
The non-locking context activation expects the render engine to
have its own GPU contexts, which is not necessarily the case when
compositing happens from the command line.

Ensure that the contexts exist prior to attempt of activating them.

Pull Request: https://projects.blender.org/blender/blender/pulls/118496
2024-02-20 12:22:43 +01:00
Lukas Tönne 2a7fcf2cfd Fix #118489: Use zero scale default since it's used as an offset. 2024-02-20 11:20:55 +01:00
Jason Fielder d1a9c2f650 Fix: Metal: EEVEE Next viewport motion blur
Resolves assertion for EEVEE Next motion
blur wherein a swizzled texture used in an
image binding loses write-access. We
instead must bind the source texture
for image write operations.

This is now consistent with expected
behaviour in other APIs.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/117479
2024-02-20 11:17:12 +01:00