Back to Tools and scripts

Script Snippets

Texture renaming script

Small Python project which was requested from one of my artists. Upon execution the script will check for our group's PBR naming convention (ex: "abcdefg_Albedo"). If it finds "_Albedo" or any other valid texture type, the script will rename the textures to the name of the directory they are currently placed in. This is especially helpful if the artist needs to re-export textures from Substance Painter and the textures no longer follow the naming standard of "folder/mesh -> mesh_Albedo".

Texture renaming script in action

The source code of this script can be found on my GitHub. Research and development of this script was conducted at The Game Assembly.

Texture Connection script for Maya

This script turned out to be such a great time saver that it was almost immediately integrated into all of our exporter tools and is still used every day. I do feel that its significance is worthy of its own short presentation.

The basic concept behind this script is based on the 'problem' that it takes time to connect every single texture on a mesh that our engine requires, meaningless repetition that only consumes time. So what this script actually does is assign a new Phong material on the mesh, then search a user-defined directory for any textures that contain 1.) the name of the mesh, and 2.) valid texture names according to our naming convention ("mesh_Albedo", "mesh_Normals", "mesh_AmbientOcclusion" etc).

If these two variables are correct the script will make all of the necessary connections, as can be seen in the picture below.

Texture connection script result in Maya

The source code of this script can be found on my GitHub. Research and development of this script was conducted at The Game Assembly.

Namespace remover for Maya

This script removes all namespaces in a scene. It was well appreciated among my artists and was eventually integrated into our FBX-Tool to help ensure that the mesh is clean of any strange names.

Namespace remover outliner result

The source code of this script can be found on my GitHub. Research and development of this script was conducted at The Game Assembly.

Last updated: 31st May 2018