Recent change to liboverride data model (6a86dd5f34) forgot to add the
new 'RNA item ID pointers references' to the expander code (readfile
area).
Note that this was essentially harmless, as these IDs are expected to be
referenced by actual data (or liboverride reference pointer) as well,
they should never be the only ones pointing at a linked ID. But better
to do it properly nonetheless.
`OperatorType.get_name` callback is supposed to return strings directly
usable in the UI, i.e. translated if needed.
Several callbacks did not, noticiably the generic
`ED_select_pick_get_name` and `ED_select_circle_get_name` ones.
And the `sculpt_color_filter_get_name` was not using available RNA
helpers for enum items has it should have.
Finally, `RNA_property_enum_name_gettexted` and
`RNA_property_enum_item_from_value_gettexted` were also not using the
optimal higher-level translation API.
Noticed while reviewing !110776.
Renaming a layer (or a layer group) from a dopesheet was not synchronized with the rest of blender.
This patch fixes this by adding the proper notifiers to the RNA layer/layer group properties, and by updating the listeners of the layer treeview (properties panel), and the outliner to redraw the area if a layer was renamed.
Pull Request: https://projects.blender.org/blender/blender/pulls/111038
It is a common practice in gamedev to rely on coding various data into
the alpha channel of the mesh and there was no way to preserve that when
using the `Set Vertex Colors` operator (would always sets the Alpha component to '1').
Now add an "Affect Alpha" option (similar to what we have for brushes)
and when that is disabled, existing alpha is locked.
Fixes#110014
Pull Request: https://projects.blender.org/blender/blender/pulls/111002
Touch the output file when any of the files it depends on are newer
to stop Unix Makefiles from running the generator for every build.
Also remove use of pathlib, gives 10-15% slowdown as it adds indirect
imports such as urllib without much benefit (joining a path).
`makesrna` was somewhat wasteful in causing rebuilds on MSBUILD for
files that have not changed.
This makes 2 changes to `makesrna.cc`
- the code in place to keep "make" out of trouble and regenerate
files regardless if they have changed or not has been disabled for non
"Unix Makefile" generators, as they do not appear to be needing this.
This brings the number of actions ninja takes down after a white-space
change in `rna_wm.cc` from 423 down to 107.
- `rna_prototypes_gen.h` was always written, this is somewhat wasteful
and has been changed to be only written when changed.
This brings the number of actions ninja takes down after a white-space
change in `rna_wm.cc` from 107 down to 11.
in total, this saves several minutes of build time for simple changes
to rna source files.
Ref !110664.
Use PyC_ParseUnicodeAsBytesAndSize parser instead of "s" / "z" type
specifier. This relates to #111033, resolving Python exceptions which
causes icons not to load (for e.g.).
Now bytes are also supported as path arguments.
Expose PyC_UnicodeAsBytesAndSize using a parser which PyArg_ParseTuple
can use. This should be used with PyArg_ParseTuple instead of "s" type
specifier when passing in file-system path arguments.
PyC_ParseUnicodeAsBytesAndSize_OrNone has been included to match "z".
This is not used in the UI except for the tooltip.
UI elements should be given full names rather than relying on symbols.
This improves the API docs as well as makes it a more understandable tooltip message.
Pull Request: https://projects.blender.org/blender/blender/pulls/110865
Overall, this commit reworks the component layering in the Principled BSDF
in order to ensure that energy is preserved and conserved.
This includes:
- Implementing support for the OSL `layer()` function
- Implementing albedo estimation for some of the closures for layering purposes
- The specular layer that the Principled BSDF uses has a proper tabulated
albedo lookup, the others are still approximations
- Removing the custom "Principled Diffuse" and replacing it with the classic
lambertian Diffuse, since the layering logic takes care of energy now
- Making the merallic component independent of the IOR
Note that this changes the look of the Principled BSDF noticeably in some
cases, but that's needed, since the cases where it looks different are the
ones that strongly violate energy conservation (mostly grazing reflections
with strong Specular).
Pull Request: https://projects.blender.org/blender/blender/pulls/110864
This PR enabled the draw manager test cases when compiling with
`WITH_VULKAN_BACKEND=On`. Currently they should pass all the tests
in draw_pass_test.cc that also pass for OpenGL. The draw_visibility
test seems to be faulty (also for OpenGL).
The vulkan backend doesn't have all the features implemented to
pass the Eevee testcases and are expected to fail.
Pull Request: https://projects.blender.org/blender/blender/pulls/110994
Instead of storing the backtrace in all memory blocks, and trying to get
meaningful info out of this list of pointers when printing leaked ones,
just use `__asan_describe_address` when ASAN is enabled.
This also work on Windows, in addition to linux and (presumably) OSX,
but does require to build with ASAN enabled.
The previous code was not working very well anymore, for some reason the
call to `backtrace_symbols` seems to fail to give any meaningful
information nowadays on most of Blender code. And it was only
implemented for linux and OSX.
Based on an idea from @LazyDodo, many thanks!
Pull Request: https://projects.blender.org/blender/blender/pulls/111006
This is one of the many ID elements that should be ignored from further
processing in this if-else block. It would only set the
`TreeElement.idcode` (and call an assert) for this, which wasn't used
elsewhere. We're trying to untangle the code step by step and make it
more clear & explicit which data is set where, changes like this help.
This PR blends the selected keyframes to an ease-in or ease-out curve.
The difference to the existing ease slider is that this one blends,
while the other snaps to the ease curve
Co-authored-by: Ares Deveaux <aresdevo@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/110566
This makes it so that in the layer tree UI layers that have an
invisible parent will render their visibility icon as inactive (faded).
Same for the locked icon.
This caused confusion when Bastien passed an empty string to the ID
template, expecting that it would ensure no default label is placed, but
it caused the layout to be split. This is because we'd still add an
empty label in this case.
The `BPy_IDPropertyUIManager` takes different keywords for different
data types in its `update` methods.
Booleans and Strings only handle defaults and description while Floats
and Ints can handle additional stuff like min/max.
(see `idprop_ui_data_update_string` vs. e.g.
`idprop_ui_data_update_float`)
There was a different code path in `rna_idprop_ui_create` for bools
already (only passing a subset to `update`), now use this for string as
well since it matches.
Bug introduced in 8b9a3b94fc.
Probably good for LTS.
Pull Request: https://projects.blender.org/blender/blender/pulls/110935
Relying on the `TreeStoreElem.id` void pointer makes assumptions about
what code elsewhere sets to it (it's also misleading since it's actually
not an ID pointer), in this case we can easily avoid that.
`TreeElement.idcode` would be reused to store the sequence type. This is
risky if the field is assumed to actually contain a valid ID-code,
without further checks.
This was only accessed in one place, which I've refactored to a clean,
type-safe solution now.
For the root group, the parent is `nullptr` so calling `parent_group()`
would fail. This fixes the issue by adding a null check and returning
`nullptr` otherwise.