RUIC 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +3 -4
- data/README.md +278 -279
- data/bin/ruic +0 -0
- data/gui/TODO +2 -2
- data/gui/appattributesmodel.rb +51 -51
- data/gui/appelementsmodel.rb +126 -126
- data/gui/launch.rb +19 -19
- data/gui/makefile +14 -14
- data/gui/resources/style/dark.qss +459 -459
- data/gui/window.rb +90 -90
- data/gui/window.ui +753 -753
- data/lib/ruic.rb +175 -175
- data/lib/ruic/application.rb +5 -1
- data/lib/ruic/assets.rb +312 -289
- data/lib/ruic/attributes.rb +165 -165
- data/lib/ruic/behaviors.rb +1 -0
- data/lib/ruic/interfaces.rb +45 -7
- data/lib/ruic/presentation.rb +103 -39
- data/lib/ruic/ripl-after-result.rb +24 -11
- data/lib/ruic/statemachine.rb +3 -2
- data/lib/ruic/version.rb +2 -2
- data/ruic.gemspec +25 -25
- data/test/MetaData-simple.xml +28 -28
- data/test/MetaData.xml +435 -435
- data/test/customclasses.ruic +21 -21
- data/test/filtering.ruic +43 -43
- data/test/futureassets.ruic +8 -8
- data/test/nonmaster.ruic +0 -0
- data/test/paths.ruic +18 -18
- data/test/projects/CustomClasses/CustomClasses.uia +7 -7
- data/test/projects/CustomClasses/FutureAsset.uip +17 -17
- data/test/projects/Paths/Paths.uia +4 -0
- data/test/projects/Paths/Paths.uip +98 -0
- data/test/projects/SimpleScene/SimpleScene.uia +4 -4
- data/test/projects/SimpleScene/SimpleScene.uip +35 -35
- data/test/properties.ruic +82 -82
- data/test/referencematerials.ruic +52 -52
- data/test/usage.ruic +20 -20
- metadata +29 -3
data/test/customclasses.ruic
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
#!/usr/bin/env ruic
|
2
|
-
metadata 'MetaData.xml' # optional; also may be set via -m flag
|
3
|
-
uia 'projects/CustomClasses/CustomClasses.uia' # required before other commands
|
4
|
-
show app.errors if app.errors?
|
5
|
-
|
6
|
-
main = app.main_presentation
|
7
|
-
|
8
|
-
effect = main/"Scene.Layer.Brush Strokes"
|
9
|
-
assert effect
|
10
|
-
assert effect.name == "Brush Strokes"
|
11
|
-
assert effect.properties.length == 11 # 6 shared asset, 1 effect, 4 from effect
|
12
|
-
assert effect['brushAngle'].value == 45
|
13
|
-
assert effect['starttime',1] == 0
|
14
|
-
assert effect['NoiseSamp'].value == 'maps/effects/brushnoise.dds'
|
15
|
-
|
16
|
-
material = main/"Scene.Layer.Rectangle.Material"
|
17
|
-
assert material.properties.length == 12 # 6 shared asset, 2 MaterialBase, 4 from material
|
18
|
-
assert material.name == "Material"
|
19
|
-
assert material['uEnvironmentMappingEnabled']
|
20
|
-
assert !material['ATTRIBUTE-DOES-NOT-EXIST']
|
21
|
-
assert material['uEnvironmentTexture',1] == 'maps/materials/spherical_checker.png'
|
1
|
+
#!/usr/bin/env ruic
|
2
|
+
metadata 'MetaData.xml' # optional; also may be set via -m flag
|
3
|
+
uia 'projects/CustomClasses/CustomClasses.uia' # required before other commands
|
4
|
+
show app.errors if app.errors?
|
5
|
+
|
6
|
+
main = app.main_presentation
|
7
|
+
|
8
|
+
effect = main/"Scene.Layer.Brush Strokes"
|
9
|
+
assert effect
|
10
|
+
assert effect.name == "Brush Strokes"
|
11
|
+
assert effect.properties.length == 11 # 6 shared asset, 1 effect, 4 from effect
|
12
|
+
assert effect['brushAngle'].value == 45
|
13
|
+
assert effect['starttime',1] == 0
|
14
|
+
assert effect['NoiseSamp'].value == 'maps/effects/brushnoise.dds'
|
15
|
+
|
16
|
+
material = main/"Scene.Layer.Rectangle.Material"
|
17
|
+
assert material.properties.length == 12 # 6 shared asset, 2 MaterialBase, 4 from material
|
18
|
+
assert material.name == "Material"
|
19
|
+
assert material['uEnvironmentMappingEnabled']
|
20
|
+
assert !material['ATTRIBUTE-DOES-NOT-EXIST']
|
21
|
+
assert material['uEnvironmentTexture',1] == 'maps/materials/spherical_checker.png'
|
data/test/filtering.ruic
CHANGED
@@ -1,44 +1,44 @@
|
|
1
|
-
metadata 'MetaData.xml'
|
2
|
-
|
3
|
-
uia 'projects/SimpleScene/SimpleScene.uia'
|
4
|
-
show app.errors if app.errors?
|
5
|
-
|
6
|
-
main = app.main_presentation
|
7
|
-
|
8
|
-
assert main.find( _type:'Model' ).length==4
|
9
|
-
assert main.find( _type:'Model', _slide:0 ).length==3
|
10
|
-
assert main.find( _type:'Model', _slide:1 ).length==4
|
11
|
-
assert main.find( _type:'Model', _slide:1, _master:false ).length==1
|
12
|
-
assert main.find( _type:'Model', position:[-150,60,0] ).length==2
|
13
|
-
assert main.find( _type:'Model', position:[-150,60,0] ).length==2
|
14
|
-
assert main.find( _type:'Model', position:[nil,60,nil] ).length==4
|
15
|
-
assert main.find( _type:'Model', sourcepath:'#Cube' ).length==1
|
16
|
-
assert main.find( _under:main/"Scene.Layer.Sphere1" ).length==1
|
17
|
-
assert main.find( name:'Material' ).length==4
|
18
|
-
assert main.find( name:/^Sphere/ ).length==2
|
19
|
-
|
20
|
-
# Return values are in Scene graph order
|
21
|
-
assert main.find.first == main/"Scene"
|
22
|
-
assert main.find.last == main/"Scene.Layer.NonMaster.Material"
|
23
|
-
|
24
|
-
# Any asset can be used as the 'root'
|
25
|
-
sphere = main/"Scene.Layer.Sphere1"
|
26
|
-
assert sphere.find.length==1
|
27
|
-
|
28
|
-
# Supplying a block will iterate, including the index
|
29
|
-
expected = main.find _type:'Model'
|
30
|
-
found = 0
|
31
|
-
main.find _type:'Model' do |mod,i|
|
32
|
-
found += 1
|
33
|
-
assert mod == expected[i]
|
34
|
-
end
|
35
|
-
assert found==4
|
36
|
-
|
37
|
-
#
|
38
|
-
['NOPE',false,/NOPE/,-1,[-1],nil].each do |v|
|
39
|
-
assert main.find(__type:v).length==0
|
40
|
-
assert main.find(NOPE:v).length==0
|
41
|
-
assert main.find('NOPE'=>v).length==0
|
42
|
-
end
|
43
|
-
|
1
|
+
metadata 'MetaData.xml'
|
2
|
+
|
3
|
+
uia 'projects/SimpleScene/SimpleScene.uia'
|
4
|
+
show app.errors if app.errors?
|
5
|
+
|
6
|
+
main = app.main_presentation
|
7
|
+
|
8
|
+
assert main.find( _type:'Model' ).length==4
|
9
|
+
assert main.find( _type:'Model', _slide:0 ).length==3
|
10
|
+
assert main.find( _type:'Model', _slide:1 ).length==4
|
11
|
+
assert main.find( _type:'Model', _slide:1, _master:false ).length==1
|
12
|
+
assert main.find( _type:'Model', position:[-150,60,0] ).length==2
|
13
|
+
assert main.find( _type:'Model', position:[-150,60,0] ).length==2
|
14
|
+
assert main.find( _type:'Model', position:[nil,60,nil] ).length==4
|
15
|
+
assert main.find( _type:'Model', sourcepath:'#Cube' ).length==1
|
16
|
+
assert main.find( _under:main/"Scene.Layer.Sphere1" ).length==1
|
17
|
+
assert main.find( name:'Material' ).length==4
|
18
|
+
assert main.find( name:/^Sphere/ ).length==2
|
19
|
+
|
20
|
+
# Return values are in Scene graph order
|
21
|
+
assert main.find.first == main/"Scene"
|
22
|
+
assert main.find.last == main/"Scene.Layer.NonMaster.Material"
|
23
|
+
|
24
|
+
# Any asset can be used as the 'root'
|
25
|
+
sphere = main/"Scene.Layer.Sphere1"
|
26
|
+
assert sphere.find.length==1
|
27
|
+
|
28
|
+
# Supplying a block will iterate, including the index
|
29
|
+
expected = main.find _type:'Model'
|
30
|
+
found = 0
|
31
|
+
main.find _type:'Model' do |mod,i|
|
32
|
+
found += 1
|
33
|
+
assert mod == expected[i]
|
34
|
+
end
|
35
|
+
assert found==4
|
36
|
+
|
37
|
+
#
|
38
|
+
['NOPE',false,/NOPE/,-1,[-1],nil].each do |v|
|
39
|
+
assert main.find(__type:v).length==0
|
40
|
+
assert main.find(NOPE:v).length==0
|
41
|
+
assert main.find('NOPE'=>v).length==0
|
42
|
+
end
|
43
|
+
|
44
44
|
show "All #{File.basename(__FILE__)} assertions successful."
|
data/test/futureassets.ruic
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
metadata 'MetaData-simple.xml'
|
2
|
-
uia 'projects/CustomClasses/CustomClasses.uia' # required before other commands
|
3
|
-
show app.errors if app.errors?
|
4
|
-
|
5
|
-
future = app["#future"]
|
6
|
-
|
7
|
-
assert xyzzy=future.find(_type:'XYZZY').first
|
8
|
-
assert xyzzy.type == 'XYZZY'
|
1
|
+
metadata 'MetaData-simple.xml'
|
2
|
+
uia 'projects/CustomClasses/CustomClasses.uia' # required before other commands
|
3
|
+
show app.errors if app.errors?
|
4
|
+
|
5
|
+
future = app["#future"]
|
6
|
+
|
7
|
+
assert xyzzy=future.find(_type:'XYZZY').first
|
8
|
+
assert xyzzy.type == 'XYZZY'
|
9
9
|
assert xyzzy['eyeball',0]==true # Unknown assets inherit from Asset
|
data/test/nonmaster.ruic
CHANGED
File without changes
|
data/test/paths.ruic
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
#!/usr/bin/env ruic
|
2
|
-
metadata 'MetaData.xml' # optional; also may be set via -m flag
|
3
|
-
uia 'projects/Paths/Paths.uia' # required before other commands
|
4
|
-
|
5
|
-
show "Uh oh!", app.errors if app.errors?
|
6
|
-
|
7
|
-
main = app.main
|
8
|
-
paths = main.find _type:'Path'
|
9
|
-
assert paths.length == 5
|
10
|
-
assert paths.first == main/"Scene.Layer.Path1"
|
11
|
-
assert paths.first['width'].value == 17
|
12
|
-
|
13
|
-
assert main.find(_type:'PathAnchorPoint').length == 25
|
14
|
-
|
15
|
-
assert paths.first.anchors
|
16
|
-
assert paths.first.anchors.first == paths.first.find(_type:'PathAnchorPoint').first
|
17
|
-
|
18
|
-
|
1
|
+
#!/usr/bin/env ruic
|
2
|
+
metadata 'MetaData.xml' # optional; also may be set via -m flag
|
3
|
+
uia 'projects/Paths/Paths.uia' # required before other commands
|
4
|
+
|
5
|
+
show "Uh oh!", app.errors if app.errors?
|
6
|
+
|
7
|
+
main = app.main
|
8
|
+
paths = main.find _type:'Path'
|
9
|
+
assert paths.length == 5
|
10
|
+
assert paths.first == main/"Scene.Layer.Path1"
|
11
|
+
assert paths.first['width'].value == 17
|
12
|
+
|
13
|
+
assert main.find(_type:'PathAnchorPoint').length == 25
|
14
|
+
|
15
|
+
assert paths.first.anchors
|
16
|
+
assert paths.first.anchors.first == paths.first.find(_type:'PathAnchorPoint').first
|
17
|
+
|
18
|
+
|
19
19
|
show "All assertions successful"
|
@@ -1,7 +1,7 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<application xmlns="http://nvidia.com/uicomposer">
|
3
|
-
<assets initial="CustomClasses">
|
4
|
-
<presentation id="CustomClasses" src="CustomClasses.uip"/>
|
5
|
-
<presentation id="future" src="FutureAsset.uip"/>
|
6
|
-
</assets>
|
7
|
-
</application>
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<application xmlns="http://nvidia.com/uicomposer">
|
3
|
+
<assets initial="CustomClasses">
|
4
|
+
<presentation id="CustomClasses" src="CustomClasses.uip"/>
|
5
|
+
<presentation id="future" src="FutureAsset.uip"/>
|
6
|
+
</assets>
|
7
|
+
</application>
|
@@ -1,17 +1,17 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" ?>
|
2
|
-
<UIP version="3" >
|
3
|
-
<Project >
|
4
|
-
<ProjectSettings author="" company="" presentationWidth="800" presentationHeight="480" maintainAspect="False" />
|
5
|
-
<Graph >
|
6
|
-
<Scene id="Scene" >
|
7
|
-
<XYZZY id="future"/>
|
8
|
-
</Scene>
|
9
|
-
</Graph>
|
10
|
-
<Logic >
|
11
|
-
<State name="Master Slide" component="#Scene" >
|
12
|
-
<Add ref="#future" />
|
13
|
-
<State id="Scene-Slide1" name="Slide1" />
|
14
|
-
</State>
|
15
|
-
</Logic>
|
16
|
-
</Project>
|
17
|
-
</UIP>
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
2
|
+
<UIP version="3" >
|
3
|
+
<Project >
|
4
|
+
<ProjectSettings author="" company="" presentationWidth="800" presentationHeight="480" maintainAspect="False" />
|
5
|
+
<Graph >
|
6
|
+
<Scene id="Scene" >
|
7
|
+
<XYZZY id="future"/>
|
8
|
+
</Scene>
|
9
|
+
</Graph>
|
10
|
+
<Logic >
|
11
|
+
<State name="Master Slide" component="#Scene" >
|
12
|
+
<Add ref="#future" />
|
13
|
+
<State id="Scene-Slide1" name="Slide1" />
|
14
|
+
</State>
|
15
|
+
</Logic>
|
16
|
+
</Project>
|
17
|
+
</UIP>
|
@@ -0,0 +1,98 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
2
|
+
<UIP version="3" >
|
3
|
+
<Project >
|
4
|
+
<ProjectSettings author="" company="" presentationWidth="800" presentationHeight="480" maintainAspect="False" />
|
5
|
+
<Graph >
|
6
|
+
<Scene id="Scene" >
|
7
|
+
<Layer id="Layer" >
|
8
|
+
<Camera id="Camera" />
|
9
|
+
<Light id="Light" />
|
10
|
+
<Path id="Path" >
|
11
|
+
<Material id="M1" />
|
12
|
+
<PathAnchorPoint id="AnchorPoint" name="AnchorPoint" />
|
13
|
+
<PathAnchorPoint id="AnchorPoint_001" name="AnchorPoint" />
|
14
|
+
<PathAnchorPoint id="AnchorPoint_002" name="AnchorPoint" />
|
15
|
+
<PathAnchorPoint id="AnchorPoint_003" name="AnchorPoint" />
|
16
|
+
<PathAnchorPoint id="AnchorPoint_004" name="AnchorPoint" />
|
17
|
+
</Path>
|
18
|
+
<Path id="Path2" >
|
19
|
+
<Material id="M2" />
|
20
|
+
<PathAnchorPoint id="AnchorPoint_005" name="AnchorPoint" />
|
21
|
+
<PathAnchorPoint id="AnchorPoint_006" name="AnchorPoint" />
|
22
|
+
<PathAnchorPoint id="AnchorPoint_007" name="AnchorPoint" />
|
23
|
+
<PathAnchorPoint id="AnchorPoint_008" name="AnchorPoint" />
|
24
|
+
<PathAnchorPoint id="AnchorPoint_009" name="AnchorPoint" />
|
25
|
+
</Path>
|
26
|
+
<Path id="Path3" >
|
27
|
+
<Material id="M3" />
|
28
|
+
<PathAnchorPoint id="AnchorPoint_010" name="AnchorPoint" />
|
29
|
+
<PathAnchorPoint id="AnchorPoint_011" name="AnchorPoint" />
|
30
|
+
<PathAnchorPoint id="AnchorPoint_012" name="AnchorPoint" />
|
31
|
+
<PathAnchorPoint id="AnchorPoint_013" name="AnchorPoint" />
|
32
|
+
<PathAnchorPoint id="AnchorPoint_014" name="AnchorPoint" />
|
33
|
+
</Path>
|
34
|
+
<Path id="Path4" >
|
35
|
+
<Material id="M4" />
|
36
|
+
<PathAnchorPoint id="AnchorPoint_015" name="AnchorPoint" />
|
37
|
+
<PathAnchorPoint id="AnchorPoint_016" name="AnchorPoint" />
|
38
|
+
<PathAnchorPoint id="AnchorPoint_017" name="AnchorPoint" />
|
39
|
+
<PathAnchorPoint id="AnchorPoint_018" name="AnchorPoint" />
|
40
|
+
<PathAnchorPoint id="AnchorPoint_019" name="AnchorPoint" />
|
41
|
+
</Path>
|
42
|
+
<Path id="Path5" >
|
43
|
+
<Material id="M5" />
|
44
|
+
<PathAnchorPoint id="AnchorPoint_020" name="AnchorPoint" />
|
45
|
+
<PathAnchorPoint id="AnchorPoint_021" name="AnchorPoint" />
|
46
|
+
<PathAnchorPoint id="AnchorPoint_022" name="AnchorPoint" />
|
47
|
+
<PathAnchorPoint id="AnchorPoint_023" name="AnchorPoint" />
|
48
|
+
<PathAnchorPoint id="AnchorPoint_024" name="AnchorPoint" />
|
49
|
+
</Path>
|
50
|
+
</Layer>
|
51
|
+
</Scene>
|
52
|
+
</Graph>
|
53
|
+
<Logic >
|
54
|
+
<State name="Master Slide" component="#Scene" >
|
55
|
+
<Add ref="#Layer" multisampleaa="4x" />
|
56
|
+
<Add ref="#Camera" fov="58.1806" position="437 499 -600" />
|
57
|
+
<Add ref="#Light" brightness="50" />
|
58
|
+
<State id="Scene-Slide1" name="Slide1" >
|
59
|
+
<Add ref="#Path" name="Path1" diffuse="2 0 0" opacity="50" width="17" />
|
60
|
+
<Add ref="#M1" name="Path" />
|
61
|
+
<Add ref="#AnchorPoint" incomingcontrol="0 0" outgoingcontrol="-69.5 -36.6" position="1211.2 501.3" />
|
62
|
+
<Add ref="#AnchorPoint_001" incomingcontrol="103.9 2.39999" outgoingcontrol="-103.9 -2.4" position="968.3 425.6" />
|
63
|
+
<Add ref="#AnchorPoint_002" incomingcontrol="199.1 -19.6" outgoingcontrol="-199.1 19.7" position="631.3 465" />
|
64
|
+
<Add ref="#AnchorPoint_003" incomingcontrol="161.1 12.6" outgoingcontrol="-161.1 -12.6" position="90.5 391.5" />
|
65
|
+
<Add ref="#AnchorPoint_004" incomingcontrol="81.8 -50" outgoingcontrol="234.1 -478.8" position="-234.1 478.8" />
|
66
|
+
<Add ref="#Path2" name="Path2" diffuse="3 1.66274 1.50196" opacity="50" position="110 0 0" rotation="-20 -20 0" />
|
67
|
+
<Add ref="#M2" name="Path" />
|
68
|
+
<Add ref="#AnchorPoint_005" incomingcontrol="0 0" outgoingcontrol="-51.5 28.9" position="1218.2 431.5" />
|
69
|
+
<Add ref="#AnchorPoint_006" incomingcontrol="119 9.79999" outgoingcontrol="-119.1 -9.8" position="996.1 479.5" />
|
70
|
+
<Add ref="#AnchorPoint_007" incomingcontrol="188.6 -14.6" outgoingcontrol="-188.6 14.5" position="649.3 411.6" />
|
71
|
+
<Add ref="#AnchorPoint_008" incomingcontrol="161 12.6" outgoingcontrol="-161.1 -12.6" position="95.6 544.9" />
|
72
|
+
<Add ref="#AnchorPoint_009" incomingcontrol="77.7 58.3" outgoingcontrol="221 -415.7" position="-221 415.7" />
|
73
|
+
<Add ref="#Path3" name="Path3" diffuse="2.62745 0 0" opacity="50" rotation="10 10 0" />
|
74
|
+
<Add ref="#M3" name="Path" />
|
75
|
+
<Add ref="#AnchorPoint_010" incomingcontrol="0 0" outgoingcontrol="-87.5 -41.8" position="1259.8 557.6" />
|
76
|
+
<Add ref="#AnchorPoint_011" incomingcontrol="119.1 9.79999" outgoingcontrol="-119.1 -9.8" position="965.7 464.2" />
|
77
|
+
<Add ref="#AnchorPoint_012" incomingcontrol="199.1 -19.7" outgoingcontrol="-199.1 19.7" position="581.4 487.6" />
|
78
|
+
<Add ref="#AnchorPoint_013" incomingcontrol="155 19.4" outgoingcontrol="-155 -19.4" position="60.2 505.5" />
|
79
|
+
<Add ref="#AnchorPoint_014" incomingcontrol="73.4 63.6" outgoingcontrol="241.5 -359" position="-241.5 359" />
|
80
|
+
<Add ref="#Path4" name="Path4" diffuse="3 1.85882 0" opacity="50" rotation="11 0 0" />
|
81
|
+
<Add ref="#M4" name="Path" />
|
82
|
+
<Add ref="#AnchorPoint_015" incomingcontrol="0 0" outgoingcontrol="-71.9 51.6" position="1297.3 406.2" />
|
83
|
+
<Add ref="#AnchorPoint_016" incomingcontrol="139.1 2.5" outgoingcontrol="-139.1 -2.4" position="1014.4 506.9" />
|
84
|
+
<Add ref="#AnchorPoint_017" incomingcontrol="225.7 -1.40002" outgoingcontrol="-225.7 1.4" position="600.7 414.7" />
|
85
|
+
<Add ref="#AnchorPoint_018" incomingcontrol="211.8 47.8" outgoingcontrol="-211.8 -47.8" position="46.7 474.7" />
|
86
|
+
<Add ref="#AnchorPoint_019" incomingcontrol="79.9 95.4" outgoingcontrol="325 -236" position="-325 236" />
|
87
|
+
<Add ref="#Path5" name="Path5" diffuse="2 2 0" opacity="50" rotation="9 6.9 7.9" />
|
88
|
+
<Add ref="#M5" name="Path" />
|
89
|
+
<Add ref="#AnchorPoint_020" incomingcontrol="0 0" outgoingcontrol="-81.5 -61.8" position="1271.6 516.8" />
|
90
|
+
<Add ref="#AnchorPoint_021" incomingcontrol="103.9 2.40002" outgoingcontrol="-103.9 -2.4" position="1004.8 390.8" />
|
91
|
+
<Add ref="#AnchorPoint_022" incomingcontrol="199 -19.7" outgoingcontrol="-199.1 19.7" position="638.9 445.8" />
|
92
|
+
<Add ref="#AnchorPoint_023" incomingcontrol="161.1 12.6" outgoingcontrol="-161.1 -12.6" position="66.8 352.6" />
|
93
|
+
<Add ref="#AnchorPoint_024" incomingcontrol="85 -71.9" outgoingcontrol="264.3 -483.7" position="-264.3 483.7" />
|
94
|
+
</State>
|
95
|
+
</State>
|
96
|
+
</Logic>
|
97
|
+
</Project>
|
98
|
+
</UIP>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<application xmlns="http://nvidia.com/uicomposer">
|
3
|
-
<assets><presentation id="main" src="SimpleScene.uip"/></assets>
|
4
|
-
</application>
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<application xmlns="http://nvidia.com/uicomposer">
|
3
|
+
<assets><presentation id="main" src="SimpleScene.uip"/></assets>
|
4
|
+
</application>
|
@@ -1,35 +1,35 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" ?>
|
2
|
-
<UIP version="3">
|
3
|
-
<Project>
|
4
|
-
<ProjectSettings author="" company="" presentationWidth="800" presentationHeight="480" maintainAspect="False"/>
|
5
|
-
<Graph>
|
6
|
-
<Scene id="Scene">
|
7
|
-
<Layer id="Layer">
|
8
|
-
<Camera id="Camera"/>
|
9
|
-
<Light id="Light"/>
|
10
|
-
<Model id="Sphere"><Material id="Material"/></Model>
|
11
|
-
<Model id="Sphere2"><Material id="Material_001"/></Model>
|
12
|
-
<Model id="Cube"><Material id="Material_002"/></Model>
|
13
|
-
<Model id="Sphere3"><Material id="Material_003"/></Model>
|
14
|
-
</Layer>
|
15
|
-
</Scene>
|
16
|
-
</Graph>
|
17
|
-
<Logic>
|
18
|
-
<State name="Master Slide" component="#Scene">
|
19
|
-
<Add ref="#Layer"/>
|
20
|
-
<Add ref="#Camera"/>
|
21
|
-
<Add ref="#Light"/>
|
22
|
-
<Add ref="#Sphere" name="Sphere1" position="-150 60 0" sourcepath="#Sphere"/>
|
23
|
-
<Add ref="#Material" diffuse="0 0.752941 0"/>
|
24
|
-
<Add ref="#Sphere2" name="Sphere2" position="150 60.0004 0" sourcepath="#Sphere"/>
|
25
|
-
<Add ref="#Material_001" diffuse="0 0.75287 0"/>
|
26
|
-
<Add ref="#Cube" name="Cube" position="0 60 0" rotation="-30 60 -20" sourcepath="#Cube"/>
|
27
|
-
<Add ref="#Material_002" name="Material" diffuse="0.5 0 0"/>
|
28
|
-
<State id="Scene-Slide1" name="Slide1">
|
29
|
-
<Add ref="#Sphere3" name="NonMaster" position="-150 60 0" sourcepath="#Sphere"/>
|
30
|
-
<Add ref="#Material_003" diffuse="0 0.752941 0"/>
|
31
|
-
</State>
|
32
|
-
</State>
|
33
|
-
</Logic>
|
34
|
-
</Project>
|
35
|
-
</UIP>
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
2
|
+
<UIP version="3">
|
3
|
+
<Project>
|
4
|
+
<ProjectSettings author="" company="" presentationWidth="800" presentationHeight="480" maintainAspect="False"/>
|
5
|
+
<Graph>
|
6
|
+
<Scene id="Scene">
|
7
|
+
<Layer id="Layer">
|
8
|
+
<Camera id="Camera"/>
|
9
|
+
<Light id="Light"/>
|
10
|
+
<Model id="Sphere"><Material id="Material"/></Model>
|
11
|
+
<Model id="Sphere2"><Material id="Material_001"/></Model>
|
12
|
+
<Model id="Cube"><Material id="Material_002"/></Model>
|
13
|
+
<Model id="Sphere3"><Material id="Material_003"/></Model>
|
14
|
+
</Layer>
|
15
|
+
</Scene>
|
16
|
+
</Graph>
|
17
|
+
<Logic>
|
18
|
+
<State name="Master Slide" component="#Scene">
|
19
|
+
<Add ref="#Layer"/>
|
20
|
+
<Add ref="#Camera"/>
|
21
|
+
<Add ref="#Light"/>
|
22
|
+
<Add ref="#Sphere" name="Sphere1" position="-150 60 0" sourcepath="#Sphere"/>
|
23
|
+
<Add ref="#Material" diffuse="0 0.752941 0"/>
|
24
|
+
<Add ref="#Sphere2" name="Sphere2" position="150 60.0004 0" sourcepath="#Sphere"/>
|
25
|
+
<Add ref="#Material_001" diffuse="0 0.75287 0"/>
|
26
|
+
<Add ref="#Cube" name="Cube" position="0 60 0" rotation="-30 60 -20" sourcepath="#Cube"/>
|
27
|
+
<Add ref="#Material_002" name="Material" diffuse="0.5 0 0"/>
|
28
|
+
<State id="Scene-Slide1" name="Slide1">
|
29
|
+
<Add ref="#Sphere3" name="NonMaster" position="-150 60 0" sourcepath="#Sphere"/>
|
30
|
+
<Add ref="#Material_003" diffuse="0 0.752941 0"/>
|
31
|
+
</State>
|
32
|
+
</State>
|
33
|
+
</Logic>
|
34
|
+
</Project>
|
35
|
+
</UIP>
|
data/test/properties.ruic
CHANGED
@@ -1,82 +1,82 @@
|
|
1
|
-
#!/usr/bin/env ruic
|
2
|
-
metadata 'MetaData.xml' # optional; also may be set via -m flag
|
3
|
-
uia 'projects/BMW_Cluster/BMW_Cluster.uia' # required before other commands
|
4
|
-
|
5
|
-
show "Uh oh!", app.errors if app.errors?
|
6
|
-
|
7
|
-
assert app.filename == 'BMW_Cluster.uia'
|
8
|
-
assert app.assets.length==10, "There should be 10 assets"
|
9
|
-
assert app.behaviors.length==3
|
10
|
-
assert app.presentations.length==6
|
11
|
-
|
12
|
-
assert app['#logic']
|
13
|
-
assert app['#logic'].datamodel=='{output=output}'
|
14
|
-
assert app['#logic']==app['states/logic.scxml']
|
15
|
-
assert app['#logic']==app['./states/logic.scxml']
|
16
|
-
assert app['#logic']==app['../BMW_Cluster/states/logic.scxml']
|
17
|
-
|
18
|
-
main = app['#main'] # Look up a presentation by asset id
|
19
|
-
assert main == app.main_presentation # …or ask for the main rendered presentation
|
20
|
-
assert main == app.main # …also available as a shortcut name
|
21
|
-
assert main.filename == 'BMW_Cluster.uip' # You can also ask for the full path via .file
|
22
|
-
assert main == app['BMW_Cluster.uip'] # Look up a presentation by asset id
|
23
|
-
|
24
|
-
assert !app['beejonkers'] # If an asset id doesn't exist, you'll get nil
|
25
|
-
|
26
|
-
scene = app/'main:Scene'
|
27
|
-
assert scene
|
28
|
-
assert scene==main.scene
|
29
|
-
assert scene.type == 'Scene'
|
30
|
-
assert scene.name == 'Scene'
|
31
|
-
assert scene['name'].value == 'Scene'
|
32
|
-
|
33
|
-
# Find an element based on path, prefixed with asset id
|
34
|
-
sm = app/'main:Scene.ClassicContent.ClassicContent.SimpleMedia'
|
35
|
-
assert sm.name == 'SimpleMedia'
|
36
|
-
assert sm.type == 'Model'
|
37
|
-
assert sm.path == 'main:Scene.ClassicContent.ClassicContent.SimpleMedia'
|
38
|
-
|
39
|
-
assert sm==main/'Scene.ClassicContent.ClassicContent.SimpleMedia'
|
40
|
-
|
41
|
-
assert sm.component == (main/'Scene.ClassicContent.ClassicContent')
|
42
|
-
assert sm.component.slides.length==2
|
43
|
-
assert sm.component.slides[0].name == 'Master Slide'
|
44
|
-
assert sm.component.slides[0].index == 0
|
45
|
-
assert sm.component.slides[2].name == 'CarStatus'
|
46
|
-
assert sm.component.slides[2].index == 2
|
47
|
-
assert sm.component.slides['CarStatus'].name == 'CarStatus'
|
48
|
-
assert sm.component.slides['CarStatus'] == sm.component.slides[2]
|
49
|
-
|
50
|
-
assert sm['endtime',0]==250
|
51
|
-
assert sm['endtime',1]==500
|
52
|
-
assert sm['endtime','SimpleMedia']==500
|
53
|
-
assert sm['endtime','CarStatus' ]==250
|
54
|
-
assert sm['endtime',99].nil?
|
55
|
-
|
56
|
-
assert sm['position'].linked?
|
57
|
-
assert !sm['endtime'].linked?
|
58
|
-
assert sm['endtime'].values == [250,500,250]
|
59
|
-
assert sm['endtime'].value == 250
|
60
|
-
|
61
|
-
assert sm['endtime',1]==500
|
62
|
-
assert sm['endtime','SimpleMedia']==500
|
63
|
-
assert sm['endtime','CarStatus' ]==250
|
64
|
-
|
65
|
-
sm['endtime','CarStatus'] = 750
|
66
|
-
assert sm['endtime','SimpleMedia']==500
|
67
|
-
assert sm['endtime','CarStatus' ]==750
|
68
|
-
|
69
|
-
sm['endtime'] = 100
|
70
|
-
assert sm['endtime',0]==100
|
71
|
-
assert sm['endtime',1]==100
|
72
|
-
assert sm['endtime',2]==100
|
73
|
-
|
74
|
-
assert sm['position',0].x==0
|
75
|
-
assert sm['scale',0].y == 2.88
|
76
|
-
|
77
|
-
sm['position',0].x=42
|
78
|
-
assert sm['position',0].x==42
|
79
|
-
|
80
|
-
sm['position',0].y=17
|
81
|
-
assert sm['position',0].y==17
|
82
|
-
assert sm['position',0].x==42
|
1
|
+
#!/usr/bin/env ruic
|
2
|
+
metadata 'MetaData.xml' # optional; also may be set via -m flag
|
3
|
+
uia 'projects/BMW_Cluster/BMW_Cluster.uia' # required before other commands
|
4
|
+
|
5
|
+
show "Uh oh!", app.errors if app.errors?
|
6
|
+
|
7
|
+
assert app.filename == 'BMW_Cluster.uia'
|
8
|
+
assert app.assets.length==10, "There should be 10 assets"
|
9
|
+
assert app.behaviors.length==3
|
10
|
+
assert app.presentations.length==6
|
11
|
+
|
12
|
+
assert app['#logic']
|
13
|
+
assert app['#logic'].datamodel=='{output=output}'
|
14
|
+
assert app['#logic']==app['states/logic.scxml']
|
15
|
+
assert app['#logic']==app['./states/logic.scxml']
|
16
|
+
assert app['#logic']==app['../BMW_Cluster/states/logic.scxml']
|
17
|
+
|
18
|
+
main = app['#main'] # Look up a presentation by asset id
|
19
|
+
assert main == app.main_presentation # …or ask for the main rendered presentation
|
20
|
+
assert main == app.main # …also available as a shortcut name
|
21
|
+
assert main.filename == 'BMW_Cluster.uip' # You can also ask for the full path via .file
|
22
|
+
assert main == app['BMW_Cluster.uip'] # Look up a presentation by asset id
|
23
|
+
|
24
|
+
assert !app['beejonkers'] # If an asset id doesn't exist, you'll get nil
|
25
|
+
|
26
|
+
scene = app/'main:Scene'
|
27
|
+
assert scene
|
28
|
+
assert scene==main.scene
|
29
|
+
assert scene.type == 'Scene'
|
30
|
+
assert scene.name == 'Scene'
|
31
|
+
assert scene['name'].value == 'Scene'
|
32
|
+
|
33
|
+
# Find an element based on path, prefixed with asset id
|
34
|
+
sm = app/'main:Scene.ClassicContent.ClassicContent.SimpleMedia'
|
35
|
+
assert sm.name == 'SimpleMedia'
|
36
|
+
assert sm.type == 'Model'
|
37
|
+
assert sm.path == 'main:Scene.ClassicContent.ClassicContent.SimpleMedia'
|
38
|
+
|
39
|
+
assert sm==main/'Scene.ClassicContent.ClassicContent.SimpleMedia'
|
40
|
+
|
41
|
+
assert sm.component == (main/'Scene.ClassicContent.ClassicContent')
|
42
|
+
assert sm.component.slides.length==2
|
43
|
+
assert sm.component.slides[0].name == 'Master Slide'
|
44
|
+
assert sm.component.slides[0].index == 0
|
45
|
+
assert sm.component.slides[2].name == 'CarStatus'
|
46
|
+
assert sm.component.slides[2].index == 2
|
47
|
+
assert sm.component.slides['CarStatus'].name == 'CarStatus'
|
48
|
+
assert sm.component.slides['CarStatus'] == sm.component.slides[2]
|
49
|
+
|
50
|
+
assert sm['endtime',0]==250
|
51
|
+
assert sm['endtime',1]==500
|
52
|
+
assert sm['endtime','SimpleMedia']==500
|
53
|
+
assert sm['endtime','CarStatus' ]==250
|
54
|
+
assert sm['endtime',99].nil?
|
55
|
+
|
56
|
+
assert sm['position'].linked?
|
57
|
+
assert !sm['endtime'].linked?
|
58
|
+
assert sm['endtime'].values == [250,500,250]
|
59
|
+
assert sm['endtime'].value == 250
|
60
|
+
|
61
|
+
assert sm['endtime',1]==500
|
62
|
+
assert sm['endtime','SimpleMedia']==500
|
63
|
+
assert sm['endtime','CarStatus' ]==250
|
64
|
+
|
65
|
+
sm['endtime','CarStatus'] = 750
|
66
|
+
assert sm['endtime','SimpleMedia']==500
|
67
|
+
assert sm['endtime','CarStatus' ]==750
|
68
|
+
|
69
|
+
sm['endtime'] = 100
|
70
|
+
assert sm['endtime',0]==100
|
71
|
+
assert sm['endtime',1]==100
|
72
|
+
assert sm['endtime',2]==100
|
73
|
+
|
74
|
+
assert sm['position',0].x==0
|
75
|
+
assert sm['scale',0].y == 2.88
|
76
|
+
|
77
|
+
sm['position',0].x=42
|
78
|
+
assert sm['position',0].x==42
|
79
|
+
|
80
|
+
sm['position',0].y=17
|
81
|
+
assert sm['position',0].y==17
|
82
|
+
assert sm['position',0].x==42
|