[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2816] contrib/py/scripts/addons/ io_sequencer_edl/import_edl.py: basic py3 compat changes

Campbell Barton ideasman42 at gmail.com
Wed Dec 28 07:17:20 CET 2011


Revision: 2816
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2816
Author:   campbellbarton
Date:     2011-12-28 06:17:19 +0000 (Wed, 28 Dec 2011)
Log Message:
-----------
basic py3 compat changes

Modified Paths:
--------------
    contrib/py/scripts/addons/io_sequencer_edl/import_edl.py

Modified: contrib/py/scripts/addons/io_sequencer_edl/import_edl.py
===================================================================
--- contrib/py/scripts/addons/io_sequencer_edl/import_edl.py	2011-12-28 06:14:56 UTC (rev 2815)
+++ contrib/py/scripts/addons/io_sequencer_edl/import_edl.py	2011-12-28 06:17:19 UTC (rev 2816)
@@ -1,4 +1,22 @@
-#!BPY
+# ##### 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,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+# <pep8 compliant>
  
 """
 Name: 'Video Sequence (.edl)...'
@@ -7,24 +25,6 @@
 Tooltip: 'Load a CMX formatted EDL into the sequencer'
 """
 
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# Copyright (C) 2009: Campbell Barton, ideasman42 at gmail.com
-#
-# 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,
-# --------------------------------------------------------------------------
-
 class TimeCode(object):
 	'''
 	Simple timecode class
@@ -59,7 +59,7 @@
 			self.frame= int(text[3])
 			return self
 		else:
-			print 'ERROR: could not convert this into timecode "%s"' % test
+			print('ERROR: could not convert this into timecode "%s"' % test)
 			return self
 
 		
@@ -416,7 +416,7 @@
 				m2.read(line, fps)
 				edits_m2.append( m2 )
 			elif not line.split()[0].isdigit():
-				print 'Ignoring:', line
+				print('Ignoring:', line)
 			else:
 				self.edits.append( EditDecision(line, fps) )
 				edits_m2.append( self.edits[-1] )
@@ -458,7 +458,7 @@
 					# Note, docs say time should also match with edit start time
 					# but from final cut pro, this seems not to be the case
 					if not isinstance(edit, EditDecision):
-						print "ERROR!", 'M2 incorrect'
+						print("ERROR!", 'M2 incorrect')
 					else:
 						edit.m2 = item
 			
@@ -546,7 +546,7 @@
 	len_disp = float(mov.endDisp - mov.startDisp)
 	
 	if len_disp <= 0.0:
-		print 'Error, strip is zero length'
+		print('Error, strip is zero length')
 		return
 	
 	mov.ipo= ipo= bpy.data.ipos.new("fade", "Sequence")
@@ -590,7 +590,7 @@
 	
 	prev_edit = None
 	for edit in edits:
-		print edit
+		print(edit)
 		frame_offset = reel_offsets[edit.reel]
 		
 		
@@ -650,7 +650,7 @@
 				
 				if edit.transition_duration:
 					if not prev_edit:
-						print "Error no previous strip"
+						print("Error no previous strip")
 					else:
 						new_end = rec_start + int(edit.transition_duration)
 						for other in prev_edit.custom_data:



More information about the Bf-extensions-cvs mailing list