This was caused by wrong assumption that `shadow_radius`
is also a radius for area light. To avoid the confusion,
use a new property for area light shadow scaling.
Blender shows invalid links in red in the node editor. However, it's not always
obvious why some links don't work, especially for beginners. This patch adds
additional information for every invalid link on the node that it links to.
The following error messages are added:
* Invalid link because of missing implicit conversions.
* Link cycle in node tree.
* A link from a field to a socket that does not support fields.
* Using the same menu on multiple Menu Switch nodes.
Currently, there are some per tree-type special cases in the link validation code.
In the future, this should be moved to tree type specific callbacks.
Pull Request: https://projects.blender.org/blender/blender/pulls/121976
Previously, the new frame was always added as root frame and did not have a parent.
Now, the common root frame of all selected nodes is detected and the new frame is attached to it.
Pull Request: https://projects.blender.org/blender/blender/pulls/121972
Fixes#121902, #121865, #121905 and some other reports that were closed
as duplicates.
Reverts a change done as part of 7d80fde033.
Reverting this change breaks the yet-to-be-used asset shelf popup a bit,
in that refreshing it won't work propery anymore. Think that's fair
given that 1) the popup isn't in use yet, 2) its refreshing implementation
causes a bunch of high priority bugs, and 3) #122068 is in review with a
better solution to handle refreshing. Namely, it converts the popup to a
popover, which handles refreshing differently, and thus makes the change
being reverted here unnecessary anyway.
The operator has a modal keymap with a toggle for inverted mode. This
key was only bound to `PRESS` events, preventing actual toggling during
modal operation.
It also needs to be invoked in inverted mode with ctrl, so a new
operator property was added to initialize the setting.
Pull Request: https://projects.blender.org/blender/blender/pulls/122146
In `SyncModule::sync_curves/sync_point_cloud` the material variable
can be used after it has been freed. The cause is that cryptomatte
can request a new material, which might trigger a relocation of the
references material.
This PR fixes this by doing the shadow sync before the cryptomatte
sync.
Pull Request: https://projects.blender.org/blender/blender/pulls/121909
Getting the owner ID of an embedded liboverride is not that expansive
anymore.
Also explain difference between this function and the new similar
`ID_IS_EDITABLE` macro.
When synchonizing the image for presentation the incorrect access
mask was used. This PR changes the access mask from data transfer
write to memory write. The data transfer write is not allowed to
change the image layout.
Pull Request: https://projects.blender.org/blender/blender/pulls/122138
* Debugging groups were not being applied as that part of the code
wasn't ported to the original patch
* Debugging groups didn't account for nodes that weren't owned by
any debug group.
Pull Request: https://projects.blender.org/blender/blender/pulls/122136
`node_socket_add_tooltip_in_node_editor` doesn't set a free function.
but uiLayoutSetTooltipFunc didn't check on it. Documentation states
that the free_arg parameter is optional.
Pull Request: https://projects.blender.org/blender/blender/pulls/122115
Moving the cursor away from the extensions "Add Repository" popup
could crash because the "Repositories" popover was closed while the
popup it created remains open.
Resolve by clearing wmEventHandler_UI::context.region_popup
which match the freed region, following similar logic already used by
WM_event_modal_handler_region_replace.
Note that this bug was exposed by [0].
[0]: 38d11482f5
Add a preference to "Work Offline" system preference as well as command
line options `--offline-mode` & `--online-mode`
(which overrides the preference).
This option is displayed in the initial setup screen too.
This is currently respected by:
- Check for updates on startup
- Disables running an update when enabling extensions.
When Blender is launched with `--offline-mode` the option cannot be
enabled in the preferences. This is intended for environments
where internet access is intentionally disallowed.
Background: with Blender supporting access to online-repositories
as well as 3rd party extensions themselves potentially accessing the
internet. This setting provides a way for users to disable online
functionality.
This prevents error messages when online access fails in environments
without internet access as well as the ability for users who prefer
Blender doesn't access the internet to have one place to turn this off.
While it does not enforce limitations on add-ons, 3rd party scripts
are expected to respect this setting using `bpy.app.internet_offline`.
The details for this will be handled along with other policies scripts
are expected to follow.
Ref !121994
When selecting Scene World with Cycles, the world background will be missing-texture pink for one frame before showing the correct light.
The issue here appears to be that Cycles queries rna_View3DShading_selected_studio_light_get, which returns the placeholder "Default" value which doesn't have a file path, so the world ends up pink.
Immediately afterwards, the UI code calls rna_View3DShading_studio_light_get, which initializes shading->lookdev_light to the proper default.
The easiest workaround for this is to provide the proper flags when getting the selected studio light, which will not match the placeholder entry and therefore return the proper default.
Pull Request: https://projects.blender.org/blender/blender/pulls/121987
Part of #116901.
The only non-obvious part is changing from using the `MR_DATA_LOOP_NOR`
flag as a signal to calculate normals and store them in `MeshRenderData` to
a more explicit check that the normals buffer is requested. In the future hopefully
these dependencies will be refactored to be part of the task graph instead.
Move the responsibility of deciding whether to calculate face corner
normals closer to the buffers and iteration, in preparation for replacing
the `data_flag` and `iter_flag` abstractions from the extractors system.
Part of #116901. Main benefits to this change are reduced function call
overhead and a simpler hot loop when face corner normals are extracted.
Code duplication is also reduced through use of templates. The downside
is that the access patterns aren't clearly better for the BMesh case where
a lot of data is stored array-of-structs style.
Make better use of the lazy calculation by avoiding storing a reference
to the calculated normals in the mesh render data. This reduces memory
usage from 282 MB to 225 MB in a test file with about 2 million faces.
Extract mesh logic to a separate function, and reorder subdiv loose
geometry extraction function. This is mainly to make a future diff
clearer. Also rename a variable to use more typical naming.
This was happening for any surface behind the near plane.
The sample bias is pushing receivers along normals so it
was visible on lights near the clip plane.
Fix#121815
Correct calculation of start of visual string and position of the
selection start when the text is scrolled (showing a subset of the
text) within an input box.
Pull Request: https://projects.blender.org/blender/blender/pulls/122110
Conversion of compositor node tree to operation is done in a job thread,
and the main thread might modify the image data-block at the same time.
This change fixes it by making it so compositor uses acquire/release
semantic for the image data-block, and making it so the image locks its
render result, preventing other threads from modifying it.
Ref #121761
Pull Request: https://projects.blender.org/blender/blender/pulls/122105
Refactor subtask of #121929
Simplified void create_index_grids(const PBVH_GPU_Args &args, bool do_coarse)
with 2 extra functions that account for 2 code path generating faces indices.
This increase code readability and reasoning about its behavior instead of having a single uber function.
Pull Request: https://projects.blender.org/blender/blender/pulls/122020
A continuation of #116901. This one doesn't have a performance impact
in my testing. It also adds a bit more code compared to main so it isn't
really obviously "better" like the previous refactors. However it does
get us closer to removing the "extractors" callback iteration loop
(`edit_data` is the only other enabled by default), and I'd argue that
the final code is easier to iterate on in the future since it's more
self-contained.
I made an effort to avoid storing restart indices in the index buffers.
Though this requires a bit more calculation on the CPU (particularly
because the hidden gaps in the IBO need to be compressed out), it
reduces overall CPU->GPU traffic and removes the need to strip the
restart indices on Metal.
Pull Request: https://projects.blender.org/blender/blender/pulls/122084
These remain linked, so data remains to be read/loaded from the packed
version from the library (making this a useless and wasteful
duplication, also changes could be perceived as lost). Tooltip was also
reading "Unpack all files packed **into this .blend** to external ones",
so that bring it in line with the tooltip.
This came up in #122033
Pull Request: https://projects.blender.org/blender/blender/pulls/122092
This was broken when introducing the new lod bias
system. This is not compatible with shadow cascade.
Add TODO to implement the bias on CPU when choosing
the Level of detail of the cascade.
This introduce a new "secret" per-repository property of type password
as described by #121856.
A token or secret may be used by some non blender.org repositories.
This only shows for remote repositories and is shown in the
"Add Remote Repository" popup.
This commit doesn't implement sending to token to the server which will
be implemented separately.
Ref !121886
Co-authored-by: Dalai Felinto <dalai@blender.org>