What is a Panotour plugin?
Plugins exist to easily enhance user experience of your tour as they bring customizable features.
Panotour's plugins are listed on the style tab, right side.
This guide will help you to understand what is a Panotour plugin and how to create your own plugin.
Where do we have to put our plugin file on our computer ?
A dedicated directory exists in your file system to store your personal plugins. This directory can be reached directly through PTP, using the "Edit >Open user directory menu".
- Windows : C:\Users\MyName\Documents\Kolor\PanotourPro 2\plugins
- Mac : /Users/MyName/Documents/Kolor/PanotourPro 2/plugins
- Linux : /home/$USER/Documents/Kolor/PanotourPro 2/plugins
So, you can start by creating your plugin directory here like "myFirstPlugin".
Files of your personnal plugins must be saved here.
Files that compose a Panotour plugin
A Plugin must have at least two files to be functional :
The name must be plug_info.xml.
This XML file describes the plugin and its customization interface that will be displayed in Panotour.
It also describes many other things like dependencies, or any assets you want to embed.
IMPORTANT : Every time you make changes on this file you have to restart Panotour for the changes to appear.
This file is a template file, you can name it as you like, it will be declared in plug_info.xml.
Here is the Krpano stuff like XML <layer> or any Krpano script, actions and custom XML.
The template grants you the possibility to get data from your current tour project in Panotour and from the Panotour plugin interface you described in plug_info.xml
The template language that's used is Django.
Some extra tags, filters and variables were added to the Django builtin tags and filters to facilitate the use in Panotour.
What does Panotour do with my plugin ?
Panotour will write the code generated by your plugin into a file named myTour_skin.xml
To test your plugin, you have to create a tour, add your plugin via the style tab, then build it.
Let's say you named your output filename "myTour" (in the build tab).
Panotour will generate files according to the filename you've set and you'll have an output like this :
The point is that Panotour will write the code generated by your plugin into the myTour_skin.xml for plugins in Krpano.