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.

viewinz

Intermediate

  • "viewinz" started this thread

Posts: 145

Location: Wellington, New Zealand

Occupation: Trying to build an entire walkthrough of NZ for tourists

  • Send private message

1

Wednesday, October 21st 2009, 11:52am

Beta 9, Scenes setting %CURRENTXML%

I'm having a problem with the new Beta 9.

If I load one scene i.e. 'pier' in an xml document, i.e. street, and then use loadpano to access a new scene i.e. exterior in a new xml document i.e. cafe it's fine. But if I then attempt to load the previous scene (street) I get an error that the scene xml file cannot be loaded because it's hasn't set the new xml file (street) as %currentxml% and is still recognising the previous XML doc, cafe as the current XML. But then it does load anyway but the error stays showing.

This may have been happening on the previous version but it didn't show an error.

Is there a way to define the currentxml? Or is this a bug?

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

2

Monday, October 26th 2009, 2:29pm

Hi viewinz,

Quoted

Is there a way to define the currentxml?
Perhaps you can use the basedir attribute of the <krpano> node:<krpano>
basedir
base directory for the loadpano action commands.
this can be a relative or a absolute path,
the path can include this placeholders:
  • %FIRSTXML% - path of the first loaded xml file
  • %CURRENTXML% - path of the current loaded xml file
  • %SWFPATH% - path of the swf file
  • %HTMLPATH% - path of the html file
the defaultvalue is %FIRSTXML%, that means the paths of all all following loaded XML files by the loadpano() action are relative to the first loaded XML file.
Salut.

3

Monday, October 26th 2009, 8:11pm

Hi,

the "currentxml" can't be defined manually,
it will be defined automatically when loading a new xml,

do you have scenes in two separate xml files?

best regards,
Klaus

viewinz

Intermediate

  • "viewinz" started this thread

Posts: 145

Location: Wellington, New Zealand

Occupation: Trying to build an entire walkthrough of NZ for tourists

  • Send private message

4

Monday, October 26th 2009, 10:19pm

Michel, thanks for that - I think I've tried that but will look at it again.

Klaus, this is in regard to that email I sent with error, this is only happening on the new version. And yes it is trying to go from scene to scene in to different XML documents. It works fine if you go from XML A scene street, to XML B scene house, but if you then try to go from XML B scene house to XML A scene street you get an error cannot find scene street in XML B. But then it loads scene street anyway! But the error remains on the screen.

I do it this way..

Source code

1
2
3
4
loadpano(../../house.xml, MERGE, blend(1));
wait(load);
wait(3);
loadscene(exterior);


As I said before it works fine one way but not the other!

EDIT: Fixed.. removed the %currentxml% from scene urls and worked fine. probably me being a bit stupid!

This post has been edited 1 times, last edit by "viewinz" (Oct 28th 2009, 1:09am)