~openshot.code/openshot/main

« back to all changes in this revision

Viewing changes to openshot/blender/scripts/lens_flare.py

  • Committer: Jonathan Thomas
  • Date: 2013-06-28 21:22:39 UTC
  • Revision ID: jonathan.oomph@gmail.com-20130628212239-tn1smb4vz8iakmvx
Fixed blender bug with 2.67, where background alpha_mode was set to SKY instead of TRANSPARENT. This solves the gray background bug.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
                        
42
42
                        'color' : [0.8,0.8,0.8],
43
43
                        'alpha' : 1.0,
 
44
                        'alpha_mode' : 'TRANSPARENT',
44
45
                        
45
46
                        'output_path' : '/tmp/',
46
47
                        'fps' : 24,
146
147
except:
147
148
        bpy.context.scene.render.image_settings.file_format = params["file_format"]
148
149
        bpy.context.scene.render.image_settings.color_mode = params["color_mode"]
 
150
        
 
151
# Set background transparency (SKY or TRANSPARENT)
 
152
try:
 
153
        bpy.context.scene.render.alpha_mode = params["alpha_mode"]
 
154
except:
 
155
        pass
149
156
 
150
157
bpy.context.scene.render.resolution_x = params["resolution_x"]
151
158
bpy.context.scene.render.resolution_y = params["resolution_y"]