Commit graph

145608 commits

Author SHA1 Message Date
Harley Acheson
53fdb68bd0 Fix #79977: Light Theme NumSlider InnerSel
Slight brightening of the Light Theme Value Slider Inner Selected color
so that it can indicate which of multiple items are selected.

Pull Request: https://projects.blender.org/blender/blender/pulls/131338
2025-01-16 17:18:37 +01:00
Miguel Pozo
1406b9e656 Fix #133073: Overlay-Next: Meshes without UVs crashes the UV Editor
Add missing check for has_active_edit_uvmap.
2025-01-16 17:14:22 +01:00
Christoph Lendenfeld
3fca91ad74 Refactor: remove unused function
this patch just removes an unused function left behind by #132601

Pull Request: https://projects.blender.org/blender/blender/pulls/133162
2025-01-16 17:02:12 +01:00
Jacques Lucke
dbb81ca483 Cleanup: BLO: simplify name to bhead map
This replaces a `GHash` with `Map<blender::StringRefNull, BHead *>` which
simplifies using the type. Additionally, this patch also removes
`USE_GHASH_BHEAD` which not seem like it's worth having it nowadays (it was
always enabled anyway and I have never seen anyone disable it).

Pull Request: https://projects.blender.org/blender/blender/pulls/133057
2025-01-16 16:57:44 +01:00
Miguel Pozo
a08de337db Fix #131981, #132995: Overlay-Next: Fix In-Front selection and cycling
The code relied on `disable_depth_test` to render without depth testing
on selection, but it was set at pre-draw, so it was always false when
calling `res.select_bind` inside the sync code.

There was also no code to tell in-front and regular objects apart, so
in-front objects were not prioritized.
The previous engine seemingly divided the depth of In Front objects by
100, so I'm reproducing the same behavior here.

Fix #131981
Fix #132995

Pull Request: https://projects.blender.org/blender/blender/pulls/133020
2025-01-16 16:45:25 +01:00
Falk David
8a4509492f Fix: VSE: Revert some changes made to RNA animation paths
This was done by mistake in d3ba70190b.
They shouldn't have been renamed.
2025-01-16 16:44:34 +01:00
Miguel Pozo
80bd81a4f6 Fix #132890: Grease Pencil: Selection crash in wireframe mode
`dtxl->depth` may not be valid until draw time, so acquire the viewport
textures/framebuffers inside the draw callback instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/132922
2025-01-16 15:14:54 +01:00
YimingWu
43492a8278 Fix #133035: Grease Pencil: Convert mesh materials to fill materials
When converting mesh to grease pencil, different face materials should
also be converted to grease pencil ones. This now works by converting
viewport display color diffuse_color from the mesh material to grease
pencil material fill color. Notes:

- If there are empty material slots in the mesh, faces assgined to these
  material slots will be assgined to a new fallback white material in
  the converted grease pencil fills.
- If original mesh does not have any material slots, a white material
  will be created in the grease pencil object for the fills.
- If original mesh has multiple material slots of the same material,
  they would be reduced to one material slot in the converted fills.

Pull Request: https://projects.blender.org/blender/blender/pulls/133087
2025-01-16 15:12:50 +01:00
Christoph Lendenfeld
f105366d73 Anim: Support multi object editing when applying poses
This patch adds support to apply a pose asset to multiple armatures in pose mode at once.
In case there is a suitable slot for the armature, it will be used to read from, otherwise
the system falls back to slot 0.

Part of #131840

Pull Request: https://projects.blender.org/blender/blender/pulls/132601
2025-01-16 13:17:20 +01:00
Philipp Oeser
fe5ce93a40 Cleanup: quiet compiler warning
Missed in c452d5d9e8
2025-01-16 12:58:58 +01:00
Falk David
d3ba70190b VSE: Python API: Rename RNA types from Sequence to Strip
This PR renames `bpy.types` that contain `Sequence` (and refer to a strip) to `Strip`.

The `bpy.types.Sequence` has already been renamed to `bpy.types.Strip` in
a previous PR. See !132179.

Additionally, this PR does some cleanup renamings in the sequencer
RNA files (e.g. `sequence` -> `strip`).

Part of #132963.

Pull Request: https://projects.blender.org/blender/blender/pulls/133054
2025-01-16 12:32:59 +01:00
Philipp Oeser
36269ab3a3 Fix #133091: Grease Pencil Vertex Weight Proximity wrong with "flipped" distances
One should be able to set the modifier `Highest` value lower then the
`Lowest`, in fact this is probably the more common usecase (getting high
values in the vertexgroup when something is close by and getting lower
values the further away from the target we get).

Now change code so we do exactly like we do for meshes.

NOTE: for grease pencil (as opposed to meshes), the Vertex Weight
Proximity modifier has a button to flip the output values, this can
probably stay for convenience.

Stumbled over this checking on #133055

Pull Request: https://projects.blender.org/blender/blender/pulls/133092
2025-01-16 12:06:27 +01:00
Philipp Oeser
c452d5d9e8 Fix #133099: Remove GP TextureMapping modifier vertexgroup influence
If I read code correctly, at least offset/translation and scale happen
in the Curve domain only in GPv3, so having vertexgroups influence per
point does not really make sense for this modifier.

Therefor, remove the influence vertexgroup from this modifier.

Pull Request: https://projects.blender.org/blender/blender/pulls/133102
2025-01-16 11:54:04 +01:00
Christoph Lendenfeld
a03b1e063d Fix #131905: Affect transform not working for Pose Space
This feature was just not implemented yet.
The solution is similar to 042a1327ca which implemented this
for the scale constraint.

Pull Request: https://projects.blender.org/blender/blender/pulls/132176
2025-01-16 11:44:38 +01:00
Campbell Barton
481a8b67d4 PyAPI: add bpy.app.portable, derived from WITH_INSTALL_PORTABLE
Support differentiating between portable & system installations,
useful to properly locate relative paths which would not work
on system installations.

Ref !133143
2025-01-16 21:07:29 +11:00
Sybren A. Stüvel
59585cf978 Cleanup: document difference between bpy.app.version and .version_file
Clarify the meaning `bpy.app.version_file`, by being more explicit in the
description of `bpy.app.version` and their differences.

### Old:

`bpy.app.version`
: The Blender version as a tuple of 3 numbers. eg. (2, 83, 1)

`bpy.app.version_file`
: The Blender version, as a tuple, last used to save a .blend file, compatible with ``bpy.data.version``. This value should be used for handling compatibility changes between Blender versions

### New:

`bpy.app.version`
: The Blender version as a tuple of 3 numbers (major, minor, micro). eg. (4, 3, 1)

`bpy.app.version_file`
: The Blender File version, as a tuple of 3 numbers (major, minor, file sub-version), that will be used to save a .blend file. The last item in this tuple indicates the file sub-version, which is different from the release micro version (the last item of the `bpy.app.version` tuple). The file sub-version can be incremented multiple times while a Blender version is under development. This value is, and should be, used for handling compatibility changes between Blender versions

Pull Request: https://projects.blender.org/blender/blender/pulls/133142
2025-01-16 11:06:59 +01:00
Casey Bianco-Davis
3f8b95f8c2 Grease Pencil: Option to subdivide last segment when closing stroke
Adds a option to add new points on the last segment to match point density.
This matches the legacy grease pencil operator.

Resolves: #125262

Pull Request: https://projects.blender.org/blender/blender/pulls/133026
2025-01-16 11:06:41 +01:00
Pratik Borhade
d891df4496 Fix #133116: Grease Pencil: Toggle selection selects all on next click
Caused by 1bacb0de62
`.selection` attribute is not converted to desired domain after changing
the type. `ensure_selection_domain` should be excuted to perform the
attribute domain conversion

Pull Request: https://projects.blender.org/blender/blender/pulls/133132
2025-01-16 11:01:38 +01:00
Jeff Moguillansky
ea4d01923b Fix: Vulkan: local_read incorrect attachment load/store ops
This fixes a rendering issue when local read enabled.
Before fix, the output image is too bright.  This is due to incorrect load/store.

With this fix, the logic for attachment load/store ops with local_read on matches the logic with local_read off inside subpass_transition_impl...

Pull Request: https://projects.blender.org/blender/blender/pulls/133111
2025-01-16 08:21:14 +01:00
Campbell Barton
81c26130dc Fix #43998: toggling edit-mode can destroy mesh shape-key
Regression in [0] that clamped the shape-key index when exiting
edit-mode but not when entering, causing the "Basis" shape not to
be treated as active when entering edit-mode, then treated as active
when exiting - overwriting it's values from the mesh.

Resolve by clamping on edit-mode enter & exit.

[0]: 225e3460d0
2025-01-16 16:36:50 +11:00
Alaska
7a4d0ab9fa Tests: Add a Cycles render test for the sample subset feature
This test consists of 4 lights in a scene with the light tree disabled.
This means a sample count that's a multiple of 4 must be used to get a
relatively clean result.

The maximum sample count is set to 4, with the sample subset option
turned on. The subset offset is set to 2 to test the offset,
and a length of 4, which will be internally clamped to 2.
The length of 4 was chosen to test the sample subset length clamping.

Ref: blender/blender-test-data!43
Ref: blender/blender@f09fd9bdef
2025-01-16 06:22:48 +01:00
Harley Acheson
8c9446a0d7 UI: Color Picker Status Bar Mac Information
On Mac we can now pick colors from outside Blender windows, but this
requires pressing the "Enter" key. This PR just changes the status bar
so that on Mac OS it shows this information to the user.

Pull Request: https://projects.blender.org/blender/blender/pulls/133120
2025-01-16 04:57:24 +01:00
Jonas Holzman
96babd5e9f UI: Support canceling Eyedropper color picking operations
Have `eyedropper_color_sample_fl` return success, in case platform
sampling starts but is canceled (Async return on MacOS). Removes any
chance of returning black color on failures.

Pull Request: https://projects.blender.org/blender/blender/pulls/133124
2025-01-16 04:13:48 +01:00
Campbell Barton
4e683c4bd6 Cleanup: doxygen formatting for param 2025-01-16 13:04:17 +11:00
Campbell Barton
e3e8c154fa Docs: correct collection.objects_add_active name & description
The name was incorrect as it doesn't add to the "Active Collection"
the description, was also incorrect referencing "the object" instead
of the selection.

Use a longer description to clarify the purpose of the operator.

Resolves #64313.
2025-01-16 13:04:17 +11:00
Harley Acheson
1f33b401b3 Fix #49117: Larger Alternative for Frame Cursor
Internally our "Time" mouse cursor, it comprises up to four digits in
a 2x2 grid.  With each digit being just 7x7 pixels this is very small
on high DPI displays. This PR adds an alternative that shows 12x14
pixel digits, shown when the UI Scale > 1.45. It also changes both
small and large versions to not show a solid black background for
empty digit positions.

Pull Request: https://projects.blender.org/blender/blender/pulls/132767
2025-01-16 02:59:49 +01:00
Sean Kim
eebdd83898 Cleanup: Add documentation for PaintStroke related functions
Pull Request: https://projects.blender.org/blender/blender/pulls/133125
2025-01-16 01:52:14 +01:00
John Kiril Swenson
1fc1878cd6 VSE: Add effect/transition UI/code cleanup
Part of the Jan 2025 Code Quality project described in #130975.

This patch aims to improve user-facing messaging when adding effects or
transitions, properly polling them out based on context, and avoiding
unnecessary error messages when possible.

- Rearrange "add Effect Strip" UI in order of required number of
  selected strips to create the effect strip, from 0 -> 1 -> 2
- Properly poll out these operators if not enough non-sound strips (i.e.
  any strips with video content) are selected.
	- Note that this does not require any extra iterations over the
	  entire seqbase.
- Gracefully avoid errors with trying to add effect/transition strips
  when sound strips are part of the selection: for example, when the
  user has selected connected strips.
	- In these cases, it is clear that the user wishes to operate on
	  the strips with video content.
- Refactor `seq_effect_find_selected` to fix bugs and account for all
  cases, removing TODOs in place. Rename it `seq_effect_get_new_inputs`
  to more accurately express its purpose.
- Rename various `last_seq` to `active_strip` to adhere to new conventions
  laid out in #132736
- Update UI tooltips for effect, transition, and fades to make their use
  clearer.

Pull Request: https://projects.blender.org/blender/blender/pulls/132672
2025-01-16 01:40:36 +01:00
Jesse Yurkovich
49ae7ffc9c USD: Support additional animated Basis Curves data during import/export
Export
Like we do for Mesh and PointCloud, export any "velocity" attribute on
the Point domain as native USD "velocities". While testing, a few
additional blender-internal attributes were discovered being exported
which are now excluded during export.

Import
Add the cache modifier as appropriate when we detect that UsdBasisCurve
data is animated. This includes time-varying positions, widths,
velocities, and general attribute values. Before this PR, only the
positions were considered. And like Export, the native USD "velocities"
attribute is now processed.

Adds test coverage as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/133027
2025-01-15 23:29:42 +01:00
Hans Goudey
7456709b69 Fix: Incorrect length limit for node socket idname 2025-01-15 14:59:38 -05:00
Hans Goudey
40b3c6baf7 Fix: Possible compile error from missing define 2025-01-15 14:55:39 -05:00
Julian Eisel
2f493dc816 Fix: Assets: Remove assert in brush asset poll, it's a valid failure
The asset lookup may fail if asset library loading hasn't finished. In that
case, don't throw an assert, display a report.
2025-01-15 19:13:34 +01:00
Julian Eisel
c07b253265 Fix: Assets: Asset library not loaded after creating brush asset (asserts)
The steps in #132900 would lead to a failed assert and some warning prints:
"Warning: Asset loading is unfinished". This is because asset libraries get
cleared more strictly and correctly since a859ed1130, but only once the menu
was shown it would get reloaded.

Instead make sure the asset library loading gets triggered whenever a button to
popup a brush asset shelf is present. This makes sense because in this context
you typically want an asset library available.
2025-01-15 19:08:08 +01:00
Bastien Montagne
7fb3179c1f Add tests for bpy.data.user_map.
These are based on data generated for liblink tests, so part of this
code is also refactored to move data generation into `bl_blendfile_utils.py`.

NOTE: Work done also to add tests to upcoming filepath mapping utils
(see !127252).

Pull Request: https://projects.blender.org/blender/blender/pulls/133110
2025-01-15 18:13:32 +01:00
Miguel Pozo
51770cd698 Fix #133106: Overlay-Next: Solid selection doesn't work in XRay mode
Regression from 2abc3ad801
2025-01-15 18:10:26 +01:00
Miguel Pozo
dd20922167 Cleanup: Overlay-Next: Remove unrequired casting 2025-01-15 17:39:59 +01:00
Miguel Pozo
4be177a12d Fix #133084: Overlay-Next: Viewport Z-Axis
ba074d1670 created subpasses based on flags that were not yet set up.
2025-01-15 17:38:43 +01:00
Laurynas Duburas
8e0c050fa1 Cleanup: Curves: Correct incorrect function name 2025-01-15 11:37:07 -05:00
Richard Antalik
4a7209f7ed Fix #133108: Slip strip not accepting numpad enter
Add `EVT_PADENTER` as valid event type.

Pull Request: https://projects.blender.org/blender/blender/pulls/133109
2025-01-15 17:24:38 +01:00
Brecht Van Lommel
7c2ace05ab Cleanup: Correct logic for static Embree library SIMD libs
We are only using a dynamic library so this doesn't matter in practice,
just better to avoid having wrong examples in the code.

Pull Request: https://projects.blender.org/blender/blender/pulls/133105
2025-01-15 16:52:30 +01:00
Brecht Van Lommel
599fa13ac0 Cleanup: Correct logic and comments about Imath includes in imbuf
There is nothing happening upstream in OpenImageIO to remove this
requirement, as the comments imply.
2025-01-15 16:52:29 +01:00
Iliya Katueshenock
57e72618cb Cleanup: Geometry Nodes: Unused namespace
Pull Request: https://projects.blender.org/blender/blender/pulls/118093
2025-01-15 16:28:37 +01:00
Pablo Vazquez
ef2bff2004 UI: Always display mesh indices overlay setting
Show the Indices overlay setting regardless of Developer Extras being
turned on or not.

With the introduction of Geometry Nodes, having access to the indices
is handy outside of development environments (as well as in game
development or to debug i/o issues).

Pull Request: https://projects.blender.org/blender/blender/pulls/133095
2025-01-15 16:05:44 +01:00
Philipp Oeser
08539618cd Fix #133097: GP Vertex Weight Proximity wrong with influence VG
The modifier would write to all weights, not respecting if a vertex was
not part of the influence vertex group.
If the vertex is not part of the influence vertex group (its weight is
0.0), dont touch the existing weights (just continue happily).

Pull Request: https://projects.blender.org/blender/blender/pulls/133098
2025-01-15 15:55:49 +01:00
Philipp Oeser
e700e1f71c Fix #115843: Expose curves sculpt collision distance
The hardcoded value doesn't work well with real scale human heads for
example (was already adjusted once in a76b5d3a07).
The result for too high values is a complete "freeze" of the whole curve
(since  the solution from e7606139ba has the problem that it keeps
running into max iterations of the collision solver).

As long as no better solver is implemented, it is better to have an
adjustable value (to work on differently sizes objects) to not run into
the above issue (same as the old particle hair system had) and show it
in sculptmode next to the button which enables collision.

This is done per `Curves` (same as the flag
`CV_SCULPT_COLLISION_ENABLED`), similar to symmetry settings
[alternatively, it could be part of `BrushCurvesSculptSettings` but I
think it makes more sense in Curves] and then passed on to the
`CurvesConstraintSolver`.

Includes versioning code (to set the default for old files).

Pull Request: https://projects.blender.org/blender/blender/pulls/132997
2025-01-15 15:54:43 +01:00
Hans Goudey
d9d7d3b354 Cleanup: Use existing utility functions in mesh split edges file
Pull Request: https://projects.blender.org/blender/blender/pulls/133081
2025-01-15 15:30:14 +01:00
Omar Emara
e545b6e764 Cleanup: Pass interpolation directly to transform algorithm
The transform algorithm currently takes realization options, but it only
uses the interpolation from it. So pass interpolation directly for
clarity.
2025-01-15 15:45:51 +02:00
Omar Emara
7e5af160bd Cleanup: Rename wrap to repeat in realization options
The wrap member in realization options is no longer used to indicate
wrapping since 8f8ae302ba. So rename it to repeat since the only user is
now repeating in the realization algorithm.
2025-01-15 15:22:36 +02:00
Bastien Montagne
484fa519fb Fix some issues with bpy.data.user_map implementation.
* In case a subset of IDs is given, it was not checked that all items
  are ID data.
* In case of error while processing the subset, there could be some
  python data 'leak' (the `user_map` would not be unreferenced).
* Improve performances in case there are many duplicates in given subset
  iterable of IDs, by not processing the duplicates.

Discovered in !127252 review.
2025-01-15 11:35:11 +01:00
Brecht Van Lommel
381e125153 Fix: Invalid character in bpy package description on pypi
Unclear why this started happening since the 4.3.0 package, maybe an update
to Python on the build machine.
2025-01-15 09:42:05 +01:00