Commit Graph

104727 Commits

Author SHA1 Message Date
Antonio Vazquez
acbfecb852 GPv3: Replace depsgraph tag to ID_RECALC_GEOMETRY
The tag ID_RECALC_SHADING is not working in Grease Pencil
2023-11-21 15:59:17 +01:00
Iliya Katueshenock
fc30a4b6a5 Fix: BLI: Math: Build error for bad overload-lookup
Fix for unreported build error.

Pull Request: https://projects.blender.org/blender/blender/pulls/115095
2023-11-21 15:58:17 +01:00
Miguel Pozo
9320742b45 Fix #114651: EEVEE-Next: SSS NaNs
Before #112901, subsurface scattering was skipped if its radius was
less than 1 pixel.
Aside from an optimization, this also avoided divisions by zero in
`burley_eval`.
This just brings back the early return when `pixel_footprint < 1.0`.

Pull Request: https://projects.blender.org/blender/blender/pulls/114928
2023-11-21 15:47:51 +01:00
Hans Goudey
29f3d54e91 Cleanup: Grammar in comments
- it's self vs. itself
- boiler plate vs boilerplate
2023-11-21 09:42:39 -05:00
Christoph Lendenfeld
a99e419b6e Anim: Insert keyframes without keying sets
When animators want to key something in the viewport,
the code needs to know *which properties* should be keyed of that selected thing.
So far that was done with keying sets, and a pop-up that let's
you choose the keying set to use. You can get rid of the popup by
choosing a keying set ahead of time. But that is also not always desirable.

That pop-up is quite confusing and gives way too many options.
To simplify this process this PR adds a User Preference option to choose one or more of:
* Location
* Rotation
* Scale
* Rotation Mode
* Custom Properties

Now whenever the `I` key is pressed in the viewport,
and no keying set is enabled, it reads the preferences for which channels to insert.

# User Facing changes
* The popup will not be shown when pressing the hotkey,
 but you can still explicitly use keying sets by going to the menu
* Which channels are keyed is defined by a User Preference setting under animation
* when a keying set is used explicitly, the User Preference settings are ignored

Part of #113278

Pull Request: https://projects.blender.org/blender/blender/pulls/113504
2023-11-21 15:38:01 +01:00
Falk David
78d9267a56 GPv3: Material locking
This PR adds the material locking functionality from the current grease pencil.

Material locking allows the user to lock strokes with that specific material. Locked strokes cannot be edited.

Pull Request: https://projects.blender.org/blender/blender/pulls/114580
2023-11-21 15:27:01 +01:00
Iliya Katueshenock
b70d387f2a Fix: Geometry Nodes: wrong field inferencing in Shortest Edge Paths node
Pull Request: https://projects.blender.org/blender/blender/pulls/115139
2023-11-21 14:52:43 +01:00
Hans Goudey
6ba9ee88c8 Geometry Nodes: Node tools: Support warnings
Warnings created during evaluation of the node group are passed as
warnings to the operator. This is done using the existing logging
system, which we could also use to get socket inspection working
in the future.

See #101778

Pull Request: https://projects.blender.org/blender/blender/pulls/115237
2023-11-21 14:27:21 +01:00
Iliya Katueshenock
d9f44f4b93 Cleanup: remove unused variable
Error from b24610053f

Pull Request: https://projects.blender.org/blender/blender/pulls/115239
2023-11-21 14:23:53 +01:00
Jacques Lucke
96b3afe065 Cleanup: rename node group to group node context
`GroupNodeComputeContext` is the more correct name because it's
specifically about a group node that invokes another node tree.
The old name makes it sound like it should be used because a node group
is invoked but does not tell anything about what invoked it.
For example, the current context in a node group can also be a
`ModifierComputeContext` if that's what invoked it.
2023-11-21 14:12:23 +01:00
Christoph Lendenfeld
a91a8f3fed Anim: View FCurve of Property in the Graph Editor
This commit adds a new operator that allows to view an FCurve in the Graph Editor from the animated property.

# Features
* Frame a single property or a whole array property by right-clicking an animated property
* Works on a property anywhere in blender
* Framed FCurves are selected and set to visible
* Works on the selection. If an object/bone doesn't have a property it is ignored.
* Works with NLA offset and normalization
* Isolate curves. This is a property on the operator

# Caveats
* Frames on the first Graph Editor it finds
* Since it works on the selection but the n-panel works on the active object,
you can create a situation where nothing happens because you can have
an active object without it being selected.
* Assigning a shortcut doesn't work through right clicking the menu entry.
You have to go to the keymap and create a new entry manually (e.g. in the user interface category)

Pull Request: https://projects.blender.org/blender/blender/pulls/114407
2023-11-21 14:06:53 +01:00
Jacques Lucke
78b2c15c4d Nodes: support storing caller tree and node in node group compute context
This is used by #112677.
2023-11-21 13:52:45 +01:00
Jacques Lucke
813078daec BLI: support checking if two maps are the same 2023-11-21 13:38:43 +01:00
Falk David
6064e726d4 Fix: GPv3: Stutter while drawing
While drawing, the line beeing drawn would seemingly only update once
in a while. This was because there was a bug in the interpolation
function that would write the value being interpolated from
directly to the destination as the first value.
In our case, we only wanted to write new values (so
we need to exclude the first one).

Making sure the interpolation always excludes the value
interpolated from, fixes the drawing stutter issue.
2023-11-21 12:45:44 +01:00
Jason Fielder
3f3f4c3478 EEVEE Next: Ensure HiZ buffer update flag is cleared
HiZ dirty flag was previously not cleared upon update
resulting in duplicate updates in several places, without
source depth input having changed.

Authored by Apple: Michael Parkin-White

Co-authored-by: Michael Parkin-White <mparkinwhite@apple.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/115235
2023-11-21 12:44:27 +01:00
Iliya Katueshenock
b24610053f Fix: crash when using attribute search in Named Attribute node
Missed part of 8149678d5e.

Pull Request: https://projects.blender.org/blender/blender/pulls/115136
2023-11-21 11:26:45 +01:00
Jeroen Bakker
dc8fd30a3c OpenGL: Raise Minimum SSBO Bindings to 12.
Draw manager requires a minimum of 12 bind points.

Pull Request: https://projects.blender.org/blender/blender/pulls/115229
2023-11-21 10:44:14 +01:00
Iliya Katueshenock
acee93bd6d Fix #115207: dynamically typed Viewer node
Missed part of 8149678d5e.

Pull Request: https://projects.blender.org/blender/blender/pulls/115130
2023-11-21 10:43:25 +01:00
20kdc
f01c82e268 VSE: Use Strip Volume property for scenes
Scene strips had scene volume property in side panel, but this meant,
that it is shared across all strips using particular scene.

Add `volume` RNA property for scene strips and use this in side panel.

Co-authored-by: 20kdc <asdd2808@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/112597
2023-11-21 08:09:18 +01:00
Richard Antalik
d0e9468848 Fix (Unreported) VSE crash when editing retiming
Caused by loop over `MutableSpan`, but underlying array can be
reallocated. Do index based looping instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/115121
2023-11-21 05:27:36 +01:00
Richard Antalik
918515495e Fix #115007: Crash when creating transition from last reiming key
This operation is not permitted, cancel operator execution when
attempted.

Pull Request: https://projects.blender.org/blender/blender/pulls/115122
2023-11-21 05:27:24 +01:00
Hans Goudey
8d2b203a3d Cleanup: Remove unnecessary keywords in C++ header 2023-11-20 22:12:27 -05:00
Hans Goudey
ea78af4b5d Cleanup: Move draw_subdivision.h to C++ 2023-11-20 22:07:11 -05:00
Charles Wardlaw
e6ff1348cb Fix: USD Export: Calculate extents property for lights
Lights without calculated extents are not considered correct USD.
This is now possible with the APIs provided by recent USD versions.

Pull Request: https://projects.blender.org/blender/blender/pulls/113910
2023-11-20 20:51:34 -05:00
Hans Goudey
ef3897f6a4 Fix #115202: Set Selection node crash in object mode
The geomery output wasn't set.
2023-11-20 18:17:54 -05:00
Hans Goudey
76dc180c3d Cleanup: Remove unused return argument from "ensure mask" function 2023-11-20 13:45:34 -05:00
Hans Goudey
e9db14b3d8 Mesh: Copy small caches when moving mesh data to Main database
For a 16 million vertex mesh, when there are no loose vertices or edges,
copying that information to new original mesh saves 100ms after applying
a modifier on a Ryzen 7950X.
2023-11-20 13:25:29 -05:00
Hans Goudey
301731692e Cleanup: Access sculpt attributes with C++ attribute API
Access masks and face sets through the `BKE_attribute.hh` API. This
us more flexibility long term, and makes code a bit simpler in the
meantime.
2023-11-20 13:14:34 -05:00
Hans Goudey
9781600d68 Cleanup: Remove sculpt session mask pointer
This was only used in one place. Adding the name lookup to
`SCULPT_vertex_mask_get` is not good long term, but the use
of that function can be removed too.
2023-11-20 13:14:34 -05:00
Philipp Oeser
e2fbcb4632 Fix #115167: crash opening files with missing fonts on disk
Check for linked fonts not found on disk.

Pull Request: https://projects.blender.org/blender/blender/pulls/115168
2023-11-20 18:34:32 +01:00
Hans Goudey
4edc138933 Fix: Missing space in property description 2023-11-20 11:54:09 -05:00
Hans Goudey
f2bcd73bd2 Mesh: Move sculpt mask to a generic attribute
Store paint masks as generic float attributes, with the name
`".sculpt_mask"`. This is similar to 060a534141, which made
the same change for face sets. The benefits are general
consistency, nicer code, and more support in newer areas
that deal with attributes like geometry nodes.

The RNA API is replaced with one created in Python. The new
API only presents a single layer as an attribute class, so it
should be simpler to use in general:
- Before: `object.data.vertex_paint_masks[0].data[0].value`
- After: `object.data.vertex_paint_mask.data[0].value`

Pull Request: https://projects.blender.org/blender/blender/pulls/115119
2023-11-20 17:42:01 +01:00
Jeroen Bakker
d638357d6f Fix: Vulkan Multi Indirect Drawing
Multi indirect drawing would bind an offset index buffer, but
indirect drawing parameters also offset the index buffer so
incorrect geometry was drawn.

Fixes drawing of meshes with multiple materials.

Pull Request: https://projects.blender.org/blender/blender/pulls/115190
2023-11-20 15:48:06 +01:00
Germano Cavalcante
07b5e1bd80 Fix #115153: Snap Base in Camera View crashes Blender
Snap to geometry is not supported when moving camera in camera view.

This is because the camera would make jumps that would be difficult to
predict and control.

The same happens if Snap Base were supported.

Therefore, disable Edit Snap Base when transforming camera into camera
view.
2023-11-20 11:09:55 -03:00
laurynas
6ccb30246d Fix #114860: Edge bevel weights in complex solidify
"Solidify" modifier in "Complex" mode was creating redundant layer
"bevel_weight_edge.001", if mesh has bevel weights for vertex set.
All modifier's  custom edge bevel weight calculations went there and got lost.

Pull Request: https://projects.blender.org/blender/blender/pulls/115178
2023-11-20 14:44:15 +01:00
Jeroen Bakker
c9ba4f694b Cleanup: Make format 2023-11-20 14:19:16 +01:00
Jeroen Bakker
27fdfb6538 Vulkan: Memory Statistics
This PR shows the memory footprint in the statusbar when activated.
Only memory allocated on the VRAM is counted. Memory allocated on host
memory is not counted.

![image](/attachments/33cedc89-9ada-4c0a-9a94-6c1b3e22b64b)

Pull Request: https://projects.blender.org/blender/blender/pulls/115184
2023-11-20 14:08:19 +01:00
Hans Goudey
b63e31df57 Fix #115170: Sculpt mode crash
If there isn't an evaluated mesh, use the original.
2023-11-20 07:45:52 -05:00
Philipp Oeser
85ffb71e44 Fix #115105: Edge Crease Doesn't Transfer
Caused by e5ec04d73c

Since above commit, the edge crease is a named attribute and considered
a "fake" customdata layer (similar to bevel weights or UV seams --
`CD_FAKE`). Thus, a special case in
`data_transfer_layersmapping_generate` has to be added for
`CD_FAKE_CREASE`.

Pull Request: https://projects.blender.org/blender/blender/pulls/115180
2023-11-20 13:32:23 +01:00
Bastien Montagne
98ed3d3538 Fix print format warning with int64_t value.
There is no portable I18N-compatoible way to printf-format an `int64_t`
value, so convert it back into an `int`.
2023-11-20 12:43:07 +01:00
Miguel Pozo
4dc1c23384 Fix #114742: Draw: Buffers never shrink
The buffers from the new Draw Manager increase their size as needed,
but they never shrink.

Add `StorageArrayBuffer::trim_to_next_power_of_2` function that can
downsize the buffer following the same heuristic as `get_or_resize`.
Add `StorageVectorBuffer::trim_and_clear`, which calls
`trim_to_next_power_of_2` automatically.

Pull Request: https://projects.blender.org/blender/blender/pulls/114857
2023-11-20 12:23:12 +01:00
Bastien Montagne
7ce745a76b UI messages fixes/cleanups. 2023-11-20 12:20:58 +01:00
Aras Pranckevicius
0d0aad6280 IO: add STL import/export tests
Pull Request: https://projects.blender.org/blender/blender/pulls/115164
2023-11-20 11:19:50 +01:00
Antonio Vazquez
90a7ca7ed0 GPv3: Cleanup style and change depsgraph tag 2023-11-20 10:07:19 +01:00
Jacques Lucke
a976cf4876 Cleanup: reduce boilerplate for equality operators for structs
Pull Request: https://projects.blender.org/blender/blender/pulls/115088
2023-11-20 09:39:13 +01:00
Jason Fielder
b8c84d03cd Fix #107025: Resolve incorrect UV stretch color on macOS
Modify `UVStretchAngle` vertex struct alignment to match
4-byte struct alignment for Metal. This includes reordering
array elements to the front and adding additional padding
to the struct in Metal such that the raw-data write size
matches the padded vertex format.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/114923
2023-11-20 08:45:56 +01:00
ok_what
c433f6666a Fix (unreported): Incorrect calculation of meta strip range
The meta strip range was calculated before the effect strip range was
updated. This resulted in incorrect range. To the user this appeared
as the meta strip erratically jumping to another location in the
timeline when transforming it, when it contained effect strips.

Pull Request: https://projects.blender.org/blender/blender/pulls/114644
2023-11-20 04:18:18 +01:00
Hans Goudey
41f9f2753a Refactor: Mesh: Include wrapper positions in bounds result
Avoid the need to call the separate `BKE_mesh_wrapper_minmax` function
that dealt with the edit mesh wrapper. This makes the API inconsistent,
since other mesh functions don't implicitly deal with the wrapper.
But the bounds are a bit of a special case anyway in regard
to the GPU subdivision wrapper already, and this is much more
convenient in the rest of the refactors for #96968.
2023-11-19 18:36:19 -05:00
Hans Goudey
48c6e682e0 Cleanup: Remove unnecessary extern "C" in legacy GP header 2023-11-19 17:32:02 -05:00
Hans Goudey
dd902d97ab Cleanup: Add missing forward struct declaration 2023-11-19 17:31:37 -05:00