Python script for creating CC3+ symbol catalog from directory of PNGs
As mentioned in an earlier post, I have a first-pass at a Python script that will create a CC3+ symbol catalog file from one or more directories that contain PNG files.
This was heavily based on referencing the data structure layouts defined in the XP SDK. I converted all the necessary structure definitions to python classes (it was only a handful: FileID, CSTUFF, SYMDEF, Marker 0, PICTR, SYMINFO, and Marker 1).
There's a lot of hardcoded values used for some of the internals, such as for all the InfoBlocks, and the symbol sizing uses the overland default of dividing the pixel dimensions by 40 to define the symbol's dimensions. The defaults I chose met my immediate needs for having an automatable and scriptable way to import large numbers of symbols from several directories, but it is likely others might have different preferences. If you have familiarity with python, it should be fairly straightforward to make changes.
As I am fairly new to CC3+ and the data structures defined by the SDK, I likely did some things wrong or made bad assumptions for some values. Feedback is very welcome.
The Python code can be found here: https://github.com/MostTornBrain/FSC-tools