~openshot.code/openshot/main

« back to all changes in this revision

Viewing changes to openshot/blender/scripts/glare.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:
58
58
                        
59
59
                        'color' : [0.8,0.8,0.8],
60
60
                        'alpha' : 1.0,
 
61
                        'alpha_mode' : 'TRANSPARENT',
61
62
                        
62
63
                        'output_path' : '/tmp/',
63
64
                        'fps' : 24,
125
126
                bpy.context.scene.render.image_settings.color_mode = "RGB"
126
127
        else:
127
128
                bpy.context.scene.render.image_settings.color_mode = params["color_mode"]
 
129
                
 
130
# Set background transparency (SKY or TRANSPARENT)
 
131
try:
 
132
        bpy.context.scene.render.alpha_mode = params["alpha_mode"]
 
133
except:
 
134
        pass
 
135
                
128
136
#bpy.data.worlds[0].horizon_color = params["horizon_color"]
129
137
bpy.context.scene.render.resolution_x = params["resolution_x"]
130
138
bpy.context.scene.render.resolution_y = params["resolution_y"]