1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/*
<?xml version='1.0' standalone='yes' ?>
<!-- xml header for scripts & plugin manager -->
<script>
<name>JMeta Union</name>
<author>Philipp Tiefenbacher</author>
<version>0.1</version>
<beta>1</beta>
<date>23/10/2008</date>
<description>
This script unions all selected Objects
</description>
<comments>
</comments>
</script>
*/
scene=window.getScene();
cube = new Cube(10, 10, 10);
cubeinfo = new ObjectInfo(cube, new CoordinateSystem(), "cube");
sphere = new Sphere(10, 10, 10);
sphereinfo = new ObjectInfo(sphere, new CoordinateSystem(), "sphere");
window.setUndoRecord(undo = new UndoRecord(window, false));
window.addObject(cubeinfo, undo);
window.addObject(sphereinfo, undo);
window.setUndoRecord(undo2 = new UndoRecord(window, false));
undo2.addCommandAtBeginning(UndoRecord.REMOVE_FROM_GROUP, new Object [] {cubeinfo, sphereinfo});
cubeinfo.addChild(sphereinfo, 0);
window.rebuildItemList();
|