Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Freitag, 8. November 2013, 16:19

dynamic include xml or another solution

hi,

i'm currently re-building a portfolio with several hundred panos,
before i was using 1 scene for 1 pano, and the code was growing exponentially,
then i changed the way by using one single scene code to get lightweight xml code,

so basically :
-i setup variables of my pano
-i use "loadscene" to load scene xml code (using populated variables)

everything works fine,

but few scenes need additional hotspots/plugins/lensflares...

i think to several solutions :

A/
in my main scene code, i can add an include pointing to an extra.xml

Quellcode

1
<include url="%FIRSTXML%/panos/%$set_id%/%$pano_id%/extra.xml"/>

as you see i use some variables here too to load the extra.xml in each pano folder,
most of them will be empty xml file (because unnecessary) and fews will contains the additional stuff needed.
this solution works but we are loading empty files for nothing.

B/
i can put the include

Quellcode

1
<include url="%FIRSTXML%/panos/%$set_id%/%$pano_id%/extra.xml"/>

and with conditional setup the include url to null,

Quellcode

1
if(have_include_xml == false, set(include.url, null));

a solution avoiding loading unnecessary xml files,
but that's doesn't works *confused*

C/
i could use "loadxml",
but have to find a way to keep everything and add my additional stuff in he scene,
i don't know for now *huh*

so, smart advices appreciated and welcome

thanks

z

2

Samstag, 16. November 2013, 19:46

Never mind,
Found a creative work-around...

Z