Skip to content

Instantly share code, notes, and snippets.

@gammy
Created January 23, 2012 01:29
Show Gist options
  • Save gammy/1659848 to your computer and use it in GitHub Desktop.
Save gammy/1659848 to your computer and use it in GitHub Desktop.
Fix missing attributes problem (Openshot 1.4 with Blender 2.61)
From http://www.reelpassion.com/process/CreateJournalEntryComment?moduleId=13871766&entryId=14366848&finalize=true:
Encountered this issue while attempting to use animated text effects in OpenShot 1.4:
AttributeError: 'RenderSettings' object has no attribute 'file_format'
Huh?...why is this attribute missing?
Because OpenShot is relying on the builtin blender api's, and expecting blender to match the scripts it uses to render animated effects. However, blender has moved faster than openshot and dropped a few attributes along the way. If you go to the blender page and follow the api changes to it's bpy module you see that the 'file_format' attribute along with 'color_mode' have magically disappeared.
So...insisting on keeping blender 2.61, I applied the following command(hack) to the source code of openshot to comment out these missing attributes - and thankfully the lens flare effect that I'm trying to use is finally working:
$ cd <..>openshot/blender/scripts
$ ls | xargs sed -i -e 's/\(bpy.context.scene.render.file_format\)/#\1/' -e 's/\(bpy.context.scene.render.color_mode\)/#\1/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment