I've found a solution that works the way I need for my project. A big thank you to sambler for pointing me in the right direction towards the blenderaid project which allowed me to get the results I needed.
Here's how I did it:
- I downloaded the blender aid package, renamed the folder from "blenderaid-py-20110211-2" to just "blenderaid" and placed the folder in the /lib folder of my project
- I added init.py files to the /lib and /lib/blenderaid folders
- In my root folder I created a test.py file with the following code:
Update - I discovered that the block label for finding image type changed at Blender 2.61 - I updated code to add the if/then statement
import os
from lib.blenderaid.blendfile import *
TRANS=[
"TGA", "IRIS", "HAMX", "FTYPE", "JPEG", "MOV", "UNKOWN", "IRIZ", "UNKOWN", "UNKOWN", "UNKOWN", "UNKOWN", "UNKOWN", "UNKOWN", "TGA", "AVI", "AVI", "PNG", "AVI", "MOV", "BMP", "HDR", "TIFF",
"EXR", "FFMPEG", "FRAMESERVER", "CINEON", "DPX", "MULTILAYER", "DDS"
]
def formatImageType(value):
if value<len(TRANS):
return TRANS[value]
else:
return "UNKNOWN"
file = 'path/to/file.blend'
if file.endswith(".blend"):
bf=openBlendFile(file)
for block in bf.FindBlendFileBlocksWithCode("SC"):
scStartFrame = block.Get("r.sfra");
scEndFrame = block.Get("r.efra");
scImageType = formatImageType(block.Get("r.imtype"))
if bf.Header.Version>=261:
scImageType = formatImageType(ord(block.Get("r.im_format.imtype")))
else:
scImageType = formatImageType(block.Get("r.imtype"))
print scStartFrame, scEndFrame, scImageType
(ie. Start Frame, etc.).
is too vague. $\endgroup$