After 12ef20990b, attributes and vertex group names were checked
simultaneously to fix the name collision. But this results in crash when
new attribute is added to curve object (it searches for vertex group
list). To avoid the crash, check for supported id types in new function
`BKE_id_supports_vertex_groups`.
Pull Request: https://projects.blender.org/blender/blender/pulls/111036
Part 2 of the patch I wrote moving USD over to the new Attributes API
for Colors: https://projects.blender.org/blender/blender/pulls/105347
This patch adds support for more types of generic Mesh Attributes.
Attribute Types and Domains are converted to their USD counterparts
where possible. For example, float Attributes used for modifying
shader masks or int Attributes for grouping are now able to be
round-tripped. Due to the differences in the two systems some
conversions are necessary, but attempts were made to keep data
loss to a minimum.
If you export to USDA, you'll find the Attributes get prefixed with
a "primvars:" namespace; this is expected behavior and identifies
the exported Attributes as different from other USD Schema.
Not supported:
- Edge domain. There doesn't seem to be a proper conversion for
this in USD. One exception is for creasing and sharpness, but if
they are desired I can add them in a future patch.
Co-authored-by: kiki <charles@skeletalstudios.com>
Co-authored-by: Charles Wardlaw <cwardlaw@nvidia.com>
Co-authored-by: Hans Goudey <h.goudey@me.com>
Co-authored-by: Charles Wardlaw <kattkieru@users.noreply.github.com>
Co-authored-by: Michael Kowalski <makowalski@nvidia.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/109518
The split face code relied a lot of the edges added to the weld context.
But with 113004687d, some edges are removed from context. And even more
edges can be removed (reducing loops and arrays).
Removing the dependence on edges decreases the array and time spent in
loops.
Furthermore, the corner edge array should not be needed for the
merge by distance operation.
So this commit redoes the face/loops iterator which previously
needed the `loop_next` member to skip loops depending on the previous
one (possibly linked to the edge whose vertex will be merged) and now
uses the `switch_to` member to switch loops instead of skipping and
depend on the former.
With the end goal of simplifying ownership and memory management,
and allowing the use of `get_name` in contexts without statically
allocated strings, use `std::string` for the return values of these two
operator type callbacks instead of `const char *` and `char *`.
In the meantime things get uglier in some places. I'd expect `std::string`
to be used more in the future elsewhere in Blender though.
Pull Request: https://projects.blender.org/blender/blender/pulls/110823
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