Updating Icarus 3D import script

Hello, I’m a long time user of Blender, but I’ve never really dealt with Python scripting. I understand the basic in-outs of it, and after having difficulty using 2.48 with the Icarus import script, I decided to address the problem systematically.

Firstly, I do know that Icarus is a very old project, and the .py script for 3D import was made for version 2.41, even though there is a 2.48 version, it does not record data based on camera movement, but instead just sticks empties to all of the tracking points.

What I do know is that the primary error that 2.48 users receive is “Unexpected start of file” which is referenced in the code to be a problem with ignoring the first few lines (which are commented). The problem is, I can’t find a reason why 2.41 and 2.48 would interpret this line differently enough to end up starting to read the file at the wrong point. here’s the code from the section that decides where to start reading: (if you want the whole file, you’ll need to go download it)

try:
fp = open(FILENAME)
data = fp.read()
fp.close()
except IOError:
ERRMSG = [1, “Cannot open %s !!” % FILENAME]
return
else:
# consider the first comment as a file ID, of course probably not future compatible
if data.splitlines()[0][:14]!="# Camera track":
ERRMSG = [1, “Unexpected start of file, nothing done”]
return

return data

It’s me again, and after experimenting for a while, I realized that the script does work, and I was just exporting a 2D track from “Full Movement” calibration. Sorry if I wasted anyone’s time. :o

There does seem to be some delay in some of the points, but that’s why they’re all averaged together.

Glad you got it working. Tracking 3d into live footage can be very rewarding.

Have you also checked out Voodoo?
http://www.digilab.uni-hannover.de/docs/manual.html

libmv seems to be the emerging toolset for Blender.
I’ve downloaded and compiled and it does have a gui for testing but is still under development.