I’ve got 2 scrips that ChatGPT helped me write, both work perfectly but now I need to merge their functionality.
Enscape renders its panos to numerically named XML files (panorama_1.xml, panorama_2.xml etc)
The jpg’s are stored as base64 images within the XML structure.
There is no differentiation between source SU models in the XML filenames BUT the filename IS stored in the XML file as ‘ProjectName’.
Enscape batch renders the selected scenes ALPHABETICALLY … not in scene order.
Saving them is a manual process through the Enscape interface which is laborious when you have 20-30 in each project that get re-rendered at least 3 times after amendments to the design.
The 1st script produces a list of the SU scenes that start with ‘P-’ and are sorted alphabetically.
The 2nd works through all the XML files in the Enscape Panorama folder, it only acts on the ones who’s ‘ProjectName’ is the same as the current SU model name and it processes them by date and time order.
It extracts the base64 image as a jpg with the filename of the original XML file.
All good so far
Now, what I want is for the date/time extracted jpg’s from the 2nd script to have the corresponding alphabetically sorted scene names from the 1st script as their file names.
This has me and ChatGPT stumped, I’ve written 1 rb script before and that was many years ago so essentially I’m a noob when it comes to this.
Would someone have a look at the attached scripts and help me weld them together?
In the case of my current project, my thinking is that I need an array/list of the 28 scenes alphabetically sorted (got that in the 1st script I think) and another array of the 28 xml’s date sorted that have the same ProjectName … and then I need to tie the 2 arrays together to be able to extract the image from the n’th XML and save it as the n’th scene name.
This is what I use the Panos for: Moira One - Type 1A