Page 1 of 1

pano object introspection?

PostPosted: Fri Feb 17, 2017 3:11 am
by bitbyter
Hi - I've been trying to tweak an HTML template for a specialized purpose and have attempted to discover which properties/variables are associated with the "pano" object. Specifically, I'm trying to determine if a scene is planar or not ...however I can't figure out how to test this property within the HTML template.

Other template authors have used {{pano.tourId}}, {{pano.description.name}}, {{pano.description.description}}, and {{pano.thumbnailPath}} within HTML templates and I am at a loss to find any definition of the pano object within docs or forums. Have tried to use Django debug to describe the object but it doesn't reveal anything.

Can anyone tell me how to get a description of the pano object and its public variables as it appears to HTML template?
Thx, Scott

Re: pano object introspection?

PostPosted: Fri Feb 17, 2017 4:19 am
by 360-compunics-com-ni
Hi Scott,

i would like to have that documentation as well.. regarding the "planar-check" i found something by greping through the original plugins templates:
{% if pano.isPlanar %}OK{% else %}NO{% endif %}

Bye,
Michael

Re: pano object introspection?

PostPosted: Fri Feb 17, 2017 6:48 am
by bitbyter
WOW! Have tried this and it's already solved my immediate problem - Thank You Michael!
I am curious where you found it though - I also tried greping for "planar" and could not find any templates that had this phrase. By "original" are you referring to legacy plugins that are no longer distributed?

Thanks again!

Re: pano object introspection?

PostPosted: Fri Feb 17, 2017 3:22 pm
by 360-compunics-com-ni
On Linux i found it in "/usr/share/PanotourPro/Resources/plugins/floorPlan/kolorFloorPlan.tmpl", and it is used in the "kolorMap.tmpl"-file as well. Both are very interesting to study, but i don't know their locations on other platforms.

Re: pano object introspection?

PostPosted: Fri Feb 17, 2017 3:33 pm
by Annis
360-compunics-com-ni wrote:but i don't know their locations on other platforms.

No matter the OS you can find those folders this way:
Open Panotour > Edit > Open Templates System folder > Plugins and select the plugin you want to study. :)

Re: pano object introspection?

PostPosted: Fri Feb 17, 2017 4:03 pm
by bitbyter
Thanks to you both!

Re: pano object introspection?

PostPosted: Sun Aug 05, 2018 9:37 am
by 360-compunics-com-ni
Not sure what your use case is, but maybe you can get some hints out of this great example using two synchronized tours to get the "before/after"- or "day/night"-effect: http://www.kolor.com/forum/viewtopic.php?f=26&t=34651
The "chair"-symbol in the upper left corner of the demotour switches between the two tours.