2011-02-23 10:52:22 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								/*
  
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								 *  * * * * *  BEGIN  GPL  LICENSE  BLOCK  * * * * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  This  program  is  free  software ;  you  can  redistribute  it  and / or 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  modify  it  under  the  terms  of  the  GNU  General  Public  License 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  as  published  by  the  Free  Software  Foundation ;  either  version  2 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  of  the  License ,  or  ( at  your  option )  any  later  version . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  This  program  is  distributed  in  the  hope  that  it  will  be  useful , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  but  WITHOUT  ANY  WARRANTY ;  without  even  the  implied  warranty  of 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  MERCHANTABILITY  or  FITNESS  FOR  A  PARTICULAR  PURPOSE .   See  the 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  GNU  General  Public  License  for  more  details . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  You  should  have  received  a  copy  of  the  GNU  General  Public  License 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  along  with  this  program ;  if  not ,  write  to  the  Free  Software  Foundation , 
							 
						 
					
						
							
								
									
										
										
										
											2010-02-12 13:34:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								 *  Inc . ,  51  Franklin  Street ,  Fifth  Floor ,  Boston ,  MA  02110 - 1301 ,  USA . 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								 * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  The  Original  Code  is  Copyright  ( C )  2001 - 2002  by  NaN  Holding  BV . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  All  rights  reserved . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  Contributor ( s ) :  Blender  Foundation ,  2003 - 2009 ,  Campbell  Barton 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  * * * * *  END  GPL  LICENSE  BLOCK  * * * * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-02-27 20:29:51 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								/** \file blender/editors/space_sequencer/sequencer_add.c
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *   \ ingroup  spseq 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								# include  <stdlib.h> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  <math.h> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  <string.h> 
  
						 
					
						
							
								
									
										
										
										
											2015-04-20 16:33:10 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  <ctype.h> 
  
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  "MEM_guardedalloc.h" 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  "BLI_blenlib.h" 
  
						 
					
						
							
								
									
										
										
										
											2009-11-10 20:43:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "BLI_math.h" 
  
						 
					
						
							
								
									
										
										
										
											2011-01-07 18:36:47 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "BLI_utildefines.h" 
  
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  "DNA_scene_types.h" 
  
						 
					
						
							
								
									
										
										
										
											2012-06-07 18:24:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "DNA_mask_types.h" 
  
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-01-05 12:06:50 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								# include  "BKE_context.h" 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  "BKE_global.h" 
  
						 
					
						
							
								
									
										
										
										
											2015-11-11 20:18:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "BKE_library.h" 
  
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								# include  "BKE_main.h" 
  
						 
					
						
							
								
									
										
										
										
											2009-12-13 14:56:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "BKE_sequencer.h" 
  
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "BKE_movieclip.h" 
  
						 
					
						
							
								
									
										
										
										
											2012-06-07 18:24:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "BKE_mask.h" 
  
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								# include  "BKE_report.h" 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  "WM_api.h" 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  "WM_types.h" 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  "RNA_define.h" 
  
						 
					
						
							
								
									
										
										
										
											2009-12-13 03:20:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "RNA_enum_types.h" 
  
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* for menu/popup icons etc etc*/  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  "ED_screen.h" 
  
						 
					
						
							
								
									
										
										
										
											2012-05-29 05:45:06 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "ED_sequencer.h" 
  
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-04-06 10:40:12 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "UI_interface.h" 
  
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-08-09 21:16:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "BKE_sound.h" 
  
						 
					
						
							
								
									
										
										
										
											2011-06-23 09:27:56 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# ifdef WITH_AUDASPACE 
  
						 
					
						
							
								
									
										
										
										
											2015-06-16 10:03:35 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								#   include AUD_SEQUENCE_H 
  
						 
					
						
							
								
									
										
										
										
											2011-06-23 09:27:56 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# endif 
  
						 
					
						
							
								
									
										
										
										
											2009-08-09 21:16:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								/* own include */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  "sequencer_intern.h" 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-04-06 10:40:12 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								typedef  struct  SequencerAddData  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ImageFormatData  im_format ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  SequencerAddData ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								/* Generic functions, reused by add strip operators */  
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* avoid passing multiple args and be more verbose */  
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# define SEQPROP_STARTFRAME  (1 << 0) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# define SEQPROP_ENDFRAME    (1 << 1) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# define SEQPROP_NOPATHS     (1 << 2) 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# define SEQPROP_NOCHAN      (1 << 3) 
  
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-01-15 16:14:57 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# define SELECT 1 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								static  void  sequencer_generic_props__internal ( wmOperatorType  * ot ,  int  flag )  
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2012-05-21 16:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PropertyRNA  * prop ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-24 06:38:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( flag  &  SEQPROP_STARTFRAME ) 
							 
						 
					
						
							
								
									
										
										
										
											2010-04-01 21:44:56 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										RNA_def_int ( ot - > srna ,  " frame_start " ,  0 ,  INT_MIN ,  INT_MAX ,  " Start Frame " ,  " Start frame of the sequence strip " ,  INT_MIN ,  INT_MAX ) ; 
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2012-03-24 06:38:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( flag  &  SEQPROP_ENDFRAME ) 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										RNA_def_int ( ot - > srna ,  " frame_end " ,  0 ,  INT_MIN ,  INT_MAX ,  " End Frame " ,  " End frame for the color strip " ,  INT_MIN ,  INT_MAX ) ;   /* not usual since most strips have a fixed length */ 
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									RNA_def_int ( ot - > srna ,  " channel " ,  1 ,  1 ,  MAXSEQ ,  " Channel " ,  " Channel to place this strip into " ,  1 ,  MAXSEQ ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2012-02-27 18:14:56 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_boolean ( ot - > srna ,  " replace_sel " ,  1 ,  " Replace Selection " ,  " Replace the current selection " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-05-21 16:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									/* only for python scripts which import strips and place them after */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									prop  =  RNA_def_boolean ( ot - > srna ,  " overlap " ,  0 ,  " Allow Overlap " ,  " Don't correct overlap on new sequence strips " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									RNA_def_property_flag ( prop ,  PROP_HIDDEN ) ; 
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-07-02 20:09:42 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								static  void  sequencer_generic_invoke_path__internal ( bContext  * C ,  wmOperator  * op ,  const  char  * identifier )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2012-03-24 06:38:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( RNA_struct_find_property ( op - > ptr ,  identifier ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										Scene  * scene  =  CTX_data_scene ( C ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-11 10:04:55 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										Sequence  * last_seq  =  BKE_sequencer_active_get ( scene ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-24 06:38:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										if  ( last_seq  & &  last_seq - > strip  & &  SEQ_HAS_PATH ( last_seq ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2013-07-15 05:11:14 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											char  path [ FILE_MAX ] ; 
							 
						 
					
						
							
								
									
										
										
										
											2010-07-02 20:09:42 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											BLI_strncpy ( path ,  last_seq - > strip - > dir ,  sizeof ( path ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2010-10-18 06:41:16 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											BLI_path_abs ( path ,  G . main - > name ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2010-07-02 20:09:42 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											RNA_string_set ( op - > ptr ,  identifier ,  path ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-02-27 01:43:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								static  int  sequencer_generic_invoke_xy_guess_channel ( bContext  * C ,  int  type )  
						 
					
						
							
								
									
										
										
										
											2013-02-27 00:04:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Sequence  * tgt  =  NULL ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Sequence  * seq ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Scene  * scene  =  CTX_data_scene ( C ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-03-20 15:45:20 +06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Editing  * ed  =  BKE_sequencer_editing_get ( scene ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2013-02-27 00:04:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									int  cfra  =  ( int )  CFRA ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									int  proximity  =  INT_MAX ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  ( ! ed  | |  ! ed - > seqbasep )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  1 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									for  ( seq  =  ed - > seqbasep - > first ;  seq ;  seq  =  seq - > next )  { 
							 
						 
					
						
							
								
									
										
										
										
											2013-02-27 01:40:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										if  ( ( type  = =  - 1  | |  seq - > type  = =  type )  & & 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										    ( seq - > enddisp  <  cfra )  & & 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										    ( cfra  -  seq - > enddisp  <  proximity ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2013-02-27 00:04:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											tgt  =  seq ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											proximity  =  cfra  -  seq - > enddisp ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  ( tgt )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  tgt - > machine ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									return  1 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-02-27 01:40:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								static  void  sequencer_generic_invoke_xy__internal ( bContext  * C ,  wmOperator  * op ,  int  flag ,  int  type )  
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2013-02-27 00:04:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Scene  * scene  =  CTX_data_scene ( C ) ; 
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2013-02-27 00:04:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									int  cfra  =  ( int )  CFRA ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2012-03-18 07:38:51 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									/* effect strips don't need a channel initialized from the mouse */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-24 06:38:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( ! ( flag  &  SEQPROP_NOCHAN ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2013-02-27 01:43:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										RNA_int_set ( op - > ptr ,  " channel " ,  sequencer_generic_invoke_xy_guess_channel ( C ,  type ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-20 04:09:33 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-02-27 00:04:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_int_set ( op - > ptr ,  " frame_start " ,  cfra ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( ( flag  &  SEQPROP_ENDFRAME )  & &  RNA_struct_property_is_set ( op - > ptr ,  " frame_end " )  = =  0 ) 
							 
						 
					
						
							
								
									
										
										
										
											2013-02-27 00:04:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										RNA_int_set ( op - > ptr ,  " frame_end " ,  cfra  +  25 ) ;   // XXX arbitary but ok for now.
 
							 
						 
					
						
							
								
									
										
										
										
											2010-07-01 14:08:41 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-12-11 20:01:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( ! ( flag  &  SEQPROP_NOPATHS ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										sequencer_generic_invoke_path__internal ( C ,  op ,  " filepath " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										sequencer_generic_invoke_path__internal ( C ,  op ,  " directory " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								static  void  seq_load_operator_info ( SeqLoadInfo  * seq_load ,  wmOperator  * op )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2014-02-03 18:55:59 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PropertyRNA  * prop ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									const  bool  relative  =  ( prop  =  RNA_struct_find_property ( op - > ptr ,  " relative_path " ) )  & &  RNA_property_boolean_get ( op - > ptr ,  prop ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									int  is_file  =  - 1 ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									memset ( seq_load ,  0 ,  sizeof ( SeqLoadInfo ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									seq_load - > start_frame  =   RNA_int_get ( op - > ptr ,  " frame_start " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									seq_load - > end_frame  =     seq_load - > start_frame ;  /* un-set */ 
							 
						 
					
						
							
								
									
										
										
										
											2010-01-29 17:01:53 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									seq_load - > channel  =       RNA_int_get ( op - > ptr ,  " channel " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									seq_load - > len  =           1 ;  // images only, if endframe isn't set!
 
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-03 18:55:59 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( ( prop  =  RNA_struct_find_property ( op - > ptr ,  " filepath " ) ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										RNA_property_string_get ( op - > ptr ,  prop ,  seq_load - > path ) ;  /* full path, file is set by the caller */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										is_file  =  1 ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-24 06:38:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-03 18:55:59 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									else  if  ( ( prop  =  RNA_struct_find_property ( op - > ptr ,  " directory " ) ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										RNA_property_string_get ( op - > ptr ,  prop ,  seq_load - > path ) ;  /* full path, file is set by the caller */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										is_file  =  0 ; 
							 
						 
					
						
							
								
									
										
										
										
											2010-07-02 20:09:42 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-24 06:38:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( ( is_file  ! =  - 1 )  & &  relative ) 
							 
						 
					
						
							
								
									
										
										
										
											2010-10-18 06:41:16 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										BLI_path_rel ( seq_load - > path ,  G . main - > name ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2010-09-07 10:48:25 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2014-02-03 18:55:59 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( ( prop  =  RNA_struct_find_property ( op - > ptr ,  " frame_end " ) ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										seq_load - > end_frame  =  RNA_property_int_get ( op - > ptr ,  prop ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2010-01-29 17:01:53 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-03 18:55:59 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( ( prop  =  RNA_struct_find_property ( op - > ptr ,  " replace_sel " ) )  & &  RNA_property_boolean_get ( op - > ptr ,  prop ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										seq_load - > flag  | =  SEQ_LOAD_REPLACE_SEL ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-03 18:55:59 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( ( prop  =  RNA_struct_find_property ( op - > ptr ,  " cache " ) )  & &  RNA_property_boolean_get ( op - > ptr ,  prop ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										seq_load - > flag  | =  SEQ_LOAD_SOUND_CACHE ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-01-09 02:35:30 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( ( prop  =  RNA_struct_find_property ( op - > ptr ,  " mono " ) )  & &  RNA_property_boolean_get ( op - > ptr ,  prop ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										seq_load - > flag  | =  SEQ_LOAD_SOUND_MONO ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-03 18:55:59 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( ( prop  =  RNA_struct_find_property ( op - > ptr ,  " sound " ) )  & &  RNA_property_boolean_get ( op - > ptr ,  prop ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										seq_load - > flag  | =  SEQ_LOAD_MOVIE_SOUND ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-01-08 18:30:26 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  ( ( prop  =  RNA_struct_find_property ( op - > ptr ,  " use_framerate " ) )  & &  RNA_property_boolean_get ( op - > ptr ,  prop ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										seq_load - > flag  | =  SEQ_LOAD_SYNC_FPS ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* always use this for ops */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									seq_load - > flag  | =  SEQ_LOAD_FRAME_ADVANCE ; 
							 
						 
					
						
							
								
									
										
										
										
											2010-07-02 20:09:42 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( is_file  = =  1 )  { 
							 
						 
					
						
							
								
									
										
										
										
											2010-07-02 20:09:42 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										BLI_strncpy ( seq_load - > name ,  BLI_path_basename ( seq_load - > path ) ,  sizeof ( seq_load - > name ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-03 18:55:59 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									else  if  ( ( prop  =  RNA_struct_find_property ( op - > ptr ,  " files " ) ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2010-07-02 20:09:42 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										/* used for image strip */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										/* best guess, first images name */ 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-03 18:55:59 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										RNA_PROP_BEGIN  ( op - > ptr ,  itemptr ,  prop ) 
							 
						 
					
						
							
								
									
										
										
										
											2012-04-30 16:22:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											char  * name  =  RNA_string_get_alloc ( & itemptr ,  " name " ,  NULL ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2010-07-28 07:00:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											BLI_strncpy ( seq_load - > name ,  name ,  sizeof ( seq_load - > name ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											MEM_freeN ( name ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2010-07-02 20:09:42 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											break ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-03 18:55:59 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										RNA_PROP_END ; 
							 
						 
					
						
							
								
									
										
										
										
											2010-07-02 20:09:42 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2015-04-06 10:40:12 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  ( ( prop  =  RNA_struct_find_property ( op - > ptr ,  " use_multiview " ) )  & &  RNA_property_boolean_get ( op - > ptr ,  prop ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( op - > customdata )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											SequencerAddData  * sad  =  op - > customdata ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											ImageFormatData  * imf  =  & sad - > im_format ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											seq_load - > views_format  =  imf - > views_format ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											seq_load - > flag  | =  SEQ_USE_VIEWS ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											/* operator custom data is always released after the SeqLoadInfo, no need to handle the memory here */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											seq_load - > stereo3d_format  =  & imf - > stereo3d_format ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-05-27 15:18:31 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								/**
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  Apply  generic  operator  options . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								static  void  sequencer_add_apply_overlap ( bContext  * C ,  wmOperator  * op ,  Sequence  * seq )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Scene  * scene  =  CTX_data_scene ( C ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Editing  * ed  =  BKE_sequencer_editing_get ( scene ,  false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  ( RNA_boolean_get ( op - > ptr ,  " overlap " )  = =  false )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( BKE_sequence_test_overlap ( ed - > seqbasep ,  seq ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											BKE_sequence_base_shuffle ( ed - > seqbasep ,  seq ,  scene ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								static  void  sequencer_add_apply_replace_sel ( bContext  * C ,  wmOperator  * op ,  Sequence  * seq )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Scene  * scene  =  CTX_data_scene ( C ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  ( RNA_boolean_get ( op - > ptr ,  " replace_sel " ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										ED_sequencer_deselect_all ( scene ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										BKE_sequencer_active_set ( scene ,  seq ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										seq - > flag  | =  SELECT ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								/* add scene operator */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								static  int  sequencer_add_scene_strip_exec ( bContext  * C ,  wmOperator  * op )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Scene  * scene  =  CTX_data_scene ( C ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-03-20 15:45:20 +06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Editing  * ed  =  BKE_sequencer_editing_get ( scene ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Scene  * sce_seq ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-12-13 03:20:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Sequence  * seq ;   /* generic strip vars */ 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									Strip  * strip ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									int  start_frame ,  channel ;  /* operator props */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									start_frame  =  RNA_int_get ( op - > ptr ,  " frame_start " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									channel  =  RNA_int_get ( op - > ptr ,  " channel " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									sce_seq  =  BLI_findlink ( & CTX_data_main ( C ) - > scene ,  RNA_enum_get ( op - > ptr ,  " scene " ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( sce_seq  = =  NULL )  { 
							 
						 
					
						
							
								
									
										
										
										
											2009-12-13 03:20:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										BKE_report ( op - > reports ,  RPT_ERROR ,  " Scene not found " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										return  OPERATOR_CANCELLED ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2012-08-08 11:15:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									seq  =  BKE_sequence_alloc ( ed - > seqbasep ,  start_frame ,  channel ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-07 15:49:02 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									seq - > type  =  SEQ_TYPE_SCENE ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									seq - > blend_mode  =  SEQ_TYPE_CROSS ;  /* so alpha adjustment fade to the strip below */ 
							 
						 
					
						
							
								
									
										
										
										
											2010-07-04 08:49:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									seq - > scene  =  sce_seq ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* basic defaults */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									seq - > strip  =  strip  =  MEM_callocN ( sizeof ( Strip ) ,  " strip " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									seq - > len  =  sce_seq - > r . efra  -  sce_seq - > r . sfra  +  1 ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									strip - > us  =  1 ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									BLI_strncpy ( seq - > name  +  2 ,  sce_seq - > id . name  +  2 ,  sizeof ( seq - > name )  -  2 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-10-04 18:30:28 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									BKE_sequence_base_unique_name_recursive ( & ed - > seqbase ,  seq ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2010-07-02 20:09:42 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-03-26 11:35:41 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									seq - > scene_sound  =  BKE_sound_scene_add_scene_sound ( scene ,  seq ,  start_frame ,  start_frame  +  seq - > len ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2010-03-20 11:15:16 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-08-08 11:15:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									BKE_sequence_calc_disp ( scene ,  seq ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-11 10:04:55 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									BKE_sequencer_sort ( scene ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2014-05-27 15:18:31 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									sequencer_add_apply_replace_sel ( C ,  op ,  seq ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									sequencer_add_apply_overlap ( C ,  op ,  seq ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2011-07-28 03:44:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									WM_event_add_notifier ( C ,  NC_SCENE  |  ND_SEQUENCER ,  scene ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									return  OPERATOR_FINISHED ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-03-13 09:03:46 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								static  int  sequencer_add_scene_strip_invoke ( bContext  * C ,  wmOperator  * op ,  const  wmEvent  * event )  
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2012-03-24 06:38:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( ! RNA_struct_property_is_set ( op - > ptr ,  " scene " ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2010-12-02 22:58:23 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										return  WM_enum_search_invoke ( C ,  op ,  event ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-02-27 01:40:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									sequencer_generic_invoke_xy__internal ( C ,  op ,  0 ,  SEQ_TYPE_SCENE ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									return  sequencer_add_scene_strip_exec ( C ,  op ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-12-13 03:20:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									// needs a menu
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									// return WM_menu_invoke(C, op, event);
 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-04-12 20:32:42 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								void  SEQUENCER_OT_scene_strip_add ( struct  wmOperatorType  * ot )  
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2009-12-13 03:20:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PropertyRNA  * prop ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* identifiers */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-22 07:26:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > name  =  " Add Scene Strip " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > idname  =  " SEQUENCER_OT_scene_strip_add " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > description  =  " Add a strip to the sequencer using a blender scene as a source " ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* api callbacks */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-22 07:26:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > invoke  =  sequencer_add_scene_strip_invoke ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > exec  =  sequencer_add_scene_strip_exec ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-26 13:21:48 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > poll  =  ED_operator_sequencer_active_editable ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-31 19:40:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* flags */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > flag  =  OPTYPE_REGISTER  |  OPTYPE_UNDO ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-31 19:40:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									sequencer_generic_props__internal ( ot ,  SEQPROP_STARTFRAME ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									prop  =  RNA_def_enum ( ot - > srna ,  " scene " ,  DummyRNA_NULL_items ,  0 ,  " Scene " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-12-13 03:20:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_enum_funcs ( prop ,  RNA_scene_itemf ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-05-05 15:09:29 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_property_flag ( prop ,  PROP_ENUM_NO_TRANSLATE ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-22 07:26:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > prop  =  prop ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-20 14:19:39 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								/* add movieclip operator */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								static  int  sequencer_add_movieclip_strip_exec ( bContext  * C ,  wmOperator  * op )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Scene  * scene  =  CTX_data_scene ( C ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-03-20 15:45:20 +06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Editing  * ed  =  BKE_sequencer_editing_get ( scene ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									MovieClip  * clip ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Sequence  * seq ;   /* generic strip vars */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Strip  * strip ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									int  start_frame ,  channel ;  /* operator props */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									start_frame  =  RNA_int_get ( op - > ptr ,  " frame_start " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									channel  =  RNA_int_get ( op - > ptr ,  " channel " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									clip  =  BLI_findlink ( & CTX_data_main ( C ) - > movieclip ,  RNA_enum_get ( op - > ptr ,  " clip " ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  ( clip  = =  NULL )  { 
							 
						 
					
						
							
								
									
										
										
										
											2012-10-26 17:32:50 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										BKE_report ( op - > reports ,  RPT_ERROR ,  " Movie clip not found " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										return  OPERATOR_CANCELLED ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2012-08-08 11:15:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									seq  =  BKE_sequence_alloc ( ed - > seqbasep ,  start_frame ,  channel ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-07 15:49:02 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									seq - > type  =  SEQ_TYPE_MOVIECLIP ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									seq - > blend_mode  =  SEQ_TYPE_CROSS ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									seq - > clip  =  clip ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-04-09 08:45:51 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-11-11 20:18:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									id_us_ensure_real ( & seq - > clip - > id ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-04-09 08:45:51 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									/* basic defaults */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									seq - > strip  =  strip  =  MEM_callocN ( sizeof ( Strip ) ,  " strip " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									seq - > len  =   BKE_movieclip_get_duration ( clip ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									strip - > us  =  1 ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									BLI_strncpy ( seq - > name  +  2 ,  clip - > id . name  +  2 ,  sizeof ( seq - > name )  -  2 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-10-04 18:30:28 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									BKE_sequence_base_unique_name_recursive ( & ed - > seqbase ,  seq ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-08-08 11:15:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									BKE_sequence_calc_disp ( scene ,  seq ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-11 10:04:55 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									BKE_sequencer_sort ( scene ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2014-05-27 15:18:31 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									sequencer_add_apply_replace_sel ( C ,  op ,  seq ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									sequencer_add_apply_overlap ( C ,  op ,  seq ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									WM_event_add_notifier ( C ,  NC_SCENE  |  ND_SEQUENCER ,  scene ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									return  OPERATOR_FINISHED ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-03-13 09:03:46 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								static  int  sequencer_add_movieclip_strip_invoke ( bContext  * C ,  wmOperator  * op ,  const  wmEvent  * event )  
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2012-03-24 06:38:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( ! RNA_struct_property_is_set ( op - > ptr ,  " clip " ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										return  WM_enum_search_invoke ( C ,  op ,  event ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-02-27 01:40:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									sequencer_generic_invoke_xy__internal ( C ,  op ,  0 ,  SEQ_TYPE_MOVIECLIP ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									return  sequencer_add_movieclip_strip_exec ( C ,  op ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									// needs a menu
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									// return WM_menu_invoke(C, op, event);
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								void  SEQUENCER_OT_movieclip_strip_add ( struct  wmOperatorType  * ot )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PropertyRNA  * prop ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-07 18:24:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									/* identifiers */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-22 07:26:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > name  =  " Add MovieClip Strip " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > idname  =  " SEQUENCER_OT_movieclip_strip_add " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > description  =  " Add a movieclip strip to the sequencer " ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* api callbacks */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-22 07:26:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > invoke  =  sequencer_add_movieclip_strip_invoke ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > exec  =  sequencer_add_movieclip_strip_exec ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-26 13:21:48 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > poll  =  ED_operator_sequencer_active_editable ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-07 18:24:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									/* flags */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > flag  =  OPTYPE_REGISTER  |  OPTYPE_UNDO ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-07 18:24:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									sequencer_generic_props__internal ( ot ,  SEQPROP_STARTFRAME ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									prop  =  RNA_def_enum ( ot - > srna ,  " clip " ,  DummyRNA_NULL_items ,  0 ,  " Clip " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_enum_funcs ( prop ,  RNA_movieclip_itemf ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-05-05 15:09:29 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_property_flag ( prop ,  PROP_ENUM_NO_TRANSLATE ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-22 07:26:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > prop  =  prop ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-06-07 18:24:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								static  int  sequencer_add_mask_strip_exec ( bContext  * C ,  wmOperator  * op )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Scene  * scene  =  CTX_data_scene ( C ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-03-20 15:45:20 +06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Editing  * ed  =  BKE_sequencer_editing_get ( scene ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-07 18:24:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Mask  * mask ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Sequence  * seq ;   /* generic strip vars */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Strip  * strip ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									int  start_frame ,  channel ;  /* operator props */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									start_frame  =  RNA_int_get ( op - > ptr ,  " frame_start " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									channel  =  RNA_int_get ( op - > ptr ,  " channel " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									mask  =  BLI_findlink ( & CTX_data_main ( C ) - > mask ,  RNA_enum_get ( op - > ptr ,  " mask " ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  ( mask  = =  NULL )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										BKE_report ( op - > reports ,  RPT_ERROR ,  " Mask not found " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  OPERATOR_CANCELLED ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-08-08 11:15:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									seq  =  BKE_sequence_alloc ( ed - > seqbasep ,  start_frame ,  channel ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-07 18:24:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									seq - > type  =  SEQ_TYPE_MASK ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									seq - > blend_mode  =  SEQ_TYPE_CROSS ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									seq - > mask  =  mask ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-11-11 20:18:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									id_us_ensure_real ( & seq - > mask - > id ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-07 18:24:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* basic defaults */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									seq - > strip  =  strip  =  MEM_callocN ( sizeof ( Strip ) ,  " strip " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									seq - > len  =  BKE_mask_get_duration ( mask ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									strip - > us  =  1 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									BLI_strncpy ( seq - > name  +  2 ,  mask - > id . name  +  2 ,  sizeof ( seq - > name )  -  2 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-10-04 18:30:28 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									BKE_sequence_base_unique_name_recursive ( & ed - > seqbase ,  seq ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-07 18:24:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-08-08 11:15:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									BKE_sequence_calc_disp ( scene ,  seq ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-07 18:24:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									BKE_sequencer_sort ( scene ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-05-27 15:18:31 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									sequencer_add_apply_replace_sel ( C ,  op ,  seq ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									sequencer_add_apply_overlap ( C ,  op ,  seq ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-07 18:24:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									WM_event_add_notifier ( C ,  NC_SCENE  |  ND_SEQUENCER ,  scene ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									return  OPERATOR_FINISHED ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-03-13 09:03:46 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								static  int  sequencer_add_mask_strip_invoke ( bContext  * C ,  wmOperator  * op ,  const  wmEvent  * event )  
						 
					
						
							
								
									
										
										
										
											2012-06-07 18:24:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  ( ! RNA_struct_property_is_set ( op - > ptr ,  " mask " ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  WM_enum_search_invoke ( C ,  op ,  event ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-02-27 01:40:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									sequencer_generic_invoke_xy__internal ( C ,  op ,  0 ,  SEQ_TYPE_MASK ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-07 18:24:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									return  sequencer_add_mask_strip_exec ( C ,  op ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									// needs a menu
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									// return WM_menu_invoke(C, op, event);
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								void  SEQUENCER_OT_mask_strip_add ( struct  wmOperatorType  * ot )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PropertyRNA  * prop ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* identifiers */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > name  =  " Add Mask Strip " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > idname  =  " SEQUENCER_OT_mask_strip_add " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > description  =  " Add a mask strip to the sequencer " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* api callbacks */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > invoke  =  sequencer_add_mask_strip_invoke ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > exec  =  sequencer_add_mask_strip_exec ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-26 13:21:48 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > poll  =  ED_operator_sequencer_active_editable ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-07 18:24:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* flags */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > flag  =  OPTYPE_REGISTER  |  OPTYPE_UNDO ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									sequencer_generic_props__internal ( ot ,  SEQPROP_STARTFRAME ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									prop  =  RNA_def_enum ( ot - > srna ,  " mask " ,  DummyRNA_NULL_items ,  0 ,  " Mask " ,  " " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									RNA_def_enum_funcs ( prop ,  RNA_mask_itemf ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-05-05 15:09:29 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_property_flag ( prop ,  PROP_ENUM_NO_TRANSLATE ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-07 18:24:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > prop  =  prop ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-21 18:02:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								static  int  sequencer_add_generic_strip_exec ( bContext  * C ,  wmOperator  * op ,  SeqLoadFunc  seq_load_func )  
						 
					
						
							
								
									
										
										
										
											2009-08-09 21:16:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Scene  * scene  =  CTX_data_scene ( C ) ;  /* only for sound */ 
							 
						 
					
						
							
								
									
										
										
										
											2014-03-20 15:45:20 +06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Editing  * ed  =  BKE_sequencer_editing_get ( scene ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									SeqLoadInfo  seq_load ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									int  tot_files ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-08-09 21:16:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									seq_load_operator_info ( & seq_load ,  op ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-08-09 21:16:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( seq_load . flag  &  SEQ_LOAD_REPLACE_SEL ) 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-29 05:45:06 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										ED_sequencer_deselect_all ( scene ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-08-09 21:16:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-05-08 09:10:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( RNA_struct_property_is_set ( op - > ptr ,  " files " ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										tot_files  =  RNA_property_collection_length ( op - > ptr ,  RNA_struct_find_property ( op - > ptr ,  " files " ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									else 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										tot_files  =  0 ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-08-09 21:16:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-24 06:38:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( tot_files )  { 
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										/* multiple files */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										char  dir_only [ FILE_MAX ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										char  file_only [ FILE_MAX ] ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-08-09 21:16:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-10-21 02:13:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										BLI_split_dir_part ( seq_load . path ,  dir_only ,  sizeof ( dir_only ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-08-09 21:16:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-04-30 16:22:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										RNA_BEGIN  ( op - > ptr ,  itemptr ,  " files " ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2014-05-27 15:18:31 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											Sequence  * seq ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											RNA_string_get ( & itemptr ,  " name " ,  file_only ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2011-02-13 03:21:27 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											BLI_join_dirfile ( seq_load . path ,  sizeof ( seq_load . path ) ,  dir_only ,  file_only ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-08-09 21:16:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-06-20 13:52:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											/* Set seq_load.name, else all video/audio files get the same name! ugly! */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											BLI_strncpy ( seq_load . name ,  file_only ,  sizeof ( seq_load . name ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-02-11 13:19:25 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											seq  =  seq_load_func ( C ,  ed - > seqbasep ,  & seq_load ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if  ( seq )  { 
							 
						 
					
						
							
								
									
										
										
										
											2014-05-27 15:18:31 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												sequencer_add_apply_overlap ( C ,  op ,  seq ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												if  ( seq_load . seq_sound )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													sequencer_add_apply_overlap ( C ,  op ,  seq_load . seq_sound ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-02-11 13:19:25 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
									
										
										
										
											2011-07-28 03:44:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										RNA_END ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									else  { 
							 
						 
					
						
							
								
									
										
										
										
											2014-05-27 15:18:31 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										Sequence  * seq ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										/* single file */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-02-11 13:19:25 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										seq  =  seq_load_func ( C ,  ed - > seqbasep ,  & seq_load ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( seq )  { 
							 
						 
					
						
							
								
									
										
										
										
											2014-05-27 15:18:31 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											sequencer_add_apply_overlap ( C ,  op ,  seq ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if  ( seq_load . seq_sound )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												sequencer_add_apply_overlap ( C ,  op ,  seq_load . seq_sound ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-02-11 13:19:25 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2011-07-28 03:44:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2009-08-09 21:16:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( seq_load . tot_success  = =  0 )  { 
							 
						 
					
						
							
								
									
										
										
										
											2012-10-26 17:32:50 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										BKE_reportf ( op - > reports ,  RPT_ERROR ,  " File '%s' could not be loaded " ,  seq_load . path ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										return  OPERATOR_CANCELLED ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2009-08-09 21:16:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-04-06 10:40:12 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( op - > customdata ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										MEM_freeN ( op - > customdata ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-05-11 10:04:55 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									BKE_sequencer_sort ( scene ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-08-08 11:15:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									BKE_sequencer_update_muting ( ed ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-08-09 21:16:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									WM_event_add_notifier ( C ,  NC_SCENE  |  ND_SEQUENCER ,  scene ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-08-09 21:16:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									return  OPERATOR_FINISHED ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-08-09 21:16:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-04-06 10:40:12 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								/* add sequencer operators */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								static  void  sequencer_add_init ( bContext  * UNUSED ( C ) ,  wmOperator  * op )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									op - > customdata  =  MEM_callocN ( sizeof ( SequencerAddData ) ,  __func__ ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								static  void  sequencer_add_cancel ( bContext  * UNUSED ( C ) ,  wmOperator  * op )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  ( op - > customdata ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										MEM_freeN ( op - > customdata ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									op - > customdata  =  NULL ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								static  bool  sequencer_add_draw_check_prop ( PointerRNA  * UNUSED ( ptr ) ,  PropertyRNA  * prop )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									const  char  * prop_id  =  RNA_property_identifier ( prop ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									return  ! ( STREQ ( prop_id ,  " filepath " )  | | 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									         STREQ ( prop_id ,  " directory " )  | | 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									         STREQ ( prop_id ,  " filename " ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									         ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								/* add movie operator */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								static  int  sequencer_add_movie_strip_exec ( bContext  * C ,  wmOperator  * op )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2012-08-08 11:15:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									return  sequencer_add_generic_strip_exec ( C ,  op ,  BKE_sequencer_add_movie_strip ) ; 
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-03-13 09:03:46 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								static  int  sequencer_add_movie_strip_invoke ( bContext  * C ,  wmOperator  * op ,  const  wmEvent  * UNUSED ( event ) )  
						 
					
						
							
								
									
										
										
										
											2010-03-16 17:23:20 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2015-04-06 10:40:12 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PropertyRNA  * prop ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Scene  * scene  =  CTX_data_scene ( C ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-01-09 00:12:33 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Editing  * ed  =  BKE_sequencer_editing_get ( scene ,  false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* only enable "use_framerate" if there aren't any existing strips
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 *   -   When  there  are  no  strips  yet ,  there  is  no  harm  in  enabling  this , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 *      and  it  makes  the  single - strip  case  really  nice  for  casual  users 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 *   -   When  there  are  strips ,  it ' s  best  we  don ' t  touch  the  framerate , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 *      as  all  hell  may  break  loose  ( e . g .  audio  strips  start  overlapping 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 *      and  can ' t  be  restored ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 *   -   These  initial  guesses  can  still  be  manually  overridden  by  users 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 *      from  the  modal  options  panel 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  ( ed  & &  ed - > seqbasep  & &  ed - > seqbasep - > first )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										RNA_boolean_set ( op - > ptr ,  " use_framerate " ,  false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2015-04-06 10:40:12 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-07-21 19:49:43 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									/* This is for drag and drop */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-24 06:38:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( ( RNA_struct_property_is_set ( op - > ptr ,  " files " )  & &  RNA_collection_length ( op - > ptr ,  " files " ) )  | | 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-22 14:33:51 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									    RNA_struct_property_is_set ( op - > ptr ,  " filepath " ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									{ 
							 
						 
					
						
							
								
									
										
										
										
											2013-02-27 01:40:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										sequencer_generic_invoke_xy__internal ( C ,  op ,  SEQPROP_NOPATHS ,  SEQ_TYPE_MOVIE ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2010-07-21 19:49:43 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										return  sequencer_add_movie_strip_exec ( C ,  op ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2010-12-11 20:01:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2013-02-27 01:40:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									sequencer_generic_invoke_xy__internal ( C ,  op ,  0 ,  SEQ_TYPE_MOVIE ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-04-06 10:40:12 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									sequencer_add_init ( C ,  op ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* show multiview save options only if scene has multiviews */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									prop  =  RNA_struct_find_property ( op - > ptr ,  " show_multiview " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									RNA_property_boolean_set ( op - > ptr ,  prop ,  ( scene - > r . scemode  &  R_MULTIVIEW )  ! =  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-07-01 14:08:41 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									WM_event_add_fileselect ( C ,  op ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									return  OPERATOR_RUNNING_MODAL ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									//return sequencer_add_movie_strip_exec(C, op);
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-04-06 10:40:12 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								static  void  sequencer_add_draw ( bContext  * UNUSED ( C ) ,  wmOperator  * op )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									uiLayout  * layout  =  op - > layout ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									SequencerAddData  * sad  =  op - > customdata ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ImageFormatData  * imf  =  & sad - > im_format ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									PointerRNA  imf_ptr ,  ptr ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* main draw call */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									RNA_pointer_create ( NULL ,  op - > type - > srna ,  op - > properties ,  & ptr ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									uiDefAutoButsRNA ( layout ,  & ptr ,  sequencer_add_draw_check_prop ,  ' \0 ' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* image template */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									RNA_pointer_create ( NULL ,  & RNA_ImageFormatSettings ,  imf ,  & imf_ptr ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* multiview template */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  ( RNA_boolean_get ( op - > ptr ,  " show_multiview " ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										uiTemplateImageFormatViews ( layout ,  & imf_ptr ,  op - > ptr ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-04-12 20:32:42 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								void  SEQUENCER_OT_movie_strip_add ( struct  wmOperatorType  * ot )  
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* identifiers */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-22 07:26:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > name  =  " Add Movie Strip " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > idname  =  " SEQUENCER_OT_movie_strip_add " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > description  =  " Add a movie strip to the sequencer " ; 
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* api callbacks */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-22 07:26:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > invoke  =  sequencer_add_movie_strip_invoke ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > exec  =  sequencer_add_movie_strip_exec ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-04-06 10:40:12 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > cancel  =  sequencer_add_cancel ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > ui  =  sequencer_add_draw ; 
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-26 13:21:48 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > poll  =  ED_operator_sequencer_active_editable ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-04-06 10:40:12 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-01-31 19:40:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									/* flags */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > flag  =  OPTYPE_REGISTER  |  OPTYPE_UNDO ; 
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2016-02-07 22:56:20 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									WM_operator_properties_filesel ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									        ot ,  FILE_TYPE_FOLDER  |  FILE_TYPE_MOVIE ,  FILE_SPECIAL ,  FILE_OPENFILE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									        WM_FILESEL_FILEPATH  |  WM_FILESEL_RELPATH  |  WM_FILESEL_FILES ,  FILE_DEFAULTDISPLAY ,  FILE_SORT_ALPHA ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2011-08-12 03:53:26 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									sequencer_generic_props__internal ( ot ,  SEQPROP_STARTFRAME ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-04-01 11:34:00 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_boolean ( ot - > srna ,  " sound " ,  true ,  " Sound " ,  " Load sound with the movie " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-01-08 18:30:26 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_boolean ( ot - > srna ,  " use_framerate " ,  true ,  " Use Movie Framerate " ,  " Use framerate from the movie to keep sound and video in sync " ) ; 
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* add sound operator */  
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								static  int  sequencer_add_sound_strip_exec ( bContext  * C ,  wmOperator  * op )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2012-08-08 11:15:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									return  sequencer_add_generic_strip_exec ( C ,  op ,  BKE_sequencer_add_sound_strip ) ; 
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-03-13 09:03:46 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								static  int  sequencer_add_sound_strip_invoke ( bContext  * C ,  wmOperator  * op ,  const  wmEvent  * UNUSED ( event ) )  
						 
					
						
							
								
									
										
										
										
											2010-03-16 17:23:20 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2010-07-21 19:49:43 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									/* This is for drag and drop */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-24 06:38:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( ( RNA_struct_property_is_set ( op - > ptr ,  " files " )  & &  RNA_collection_length ( op - > ptr ,  " files " ) )  | | 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									    RNA_struct_property_is_set ( op - > ptr ,  " filepath " ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-22 14:33:51 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									{ 
							 
						 
					
						
							
								
									
										
										
										
											2013-02-27 01:40:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										sequencer_generic_invoke_xy__internal ( C ,  op ,  SEQPROP_NOPATHS ,  SEQ_TYPE_SOUND_RAM ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2010-07-21 19:49:43 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										return  sequencer_add_sound_strip_exec ( C ,  op ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2010-12-11 20:01:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2013-02-27 01:40:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									sequencer_generic_invoke_xy__internal ( C ,  op ,  0 ,  SEQ_TYPE_SOUND_RAM ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2011-10-12 00:15:19 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-07-01 14:08:41 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									WM_event_add_fileselect ( C ,  op ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									return  OPERATOR_RUNNING_MODAL ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									//return sequencer_add_sound_strip_exec(C, op);
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-04-12 20:32:42 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								void  SEQUENCER_OT_sound_strip_add ( struct  wmOperatorType  * ot )  
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* identifiers */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-22 07:26:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > name  =  " Add Sound Strip " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > idname  =  " SEQUENCER_OT_sound_strip_add " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > description  =  " Add a sound strip to the sequencer " ; 
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* api callbacks */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-22 07:26:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > invoke  =  sequencer_add_sound_strip_invoke ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > exec  =  sequencer_add_sound_strip_exec ; 
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-26 13:21:48 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > poll  =  ED_operator_sequencer_active_editable ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-31 19:40:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* flags */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > flag  =  OPTYPE_REGISTER  |  OPTYPE_UNDO ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-31 19:40:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2016-02-07 22:56:20 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									WM_operator_properties_filesel ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									        ot ,  FILE_TYPE_FOLDER  |  FILE_TYPE_SOUND ,  FILE_SPECIAL ,  FILE_OPENFILE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									        WM_FILESEL_FILEPATH  |  WM_FILESEL_RELPATH  |  WM_FILESEL_FILES ,  FILE_DEFAULTDISPLAY ,  FILE_SORT_ALPHA ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2011-08-12 03:53:26 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									sequencer_generic_props__internal ( ot ,  SEQPROP_STARTFRAME ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-04-01 11:34:00 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_boolean ( ot - > srna ,  " cache " ,  false ,  " Cache " ,  " Cache the sound in memory " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-01-09 02:35:30 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_boolean ( ot - > srna ,  " mono " ,  false ,  " Mono " ,  " Merge all the sound's channels into one " ) ; 
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-06-04 20:40:11 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								int  sequencer_image_seq_get_minmax_frame ( wmOperator  * op ,  int  sfra ,  int  * r_minframe ,  int  * r_numdigits )  
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2015-04-20 17:35:09 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									int  minframe  =  INT32_MAX ,  maxframe  =  INT32_MIN ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-04 20:40:11 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									int  numdigits  =  0 ; 
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-04-20 18:07:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_BEGIN  ( op - > ptr ,  itemptr ,  " files " ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									{ 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-04 20:40:11 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										char  * filename ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-04-20 18:07:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										int  frame ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										/* just get the first filename */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										filename  =  RNA_string_get_alloc ( & itemptr ,  " name " ,  NULL ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-04-20 18:07:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										if  ( filename )  { 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-04 20:40:11 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											if  ( BLI_path_frame_get ( filename ,  & frame ,  & numdigits ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2015-04-20 18:07:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												minframe  =  min_ii ( minframe ,  frame ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												maxframe  =  max_ii ( maxframe ,  frame ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2015-04-20 17:35:09 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-04-20 18:07:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											MEM_freeN ( filename ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									RNA_END ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-04-20 17:35:09 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-04-20 18:07:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( minframe  = =  INT32_MAX )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										minframe  =  sfra ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										maxframe  =  minframe  +  1 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2015-04-20 17:35:09 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-04-20 18:07:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									* r_minframe  =  minframe ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-04 20:40:11 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									* r_numdigits  =  numdigits ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-04-20 17:35:09 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-04-20 18:07:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									return  maxframe  -  minframe  +  1 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-06-04 20:40:11 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								void  sequencer_image_seq_reserve_frames ( wmOperator  * op ,  StripElem  * se ,  int  len ,  int  minframe ,  int  numdigits )  
						 
					
						
							
								
									
										
										
										
											2015-04-20 18:07:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									int  i ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-04 20:40:11 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									char  * filename  =  NULL ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-04-20 18:07:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_BEGIN  ( op - > ptr ,  itemptr ,  " files " ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										/* just get the first filename */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										filename  =  RNA_string_get_alloc ( & itemptr ,  " name " ,  NULL ,  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										break ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									RNA_END ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-06-04 20:40:11 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( filename )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										char  ext [ PATH_MAX ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										char  filename_stripped [ PATH_MAX ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										/* strip the frame from filename and substitute with # */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										BLI_path_frame_strip ( filename ,  true ,  ext ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-04-20 17:35:09 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-04-20 18:07:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										for  ( i  =  0 ;  i  <  len ;  i + + ,  se + + )  { 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-04 20:40:11 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											BLI_strncpy ( filename_stripped ,  filename ,  sizeof ( filename_stripped ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											BLI_path_frame ( filename_stripped ,  minframe  +  i ,  numdigits ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											BLI_snprintf ( se - > name ,  sizeof ( se - > name ) ,  " %s%s " ,  filename_stripped ,  ext ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-04-20 17:35:09 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-04-20 18:07:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										MEM_freeN ( filename ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* add image operator */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								static  int  sequencer_add_image_strip_exec ( bContext  * C ,  wmOperator  * op )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2015-06-04 20:40:11 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									int  minframe ,  numdigits ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-04-20 18:07:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									/* cant use the generic function for this */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Scene  * scene  =  CTX_data_scene ( C ) ;  /* only for sound */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Editing  * ed  =  BKE_sequencer_editing_get ( scene ,  true ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									SeqLoadInfo  seq_load ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Sequence  * seq ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Strip  * strip ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									StripElem  * se ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									const  bool  use_placeholders  =  RNA_boolean_get ( op - > ptr ,  " use_placeholders " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									seq_load_operator_info ( & seq_load ,  op ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* images are unique in how they handle this - 1 per strip elem */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  ( use_placeholders )  { 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-04 20:40:11 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										seq_load . len  =  sequencer_image_seq_get_minmax_frame ( op ,  seq_load . start_frame ,  & minframe ,  & numdigits ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-04-20 16:33:10 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										seq_load . len  =  RNA_property_collection_length ( op - > ptr ,  RNA_struct_find_property ( op - > ptr ,  " files " ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( seq_load . len  = =  0 ) 
							 
						 
					
						
							
								
									
										
										
										
											2010-07-02 20:09:42 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										return  OPERATOR_CANCELLED ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-24 06:38:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( seq_load . flag  &  SEQ_LOAD_REPLACE_SEL ) 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-29 05:45:06 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										ED_sequencer_deselect_all ( scene ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* main adding function */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-08-08 11:15:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									seq  =  BKE_sequencer_add_image_strip ( C ,  ed - > seqbasep ,  & seq_load ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									strip  =  seq - > strip ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									se  =  strip - > stripdata ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-04-20 16:33:10 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( use_placeholders )  { 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-04 20:40:11 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										sequencer_image_seq_reserve_frames ( op ,  se ,  seq_load . len ,  minframe ,  numdigits ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-04-20 16:33:10 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										RNA_BEGIN  ( op - > ptr ,  itemptr ,  " files " ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											char  * filename  =  RNA_string_get_alloc ( & itemptr ,  " name " ,  NULL ,  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											BLI_strncpy ( se - > name ,  filename ,  sizeof ( se - > name ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											MEM_freeN ( filename ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											se + + ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										RNA_END ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-06-05 16:11:35 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2010-07-02 20:09:42 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-24 06:38:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( seq_load . len  = =  1 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( seq_load . start_frame  <  seq_load . end_frame )  { 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											seq - > endstill  =  seq_load . end_frame  -  seq_load . start_frame ; 
							 
						 
					
						
							
								
									
										
										
										
											2010-01-29 17:01:53 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2012-11-05 14:44:29 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									BKE_sequence_init_colorspace ( seq ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-08-08 11:15:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									BKE_sequence_calc_disp ( scene ,  seq ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-05-11 10:04:55 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									BKE_sequencer_sort ( scene ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									/* last active name */ 
							 
						 
					
						
							
								
									
										
										
										
											2013-07-14 22:08:56 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									BLI_strncpy ( ed - > act_imagedir ,  strip - > dir ,  sizeof ( ed - > act_imagedir ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2011-07-28 03:44:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-05-27 15:18:31 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									sequencer_add_apply_overlap ( C ,  op ,  seq ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2011-07-28 03:44:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-04-06 10:40:12 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( op - > customdata ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										MEM_freeN ( op - > customdata ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									WM_event_add_notifier ( C ,  NC_SCENE  |  ND_SEQUENCER ,  scene ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-11-14 19:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									return  OPERATOR_FINISHED ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-03-13 09:03:46 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								static  int  sequencer_add_image_strip_invoke ( bContext  * C ,  wmOperator  * op ,  const  wmEvent  * UNUSED ( event ) )  
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2015-04-06 10:40:12 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PropertyRNA  * prop ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Scene  * scene  =  CTX_data_scene ( C ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-12-11 20:01:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									/* drag drop has set the names */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-24 06:38:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( RNA_struct_property_is_set ( op - > ptr ,  " files " )  & &  RNA_collection_length ( op - > ptr ,  " files " ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2013-02-27 01:40:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										sequencer_generic_invoke_xy__internal ( C ,  op ,  SEQPROP_ENDFRAME  |  SEQPROP_NOPATHS ,  SEQ_TYPE_IMAGE ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2010-12-11 20:01:34 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										return  sequencer_add_image_strip_exec ( C ,  op ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2013-02-27 01:40:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									sequencer_generic_invoke_xy__internal ( C ,  op ,  SEQPROP_ENDFRAME ,  SEQ_TYPE_IMAGE ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2010-07-01 14:08:41 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-04-06 10:40:12 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									sequencer_add_init ( C ,  op ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* show multiview save options only if scene has multiviews */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									prop  =  RNA_struct_find_property ( op - > ptr ,  " show_multiview " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									RNA_property_boolean_set ( op - > ptr ,  prop ,  ( scene - > r . scemode  &  R_MULTIVIEW )  ! =  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-07-01 14:08:41 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									WM_event_add_fileselect ( C ,  op ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									return  OPERATOR_RUNNING_MODAL ; 
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-04-12 20:32:42 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								void  SEQUENCER_OT_image_strip_add ( struct  wmOperatorType  * ot )  
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* identifiers */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-22 07:26:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > name  =  " Add Image Strip " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > idname  =  " SEQUENCER_OT_image_strip_add " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > description  =  " Add an image or image sequence to the sequencer " ; 
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* api callbacks */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-22 07:26:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > invoke  =  sequencer_add_image_strip_invoke ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > exec  =  sequencer_add_image_strip_exec ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-04-06 10:40:12 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > cancel  =  sequencer_add_cancel ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > ui  =  sequencer_add_draw ; 
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-26 13:21:48 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > poll  =  ED_operator_sequencer_active_editable ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-31 19:40:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* flags */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > flag  =  OPTYPE_REGISTER  |  OPTYPE_UNDO ; 
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2016-02-07 22:56:20 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									WM_operator_properties_filesel ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									        ot ,  FILE_TYPE_FOLDER  |  FILE_TYPE_IMAGE ,  FILE_SPECIAL ,  FILE_OPENFILE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									        WM_FILESEL_DIRECTORY  |  WM_FILESEL_RELPATH  |  WM_FILESEL_FILES ,  FILE_DEFAULTDISPLAY ,  FILE_SORT_ALPHA ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									sequencer_generic_props__internal ( ot ,  SEQPROP_STARTFRAME  |  SEQPROP_ENDFRAME ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-04-20 16:33:10 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									RNA_def_boolean ( ot - > srna ,  " use_placeholders " ,  false ,  " Use Placeholders " ,  " Use placeholders for missing frames of the strip " ) ; 
							 
						 
					
						
							
								
									
										
										
											
												New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
											 
										 
										
											2009-01-22 15:52:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* add_effect_strip operator */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								static  int  sequencer_add_effect_strip_exec ( bContext  * C ,  wmOperator  * op )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Scene  * scene  =  CTX_data_scene ( C ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-03-20 15:45:20 +06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Editing  * ed  =  BKE_sequencer_editing_get ( scene ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Sequence  * seq ;   /* generic strip vars */ 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Strip  * strip ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									struct  SeqEffectHandle  sh ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									int  start_frame ,  end_frame ,  channel ,  type ;  /* operator props */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Sequence  * seq1 ,  * seq2 ,  * seq3 ; 
							 
						 
					
						
							
								
									
										
										
										
											2010-12-03 17:05:21 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									const  char  * error_msg ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									start_frame  =  RNA_int_get ( op - > ptr ,  " frame_start " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									end_frame  =  RNA_int_get ( op - > ptr ,  " frame_end " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									channel  =  RNA_int_get ( op - > ptr ,  " channel " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									type  =  RNA_enum_get ( op - > ptr ,  " type " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2010-07-04 08:49:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									// XXX move to invoke
 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-24 06:38:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( ! seq_effect_find_selected ( scene ,  NULL ,  type ,  & seq1 ,  & seq2 ,  & seq3 ,  & error_msg ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										BKE_report ( op - > reports ,  RPT_ERROR ,  error_msg ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  OPERATOR_CANCELLED ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-03 11:45:08 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									/* If seq1 is NULL and no error was raised it means the seq is standalone
 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									 *  ( like  color  strips )  and  we  need  to  check  its  start  and  end  frames  are  valid  */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( seq1  = =  NULL  & &  end_frame  < =  start_frame )  { 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										BKE_report ( op - > reports ,  RPT_ERROR ,  " Start and end frame are not set " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  OPERATOR_CANCELLED ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-08-08 11:15:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									seq  =  BKE_sequence_alloc ( ed - > seqbasep ,  start_frame ,  channel ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									seq - > type  =  type ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-08-08 11:15:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									BLI_strncpy ( seq - > name  +  2 ,  BKE_sequence_give_name ( seq ) ,  sizeof ( seq - > name )  -  2 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-10-04 18:30:28 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									BKE_sequence_base_unique_name_recursive ( & ed - > seqbase ,  seq ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-11-22 17:58:33 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-08-08 11:15:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									sh  =  BKE_sequence_get_effect ( seq ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									seq - > seq1  =  seq1 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									seq - > seq2  =  seq2 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									seq - > seq3  =  seq3 ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									sh . init ( seq ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  ( ! seq1 )  {  /* effect has no deps */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										seq - > len  =  1 ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-08-08 11:15:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										BKE_sequence_tx_set_final_right ( seq ,  end_frame ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-11-29 18:14:16 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									seq - > flag  | =  SEQ_USE_EFFECT_DEFAULT_FADE ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-08-08 11:15:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									BKE_sequence_calc ( scene ,  seq ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* basic defaults */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									seq - > strip  =  strip  =  MEM_callocN ( sizeof ( Strip ) ,  " strip " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									strip - > us  =  1 ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-06-07 15:49:02 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( seq - > type  = =  SEQ_TYPE_COLOR )  { 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										SolidColorVars  * colvars  =  ( SolidColorVars  * ) seq - > effectdata ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										RNA_float_get_array ( op - > ptr ,  " color " ,  colvars - > col ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-07 15:49:02 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										seq - > blend_mode  =  SEQ_TYPE_CROSS ;  /* so alpha adjustment fade to the strip below */ 
							 
						 
					
						
							
								
									
										
										
										
											2010-07-04 08:49:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-24 06:38:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-07 15:49:02 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									else  if  ( seq - > type  = =  SEQ_TYPE_ADJUSTMENT )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										seq - > blend_mode  =  SEQ_TYPE_CROSS ; 
							 
						 
					
						
							
								
									
										
										
										
											2010-07-04 08:49:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2015-07-01 20:29:18 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									else  if  ( seq - > type  = =  SEQ_TYPE_TEXT )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										seq - > blend_mode  =  SEQ_TYPE_ALPHAOVER ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2010-07-04 08:49:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-06-20 04:09:33 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									/* an unset channel is a special case where we automatically go above
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 *  the  other  strips .  */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-24 06:38:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( ! RNA_struct_property_is_set ( op - > ptr ,  " channel " ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( seq - > seq1 )  { 
							 
						 
					
						
							
								
									
										
										
										
											2012-12-21 05:07:26 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											int  chan  =  max_iii ( seq - > seq1  ?  seq - > seq1 - > machine  :  0 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											                   seq - > seq2  ?  seq - > seq2 - > machine  :  0 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											                   seq - > seq3  ?  seq - > seq3 - > machine  :  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-24 06:38:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											if  ( chan  <  MAXSEQ ) 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												seq - > machine  =  chan ; 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-20 04:09:33 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-05-27 15:18:31 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									sequencer_add_apply_replace_sel ( C ,  op ,  seq ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									sequencer_add_apply_overlap ( C ,  op ,  seq ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-01-02 16:15:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									BKE_sequencer_update_changed_seq_and_deps ( scene ,  seq ,  1 ,  1 ) ;  /* runs BKE_sequence_calc */ 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* not sure if this is needed with update_changed_seq_and_deps.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									 *  it  was  NOT  called  in  blender  2.4 x ,  but  wont  hurt  */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-11 10:04:55 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									BKE_sequencer_sort ( scene ) ;  
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									WM_event_add_notifier ( C ,  NC_SCENE  |  ND_SEQUENCER ,  scene ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-12-08 13:57:51 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									return  OPERATOR_FINISHED ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* add color */  
						 
					
						
							
								
									
										
										
										
											2013-03-13 09:03:46 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								static  int  sequencer_add_effect_strip_invoke ( bContext  * C ,  wmOperator  * op ,  const  wmEvent  * UNUSED ( event ) )  
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2014-04-11 11:25:41 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									bool  is_type_set  =  RNA_struct_property_is_set ( op - > ptr ,  " type " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									int  type  =  - 1 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									int  prop_flag  =  SEQPROP_ENDFRAME ; 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-20 04:09:33 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-24 06:38:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( is_type_set )  { 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										type  =  RNA_enum_get ( op - > ptr ,  " type " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-20 04:09:33 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										/* when invoking an effect strip which uses inputs,
 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-04 04:35:12 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										 *  skip  initializing  the  channel  from  the  mouse . 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-20 04:09:33 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										 *  Instead  leave  the  property  unset  so  exec ( )  initializes  it  to  be 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										 *  above  the  strips  its  applied  to .  */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-08-08 11:15:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										if  ( BKE_sequence_effect_get_num_inputs ( type )  ! =  0 )  { 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-20 04:09:33 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											prop_flag  | =  SEQPROP_NOCHAN ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-02-27 01:40:36 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									sequencer_generic_invoke_xy__internal ( C ,  op ,  prop_flag ,  type ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-05-29 10:21:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									return  sequencer_add_effect_strip_exec ( C ,  op ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-04-12 20:32:42 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								void  SEQUENCER_OT_effect_strip_add ( struct  wmOperatorType  * ot )  
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* identifiers */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-22 07:26:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > name  =  " Add Effect Strip " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > idname  =  " SEQUENCER_OT_effect_strip_add " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > description  =  " Add an effect to the sequencer, most are applied on top of existing strips " ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* api callbacks */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-22 07:26:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > invoke  =  sequencer_add_effect_strip_invoke ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > exec  =  sequencer_add_effect_strip_exec ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-26 13:21:48 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > poll  =  ED_operator_sequencer_active_editable ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-31 19:40:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* flags */ 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > flag  =  OPTYPE_REGISTER  |  OPTYPE_UNDO ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-31 19:40:40 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2016-02-07 22:56:20 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									WM_operator_properties_filesel ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									        ot ,  0 ,  FILE_SPECIAL ,  FILE_OPENFILE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									        WM_FILESEL_FILEPATH  |  WM_FILESEL_RELPATH ,  FILE_DEFAULTDISPLAY ,  FILE_SORT_ALPHA ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-29 22:26:11 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									sequencer_generic_props__internal ( ot ,  SEQPROP_STARTFRAME  |  SEQPROP_ENDFRAME ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-07 15:49:02 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_enum ( ot - > srna ,  " type " ,  sequencer_prop_effect_types ,  SEQ_TYPE_CROSS ,  " Type " ,  " Sequencer effect type " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-11-12 12:40:53 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_float_vector ( ot - > srna ,  " color " ,  3 ,  NULL ,  0.0f ,  1.0f ,  " Color " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									                     " Initialize the strip with this color (only used when type='COLOR') " ,  0.0f ,  1.0f ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-26 09:13:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}