You are not logged in.

1

Friday, February 27th 2015, 12:00pm

How to dynamically remove <scene> ?

How to dynamically remove <scene> element, same as removelayer(); do ?

benji33

Intermediate

Posts: 244

Location: France

Occupation: Senior Software engineer

  • Send private message

2

Monday, March 2nd 2015, 12:54pm

Not tested but delete(scene[get(xml.scene)]); perhaps ?
Or use loadscene action on an empty scene name ?

3

Wednesday, March 4th 2015, 10:25am

Hi,

the <scene> elements are krpano-array-elements.

Removing such array item is possibly either by setting the name of that item to null - then the item will remove itself from the array:

Source code

1
set(scene[name_of_the_scene].name, null);


or by calling removearrayitem (a function mainly from the krpano plugin interface, but that is also available in the xml):

Source code

1
scene.removearrayitem(name_of_the_scene);


Best regards,
Klaus

benji33

Intermediate

Posts: 244

Location: France

Occupation: Senior Software engineer

  • Send private message

4

Wednesday, March 4th 2015, 1:09pm

Excellent I forgot this.