Commit graph

145608 commits

Author SHA1 Message Date
Sybren A. Stüvel
e8019814bd Anim: Copy Global Transform, fix MyPy warnings
No functional changes, except that a rare error case is now handled
correctly.
2025-01-20 14:05:30 +01:00
Falk David
10632776b5 Cleanup: Grease Pencil: unused parameter warning
Caused by ff9992d77f.
The argument is not used/needed.
2025-01-20 14:00:56 +01:00
Philipp Oeser
f6b820ccb7 Fix #133296: Grease Pencil influence VG affects stroke but not fill
This was true for Opacity or Tint modifiers where influence vertexgroups
were having an effect on strokes, but were ignored for fills.

This was also the case for GPv2 / 4.2, but there is no apparent reason
for not doing this on fills (if we are doing it for strokes).

NOTE: it was actually in use if "Use Weight as Factor" was used (but
that only means weights should be used directly, otherwise [when used as
influence], weights should be multiplied).

Pull Request: https://projects.blender.org/blender/blender/pulls/133306
2025-01-20 13:33:56 +01:00
Pratik Borhade
ff9992d77f Fix #133240: Grease Pencil: Reset vertex color ignores selection mask
`Reset color attribute` operator currently removes the `vertex_color`
attribute from geometry. If selection exists, reset the color value to
1.0 instead of clearing the entire attribute.

Pull Request: https://projects.blender.org/blender/blender/pulls/133249
2025-01-20 12:58:34 +01:00
Pratik Borhade
131270cb5a Fix: Grease Pencil: Consider selection mask for fill material in vpaint
`apply_color_operation_for_mode` only deals with the selection mask if
vertex color mode is `Stroke` (or the attribute domain is `Point`).
Use similiar logic for `mode=Fill`(domain=`Stroke`).

Pull Request: https://projects.blender.org/blender/blender/pulls/133256
2025-01-20 12:58:09 +01:00
Stefan Werner
416085d893 Fix: Added missing include to allow Cylces build without Embree 2025-01-20 12:41:19 +01:00
Omar Emara
d4189ee398 Fix #133225: File Output nodes fail inside node groups
The File Output node no longer works inside node groups since the
introduction of the new CPU compositor. This is explicit in the code, so
we just consider all file output nodes recursively to fix this issue.
2025-01-20 13:11:28 +02:00
YimingWu
a2dbe53a3c Fix #133013: Grease Pencil: Refined stroke attribute randomization
Randomization of stroke color(H/S/V), opacity, radius and rotation was
implemented using this formula:

`value = original_value * random(0~2)` (1)

Which was different from before Grease Pencil v3 rewrite:

`value = original_value + random(0~2)` (2)

This leads to different looks of the stroke. This PR fixes the problem
by implementing formula (2) for the randomization mixing to restore
original behaviour.
Also makes sure the values are correctly clamped to the expected ranges.

Pull Request: https://projects.blender.org/blender/blender/pulls/133032
2025-01-20 11:41:18 +01:00
Brecht Van Lommel
1fb83c551a Fix #132781: MaterialX node name conflict causes crash
Use BLI_uniquename_cb to check and fix naming conflicts, and keep track
of the potentially modified node names in a map.

Reserve the material name, so that later the output node can be renamed to it
without conflicts. Also make sure there are no conflicts with names auto
generated by MaterialX, by always naming nodes ourselves.

Pull Request: https://projects.blender.org/blender/blender/pulls/133234
2025-01-20 11:37:08 +01:00
Philipp Oeser
82ea972834 Fix #133295: Grease Pencil tint influence vertexgroup has no effect
The weights were only used when "Use Weight as Factor" was used (this is
wrong though, that button uses the weights directly, otherwise the
Factor has to be multiplied by the weights -- as done in all other
modifiers [and in 4.2])

Pull Request: https://projects.blender.org/blender/blender/pulls/133297
2025-01-20 11:36:17 +01:00
Brecht Van Lommel
da1497af5e Refactor: MaterialX: Add NodeGraph wrapper around MaterialX graph
Pull Request: https://projects.blender.org/blender/blender/pulls/133234
2025-01-20 11:26:10 +01:00
Jeroen Bakker
781aeb1b3f Fix #133155: Vulkan: Initial uniform buffer upload failing
In some cases the initial uniform buffer upload fails. Using the
indirect upload (via render graph) does succeed. This PR uses the
render graph approach.

Pull Request: https://projects.blender.org/blender/blender/pulls/133293
2025-01-20 11:00:27 +01:00
Eric Cosky
292b0c74d3 Fix #133239: Corrected inconsistent use of calloc/free vs new/delete to fix crash when disabling VR preview
Code at the XR actionmap level is using calloc/free, but later when
conditions trigger WM_operator_properties_alloc in
`windowmanager\intern\wm_operators.cc` it is using MEM_new, which is
the mismatch. XR actionmap code needed to be modified to be compatible
with the allocators it is using.

Pull Request: https://projects.blender.org/blender/blender/pulls/133274
2025-01-20 10:46:08 +01:00
Pratik Borhade
9439ff09e9 Fix #133259: Regression: Error when saving a theme
Missed in 655a17a6ab.

Pull Request: https://projects.blender.org/blender/blender/pulls/133285
2025-01-20 10:35:27 +01:00
Jonas Holzman
5472ffeae3 Fix: UBSan division by zero runtime error in intern/shrinkwrap.cc
This error would occur because the quadratic equation solving code didn't
check for `a` being non-zero. Fixed by adding the additional check. This
can be tested and reproduced using the `ShrinkwrapTargetNormalProject2`
`modifiers` test.

Pull Request: https://projects.blender.org/blender/blender/pulls/133273
2025-01-20 10:05:34 +01:00
Campbell Barton
723cd87d49 Cleanup: quiet compiler warning 2025-01-20 17:10:21 +11:00
Campbell Barton
ad7a6495ac PyDoc: use "note" directive for bpy.props
Also minor rewording & adjust indentation.
2025-01-20 16:34:47 +11:00
Campbell Barton
4507c9fcc2 PyDoc: add bpy.types.PropertyGroup to registration doc-strings
Ref !133233

Co-authored-by: Jonathan Plasse <jonathan.plasse@eilbek-research.de>
2025-01-20 16:12:11 +11:00
Campbell Barton
7cd621bebc Fix incorrect docs for bpy.types.bpy_prop_collection_idprop
ID Property methods were missing from the API docs,
error in [0] which added docs for this type.

[0]: 10e3e3b4a0

Co-authored-by: nutti <nutti.metro@gmail.com>
2025-01-20 15:49:54 +11:00
Campbell Barton
ddae7cd966 PyAPI: expose bpy.types.bpy_prop_collection_idprop
Expose the IDProperty sub-class of `bpy.types.bpy_prop_collection`,
needed for API doc generation but should have been exposed for
completeness.
2025-01-20 15:47:08 +11:00
Alaska
786a601cc8 Tests: Enable OptiX OSL window test
The window coordinate test was on the block list due to the
world shader rendering it incorrectly.

This has since been fixed, so this test can be removed from the
blocklist.

Ref: blender/blender#123012
Ref: blender/blender@4f0aef1fde
2025-01-20 05:06:13 +01:00
Pratik Borhade
a9b863be43 Fix #58333: Box select missing status bar key for deselect
Allow mouse release events to be included on status bar.

Pull Request: https://projects.blender.org/blender/blender/pulls/133182
2025-01-20 03:54:56 +01:00
Lukas Stockner
4f0aef1fde Fix #132516: Cycles: No NDC coordinates with OSL on OptiX
This attribute just wasn't implemented on OptiX. Not sure why, adding it works.
2025-01-20 03:42:02 +01:00
Lukas Stockner
2bd71e2fd8 Cleanup: Cycles: Cleanup point cloud attribute update
For other geometry types this was done in bbe6d44928, but for some reason
point clouds were added with the old scheme.
2025-01-20 02:49:35 +01:00
Lukas Stockner
e5ca7ae421 Fix #108215: Cycles: Point Cloud uses wrong position with Persistent Data
The problem here was that the sync code overwrites the point data, but didn't
reset the transform_applied flag, so the rest of the code assumed that the
points are already in world space and didn't apply the transform again.
2025-01-20 02:49:35 +01:00
Harley Acheson
5a452884fc UI: Improve Status Bar Display for GP Lines
When adding Grease Pencil lines, circles, curves, etc this PR updates
how the status bar shows options. No big changes just substituting
icons for text.

Pull Request: https://projects.blender.org/blender/blender/pulls/133279
2025-01-20 02:35:01 +01:00
Campbell Barton
d42b425ea9 Fix #131062: Active tool does not sync in Texture Painting workspace
Resolve an error where the brushes from the image/3D viewport
where shared but the tool was not. Causing the brush not to match
the appropriate tool when both an image & 3D viewport were displayed.

Resolve the issue by adding support for a "pending" tool,
a tool ID which is to be used.

This accounts for cases where it's not known if the requested tool
exists and uses the same code paths for initializing tools as is done
for initializing on file load for e.g.

Ref !133085
2025-01-20 11:21:33 +11:00
Campbell Barton
90b03d2344 Cleanup: spelling in comments 2025-01-20 11:19:23 +11:00
Campbell Barton
05efd19982 Cleanup: hide unused variable, correct comment 2025-01-20 11:19:06 +11:00
Richard Antalik
5394cb7514 Fix: VSE retiming key python API not defined on all strip types
API was defined only for movie strips. Define is also for Scene, image
and sound strips.

This required minor refactoring of how RNA collection type is defined.

Pull Request: https://projects.blender.org/blender/blender/pulls/133103
2025-01-19 21:21:36 +01:00
Richard Antalik
30f3eaa2a5 Fix #133167: Scene snapping settings confilict with VSE
Enabling `use_snap_rotate` in 3D viewport caused rotation in sequencer
to apply snapping. Rotation snapping was using mixed snapping functions,
which aren't implemented in sequencer.

Ignore affect rotation/scale tool setting property and force increment
snapping to be used with these transform modes.

Pull Request: https://projects.blender.org/blender/blender/pulls/133272
2025-01-19 20:56:56 +01:00
Brecht Van Lommel
4f72b8b3ff Math: Protect against using inplace min/max on pointers and references
As happened before, see #132918.

Pull Request: https://projects.blender.org/blender/blender/pulls/133261
2025-01-19 12:31:16 +01:00
Pratik Borhade
c479e0c2de Fix #132545: Grease Pencil: Change primitive tool radius/strength with hotkey
Move keymap for brush radius/strength out of `km_grease_pencil_brush_stroke`.
Poll function of it skips primitive tools (see:`keymap_grease_pencil_brush_stroke_poll`)

Pull Request: https://projects.blender.org/blender/blender/pulls/132589
2025-01-19 10:00:18 +01:00
Brecht Van Lommel
627114ee54 UI: Viewport Render Animation operator using jobs system
Instead of the old time cursor, this will now show a progress bar in the
OS taskbar or dock, as well as the main window status bar. Along with the
job name and cancel button.

Pull Request: https://projects.blender.org/blender/blender/pulls/133174
2025-01-19 07:30:50 +01:00
Alaska
f85ff21ed0 Tests: Add render tests for texture nodes
Enable render tests in the `texture` folder.

Ref #123012
2025-01-19 00:52:22 +01:00
Harley Acheson
8953cc5045 UI: Improved Initial Message for Mesh Bisect
When first starting the Mesh Bisect operator, the Status Bar shows
"LMB: Click and drag to draw cut line". This PR just changes that to
show the message with an icon instead. And adds "Cancel".

Pull Request: https://projects.blender.org/blender/blender/pulls/133244
2025-01-19 00:49:52 +01:00
Pratik Borhade
386365aece Fix #133203: Call invoke function for transfer mesh data
Use operator context of 'INVOKE_DEFAULT' for object.data_transfer and
object.datalayout_transfer in menu VIEW3D_MT_make_links so that they
work correctly when called from popup menus.

Pull Request: https://projects.blender.org/blender/blender/pulls/133228
2025-01-18 19:58:35 +01:00
Pratik Borhade
5726a998a0 Fix #133151: Display "Depth" in status bar for inset operator keymap
Depth property of inset operator had wrong text displayed in status
bar. Should be "Depth" instead of "Tweak". Was changed in error in
commit 42a8947eb1.

Pull Request: https://projects.blender.org/blender/blender/pulls/133230
2025-01-18 19:35:44 +01:00
Sietse Brouwer
0db41a88b5 Fix: Grease Pencil: Uninitialized attribute values when drawing strokes
When drawing strokes in Grease Pencil, some (custom) attribute values
stayed uninitialized. This was due to a tiny bug in the Draw operator
initializing only some attribute values of newly drawn stroke points
to their default value and not all of them.
This PR fixes that.

Pull Request: https://projects.blender.org/blender/blender/pulls/133216
2025-01-18 09:02:00 +01:00
Sean Kim
6100023527 Cleanup: Remove unused sculpt_automask variables and functions
Pull Request: https://projects.blender.org/blender/blender/pulls/133223
2025-01-18 04:04:12 +01:00
Sean Kim
baffd174c8 Paint: Allow executing 3D paint operators without location
In Sculpt, Vertex Paint, and Weight Paint, the operator used while
painting (`SCULPT_OT_brush_stroke`, `PAINT_OT_vertex_paint`, and
`PAINT_OT_weight_paint`) can currently be executed in python as they
define `exec` methods. However, each of them has a implicit dependency
on the `OperatorStrokeElement` struct containing a `location`
corresponding to the object space location of the stroke daub.

This limits the usefulness of the operator in non-interactive
situations, as determining the actual location of a stroke on a 3D
object requires access to the Paint BVH to perform a raycast and project
the mouse from 2D region space into object space.

To allow users to define a stroke in region space coordinates, this
commit adds a new parameter to the associated operators,
`reproject_stroke` which indicates whether or not the current `location`
data should be discarded and replaced with newly calculated positions.

Ref: #132960

Pull Request: https://projects.blender.org/blender/blender/pulls/132974
2025-01-18 02:17:47 +01:00
Miguel Pozo
0a72db9f94 Fix #133198: Overlay-Next: Texture Paint workspace crash
Regression from 1406b9e656
Ensure it matches the Overlay Legacy behavior.
2025-01-17 22:59:39 +01:00
Harley Acheson
e8bc7ec68b Fix #83589: Remove Tooltips on Gizmo Mouse Down
Currently tooltips on gizmo parts can pop up while holding your mouse
down, unlike other UI elements. And they don't disappear until a few
pixels into a drag. This PR solves both by removing tooltips on mouse
down on a gizmo part.

Pull Request: https://projects.blender.org/blender/blender/pulls/132576
2025-01-17 22:44:21 +01:00
Sean Kim
7ba732a911 Assets: Update submodule hash
Related PR: blender/blender-assets#19

Ref: #131122

Pull Request: https://projects.blender.org/blender/blender/pulls/133219
2025-01-17 21:30:22 +01:00
Bastien Montagne
64bdc245b2 Fix warning in some compilers.
Compilers do not seem to agree on valid printf format for `int64_t`,
recent clang 19 on linux requires `%ld`, while older compilers like the
buildbot ones of clang 15 on OSX ask for `%lld`.

So instead, cast the value to `int32_t`. Other solution may have been to
use `PRId64`, but this is fairly bad for readability.
2025-01-17 21:07:11 +01:00
Bastien Montagne
b802c328b5 Refactor: Tests: bl_blendfile: Use unittest module instead of asserts.
Pull Request: https://projects.blender.org/blender/blender/pulls/133217
2025-01-17 21:05:39 +01:00
Ray Molenkamp
89efa94a2d Fix #132198: Remove license dialog from the msi installer
This also removes the component selection, made sense when you could
install both blender and the game-engine player individually but since
the game-engine got removed the dialog is a bit strange, as if one were
to turn any of the components off you'd end up with a non-functional
blender.

The wix documentation [1] has the details on how/why the license dialog skip works.

[1] https://wixtoolset.org/docs/v3/wixui/wixui_customizations/#changing-the-ui-sequence-of-a-built-in-dialog-set

Pull Request: https://projects.blender.org/blender/blender/pulls/132308
2025-01-17 18:45:26 +01:00
Philipp Oeser
434f94b254 Fix #133211: Grease pencil Smooth modifier ignores influence vertexgroup
To resolve, multiply the modifier `Factor` by influence vertex groups
weights (if a vertexgroup is used).

Pull Request: https://projects.blender.org/blender/blender/pulls/133213
2025-01-17 18:00:43 +01:00
Philipp Oeser
0fd3f3c216 Fix #133207: Grease Pencil Opacity modifier "Use Weight As Factor" wrong
Two things not behaving as in GPv2:
- points outside the influence vertexgroup were getting zero opacity (as
opposed to 1.0 in GPv2)
- Opacity Factor was multiplied in (even though it shouldnt and is
rightfully greyed out)

I assume the a misunderstanding in c02f3c94d9.

Pull Request: https://projects.blender.org/blender/blender/pulls/133208
2025-01-17 17:56:49 +01:00
Christoph Lendenfeld
3f76352149 Refactor: extract utility functions from brush asset code
No functional changes intended.

Some functionality from the brush asset system will be reused by the pose library.
To avoid duplicating code, the relevant functions are extracted to a common place.

All functions are moved as is, except for `visit_library_catalogs_catalog_for_search`.
For that I changed the `bUserAssetLibrary` argument to a `AssetLibraryReference`.
That is because in the follow up PR I am using this function with non user libraries as well.

This is a refactor PR extracted from #132747.
To get a full picture of the use case see that PR.

Part of #131840

Pull Request: https://projects.blender.org/blender/blender/pulls/132857
2025-01-17 17:11:03 +01:00