Sie sind nicht angemeldet.

perspixe

Schüler

  • »perspixe« ist der Autor dieses Themas

Beiträge: 64

Wohnort: Bologna, Italia, Vancouver, BC

  • Nachricht senden

1

Mittwoch, 3. August 2016, 12:06

execute a string from variable as krpano xml

Hello

I have an array of points of view settings this way:

Quellcode

1
2
<pov name="pov1" h="181" v="-20 " fovmul="1.17" fish="0.995" act="callwhen(((plugin[video].time) GT 50), setPOV('pov2'));" />
<pov name="pov2" h="181" v="-73 " fovmul="0.83" fish="0.995" act="callwhen(((plugin[video].time) GT 60), setPOV('pov3'));" />

Then I have an action that set the pov using the variables with

Quellcode

1
2
3
4
5
6
<action name="setPOV">
     tween(view.fisheye, get(pov[%1].fish), smooth(%2,%2,%2));
     mul (thisfov, fovST, get(pov[%1].fovmul));
     lookto (get(pov[%1].h), get(pov[%1].v), get(thisfov), smooth(%2,%2,%2));
     get(pov[%1].act);
 </action>


It all works fine but for the act value. I want to put there as string a serie of actions to execute; the example in the code is a single callwhen but potentially more things, for an automated virtual "tour".

How do I execute as krpano xml code the content of a variable as string?

2

Mittwoch, 3. August 2016, 12:49

Just do:

Quellcode

1
pov[%1].act();

perspixe

Schüler

  • »perspixe« ist der Autor dieses Themas

Beiträge: 64

Wohnort: Bologna, Italia, Vancouver, BC

  • Nachricht senden

3

Mittwoch, 3. August 2016, 12:52

Thank you!
it works.