Sie sind nicht angemeldet.

  • »sachagriffin« ist der Autor dieses Themas

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

1

Freitag, 23. September 2011, 00:31

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

2

Freitag, 23. September 2011, 20:47

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« ist der Autor dieses Themas

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

3

Freitag, 23. September 2011, 22:35

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

Montag, 26. September 2011, 17:56

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« ist der Autor dieses Themas

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

5

Montag, 26. September 2011, 23:51

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« ist der Autor dieses Themas

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

6

Dienstag, 27. September 2011, 00:27

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

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »sachagriffin« (27. September 2011, 00:42)


7

Dienstag, 27. September 2011, 15:46

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« ist der Autor dieses Themas

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

8

Dienstag, 27. September 2011, 15:55

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

Dienstag, 27. September 2011, 16:04

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

Quellcode

1
set(thumbnails.count,0);

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

Quellcode

1
removearray(thumbnails);


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

  • »sachagriffin« ist der Autor dieses Themas

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

10

Dienstag, 27. September 2011, 16:42

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