[Script] Meshfoot OBJ Sequence Manager (revised for Blender 2.76)

Hi All,

This my initial python port of the Meshfoot OBJ sequencer from Blender 2.49 to Blender 2.76. Meshfoot manages multiple OBJ sequences and allows you to think of the mesh sequence as if it were footage. OBJ sequences are generated by many programs such as Poser, Daz Studio, Maya, Blender, Lightwave, Grobotto and more. Meshfoot supports five out-of-range types. One Shot Hold, One Shot Die, Loop, Ping Pong and Random. This video shows how to link a folder with a series of OBJ files to a Blender scene. Meshfoot manages which frame gets displayed at what time depending upon the parameter settings for each list entry.


Here is a video tutorial that explains how to use the script.



276_meshfoot_1m.blend (858 KB)

Thanks for the script Atom, I followed your instructions, but this seems not to work on a mac…

When I get a chance, I’ll try it on my MacBook. I developed it on Windows XP64. So what part is not working?

Can you see the panel after clicking the button?
Are there script errors?
Can you post a screen grab of what your OBJ sequence filenames look like?

If the panels work, it might simply be a cross platform OS pathing problem.

Thanks for the feedback.

I can see the panel after clicking the button,
my obj sequence is like this:
Untitled 1_000000.obj
Untitled 1_000001.obj

Thanks for looking into this :slight_smile:


great! I have been missing this feature a lot in the last time!! Until we don’t get fbx import that’s really good stuff! I will tryit soon, thanks a lot!

@Yodorow: I forgot to mention, that the zero padding code only supports 4 digits. So in your case, that is probably the failure. You could rename your sequence (if it is not that long) or re-export it with less zero padding. Another option would be to extend the function returnNameForNumber located on line #173 of the script to support longer zero padding.

I would also like to mention that there is a test OBJ sequence of a running horse available for download on shareCG.com.

There is a confirmed Mac pathing problem. I’m not sure why python does not handle this behind the scenes. For instance, I am using os.path.exists(myPath). On Windows this works if I give it something like this. os.path.exists(“c:\myfoldername”). On OSX the same code fails even if I give it a valid Mac path like os.path.exists(“SnowLeopard:Users:Atom:Downloads:horse_obj_sequence”).

Any tips on cross platform pathing solutions are welcome.

I renamed my sequence so it has only four digits counting, now it works like a charm. Thank you very much for this wonderful script!

Very good utility Atom!

One question: Is there a handle/option to change up axis? I export the obj sequence from Maya which is Y-up and Blender is Z-up.


Very good utility Atom!

One question: Is there an option to change up axis?

I export the OBJ sequence from Maya and we all know Maya and Blender have different orientations.


Just rotate the object once it appear in the scene. If you notice in my video I do the same thing with my Poser object. Keyboard commands RX90.

I was able to find this while looking around, and I have to admit, this is a great tool, albeit rather hard to find.

I did want to ask about how Meshfoot imports the .obj files. The basic functionality uses one object, but multiple meshes to cycle through, and I was wondering if there was (or could be) a way to separate each mesh into separate objects by the same name? Right now, this tool was able to take my skeletally-animated mesh that I’d exported move as it did before, so this has worked out very well; the tool is functional. My question is whether or not there could be a way to use Meshfoot’s import structure to test the animation and then convert it in some way to separate objects once I’ve confirmed the functionality of the animation?

Otherwise, excellent job getting this up-to-date to the latest version of Blender.

Feel free to modify the script for your needs. The mesh import section is contained in an operator called OBJECT_OT_preload_mesh_sequence. It examines the properties of a list entry to decide what to do.

All objects must have a unique name so there is no way in Blender to have two objects named the same.

I have never actually tried writing an OBJ file to disk from Python so I do not have any code for that.

The preload mesh button will load the mesh data in to Blender memory so after the button completes all the mesh frames are in memory. It sound like you just want a way to display them all simultaneously? If so just modify OBJECT_OT_preload_mesh_sequence to NOTdelete the object associated with the datablock.

This is around line #770 in frame_meshfoot.py.

# Now that we have the mesh in memory and have named it, the object is no longer needed.
ob_new_name = ob_new.name
    context.scene.objects.unlink(ob_new)    #This removes it from the scene, but not from memory.

Change to:

# Now that we have the mesh in memory and have named it, the object is no longer needed.
ob_new_name = ob_new.name
    pass    #context.scene.objects.unlink(ob_new)    #This removes it from the scene, but not from memory.

So by adding pass we skip unlinking the object each mesh will now have an associated object that links it to the scene. You could also just remove the entire try/except block.

Hi Atom! Is there any chance to get it working in 2.64? It doesn’t work for me here :frowning:

@julperado: Hmm…what part is not working for you? I just tried the above 2.62 version 1c along with the test horse obj sequence from sharecg and it worked fine. No crashes, no errors.

I am using the official 2.64 Blender release.

Now that 2.65 is out I think this script is no longer working, can you check it out Atom? Thanks and congratulations for this amazing tool.

I guess I spoke too soon. Today’s release of Blender 2.65, broke the script. I have posted a revised version in post #1 of this thread.

So are there plans to allow it it bake or export obj sequences as well?

No plans for that…can’t Blender exporters already do that?

Export a singular obj file, yes. A Sequence of obj files, no. It doesn’t unfortunately, and there are not currently any plugins for this either that I can find.

Have you tried checking the Animation checkbox for the existing OBJ exporter? I just tried it and it spit out a series of OBJ files.