Maya Ascii camera export script

Oh I found the problem!!! The camera need to be named Camera for the script to work. Thx for your script OsxRule this is really really awesome.

Your version of Python doesn’t seem to support list comprehensions. That version should but I’ve had that issue before. You’d need to install a newer version of Python, e.g:

http://www.python.org/ftp/python/2.5.4/python-2.5.4-macosx.dmg

You should be able to name the camera to any name. You should even be able to set the active camera to an object such as a lamp using ctrl-0. I did rename objects in the script to be compatible with Maya as it doesn’t like names with dots in them so dots are converted to underscore. If you had an object called box.001 and one called box_001, that would cause a conflict. I should really only do renaming for Maya as well as check for naming conflicts.

hey osxrules,
i figured it had something to do with my python version. only problem is i can’t find a version of blender for PPC that uses python 2.5, i do have it installed but my blender version is compiled with 2.3 :frowning:

That’s ok as long as the Python version installed is greater than the version Blender is compiled with. The PPC page listing 2.3 is just a minimum requirement (minimum OS 10.3, minimum Python 2.3).

Osxrules,
I’m getting some other weird problems in another scene.
I’m using nulls as placeholders: the starting position seems to be good, but the nulls appear completely off their start position… I’ll post a scene as soon as possible.
Have you in the meantime got the chance to figure out what’s that problem?

I will check the scene but one thing to look at might be the frame numbers if you are rendering from frames not starting at frame 1. I think that should be ok but some programs will move the frames by 1 or they put the imported footage at the start and not the keyframes. I’m pretty sure I checked that out though.

The rotation problem? No, I haven’t been able to figure out what’s causing that. As I say, the rotation values are correct in Maya so it must be to do with how AE is dealing with them.

I know AE has speed curves so perhaps that is messing with how the object is moving but I would have expected the default speed curve to be linear rather than say ease-in/ease-out.

As an aside, can I ask if you use an online resource for animated masks or do you make them in say realflow? I saw some of your work and the animated smoke/fluid effects on the surfaces look great but I don’t know of a good stock footage site to get those type of clips. I’ve tried hand animated masks and you get decent control but it generally looks too fake as the mask moves too predictably.

I just checked that scene with the odd rotation again and it’s because it was importing the .tga sequence as 30fps instead of 25fps. I checked the numbers in Blender and the frame where the text is exactly pointing away from the camera is frame 28 but in AE was showing at 23 and the clip only lasted 1:20 despite being 50 frames, so should be 2:00.

If you right-click the .tga sequence in the AE project tab, choose interpret footage > main and then change the fps value to 25fps, it should bring it in as the full 2:00 and match the rotation exactly. That may be the same problem you have with your current clip.

If you go into Preferences > import, you can set the default import to 25fps.

Osxrules,

I’m feeling really stupid now!
many apologies for trouble I’ve caused and thanks again for giving your feedback here.

OSXRULES, I must say this is a FINE script. You’ve really created a useful tool for AE/Maya pipelines. Your continued development and follow up on bug reports has given this script some powerful refinements. Thank you very much for your time and talent in developing this great tool for blender and it’s artists

The script is great
thanks a lot, i got it working with after effects after quite a while.
I tried several wrong scripts before and got strange camera data in AE, I was not sure which script actually is the last release. I tried the one downloadable here:
http://www.videocopilot.net/products/the_bullet/help/
but it wasn’t OK. This one worked:
http://dev-art.co.uk/files/tracking.py.zip
Would it be possible to post it just here:
http://wiki.blender.org/index.php/Extensions:Py/Scripts/Manual/Animation/Camera_Tracking
so everyone interested will find the newest release directly?
Another mistake I did was using the 75% Resolution Button when rendering out of Blender. Then the Camera Data was also slightly incorrect in AE. It seems that the script doesn´t consider these render settings, but that doesn’t matter if you know it.
thank you very much for your work on this.

can someone repost the last version of the tracking_ae.zip please the geoscity hos is dead.

Eror Check :

if not pvals.has_key(name): pvals[name] = dict((p,[None,None]) for p in attrlist)

Thanks for the comment.

I updated the original post with a link to the latest script, which is where the wiki points to but a direct link can go on the wiki if preferred.

The camera resolution thing should be an easy fix to add. I will look into it.

Make sure you have an up to date Python distribution from python.org, older ones won’t support some of the function calls. Anything above version 5 should be ok.

Any link available where I can download this script?

OMG, it felt like my last post here was 3+ years ago and I thought I’d check back in to see what was happening. It’s only been a year, that’s not so bad.

I switched the server and I was sure I’d put the zip file back on it, sorry about that. I’ve fixed the link now so hopefully it should work. Feel free to copy, backup, duplicate the file anywhere and everywhere in case it happens again.

When 2.5 fiiiinally arrives, I’ll check if it needs updated.

+1, I too hope this is updated someday for 2.5x

i hope that too. +1
I’ve used this script, and it was wonderful. Yet now that i’m doing compositing into Blender too (leaving AE… !)

I have been looking for a solution to get camera information over to Apple’s Motion.

Has anyone had any success?

Thank you. :slight_smile:

This script wouldn’t work for Motion but I can have a go at a Motion script. It looks straightforward enough and Motion would be quite cool to experiment with. It’s so fast at rendering doing everything on the GPU.

For now, I reworked the Maya exporter since Blender has a stable release. They changed lots of the Python API (tore up the book essentially) so it meant changing quite a lot but it needed to be done and I’m really happy they did it.

Blender 2.5 is awesome, having everything animatable and accessible to scripting with the expanding UI. The new PyAPI is great to work with, looks like Cambo did a lot of work here. When you see it next to 2.49, it’s clear it needed an overhaul.

Anyway, here is the new script for 2.57:

http://www.dev-art.co.uk/files/maya_camera_tracking.py.zip

I gave it a more unique name so that if you choose to install it as an addon in the preferences, it doesn’t conflict with anything when it gets copied into your scripts folder but you can run it from the text editor and it will load an entry in the export menu just for that session.

I put the option to switch between Maya, Shake and AE in the export dialog on the left. Most people will just leave it on AE but that space is good if I need to add other options later.

I haven’t figured out how to get the UI to update during export. It seems to block everything whereas in 2.49, the UI would refresh during export so no progress bars etc just yet. No native file dialog either as Python is bundled with Blender now but that’s better anyway and the Blender dialog works very well now.

As always, let me know of any issues or improvements and I will check them out.

I was really missing this script.
This is absolutely the best AE export script ever made for Blender.
Thank you once again Osxrules!

I’ve given it a quick try: so far no prob. Flawless, fast and the result it’s just what I need to comp Blender 3D renders in AE.