Skip to content

Commit

Permalink
Check for active object and material slot for CopyMaterialProperties …
Browse files Browse the repository at this point in the history
…panel
  • Loading branch information
Notexe committed Jan 15, 2024
1 parent 8be6d18 commit 24e77ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion file_prim/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,10 @@ class GLACIER_OT_CopyMaterialProperties(bpy.types.Operator):

@classmethod
def poll(cls, context):
return context.material and context.active_object and context.selected_objects
if context.active_object:
if context.active_object.material_slots:
return bool(context.selected_objects)
return False

def execute(self, context):
active_object = context.active_object
Expand Down

0 comments on commit 24e77ae

Please sign in to comment.