Skip to content

Commit 84e3af2

Browse files
committed
Also check if panel exists in other locations
1 parent 4e5961f commit 84e3af2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mesh/vertex_color_mapping.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,10 +422,12 @@ def register(settings):
422422
bpy.types.Object.vertex_color_mapping = bpy.props.CollectionProperty(
423423
type=GRET_PG_vertex_color_mapping,
424424
)
425-
bpy.types.DATA_PT_vertex_colors.append(vcol_panel_draw)
425+
if hasattr(bpy.types, "DATA_PT_vertex_colors"):
426+
bpy.types.DATA_PT_vertex_colors.append(vcol_panel_draw)
426427

427428
def unregister():
428-
bpy.types.DATA_PT_vertex_colors.remove(vcol_panel_draw)
429+
if hasattr(bpy.types, "DATA_PT_vertex_colors"):
430+
bpy.types.DATA_PT_vertex_colors.remove(vcol_panel_draw)
429431
del bpy.types.Object.vertex_color_mapping
430432

431433
for cls in reversed(classes):

0 commit comments

Comments
 (0)