You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

  • "sachagriffin" started this thread

Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

1

Friday, September 23rd 2011, 12:31am

how to get loadpano to load a new xml completely? and a bug found it looks like.

It looks like loadpano won't ever call your <krpano onstart="" code...
Seems like there should be a parameter for loading a new xml clean.
also loadpano can not remove any plugins that were added with addplugin.
I tried ignorekeep, null etc,, and all my xml thumbnails were still there from the last xml.
For now it looks like the best way is openurl instead.
*cry*
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

VN2011

Professional

Posts: 1,336

Location: Duluth MN

  • Send private message

2

Friday, September 23rd 2011, 8:47pm

wouldnt keep="false" prevent the xml thumbs from carrying into the next pano?

or

couldnt you also set a variable in the plugins you want removed then use the remove plugin looping code to take them out?

i currently use the onstart with loadpano to do the second option in certain tours but i have not upgraded to the newest krpano verison yet so maybe it is broken now.

  • "sachagriffin" started this thread

Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

3

Friday, September 23rd 2011, 10:35pm

The thumbs are tour/XML specific. Basically I was try to load a completely new tour without a page refresh. It looks like loadpano can't remove dynamically added plugins. For onstart I guess I can program around it. I don't know why load Pano can't run the new onstart but oh well.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

4

Monday, September 26th 2011, 5:56pm

Hi,

the onstart will be only executed when there are no addtional calls after the loadpano() call,
see the notes here:
http://krpano.com/docu/actions/#loadpano

but when loading new panos the removing of plugins or hotspots, regardless if defined statically or added dynamically should work,
are you maybe adding the hotspots in a global event? (note - the events will be kept set),

the krpano.xml in the main folder in the viewer download package contains an example for loading complete new xml files - see there the back button and "resetkrpano" action code,

best regards,
Klaus

  • "sachagriffin" started this thread

Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

5

Monday, September 26th 2011, 11:51pm

I think the main problem is that for professional plugins, they set variables. Number of items, whether it's been completed etc.
So upon loading a new XML, all these custom variables are STILL set, so previous plugins, might be RECREATED, based on settings from a previous XML.
Is there a way to CLEAR out all previously set variables?

Also, the below first example does NOT work per documentation. There are no additional commands after loadpano. No worries, I worked around it with a delayed call. So the only issue now, is how to remove, reset krpano to "factory defaults"...
without going through a series troubleshooting session, to see which variables need to be RESET to null.

<hotspot name="arrow1124c" ... ondown="fade_hotspots(get(name),0,1,default,WAIT);looktohotspot(get(name),42);loadpano(204,null,IGNOREKEEP,ZOOMBLEND(1,10));" ... />

<hotspot name="arrow1124d" ... ondown="fade_hotspots(get(name),0,1,default,WAIT);looktohotspot(get(name),42);delayedcall(0.1,loadpano(204,null,IGNOREKEEP,ZOOMBLEND(1,10)));" ... />
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

  • "sachagriffin" started this thread

Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

6

Tuesday, September 27th 2011, 12:27am

For example,

<thumbnails name="thumbs1" width="750" edge="leftbottom" align="leftbottom" x="35" y="-6" thumb_width="135" thumb_height="60" thumb_margin="12" frame_width="151" frame_height="72" folow_mouse="false" skin_url="%SWFPATH%/skin/" thumb_url="http://www.seeit360.com/files2/imagecache/krpanothumb" scroll_speed="2" visited_auto="false" >
<thumb name="tn1" url="/volcanbaru360_001.jpg" onclick="loadscene(get(scene[0].name),null,MERGE,BLEND(1));" onhover="showtext('Volcan Baru - Expedition sart from Cerro Punta', buttonstyle);" />
<thumb name="tn2" url="/volcanbaru360_003.jpg" onclick="loadscene(get(scene[1].name),null,MERGE,BLEND(1));" onhover="showtext('Volcan Baru - First Overlook', buttonstyle);" />
<thumb name="tn3" url="/volcanbaru360_002.jpg" onclick="loadscene(get(scene[2].name),null,MERGE,BLEND(1));" onhover="showtext('Volcan Baru - Halfway Point ', buttonstyle);" />
<thumb name="tn4" url="/vp11.jpg" onclick="loadscene(get(scene[3].name),null,MERGE,BLEND(1));" onhover="showtext('Volcan Baru Summit', buttonstyle);" />
<thumb name="tn5" url="/volcanbaru360_005.jpg" onclick="loadscene(get(scene[4].name),null,MERGE,BLEND(1));" onhover="showtext('Volcan Baru - Summit After Sunrise', buttonstyle);" />
</thumbnails>

would supposed to be overwritten by a new one but instead, they only replace the first two in the array, I'm assuming..
I don't think there is a solution here except for using unique names for every single xml.

<thumbnails name="thumbs1" width="750" edge="leftbottom" align="leftbottom" x="35" y="-6" thumb_width="135" thumb_height="60" thumb_margin="12" frame_width="151" frame_height="72" folow_mouse="false" skin_url="%SWFPATH%/skin/" thumb_url="http://www.seeit360.com/files2/imagecache/krpanothumb" scroll_speed="2" visited_auto="false" >
<thumb name="tn1" url="/cerro_brujo.jpg" onclick="loadscene(get(scene[0].name),null,MERGE,BLEND(1));" onhover="showtext('Cerro Brujo Gourmet', buttonstyle);" />
<thumb name="tn2" url="/cerro_brujo2.jpg" onclick="loadscene(get(scene[1].name),null,MERGE,BLEND(1));" onhover="showtext('Cerro Brujo Gourmet: Exterior', buttonstyle);" />
</thumbnails>

I also just tried nesting these INSIDE the SCENE. But it still did not prevent the data from existing beyond its scope.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

This post has been edited 1 times, last edit by "sachagriffin" (Sep 27th 2011, 12:42am)


7

Tuesday, September 27th 2011, 3:46pm

Hi,

okay, you mean a complete reset where also all custom stuff will be removed?
... that's technically a bit more difficult but I will see what I can do and maybe an action or flag for doing that in the next versions,

best regards,
Klaus

  • "sachagriffin" started this thread

Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

8

Tuesday, September 27th 2011, 3:55pm

Thank, I have most everything working now, except for the thumbs that recreate themselves. Is there anyway you see to just reset that object?
I'm not sure that makes any sense. Unless I could reset it just before the XML change.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

9

Tuesday, September 27th 2011, 4:04pm

You could remove all custom "thumbnails" elements by calling:

Source code

1
set(thumbnails.count,0);

or better - to remove the array itself too - by:

Source code

1
removearray(thumbnails);


for removearray see:
http://krpano.com/docu/plugininterface/#removearray

  • "sachagriffin" started this thread

Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

10

Tuesday, September 27th 2011, 4:42pm

I didn't realize I could use that in a normal <action as it's not listed in http://krpano.com/docu/actions/
But I'll give it a whirl! Thanks!
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour