Commit Graph

138642 Commits

Author SHA1 Message Date
Hans Goudey
83d34acc1f Fix: MEM_new/MEM_freeN mismatch in node editor
We can't use C++ non-trivial allocation for DNA data unfortunately
because the read file system uses c-style allocation with raw bytes
when reading files.

Pull Request: https://projects.blender.org/blender/blender/pulls/124180
2024-07-04 18:27:47 +02:00
e466c5315d Anim: fix compiler warning about double declaration
Fix compiler warning about double declaration of
`get_action_binding_pair()`

No functional changes.
2024-07-04 17:53:42 +02:00
Bastien Montagne
3c6c9ee337 Merge branch 'blender-v4.2-release' 2024-07-04 15:42:25 +02:00
Bastien Montagne
47f7ce4580 Cleanup: Core: LibOverride: deduplicate code.
Call `BKE_lib_override_library_is_user_edited` instead of duplicating
its logic.

No functional changes expected here.
2024-07-04 15:41:49 +02:00
Bastien Montagne
34d157634a Fix #122623: Partial Resync fails to remap all ID pointers to existing unchanged overrides.
Regression from fb8bf8b0c8: Now that the 'automatic override'
relationships between IDs are much more strict, re-creating
sub-hierarchies of overrides as part of the partial resync may not be
able to 'find' all previously used overrides anymore. An additional
remapping from linked (reference) data to existing, unchanged 'old'
overrides is needed.

In the report case, the root of the partial resync is the Curve obdata
itself, which will imply resync of its material. But the Armature object
used as dependency of the material (through the driver target) has
already been checked as not needing resync, so it is not included as
part of this partial resync sub-hierarchy anymore.

However, it means that the newly resync material override will have a
pointer to the linked armature object, which then needs to be remapped
to the matching existing (unchanged) override.

NOTE: this likely means that too many override IDs are still being
resynced currently. In the report-s case e.g., the Material ID likely
does not need to be resynced either.
2024-07-04 15:41:49 +02:00
Bastien Montagne
265a25ee42 Cleanup: Core: LibOverride: Clearer variable name. 2024-07-04 15:41:49 +02:00
Bastien Montagne
44b6b59dca Debug: Add more log info in RNA override code.
Non-functional change.
2024-07-04 15:41:49 +02:00
Sietse Brouwer
e9da9a90bb Fix: GPv3: Wrong cursor radius for Tint tool and Weight Paint tools
Fix: GPv3: Wrong cursor radius for Tint tool and Weight Paint tools

The brush cursor size (the circle in the viewport) of the Tint tool and
the Weight Paint tools didn't match the brush radius, because:
- The radius unit `Scene` calculation was also applied to the Tint tool
brush, while it's only relevant for Draw brushes.
- The Weight Paint tools use unified paint settings and the Draw tool
doesn't any more since #122886, causing a mismatch in cursor size.

In this PR the cursor size is fixed.

Pull Request: https://projects.blender.org/blender/blender/pulls/124100
2024-07-04 15:27:31 +02:00
Falk David
477897c5c1 Fix: GPv3: Draw Tool generates invalid vertex colors
When the drawing contains a stroke that was drawn with vertex colors,
drawing a new stroke with just the material color can lead to invalid
vertex colors.

This was because the draw tool did not write to the vertex color attribute
even if it existed. This meant that when the curves geometry got
resized to be larger, the attribute would contain invalid values for
the new points.

The fix makes sure to write empty vertex colors (black, fully transparent)
to the attribute if the attribute already exists or the vertex color
is being used.

Pull Request: https://projects.blender.org/blender/blender/pulls/124146
2024-07-04 15:23:32 +02:00
Nathan Vegdahl
95b3daed5d Fix: don't auto-key location on connected bones
This is a follow up to #124054, which made all selected bones get their
location keyed after a targetless IK transform. That solved an issue
where auto-keying was failing to insert location keys on bones that
needed them, but in the process that fix also inserts location keys on
many bones that *don't* need it.

This commit addresses one of the simpler cases of unneccesary location
keys: bones that are connected to their parents. If a bone is connected,
its location will no longer get keyed.

Pull Request: https://projects.blender.org/blender/blender/pulls/124145
2024-07-04 14:50:31 +02:00
1d2cea1e3e Show Action Slots (Bindings) in the Action editor
In the Action mode of the Dope Sheet, show the Bindings, optionally
showing all Bindings in that Action. This also works when different
data-block types are animated from the same Action.

Bindings are selectable in the Action editor with box/range select.
Since there is no use for an 'active Binding' yet, this has not been
implemented, and as a result, clicking on a Binding does nothing.

Note on 'Binding' vs 'Slot': this code change was created before the
decision to change the name from 'Bindings' to 'Slots'. To avoid
confusion, and to keep this PR in sync with the code changes, it still
uses the term 'binding'. Renames of 'Binding' to 'Slot' in the code will
happen after this PR lands.

Pull Request: https://projects.blender.org/blender/blender/pulls/122672
2024-07-04 14:44:19 +02:00
Bastien Montagne
9a13aff4b8 Merge branch 'blender-v4.2-release' 2024-07-04 14:39:58 +02:00
Bastien Montagne
dc8ab86aec Cleanup: make format 2024-07-04 14:39:23 +02:00
Damien Picard
cc40d9f565 I18n: Fix translations for NLA
- Do not translate a label containing the name of the active NLA
  action.
- Translate default action name when created by inserting a keyframe.
- Translate "<NoAction>" and other default NLA strip names.
- Translate "<NoAction>" displayed in the UI when no action exists in
  the NLA.
- Translate the temporary meta-strip created when moving an NLA strip
  around. This uses DATA_() for consistency, even though it is not
  really user data.

Issues reported by Gabriel Gazzán.

Pull Request: https://projects.blender.org/blender/blender/pulls/124113
2024-07-04 14:35:19 +02:00
Damien Picard
78b9218c98 I18n: Fix translations for Rigify
Rigify was recently added to the core add-ons, and is now
translatable. This change fixes many issues that made messages
poorly or not translatable.

- Replace f-strings and % formatting with str.format().
- Use iface_ and rpt_ to translate formatted strings.
- Rename metarig submenus from "<Category> (submenu)" to simply
  "<Category>" to allow the menu entries and submenus to have the same
  name and be translated. The label was awkward anyway in my opinion.
- Remove trailing "." in operator reports.
2024-07-04 14:35:17 +02:00
Jeroen Bakker
89daa19f57 Vulkan: Device statistics
This PR adds device statistics which can be printed to the console.
By default nothing is printed, but developer can choose to enable
it during development.

Pull Request: https://projects.blender.org/blender/blender/pulls/124150
2024-07-04 13:47:54 +02:00
Omar Emara
4cd1245396 Compositor: Support viewport in Cryptomatte picker
This patch supports the Cryptomatte picker in the 3D viewport. Instead
of picking a color from the viewport GPU texture, we instead sample the
scene directly to get the object or material under the cursor, then hash
their names to get the Cryptomatte hash value. We do this because the
viewport texture have limited precision, so it can't store the
Cryptomatte hash values.

Additionally, we adjust the Cryptomatte session code to extract the
Cryptomatte manifest from the scene directly, as opposed to the
RenderResult. This is done to make it work even when no RenderResult
exist, as is the case for the viewport compositor, which is needed
especially after #123378.

Pull Request: https://projects.blender.org/blender/blender/pulls/123815
2024-07-04 13:42:23 +02:00
Pratik Borhade
b724756873 Merge branch 'blender-v4.2-release' 2024-07-04 16:54:56 +05:30
Pratik Borhade
8ddd49409c Fix #124090: Delete strip operator missing redo panel property
Caused by 1a887c06d95a2164c66e9de7c65c0a24ab18a443
`poll_property` callback is not required, both delete strip and retiming
key operator are separated now.

Pull Request: https://projects.blender.org/blender/blender/pulls/124095
2024-07-04 13:22:37 +02:00
Jeroen Bakker
3891f46084 Merge branch 'blender-v4.2-release' 2024-07-04 12:47:38 +02:00
Jeroen Bakker
1931b8e63f EEVEE: Fix missing material preview
Pull Request: https://projects.blender.org/blender/blender/pulls/124151
2024-07-04 12:46:29 +02:00
Bastien Montagne
f4ef3de32b Fix (unreported) more invalid MEM_new/MEM_freeN mismatches.
NOTE: Had to make `NodeLinkItem` trivial again, by removing its default
values and instead using an 'init' function. Please ensure that the
code area you are using your data with _is_ compatible with c++ memory
handling. UI code generally is not currently.
2024-07-04 11:58:21 +02:00
Jacques Lucke
4ec3f0c981 Fix: new-free mismatch
Required since 06be295946a.
2024-07-04 11:39:12 +02:00
Falk David
103f3f261a Fix: GPv3: Draw Tool: Use "Dot" cursor for draw tool
When disabling the "Show Cursor" option in the tool settings for the
draw tool, the cursor was set to the OS default.
This was not the case in GPv2, which used the "Dot" cursor.

The fix enables the "Dot" cursor by default for the draw tool.
2024-07-04 11:22:32 +02:00
Alaska
9d1e613292 Cycles: Refactor and add use_gpu() to UI code
Add a `use_gpu()` function to the UI code for Cycles.
This is done to clean up some of the other code (`use_{backend}()`)
and to help isolate `use_multi_device` and `show_device_active` from
their context making them more robust to changes made in other parts
of the UI code.

Pull Request: https://projects.blender.org/blender/blender/pulls/124134
2024-07-04 11:21:45 +02:00
Bastien Montagne
b42f2b7634 Merge branch 'blender-v4.2-release' 2024-07-04 11:08:56 +02:00
13276e1f1e Sculpting: initialise uninitialised variable
Initialise `sum = 0.0f` before adding to it. Otherwise it'll get not just
a compiler warning, but also undefined behaviour.
2024-07-04 11:04:00 +02:00
Damien Picard
6a52c76a65 I18n: Translate messages in extensions, operator descriptions, Node Wrangler
- Operator descriptions use tip_() since they will be displayed in
  tooltips.

- Extension messages:
  - Split "(Add-on|Theme) \"{:s}\" already installed!" into two
    messages.
  - Use rpt_() to translate error messages.

- Restore core add-on name and description translation.

- Use DATA_ to translate paint material slot name, so that translation
  happens only if the user enabled it for user-created data.

- Node Wrangler contains functions used to build operators' poll
  methods. This change allows them to be properly translated by using
  str.format() instead of f-strings, and explicit extraction with
  tip_().

Pull Request: https://projects.blender.org/blender/blender/pulls/123795
2024-07-04 10:49:52 +02:00
Jeroen Bakker
84cbf33b38 Vulkan: Enable multi draw indirect feature
Multi draw indirect is used by the overlay engine and can lead
to a validation error when multiple instances are drawn.

This PR enabled the feature. We expect that all our devices can handle
this feature.

Pull Request: https://projects.blender.org/blender/blender/pulls/124141
2024-07-04 10:42:20 +02:00
Jeroen Bakker
b6c078a28f Vulkan: Fix image bind space collision
EEVEE Eval light shader could still make a collision between
texture and image bind space making rendering glitch
when not using `--debug-gpu`. The problem was that the bind space
wasn't aware of the offset that the shader interface was using.

Pull Request: https://projects.blender.org/blender/blender/pulls/124140
2024-07-04 10:41:43 +02:00
Aras Pranckevicius
d51dee85f7 Merge branch 'blender-v4.2-release' 2024-07-04 11:29:08 +03:00
Aras Pranckevicius
2aee84a611 Fix #123579: VSE, no magenta preview for missing scene strips
Code that implemented "show missing media in magenta" in VSE preview
only implemented that for images and movies, and forgot that scene
strips can also be missing.

Pull Request: https://projects.blender.org/blender/blender/pulls/124124
2024-07-04 10:27:52 +02:00
Nathan Vegdahl
b31d34033a Fix: make auto-keying reliably key all needed bone channels
This is a follow-up to #123998 which fixed autokeying on objects when
the "Only Insert Needed" user preference was enabled. This fixes an
essentially identical bug for auto-keying bones, but *also* fixes a
different-but-related bug unique to bone keying.

In the first bug the location channel would erroneously not get keyed
sometimes when the "Only Insert Needed" user preference was enabled.
This fixes that by passing in whether more than one bone is being keyed
or not, and using that to accurately determine if location actually
needs to be keyed.

In the second bug, the location channel would erroneously not get keyed
when "Auto IK" was used to transform bones. This fixes that by just
being over-conservative. This unforunately leads to more bones getting
their location channel keyed than needed when Auto IK is used, but this
is better than *failing* to key needed channels, which was the previous
behavior. I left a comment explaining the situation, along with a TODO
to address this in a more satisfying way in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/124054
2024-07-04 10:18:32 +02:00
Sietse Brouwer
dd5f34eb51 Fix: GPv3: Bracket keys [ and ] don't change the brush size
The keyboard shortcuts `[` and `]` should change the brush size, but
they didn't for the tools in GPv3 because GPv3 switched to the 'unified
paint settings' system for brushes.

This PR is a fix for that. The brush scale size operator now also acts
on the unified brush size for GPv3 brushes. One exception: the Grease
Pencil brushes in Paint mode (Draw, Erase, Tint), because they don't
use the unified paint settings.

Pull Request: https://projects.blender.org/blender/blender/pulls/124069
2024-07-04 10:16:12 +02:00
Alexander Brock
717c970297 Add round-trip tests for *_to_direction functions and fix some of them
The function `direction_to_<some projection model>` computes the inverse of `<some projection model>_to_direction`.
Some of these functions had a bug where they mirror the x-axis, and some of them could be simplified.
I added round-trip tests for all of them.
This MR might change the behavior of the renderer when using equiangular_cubemap_face_to_direction:
I normalized the result vector. I looked at the usages and I think it's normalized later anyways, but someone else should probably verify that this doesn't cause issues.

Pull Request: https://projects.blender.org/blender/blender/pulls/123932
2024-07-04 09:54:50 +02:00
Julien Duroure
d8675a3f6a Merge branch 'blender-v4.2-release' 2024-07-04 09:00:46 +02:00
Julien Duroure
8bf4d3c33f glTF exporter: Fix #124072 - avoid crash exporting empty collection at center 2024-07-04 08:57:27 +02:00
Julien Duroure
69390e970f glTF exporter: avoid crash copying props 2024-07-04 08:50:48 +02:00
Julien Duroure
2e03ca4a5b Merge branch 'blender-v4.2-release' 2024-07-04 08:50:26 +02:00
Julien Duroure
0ec32af432 glTF exporter: avoid crash copying props 2024-07-04 08:47:17 +02:00
Christoph Lendenfeld
8ecccddf1c Fix: Bone wire width not working with curve objects
The issue was that the wire width was not passed to the shader
when the object was of type curve.
This resulted in the bone wire thicker than expected and
not responding to the parameter.

Pull Request: https://projects.blender.org/blender/blender/pulls/124053
2024-07-04 08:40:52 +02:00
Harley Acheson
444626593c Merge branch 'blender-v4.2-release' 2024-07-03 20:38:24 -07:00
Harley Acheson
508d08c687 Revert "Fix #122808: Better Indication of Missing VFont"
This reverts commit ff89e24bf5de8db9a5119a696789d154beb6f943.
2024-07-03 20:35:46 -07:00
Campbell Barton
b7adeb5d80 Merge branch 'blender-v4.2-release' 2024-07-04 12:41:26 +10:00
Campbell Barton
a9763ffabc Merge branch 'blender-v4.2-release' 2024-07-04 12:41:23 +10:00
Campbell Barton
1d23e54fb3 Cleanup: quiet parenthesis warning 2024-07-04 12:40:56 +10:00
Campbell Barton
c55ae88148 Fix #123954: string attributes don't work with BMesh
RNA accessors were ignoring MStringProperty::s_len and assumed UTF8
encoding which is not the case. Use byte strings and get/set the length
member.
2024-07-04 12:29:59 +10:00
Campbell Barton
e3457bccbf Extensions: sub-commands "build" & "validate" validate manifest tags
Enforce tags from extensions.blender.org with support for using an
alternate set of tags (for other repositories), or no tag validation
at all if the repositories choose not to enforce this.

- By default building & validating an extensions fails when unknown
  tags are used.

- The option `--valid-tags`` has been added which can either:

  - Reference a JSON file which lists valid tags per extension type.
  - Pass in an empty string to disable tag validation.

Default to constraining packages to use Blender's official tags as every
extension defining their own tags is likely to result in many similar
tags & a bad user experience. Details in code-comments.

Implements #123986.
2024-07-04 11:56:07 +10:00
Harley Acheson
140a214541 Merge branch 'blender-v4.2-release' 2024-07-03 18:27:35 -07:00
Harley Acheson
ff89e24bf5 Fix #122808: Better Indication of Missing VFont
For text objects, current code will use another font if you ask for
a character that is not found in the selected font. But what if the
selected font is invalid? This can happen with a saved Blend that uses
a non-packed font that is since deleted. Current behavior will show
nothing. This PR restores earlier behavior where we use the built-in
font in this case.

Pull Request: https://projects.blender.org/blender/blender/pulls/122851
2024-07-04 03:26:22 +02:00