Use appropriate function for converting paths. This adds an ugly
dependency on a function that is private to python/, similar to how it
is done for Freestyle. Solving that will be for a separate change.
Ref #110765
AOV/group/material output nodes can now be previewed the same way the
other nodes are.
This patch also improves the socket detection of the preview by using
`get_main_socket` which takes care of the priorities of the sockets.
Pull Request: https://projects.blender.org/blender/blender/pulls/110945
For shader nodes, use the flat preview scene as default.
A new setting in the overlay panel adds the possibility to
use the material preview scene for the node previews.
Pull Request: https://projects.blender.org/blender/blender/pulls/110958
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
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
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.
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.
The view layer "base" element (the parent that the individual layers are
nested in) does not point to any data in its `directdata`, definitely
not to a view layer. Don't cast it to one, this can cause undefined
behavior when the pointer is not null.