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

    Code
    <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

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


    and with conditional setup the include url to null,

    Code
    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

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!