Skip to content

Commit

Permalink
Also check if panel exists in other locations
Browse files Browse the repository at this point in the history
  • Loading branch information
greisane committed Apr 14, 2022
1 parent 4e5961f commit 84e3af2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mesh/vertex_color_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,10 +422,12 @@ def register(settings):
bpy.types.Object.vertex_color_mapping = bpy.props.CollectionProperty(
type=GRET_PG_vertex_color_mapping,
)
bpy.types.DATA_PT_vertex_colors.append(vcol_panel_draw)
if hasattr(bpy.types, "DATA_PT_vertex_colors"):
bpy.types.DATA_PT_vertex_colors.append(vcol_panel_draw)

def unregister():
bpy.types.DATA_PT_vertex_colors.remove(vcol_panel_draw)
if hasattr(bpy.types, "DATA_PT_vertex_colors"):
bpy.types.DATA_PT_vertex_colors.remove(vcol_panel_draw)
del bpy.types.Object.vertex_color_mapping

for cls in reversed(classes):
Expand Down

0 comments on commit 84e3af2

Please sign in to comment.