active_sequence_strip poll issue
This commit is contained in:
		
							parent
							
								
									671b2eeb4e
								
							
						
					
					
						commit
						06c8c28071
					
				| @ -87,7 +87,7 @@ class VSETB_OT_casting_add(Operator): | |||||||
|     #asset_name : EnumProperty(name='', items=get_scene_settings().active_project.get('asset_items', [])) |     #asset_name : EnumProperty(name='', items=get_scene_settings().active_project.get('asset_items', [])) | ||||||
|     @classmethod |     @classmethod | ||||||
|     def poll(cls, context): |     def poll(cls, context): | ||||||
|         active_strip = context.scene.sequence_editor.active_strip |         active_strip = context.active_sequence_strip | ||||||
|         if active_strip: |         if active_strip: | ||||||
|             return True |             return True | ||||||
| 
 | 
 | ||||||
| @ -135,7 +135,7 @@ class VSETB_OT_casting_remove(Operator): | |||||||
| 
 | 
 | ||||||
|     @classmethod |     @classmethod | ||||||
|     def poll(cls, context): |     def poll(cls, context): | ||||||
|         active_strip = context.scene.sequence_editor.active_strip |         active_strip = context.active_sequence_strip | ||||||
|         if active_strip: |         if active_strip: | ||||||
|             return True |             return True | ||||||
| 
 | 
 | ||||||
| @ -190,7 +190,7 @@ class VSETB_OT_casting_move(Operator): | |||||||
| 
 | 
 | ||||||
|     @classmethod |     @classmethod | ||||||
|     def poll(cls, context): |     def poll(cls, context): | ||||||
|         active_strip = context.scene.sequence_editor.active_strip |         active_strip = context.active_sequence_strip | ||||||
|         if active_strip: |         if active_strip: | ||||||
|             return True |             return True | ||||||
| 
 | 
 | ||||||
| @ -229,16 +229,15 @@ class VSETB_OT_copy_casting(Operator): | |||||||
| 
 | 
 | ||||||
|     @classmethod |     @classmethod | ||||||
|     def poll(cls, context): |     def poll(cls, context): | ||||||
|         active_strip = context.scene.sequence_editor.active_strip |         if not context.scene.sequence_editor: | ||||||
|  |             return | ||||||
|  |         active_strip = context.active_sequence_strip | ||||||
|         strip_settings = get_strip_settings() |         strip_settings = get_strip_settings() | ||||||
|          |          | ||||||
|         if active_strip and strip_settings.casting: |         if active_strip and strip_settings.casting: | ||||||
|             return True |             return True | ||||||
| 
 | 
 | ||||||
|     def execute(self, context): |     def execute(self, context): | ||||||
|         scn = context.scene |  | ||||||
|          |  | ||||||
|         active_strip = scn.sequence_editor.active_strip |  | ||||||
|         strip_settings = get_strip_settings() |         strip_settings = get_strip_settings() | ||||||
|          |          | ||||||
|         datas = [c.to_dict() for c in strip_settings.casting] |         datas = [c.to_dict() for c in strip_settings.casting] | ||||||
| @ -257,9 +256,7 @@ class VSETB_OT_paste_casting(Operator): | |||||||
| 
 | 
 | ||||||
|     @classmethod |     @classmethod | ||||||
|     def poll(cls, context): |     def poll(cls, context): | ||||||
|         active_strip = context.scene.sequence_editor.active_strip |         return context.active_sequence_strip | ||||||
|         if active_strip: |  | ||||||
|             return True |  | ||||||
| 
 | 
 | ||||||
|     def invoke(self, context, event): |     def invoke(self, context, event): | ||||||
|         self.mode = 'REPLACE' |         self.mode = 'REPLACE' | ||||||
|  | |||||||
| @ -427,7 +427,7 @@ class VSETB_OT_next_shot(Operator): | |||||||
|          |          | ||||||
|         bpy.ops.sequencer.select_all(action="DESELECT") |         bpy.ops.sequencer.select_all(action="DESELECT") | ||||||
|         next_shot.select = True |         next_shot.select = True | ||||||
|         context.scene.sequence_editor.active_strip = next_shot |         context.active_sequence_strip = next_shot | ||||||
| 
 | 
 | ||||||
|         return {"FINISHED"} |         return {"FINISHED"} | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user