Page 1 of 1

A way to automate updating hundreds of Pano2VR scenes?

Posted: Sat May 23, 2020 4:17 pm
by e3g
Let's say you have hundreds of individual Pano2VR panoramas, each one with it's own Pano2VR build file. Then you make some changes to your skin (or Pano2VR adds a new feature like WebVR support) and you want to go back and update all existing panoramas, producing new html5 output for each one. And I'm on a Mac.

In my case I have an added complication where I have a new skin name I want to use.

In the past, I would use AppleScript to automate something like this.

However I don't see any references to Applescript support in here or the docs.

What are the options to automate updating hundreds of Pano2VR files?

Thanks!

Re: A way to automate updating hundreds of Pano2VR scenes?

Posted: Sun May 24, 2020 1:07 am
by digitalnoodle
I may be wrong, but I believe you can simply use the new skin.js file (and probably any linked images/media/webvr folders) to the older pano.xml. In that way, it would be a matter of scripting the copying of files rather thank trying to script Pano2VR. It's worth a test anyway.

Re: A way to automate updating hundreds of Pano2VR scenes?

Posted: Sun May 24, 2020 5:05 am
by e3g
I tried copying three items from my latest skin to an older panorama output area:

pano2vr_player.js
skin.js
webxr (folder)

And sure enough, playing the scene in a browser appears to have the new skin. That's great, I can easily script what I need this way.

However when I open my .p2vr file in Pano2VR, it thinks the old skin is the one to use (and is shown in the html5 output panel). So it appears the skin ID is stored in the .p2vr file? This is not a big problem but I'll have to remember to switch to the new skin if I edit the scene in Pano2VR.

Thanks!

Re: A way to automate updating hundreds of Pano2VR scenes?

Posted: Mon May 25, 2020 2:52 pm
by 3DV
The Pano2VR project file (*.p2vr) is an XML file, so with AppleScript you could modify the <skinfile> tag to change the skin file that should be used in the project.
Then you can re-export the project with the Pano2VR command line: https://ggnome.com/doc/command-line/

Re: A way to automate updating hundreds of Pano2VR scenes?

Posted: Sat May 30, 2020 3:30 am
by e3g
That's great, I didn't know about the pano2vr command line, or the project file being XML. I'll give that a try.

pano2vr command line

I see the page on the command line:

https://ggnome.com/doc/command-line/

However when I drop into the terminal, I get
pano2vr: command not found

Do I have to set something up in my .bash_profile file?