Merge branch 'blender-v4.0-release'

This commit is contained in:
Hans Goudey
2023-10-11 16:51:50 +02:00
2 changed files with 13 additions and 0 deletions

View File

@@ -550,6 +550,11 @@ CacheReader *CacheReader_open_usd_object(CacheArchiveHandle *handle,
pxr::UsdPrim prim = archive->stage()->GetPrimAtPath(pxr::SdfPath(object_path));
if (!prim) {
WM_reportf(RPT_WARNING, "USD Import: unable to open cache reader for object %s", object_path);
return nullptr;
}
if (reader) {
USD_CacheReader_free(reader);
}

View File

@@ -44,6 +44,10 @@ static void node_geo_exec(GeoNodeExecParams params)
if (Mesh *mesh = geometry.get_mesh_for_write()) {
switch (domain) {
case ATTR_DOMAIN_POINT:
/* Remove attributes in case they are on the wrong domain, which can happen after
* conversion to and from other geometry types. */
mesh->attributes_for_write().remove(".select_edge");
mesh->attributes_for_write().remove(".select_poly");
bke::try_capture_field_on_geometry(geometry.get_component_for_write<MeshComponent>(),
".select_vert",
ATTR_DOMAIN_POINT,
@@ -51,6 +55,10 @@ static void node_geo_exec(GeoNodeExecParams params)
BKE_mesh_flush_select_from_verts(mesh);
break;
case ATTR_DOMAIN_FACE:
/* Remove attributes in case they are on the wrong domain, which can happen after
* conversion to and from other geometry types. */
mesh->attributes_for_write().remove(".select_vert");
mesh->attributes_for_write().remove(".select_edge");
bke::try_capture_field_on_geometry(geometry.get_component_for_write<MeshComponent>(),
".select_poly",
ATTR_DOMAIN_FACE,