This commit changes the face_ptex_offset from a manually managed int
array to a blender::Array. This required a number of changes:
* The `Subdiv` struct is no longer trivial, so MEM_new and MEM_delete
need to be used
* The Draw module API has an overloaded set of `origindex_buffer`
methods created to take in a Span instead of an int pointer and size
Pull Request: https://projects.blender.org/blender/blender/pulls/141702
In RNA access code, when trying to 'decode' a given property into valid
data, if the existing storage IDProperty for a runtime-defined RNA
property was detected as invalid (e.g. wrong dimensions for an
array...), code was trying to remove that property from the user-defined
IDProperties (custom properties) instead of the system ones.
Mistake from the original IDProperty split commit (7276b2009a).
Don't init duplis if `dupli_list` is empty.
Otherwise, the `data->dupli_parent` "leaks" into the next objects.
This also asserts that dupli iteration properties are set to default
values when calling `deg_iterator_duplis_init`.
Pull Request: https://projects.blender.org/blender/blender/pulls/145407
Currently, sequencer structs contain several pointers to data within
other structs. These pointers need to be remapped as the structs are
reallocated when reading from blend files. That has worked so far
because the pointers are exactly the values from the Blender session
that saved the file. With the implementation of #127706, the pointers
in the file aren't "real" anymore, and we can't offset them to get the
struct that contained the data. I'm working on the pointer stability
solution now to address a memfile undo performance regression
in 5.0 due to the `AttributeStorage` read/write design.
This commit replaces these 4 mid-struct pointers to point to the
containing strips instead, and uses some trivial logic to access the
fallback root sequence channels and strips. This makes the pointer
remapping on file load possible again.
This change is backward compatible but not forward compatible.
Second try after #144626
Pull Request: https://projects.blender.org/blender/blender/pulls/144878
When copying grease pencil strokes, `BKE_object_material_get()` was used
to retrieve the material ID, but the index starts at 1 instead of 0,
this caused the pasted material to be wrong. Now the index is properly
incremented to 1 when copying.
Pull Request: https://projects.blender.org/blender/blender/pulls/145398
The pose library registered a double-click keymap item for the file
browser keymap, because that was the only way to add keymap items to the
asset browser (which is just the file browser under the hood). Since
450f428434, the pose library apply & blend operators are available in
more contexts, since their check for an active asset was moved from the
operator poll to the operator execution. So the pose apply operator
would end up triggering.
The poll function could be adjusted somehow to return false in this
case, e.g. by checking if it's executed from a file browser (not an
asset browser).
However, the operator should be independent of where it's called from.
So instead this registers a separate keymap for the asset browser, so
the pose library operators can be registered exclusively for the asset
browser.
Moves the descriptor pools from resource pools to thread data.
The descriptor pools uses a recycling approach and don't need
to be guarded anymore inside a resource pool. Now only the
descriptor set tracker is inside the resource pool.
Pull Request: https://projects.blender.org/blender/blender/pulls/145393
Previously `SVGExporter::export_scene` can work on a empty `frames`
index mask, causing crash. Now it will exit early when no frames are
selected, and it will show a warning to the user.
Pull Request: https://projects.blender.org/blender/blender/pulls/145286
The outliner was still using the active scene to show the sequencer
strips in the VSE mode.
This adds the workspace to the `TreeSourceData` so that
the `TreeDisplaySequencer` can read the sequencer
scene.
Note that more places need to be fixed to make this mode
work correctly again.
Pull Request: https://projects.blender.org/blender/blender/pulls/145247
This commit refactors the relevant code to extract the
logic of determining which cache to use into a centralized location to
avoid missing updates happening in the future.
Pull Request: https://projects.blender.org/blender/blender/pulls/143580
Added in 8d6c717e34
These enums are unrelated to nodes. The fact that nodes reuse the
enum property items is an implementation detail that shouldn't leak.
Currently it causes the type dropdown in the "Add Attribute" operator
to be full of node socket icons.
At a data level it is also not clear that these should have node socket
colors, even in geometry nodes. Arguably it's important to distinguish
between attribute types and socket types, especially since some
attribute types cannot be explicitly passed around by node links.
For now, revert the parts of that commit that added node socket icons
in areas unrelated to the node editor. If we're going to do that it needs
proper consensus and a more complete design.
Meshes that require adaptive subdivision are currently tesselated one at
a time. Change this part of device update to be done in parallel.
To remove the possibility of the status message going backwards, a mutex
was required to keep that portion of the loop atomic.
Results for the loop in question: On one particular scene with over 300
meshes requiring tesselation, the update time drops from ~16 seconds to
~3 seconds. The attached synthetic test drops from ~9 seconds down to ~1
second.
Pull Request: https://projects.blender.org/blender/blender/pulls/145220
The pattern of transforming many position vectors at once is quite
common, both with separate source and result arrays, and when modifying
an array in place. In some cases at least we used a separate function
with a consistent name across files, but there were also many duplicate
parallel transform implementations.
This commit adds these utilities to the BLI_math_matrix.hh API and uses
them where many positions from contiguous arrays are transformed at
once. While there might be a more ideal location for these utilities,
it's consistent with 3936d7a93e, and certainly better
than duplicating them.
This also reduces binary size of my build by 15 KB.
Pull Request: https://projects.blender.org/blender/blender/pulls/145352
Selected tracks in the Movie Clip Editor's Dope Sheet used hard-coded color.
Added a new theme property for them, and previously hard-coded color is now just a default.
Pull Request: https://projects.blender.org/blender/blender/pulls/144265
While handling this pointer is technically not needed in `foreach_id`
code (and likely never will be), better not rely on such undocumented
implicit specifics, and instead properly handle it there, with comments
and asserts explaining why it should not be actually executed in current
code.
Pull Request: https://projects.blender.org/blender/blender/pulls/145345
When line art is first developed, curves objects does not exist yet, now
it is added to line art so it will be read and take part in feature line
generation and occlusion tests.
This patch also adds "Line Art" panel for curves object, just like other
objects supported by line art.
Pull Request: https://projects.blender.org/blender/blender/pulls/145296
The PR restores the old behavior (after the changes in #139128) so that
specifying a path to a non-existing blend file will load Blender with
default blend default and with that name assigned. Paths to non-blend
files will load blender but then give the new warning message.
Pull Request: https://projects.blender.org/blender/blender/pulls/145274
This adds support for opening "invalid" files containing closure/bundle nodes that have
first been saved with 5.0, then resaved with 4.5. Note that loading them in 4.5 only works
after #145337.
Pull Request: https://projects.blender.org/blender/blender/pulls/145333
This patch optimizes nodes with Boolean and Menu inputs for GPU
execution. This is done by using constant links instead of uniforms for
those inputs. This will cause shader recompilation, but is okay since
those inputs rarely change.
Pull Request: https://projects.blender.org/blender/blender/pulls/145329
This PR disables HDR when driver doesn't support
`VK_EXT_swapchain_colorspace`. It could be that Windows detect support
(DirectX) and allow users to enable HDR. But that it isn't supported by
the Vulkan part of the driver.
In case of Windows there might be an issue with using SRGB non
linear on F16 swapchains where somewhere an additional transform is
being performed. After adding support for other color spaces we should
remove the support of this swapchain configuration.
Pull Request: https://projects.blender.org/blender/blender/pulls/145325
Caused by d7fa455e66
Due to an earlier experiment to get right alignment, above commit left a
space in the text (this was later solved by using
`UI_ITEM_R_SPLIT_EMPTY_NAME`, but... for this one node, the name was not
actually empty then...)
Pull Request: https://projects.blender.org/blender/blender/pulls/145303
The function was using the `BKE_id_material_len_p` with the ID
of the object rather than the object data ID, which is what the
function expects.
Instead make sure to use `BKE_object_material_len_p` to get
the right number of material slots.
Additionally use the correct slot in `BKE_object_material_get`
which is the index of the material + 1.
Pull Request: https://projects.blender.org/blender/blender/pulls/145323