From af0dee0c9d7be4d31ba4eb89043866406140b14f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 30 Sep 2016 13:58:49 +0200 Subject: [PATCH] Make attract.strip_unlink unlink all selected strips, and not just the active --- blender_cloud/attract/__init__.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/blender_cloud/attract/__init__.py b/blender_cloud/attract/__init__.py index cf175c8..c430252 100644 --- a/blender_cloud/attract/__init__.py +++ b/blender_cloud/attract/__init__.py @@ -355,16 +355,15 @@ class AttractShotDelete(AttractOperatorMixin, Operator): class AttractStripUnlink(AttractOperatorMixin, Operator): bl_idname = 'attract.strip_unlink' bl_label = 'Unlink' - bl_description = 'Remove Attract props from the strip' + bl_description = 'Remove Attract props from the selected strip(s)' def execute(self, context): - strip = active_strip(context) + for strip in context.selected_sequences: + atc_object_id = getattr(strip, 'atc_object_id') + remove_atc_props(strip) - atc_object_id = getattr(strip, 'atc_object_id') - remove_atc_props(strip) - - if atc_object_id: - self.report({'INFO'}, 'Shot %s has been unlinked from Attract.' % atc_object_id) + if atc_object_id: + self.report({'INFO'}, 'Shot %s has been unlinked from Attract.' % atc_object_id) draw.tag_redraw_all_sequencer_editors() return {'FINISHED'}