Commit: b43cfae49c6847c9f505247ebd11d92bf82b84b1 Author: Philipp Oeser Date: Tue Oct 25 11:51:04 2022 +0200 Branches: blender-v3.3-release https://developer.blender.org/rBb43cfae49c6847c9f505247ebd11d92bf82b84b1
Fix T102045: Properties Editor Attribute panels errors when pinning mesh When pinning a Mesh, we cannot rely on the context object. Instead, use the context mesh now. For vertexgroups names [which are still on the object API wise], this means name collisions cannot be checked when pinning a Mesh (so print this as a warning in that case) Maniphest Tasks: T102045 Differential Revision: https://developer.blender.org/D16333 =================================================================== M release/scripts/startup/bl_ui/properties_data_mesh.py =================================================================== diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py index 8f2141ba6fc..efcc2f51e9d 100644 --- a/release/scripts/startup/bl_ui/properties_data_mesh.py +++ b/release/scripts/startup/bl_ui/properties_data_mesh.py @@ -574,7 +574,7 @@ class DATA_PT_mesh_attributes(MeshButtonsPanel, Panel): def draw_attribute_warnings(self, context, layout): ob = context.object - mesh = ob.data + mesh = context.mesh unique_names = set() colliding_names = [] @@ -583,8 +583,11 @@ class DATA_PT_mesh_attributes(MeshButtonsPanel, Panel): {"position": None, "material_index": None, "shade_smooth": None, "normal": None, "crease": None}, mesh.attributes, mesh.uv_layers, - ob.vertex_groups, + None if ob is None else ob.vertex_groups, ): + if collection is None: + colliding_names.append("Cannot check for object vertex groups when pinning mesh") + continue for name in collection.keys(): unique_names_len = len(unique_names) unique_names.add(name) _______________________________________________ Bf-blender-cvs mailing list [email protected] List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
