Previous namings in makesdna code was very confusing and inconsistent.
This commit unifies names accross the codebase as such:
- `struct` for the structs definitions data.
- `type` for the types definitions data.
- `member` for the struct members definitions data.
Structs and types definitions are not in synced for two reasons:
- types contains also definitions for basic types (int, float, etc.).
- types can be discovered before their struct definition (as members of
other structs).
This commit also groups all members of `SDNA` struct more logically (all
'structs' ones together, then all 'types' ones, then all 'struct
members' ones).
This commit should have no behavioral change at all.
Pull Request: https://projects.blender.org/blender/blender/pulls/125605
Expose arguments to use when creating a Python sub-process.
Python could fail to start when loaded in a customized environment,
with PYTHONPATH set for e.g. Blender ignores these and loads but a
Python sub-process attempts to use these environment variables which
may point to incompatible Python versions.
Resolve the root cause of #124731.
This PR changes the locations of the status icons shown on file item
thumbnails in the File Browser. Rather than show the file type at the
bottom-left of the thumbnail extent, show it at the item bounds. This
way they always are aligned with each other. This also changes the
current file indicator (top-right) similarly and adds an outline.
Pull Request: https://projects.blender.org/blender/blender/pulls/125625
Changes to the VSE strip handle mouse cursors when there are not
platform-specific versions. Trying to match the new design a bit
better, withing the the low resolution and aliased constraints of
the default mouse cursors.
Pull Request: https://projects.blender.org/blender/blender/pulls/125457
EEVEE writes wrong Cryptomatte meta data layer name. The view layer name
is always prepended to the Cryptomatte layer name, which can cause the
view layer name to be duplicated or the existence of view layer name
where it shouldn't be.
Old: cryptomatte/{hash}/name: string 'ViewLayer.ViewLayer.CryptoObject'
New: cryptomatte/{hash}/name: string 'ViewLayer.CryptoObject'
Pull Request: https://projects.blender.org/blender/blender/pulls/125515
Loading GPv2 files was crashing after modifiers were removed in #125102.
The modifier type info structs were still used for some internal
purposes (`struct_name`, `free_data`, `foreach_ID_link`), but the info
was not registered any more.
Since we only need a small portion of the typeinfo and because GPv2
modifiers will never change, using simple functions with switch
statements makes more sense here than bringing back fully fledged
typeinfo struct registration.
Pull Request: https://projects.blender.org/blender/blender/pulls/125663
Fixes a mismatch between Cycles and EEVEE when rendering a
Vector Math node in Refract mode with a normal vector of 0,0,0.
This mismatch first appeared after 8650068f0c which changed the
behaviour in Cycles, but not EEVEE.
Pull Request: https://projects.blender.org/blender/blender/pulls/125644
When a button had an operator attached and was using quick label
tooltips, the quick tooltip would include the Python path after the
label. In other cases like toolshelf buttons or buttons representing RNA
properties only the label would be shown, as expected.
Was visible in the tooltips of asset shelf items.
Rather than relying on subtle and rather implicit logic, use explicit
early exiting after the label fields are handled.
Having a default True return value in poll functions makes this
functions to succeed when they encounter errors or do not return any
value.
Ref !125628
Add an RNA path function to `AnimData`, so that
`repr(some_object.animation_data)` actually shows
`bpy.data["some_object"].animation_data`.
Previously it would only show the path of the owner ID, so
`bpy.data["some_object"]`, which is quite misleading.
Pull Request: https://projects.blender.org/blender/blender/pulls/125655
`paths_from_operator_properties` can return paths for both the explicit
operator `filepath` property as well as the `directory` content.
16129d6a attempted to fix this, but fails because one instance of a path
can be absolute and the other negative.
This patch makes sure to only compare absolute paths. Comparison uses
a separate list so that the final output can still mix absolute and
relative paths, but should only include each path once.
Pull Request: https://projects.blender.org/blender/blender/pulls/125608
Essentially, the issue is that the Adjust Last Operation popup is
created in the new image editor window, before region polling was
executed for the new window. This region polling must be done first
because it can affect which regions are visible, and the
`ARegionType.on_poll_success()` callback may do additional set up.
Now make sure that region polling is always executed when a screen is
prepared for display, as part of the screen "refresh" code.
Note that the region polling is used for the asset shelf regions, which
are supported in the image editor since c60a1006e5.
Pull Request: https://projects.blender.org/blender/blender/pulls/123385
There was already code to handle active scene pointer for the window.
Simply replace it by a call to `wm_data_consistency_ensure`, which will
ensure that all potentially missing pointers in UI data get reset.
This adds a `geometry::smooth_curve_positions` function that
smoothes both bézier curves and all the other curve types.
Bézier curves are smoothed by joining the handle and control
points into a flat array, then using the 1D gaussian algorithm
and writing the resulting positions back into the left and right
handle positions as well as the control points. In general,
this works reasonably well and is similar to the results of the
other curve types.
Pull Request: https://projects.blender.org/blender/blender/pulls/125496
The methods on the `OCIOColorSpaceConversionShader` expect
`shader_creator_` to be valid so, in case of a build without OCIO
support, ensure we have a valid GPUShaderCreator available.
In this case we use the "stub" implementation.
Pull Request: https://projects.blender.org/blender/blender/pulls/125631
This commit prevents the Grow Face Set and Shrink Face Set operations
from happening on a mesh without the face set attribute. In particular,
this prevents the entire mesh from getting a value of 0 for the face set
attribute if it is missing the '.sculpt_face_set' attribute entirely.
Pull Request: https://projects.blender.org/blender/blender/pulls/125632
Part of #118145
This commit tackles splitting up the cached, per element data that is
calculated prior to the first stroke of the boundary brush occuring. The
main entry point is the `data_init` function which handles the following
rough steps:
* Find the closest boundary vert to the current position.
* Check to see if the selected boundary is valid.
* Find all boundary vertices to affect with this task.
* For all vertices near each of the boundary vertices, populate various
information to be used when actually performing the deformation into
an array that is sized to the total number of elements in the backing
data structure.
The result at the end of this is the `SculptBoundary` struct which has
remained unchanged and is populated for each of the symmetry passes.
Because the current algorithm is single threaded, this commit opts to
avoid making any major changes to this structure, as improving this
performance will likely require reevaluating the problem from the base
needs of this brush.
For each of the preceding four rough areas of computation, the methods
have been split into separate implementations per PBVH type to remove
most usage of `SculptSession` and `PBVHVertRef`.
Additionally, the method which is used to display the targeted boundary
and the pivot data has been updated as well to use this same code path.
Pull Request: https://projects.blender.org/blender/blender/pulls/125525
Add a utility function to add horizontal padding to the left and right
of items in UI lists and tree views to make them more consistent with
other buttons like menu entries.
Pull Request: https://projects.blender.org/blender/blender/pulls/125498
`Sequence.frame_duration` returned number of frames in movie, but did
not consider "playback rate" factor (adapting to scene framerate), nor
user level retiming.
Pull Request: https://projects.blender.org/blender/blender/pulls/125243
Access each parameter by name instead of depending on ordering.
Also reorder the parameters to better indicate their groupings, making
things a bit easier to see at a glance what is possible to be set.
Pull Request: https://projects.blender.org/blender/blender/pulls/125620