Here’s a nifty little Python script to help clean up models imported from FBX/STL/OBJ/whatever. It’s a simplified version of a custom add-on we use at my studio. Over the years I’ve found myself performing the same operations when prepping stock assets or CAD files for animation, so I wrote an add-on to do it for me.
Thanks for sharing this useful script. Great contribution!
I had been looking a simple way to add scrips as easily accessible buttons in UI without need to run in script editor or create as addons. Blender is unfortunately missing highly important toolshelf to just drag&drop this type of scripts for later use. I recently found the below addon that is closest to what I’d like to have, so maybe it’s useful for others as well. Not mine, so credits to the creator.
No problem, @Saku! The only reason it’s not a proper add-on like the one I use at work is because a buddy of mine needed help cleaning messy FBX files for a game project and he’s a complete Blender noobie. He comes from a computer science/coding background, so I wanted to keep it as simple for him as possible to use at first.
It’s pretty trivial to take the script and turn it back into an add-on again. If there’s enough interest I might do it myself, but anyone else is welcome to as well.
EDIT: Just wanted to also mention that I agree with you, I do miss Maya’s toolshelf from time to time. It’s a really understated feature.
I don’t think this type of assisting scripts need to be addons at all, so it’s good like this. Also easier to store, modify and share as no need to install or update the addon.
Yeah, in Maya the toolshelf works well, but I think it’s somehow not understood in Blender community or by developers properly. This is clear if have used it, but I just had to mention it, as in a production environment it’s just easiest way to share stuff with other team members. And for personal use as useful when can just grab needed command/commands from info window and paste to toolshelf even without any scripting experience.
Alright, I downloaded your test file and took a look. I don’t think there’s necessarily a bug in the script - I think it’s more related to the defaults for the “tris to quads” function and this particular model.
I tried converting tris to quads on the model explicitly in the Blender UI and very few edges actually changed. And the mesh is identical, whether it’s run through the UI or the Python script, so it seems to be running the function as-expected. When the function can’t calculate a quad from a collection of tris, it just leaves it as-is and I think that’s what’s happening here. If you run the tris to quads function in Blender’s UI you can adjust the angle it uses to calculate the conversion and see if it has any effect.
If I were optimizing this model, I would run the script to cover the basics, then go in by hand and fix the geometry where it really matters (sometimes it doesn’t, and leaving it as it is would be more than enough).