[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3919] contrib/py/scripts/addons/ sequencer_extra_actions/ui.py: fixed warning when no metadata is find
carlos padial
palidoestudio2 at gmail.com
Sat Nov 3 14:52:34 CET 2012
Revision: 3919
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3919
Author: carlospadial
Date: 2012-11-03 13:52:29 +0000 (Sat, 03 Nov 2012)
Log Message:
-----------
fixed warning when no metadata is find
Modified Paths:
--------------
contrib/py/scripts/addons/sequencer_extra_actions/ui.py
Modified: contrib/py/scripts/addons/sequencer_extra_actions/ui.py
===================================================================
--- contrib/py/scripts/addons/sequencer_extra_actions/ui.py 2012-11-03 10:20:29 UTC (rev 3918)
+++ contrib/py/scripts/addons/sequencer_extra_actions/ui.py 2012-11-03 13:52:29 UTC (rev 3919)
@@ -186,27 +186,29 @@
row.label(text="Exif Data!", icon='RENDER_REGION')
row = layout.row()
- strip = context.scene.sequence_editor.active_strip
+ try:
+ strip = context.scene.sequence_editor.active_strip
- f=strip.frame_start
- frame=sce.frame_current
- try:
- if len(sce['metadata']) == 1:
- for d in sce['metadata'][0]:
- split = layout.split(percentage=0.5)
- col = split.column()
- row = col.row()
- col.label(text=d)
- col = split.column()
- col.label(str(sce['metadata'][0][d]))
- else:
- for d in sce['metadata'][frame-f]:
- split = layout.split(percentage=0.5)
- col = split.column()
- row = col.row()
- col.label(text=d)
- col = split.column()
- col.label(str(sce['metadata'][frame-f][d]))
- except IndexError:
- pass
-
\ No newline at end of file
+ f=strip.frame_start
+ frame=sce.frame_current
+ try:
+ if len(sce['metadata']) == 1:
+ for d in sce['metadata'][0]:
+ split = layout.split(percentage=0.5)
+ col = split.column()
+ row = col.row()
+ col.label(text=d)
+ col = split.column()
+ col.label(str(sce['metadata'][0][d]))
+ else:
+ for d in sce['metadata'][frame-f]:
+ split = layout.split(percentage=0.5)
+ col = split.column()
+ row = col.row()
+ col.label(text=d)
+ col = split.column()
+ col.label(str(sce['metadata'][frame-f][d]))
+ except KeyError:
+ pass
+ except AttributeError:
+ pass
\ No newline at end of file
More information about the Bf-extensions-cvs
mailing list