diff --git a/OP_material_picker.py b/OP_material_picker.py index 390e34b..cc88758 100644 --- a/OP_material_picker.py +++ b/OP_material_picker.py @@ -326,11 +326,17 @@ GP_OT_pick_closest_material, ) def register(): + if bpy.app.background: + return + for cls in classes: bpy.utils.register_class(cls) register_keymaps() def unregister(): + if bpy.app.background: + return + unregister_keymaps() for cls in reversed(classes): bpy.utils.unregister_class(cls) \ No newline at end of file