This Python script automates the creation of .gsgm
data files for GSG materials so that they can be detected and imported by GSG's Houdini and Blender importer addons. It recursively processes directories and their subdirectories, using information from folder names to generate .gsgm
files.
- Follow the prompt:
- Enter the directory path to the materials.
- Input
(x)
to exit the prompt loop.
- The script will generate
.gsgm
data files for the materials.
.gsgm
files will be created based on the material's folder name information. Examples:GSG_MC028_A001_Fabric
,Blob_Marble
.- Existing
.gsgm
files in the specified directories will have their contents overwritten and updated.
Suppose we have a folder with all our materials that has a structure like this located at "E:\GSG_March2023_Update\materials":
Each folder has 10-70 subfolders of materials. Instead of entering each folder individually, you can enter the main folder that encompasses all of them which will be recursively searched. In this case "E:\GSG_March2023_Update\materials" from the example above will give the following output and generate .gsgm
files for all 272 materials:
Example of the materials being imported and detected by GSG's Houdini material importer: