Polygonal hotspots visibility via menu

Q&A about the latest versions
Post Reply
hkreslone
Posts: 5
Joined: Mon Mar 22, 2021 2:12 pm

Hi,
What I want to achieve:
I have polygonal hotspots in my VT(ids: A,B,C). Behavior is set to show current. I also have menu with fields for each polygonal hotspot: a,b,c. When I click 'a' in menu it makes polygonal hotspot 'A' visible. Now if I click on the menu 'b' it makes PH 'B' visible but the 'A' also stay visible. How can I make an action that hides all the other polygonal hotspots except the one that is currently shown? Can I use some special value in th hide one action that will hide all PH?
The solution is probably trivial but my brain is far away from it.
With regards
Leszek
User avatar
Hopki
Gnome
Posts: 12999
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Leszek,
Depends if your using Pano2VR 6 or 7 on how you do this.
Pano2VR 6 needs more actions while Pano2VR 7 can use regular expressions so targeting many polygon hotspots with one action.

Please find three projects on the attached zip.

The first project, pano_v6, you will see you need an action for each polygon in the project.
So you have actions hiding all the other polygons and then one to toggle the polygon you want to show.
So on mouse click all polygons will hide, the required polyon will show and a second click will hide it.

With the project pano_v7, you will see each button only needs two actions because it can use regular expressions.
Yes it is code, but it is quite logical.
To show poly02 and hide Poly01 and Poly03.
The Hide action target will be #Poly0[13]
So hiding Poly01 and Poly03
If you look at the other buttons you will see a pattern and how it will works, but thsi is only for Polygon ranging from 00 to 09.

To see how to address many polygons see project pani_v7_2
Again each button only needs two actions but the target needs to be able to cope with 00 to 25.

We do have a document on this, see: https://ggnome.com/doc/skin-regex/

But basically the target is split into three, so 0[0-9] targets 00 to 09. Then 1[0-9] which targets 10 to 19 and finally 2[0-9] targeting 20 to 29.

So looking at 25 polygon hotspots, to hide all apart from Poly23 the target would be #Poly(0[0-9]|1[0-9]|2[124-9])
As you are targeting a range you surround it with brackets. To separate the rainges use the "pipe" |.

You can of course use the same method in V7 as in V6 but as you can see if you have many Polygon hotspots then you would have many actions in each button.
Of course you can copy and paste all teh actions and then go back and edit each button.
Regards,
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
hkreslone
Posts: 5
Joined: Mon Mar 22, 2021 2:12 pm

Hi Hopki,
thank You for your explanation. I am still using pano_v6 and my 'temporary' solution was hiding all and showing one but this is a lot of actions. I have a lot of small objects in my VT so I was hoping for some 'hide all' action. I just thought that there is one implemented in the software and I am unable to find it. In the end I've made upgrade to the algorithm reducing the number of actions:
1. Create variable (type text) that holds the name of currently active(clicked) polygon.
2. When new polygon is chosen to be active first hide the currently active polygon: variable from point one, then show new polygon and assign new polygon name to our variable.
As for now it works as intended and it is only three actions instead of an action for each polygon to hide and then one action to show current.

This works great if you want to have one polygon active.
Good to see that pano_v7 allows you to target polygon ranges.

Thank you again and see you when I have a next question
with regards,
Leszek
User avatar
Hopki
Gnome
Posts: 12999
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Leszek,
You can only use Regular Expressions with V7.
In V6 you will need all the actions.
Remember you can copy and paste actions, then modify them.
Regards,
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
User avatar
SergePix
Posts: 108
Joined: Fri Feb 01, 2019 2:27 pm
Location: Quebec

Hello Hopki,

do you have the zip files for this project?

Thanks!
Hopki wrote: Fri Oct 28, 2022 2:04 pm Hi Leszek,
Depends if your using Pano2VR 6 or 7 on how you do this.
Pano2VR 6 needs more actions while Pano2VR 7 can use regular expressions so targeting many polygon hotspots with one action.

Please find three projects on the attached zip.

The first project, pano_v6, you will see you need an action for each polygon in the project.
So you have actions hiding all the other polygons and then one to toggle the polygon you want to show.
So on mouse click all polygons will hide, the required polyon will show and a second click will hide it.

With the project pano_v7, you will see each button only needs two actions because it can use regular expressions.
Yes it is code, but it is quite logical.
To show poly02 and hide Poly01 and Poly03.
The Hide action target will be #Poly0[13]
So hiding Poly01 and Poly03
If you look at the other buttons you will see a pattern and how it will works, but thsi is only for Polygon ranging from 00 to 09.

To see how to address many polygons see project pani_v7_2
Again each button only needs two actions but the target needs to be able to cope with 00 to 25.

We do have a document on this, see: https://ggnome.com/doc/skin-regex/

But basically the target is split into three, so 0[0-9] targets 00 to 09. Then 1[0-9] which targets 10 to 19 and finally 2[0-9] targeting 20 to 29.

So looking at 25 polygon hotspots, to hide all apart from Poly23 the target would be #Poly(0[0-9]|1[0-9]|2[124-9])
As you are targeting a range you surround it with brackets. To separate the rainges use the "pipe" |.

You can of course use the same method in V7 as in V6 but as you can see if you have many Polygon hotspots then you would have many actions in each button.
Of course you can copy and paste all teh actions and then go back and edit each button.
Regards,
Serge
Version: V7.01
Windows 10
Post Reply