Commit Graph

143384 Commits

Author SHA1 Message Date
Sean Kim
bdee3b9762 ClangFormat: Remove unused sculpt macro exceptions
Pull Request: https://projects.blender.org/blender/blender/pulls/130158
2024-11-12 00:44:24 +01:00
Sean Kim
406f259920 Merge branch 'blender-v4.3-release' 2024-11-11 11:05:59 -08:00
Sean Kim
009fb327ee Fix #130101: Boundary brush radius uses incorrect initial value
Introduced in 99c55bdbfb

Pull Request: https://projects.blender.org/blender/blender/pulls/130154
2024-11-11 20:02:36 +01:00
Hans Goudey
7d68a4ca14 Refactor: Sculpt: Shape key deformation consistency & deduplication
Make use of the struct and patterns from 005e02d008 to make
the view places that deform shape keys more similar. While they each are
slightly different for valid reasons, with this change they follow the
same structure and use the same helper struct.

Pull Request: https://projects.blender.org/blender/blender/pulls/129901
2024-11-11 19:35:24 +01:00
Hans Goudey
312052112a Cleanup: Remove references to legacy Grease Pencil type
See #123468.

Pull Request: https://projects.blender.org/blender/blender/pulls/130151
2024-11-11 19:11:03 +01:00
Falk David
4bf63b69f0 Merge branch 'blender-v4.3-release' 2024-11-11 18:43:57 +01:00
Pratik Borhade
56beccb563 Fix: GPv3: Hide sculpt automasking properties in UI
Automasking is not functional. Better to not expose it through the UI.
See: #130022.

Pull Request: https://projects.blender.org/blender/blender/pulls/130064
2024-11-11 18:42:53 +01:00
Jacques Lucke
3f3f8d315d Fix: don't show Geometry Nodes modifier gizmos for unselected objects
It's unexpected that the gizmos show for unselected objects.

Pull Request: https://projects.blender.org/blender/blender/pulls/130144
2024-11-11 18:42:53 +01:00
Clément Foucault
6e16447145 EEVEE: Add assertion that all random numbers are between 0 and 1
This ensures the result of the random number generator is
well defined and that we can trust the output to feed into
functions like `sqrt`.
2024-11-11 18:42:22 +01:00
Lukas Tönne
1158130995 Fix #129324: Merge Down operator always appends merged layers at the end
The Merge-Down operator for layers was inserting existing layers first,
then appending the 2 merged layers at the end (top of stack).

Now merged layers are inserted at the position of the layer below the
active, so the layer order remains unchanged.

Note that merging a layer group has a similar issue, with the new
layers getting appended at the top. This is a bit more difficult because
looping only over layers drops the relative ordering of groups and
layers. A separate fix is needed for that.

Pull Request: https://projects.blender.org/blender/blender/pulls/130146
2024-11-11 18:42:10 +01:00
Pratik Borhade
f93108fa28 Fix: GPv3: Hide sculpt automasking properties in UI
Automasking is not functional. Better to not expose it through the UI.
See: #130022.

Pull Request: https://projects.blender.org/blender/blender/pulls/130064
2024-11-11 18:28:42 +01:00
Hans Goudey
70483bef74 Cleanup: Remove asset header include from BKE_context.hh
Trying to reduce the number of indirect includes.
2024-11-11 12:23:42 -05:00
Jacques Lucke
0d6d54d565 Fix: don't show Geometry Nodes modifier gizmos for unselected objects
It's unexpected that the gizmos show for unselected objects.

Pull Request: https://projects.blender.org/blender/blender/pulls/130144
2024-11-11 18:20:46 +01:00
Falk David
9323a646b3 Merge branch 'blender-v4.3-release' 2024-11-11 18:19:34 +01:00
Falk David
0d1d3d12ba Fix: GPv3: Inconsistent behavior when adding a layer group
When a layer group was active, new groups would be created at
the top of the layer tree which is inconsistent with how layers are
added.

This fixes the behavior. When a group is active, newly added groups
are moved into that group.
2024-11-11 18:18:47 +01:00
Falk David
753e6952b9 Fix: GPv3: Inconsistent behavior when updating the active node after removal
The code that was updating the active node after removing a layer/group
was not handling all cases correctly.

The fix updates the logic for setting the active node:
1. If the node is a non-empty group and we're keeping the children, then set
the active node to the top node in the group.
2. Otherwise, if the node has a node below it (in the same group), set it to be the active one.
3. Otherwise, if the node has a node above it (in the same group), set it to be the active one.
4. Otherwise, if the parent is not the root group, set the parent to be the active node.
5. Otherwise, clear the active node.

This behaves the same as in Krita.

Pull Request: https://projects.blender.org/blender/blender/pulls/130126
2024-11-11 18:18:24 +01:00
Hans Goudey
acf30d1962 Merge branch 'blender-v4.3-release' 2024-11-11 11:59:22 -05:00
Pratik Borhade
9a59372f07 Fix #130034: GPv3: Deleting root layer group leads to crash
The code was relying on the layer cache through `groups_for_write`/`layers_for_write`.
The `group->runtime->layer_group_cache_` stores all the child groups instead
of groups on first level. This leads to crash when recursively deleting
group i.e. group at third level has been deleted but `layer_group_cache_`
of first level group will still point to address of freed memory.

The fix removes the use of the cache and iterates over the direct
children in `group.children` and deletes them recursively.

Pull Request: https://projects.blender.org/blender/blender/pulls/130082
2024-11-11 17:54:59 +01:00
Pratik Borhade
b0f05228f9 Fix #130034: GPv3: Deleting root layer group leads to crash
The code was relying on the layer cache through `groups_for_write`/`layers_for_write`.
The `group->runtime->layer_group_cache_` stores all the child groups instead
of groups on first level. This leads to crash when recursively deleting
group i.e. group at third level has been deleted but `layer_group_cache_`
of first level group will still point to address of freed memory.

The fix removes the use of the cache and iterates over the direct
children in `group.children` and deletes them recursively.

Pull Request: https://projects.blender.org/blender/blender/pulls/130082
2024-11-11 17:53:13 +01:00
Germano Cavalcante
2ddab48cab Merge branch 'blender-v4.3-release' 2024-11-11 13:42:42 -03:00
Germano Cavalcante
61f503a197 Fix: error in previous commit 2024-11-11 13:41:58 -03:00
Germano Cavalcante
d7ac528d53 Merge branch 'blender-v4.3-release' 2024-11-11 13:35:57 -03:00
Germano Cavalcante
fe37ede725 Fix: warning due to b4154c
No parentheses around comparison in operand of ‘==’ [-Wparentheses]
2024-11-11 13:34:59 -03:00
Hans Goudey
dd651ef5d6 Fix #130086: Weight/vertex paint non-deform modifiers wrong positions
The PBVH vertex positions accessor functions have to match the logic in
`sculpt_update_object`. When there were topology changing modifiers
before deform modifiers it didn't. `BKE_crazyspace_build_sculpt` just
skips the topology changing modifiers, and the resulting positions
are stored in `ss.deform_cos`, which we need to access here.

Pull Request: https://projects.blender.org/blender/blender/pulls/130139
2024-11-11 17:24:13 +01:00
Weizhen Huang
90ed91dfdb Cleanup: Cycles: Add Kernel prefix to light tree bounding shapes
BoundingBox -> KernelBoundingBox
BoundingCone -> KernelBoundingCone

Pull Request: https://projects.blender.org/blender/blender/pulls/130141
2024-11-11 17:13:55 +01:00
Lukas Tönne
dbbacbffaf Merge branch 'blender-v4.3-release' 2024-11-11 17:12:17 +01:00
Lukas Tönne
9fb185d31d Fix #130066: Crash after joining Grease Pencil objects
The Join operator for Grease Pencil was making a shallow copy of the drawings
array, with the assumption that the source object would no longer be needed.
This is not the case, the source object is still in the blend data and still
shares the same drawings pointer as the target object. This is invalid, the
drawings should owned by one object.

To fix this the patch makes a deep copy of the drawings so the source and target
have their own sets of drawings. Data is still shared at the CustomData level,
so these copies are not very expensive.

Pull Request: https://projects.blender.org/blender/blender/pulls/130140
2024-11-11 17:10:26 +01:00
Hans Goudey
e88ac07046 Fix #130098: Sculpt sample detail operator crash on failure
Check the error status from the function that updates the active vertex.
Also add `PROP_HIDDEN` to the operator's properties so the redo panel
doesn't show; that seemed extra weird to display on failure.

Pull Request: https://projects.blender.org/blender/blender/pulls/130142
2024-11-11 17:06:22 +01:00
YimingWu
37ec4b5430 Fix #129883: GPv3: Build modifier frame timing is not correct
When the duration of a frame is shorter than the build time specified in
the modifier, build modifier should shorten the build time to allow the
frame to be fully built within the frame duration. This fix made the
timing behaviour the same as GPv2.

Pull Request: https://projects.blender.org/blender/blender/pulls/129894
2024-11-11 16:53:39 +01:00
Weizhen Huang
ec3128ee37 Cleanup: Cycles: Remove unused functions
Wasn't used even when they were added
2024-11-11 16:42:50 +01:00
Hans Goudey
c709b59539 Refactor: Use blender::Map for screen context lookup
This moves from `GHash` to the type-safe and better-performing `Map`.
It uses the construct on first use idiom to simplify creation and freeing
of the map, removing the need to register an at-exit callback.

The change was initially motivated by seeing the hash lookups in a profile
of drawing a large node tree. Though my testing wasn't exactly scientific,
I did observe a few percent performance improvement with this change.

Pull Request: https://projects.blender.org/blender/blender/pulls/129954
2024-11-11 16:29:20 +01:00
Bastien Montagne
b1d044bfb8 Merge branch 'blender-v4.3-release' 2024-11-11 16:17:04 +01:00
Bastien Montagne
69a7948575 Doc: Py API: Add more info about UNDO operator option.
Essentially, any operator modifying Blender data should enable this
`UNDO` option, else bad things (corruption, crashes...) are likely to
happen.

* Added a new Operator example to explain this topic.
* Updated some existing Operator examples that were not correct anymore.
* Added a new small section in the gotchas page linking to it.
* Added also short reminder about this in the `UNDO` 'tooltip'
  description itself.

Related to #77557.
2024-11-11 16:13:37 +01:00
Bastien Montagne
ac75e37c8e Fix #130113: Copying Object ID never copies its preview.
This was added 7 years ago as 'safe' preservation of previous behavior,
when ID copying was refactored and more control was added over its
behavior.

However, it was never removed since then, even though `NO_PREVIEW` flag
has been part of the `LOCALIZE` copying behavior since many years.

So time to remove this enforced bahevior and use the API as designed. If
this causes new issues, they will have to be fixed in code calling the
ID copy API (most likely by simply adding the `NO_PREVIEW` flag to the
copy options).
2024-11-11 16:13:37 +01:00
Hans Goudey
f9bb4c9c81 Merge branch 'blender-v4.3-release' 2024-11-11 10:04:59 -05:00
Weizhen Huang
e9593a6619 Cleanup: Cycles: update light tree paper link
The original one was expired
2024-11-11 15:46:52 +01:00
Sybren A. Stüvel
88b10765ae Anim: add slot selector to NLA Action track buttons
The Action track in the NLA shows the directly-assigned Action. It should
also show the Slot selector, just like other places in the GUI.

Pull Request: https://projects.blender.org/blender/blender/pulls/129356
2024-11-11 15:17:22 +01:00
Hans Goudey
7f75690127 Fix #130102: Boundary brushes ignore masking with Multires
Also fixes #130100.

Mistake in 1618448abd.
2024-11-11 09:13:45 -05:00
Germano Cavalcante
e79ffa3ae9 Merge remote-tracking branch 'origin/blender-v4.3-release' 2024-11-11 10:30:18 -03:00
Germano Cavalcante
b4154c6a0e Fix #130078: Snap to Grid ignored if occluded in Add Object Tool
The snap cursor internally snaps to the Face to define the occlusion of
the Grid or to calculate the "Surface" orientation set by the tool.

Even though this is not the snap point enabled by the user, this
internal Snap to Face takes precedence over the Snap to Grid that is
enabled by the user.

To solve this, the solution is to do a second snap test but now only to
Grid and using the hit point as a reference for the closest grid.

Also fixes Absolute Increment Snap not being detected as Grid by the
tool.

Pull Request: https://projects.blender.org/blender/blender/pulls/130092
2024-11-11 14:26:52 +01:00
Lukas Tönne
da5bd15ca2 Merge branch 'blender-v4.3-release' 2024-11-11 14:26:12 +01:00
Lukas Tönne
72fd267024 Fix #130110: Fill tool crashes when extension lines are enabled
This was caused by ba28469e, which subtracted the start of the
offsets array, so it can't be used for "max array size" any more.
Use the "last()" entry directly to correctly size the view
positions array.

Pull Request: https://projects.blender.org/blender/blender/pulls/130127
2024-11-11 14:25:08 +01:00
Falk David
eca092b225 Merge branch 'blender-v4.3-release' 2024-11-11 14:13:42 +01:00
Falk David
4ba7950c2c Fix: GPv3: Memory leak with empty drawings array
The `BKE_grease_pencil_duplicate_drawing_array` function
would allocate memory for an empty array. This can be avoided.
2024-11-11 14:12:07 +01:00
Omar Emara
4c6f0bb60d Compositor: Implement Stabilize 2D for new CPU compositor
Reference #125968.
2024-11-11 14:32:35 +02:00
Omar Emara
778a86fa48 Compositor: Implement Keying Screen for new CPU compositor
Reference #125968.
2024-11-11 14:04:29 +02:00
Pratik Borhade
68ddaa2f0a Fix #128930: Cancel resize area with Right mouse
Add RMB switch case in modal fn() to cancel area resize operation.

Pull Request: https://projects.blender.org/blender/blender/pulls/129100
2024-11-11 12:48:13 +01:00
YimingWu
b8eb80c1fd Fix #130110: GPv3: Fill tool respect legacy radius factor
After applying fill tool, the `LEGACY_RADIUS_CONVERSION_FACTOR` was not
multiplied back so the value in the brush settings panel will become
smaller and smaller for each execution of the tool. Now fixed.

Pull Request: https://projects.blender.org/blender/blender/pulls/130120
2024-11-11 12:43:36 +01:00
Alaska
442498d53c Fix #130076: Make Grease Pencil Select Similar a callable menu
Use `WM_menu_invoke` callback to invoke menu for
"select similar" operator shortcut

Pull Request: https://projects.blender.org/blender/blender/pulls/130081
2024-11-11 12:41:55 +01:00
Falk David
e356a45d20 Merge branch 'blender-v4.3-release' 2024-11-11 12:18:32 +01:00