Skip to content

Commit

Permalink
Merge pull request #144 from DoctorPresto/main
Browse files Browse the repository at this point in the history
prevents uv checker ui draw function from checking things that aren't meshes with materials for the checker material
  • Loading branch information
DoctorPresto authored Apr 22, 2024
2 parents b5ed6ed + 7840852 commit 38beeb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion i_scene_cp77_gltf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ def draw(self, context):
box = layout.box()
box.label(icon_value=custom_icon_col["sculpt"]["SCULPT"].icon_id, text="Modelling:")
row = box.row(align=True)
if context.object.active_material and context.object.active_material.name == 'UV_Checker':
if context.active_object and context.active_object.type == 'MESH' and context.object.active_material and context.object.active_material.name == 'UV_Checker':
row.operator("cp77.uv_unchecker", text="Remove UV Checker")
else:
row.operator("cp77.uv_checker", text="UV Checker")
Expand Down

0 comments on commit 38beeb2

Please sign in to comment.