RUIC 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +252 -207
- 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 +20 -16
- data/lib/ruic/application.rb +0 -0
- data/lib/ruic/assets.rb +281 -281
- data/lib/ruic/attributes.rb +164 -164
- data/lib/ruic/behaviors.rb +0 -0
- data/lib/ruic/interfaces.rb +0 -0
- data/lib/ruic/presentation.rb +0 -0
- data/lib/ruic/statemachine.rb +0 -0
- data/lib/ruic/version.rb +2 -2
- data/ruic.gemspec +25 -24
- data/test/customclasses.ruic +0 -0
- data/test/filtering.ruic +38 -38
- data/test/nonmaster.ruic +0 -0
- data/test/projects/SimpleScene/SimpleScene.uia +4 -0
- data/test/projects/SimpleScene/SimpleScene.uip +35 -0
- data/test/properties.ruic +0 -0
- data/test/referencematerials.ruic +52 -52
- data/test/usage.ruic +20 -20
- metadata +38 -4
data/test/nonmaster.ruic
CHANGED
File without changes
|
@@ -0,0 +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>
|
data/test/properties.ruic
CHANGED
File without changes
|
@@ -1,52 +1,52 @@
|
|
1
|
-
require 'fileutils'
|
2
|
-
FileUtils.copy_entry('projects/ReferencedMaterials','projects/_RefMat',false,false,true)
|
3
|
-
|
4
|
-
metadata 'MetaData.xml'
|
5
|
-
|
6
|
-
uia 'projects/_RefMat/ReferencedMaterials.uia'
|
7
|
-
show app.errors if app.errors?
|
8
|
-
|
9
|
-
layer = app/'main:Scene.Layer'
|
10
|
-
cubemat = layer/"Cube"/"Material"
|
11
|
-
|
12
|
-
# Ensure that the diffuse attribute is linked and present on multiple slides
|
13
|
-
assert cubemat['diffuse'].linked?
|
14
|
-
assert cubemat.has_slide?(0)
|
15
|
-
assert cubemat.has_slide?(1)
|
16
|
-
assert cubemat.has_slide?(2)
|
17
|
-
assert cubemat['diffuse',1].r == 0.5
|
18
|
-
assert cubemat['diffuse',2].r == 0.5
|
19
|
-
|
20
|
-
# When we do not unlink, values remain shared
|
21
|
-
cubemat['diffuse',1].r = 1
|
22
|
-
cubemat['diffuse',2].r = 0.2
|
23
|
-
assert cubemat['diffuse',1].r == cubemat['diffuse',2].r
|
24
|
-
|
25
|
-
# Ensure that we can unlink an attribute and vary the values per slide
|
26
|
-
cubemat['diffuse'].unlink
|
27
|
-
assert !cubemat['diffuse'].linked?
|
28
|
-
cubemat['diffuse',1].r = 1
|
29
|
-
cubemat['diffuse',2].r = 0.2
|
30
|
-
assert cubemat['diffuse',1].r == 1
|
31
|
-
assert cubemat['diffuse',2].r == 0.2
|
32
|
-
|
33
|
-
# We can swap a material with a referenced material
|
34
|
-
model = cubemat.parent
|
35
|
-
assert model
|
36
|
-
ref = cubemat.replace_with_referenced_material
|
37
|
-
assert cubemat.parent.nil? # The old material is removed from the graph
|
38
|
-
assert ref.parent==model # The new material is where the old was
|
39
|
-
assert ref['id'] == cubemat['id'] # The new material has the same id and name
|
40
|
-
assert ref.name == 'Material'
|
41
|
-
assert ref['referencedmaterial',0].object.nil? # New referenced materials start out with no reference
|
42
|
-
assert ref['referencedmaterial',0].type == :absolute # New references default to absolute
|
43
|
-
|
44
|
-
ref['referencedmaterial'].unlink
|
45
|
-
%w[Sphere Sphere2].each.with_index do |name,s|
|
46
|
-
# You can set a reference directly to an object, or alternatively
|
47
|
-
# ref['referencedmaterial',1].object = layer/name/"Material"
|
48
|
-
ref['referencedmaterial',s+1] = layer/name/"Material"
|
49
|
-
ref['referencedmaterial',s+1].type = :path
|
50
|
-
end
|
51
|
-
|
52
|
-
app.save_all!
|
1
|
+
require 'fileutils'
|
2
|
+
FileUtils.copy_entry('projects/ReferencedMaterials','projects/_RefMat',false,false,true)
|
3
|
+
|
4
|
+
metadata 'MetaData.xml'
|
5
|
+
|
6
|
+
uia 'projects/_RefMat/ReferencedMaterials.uia'
|
7
|
+
show app.errors if app.errors?
|
8
|
+
|
9
|
+
layer = app/'main:Scene.Layer'
|
10
|
+
cubemat = layer/"Cube"/"Material"
|
11
|
+
|
12
|
+
# Ensure that the diffuse attribute is linked and present on multiple slides
|
13
|
+
assert cubemat['diffuse'].linked?
|
14
|
+
assert cubemat.has_slide?(0)
|
15
|
+
assert cubemat.has_slide?(1)
|
16
|
+
assert cubemat.has_slide?(2)
|
17
|
+
assert cubemat['diffuse',1].r == 0.5
|
18
|
+
assert cubemat['diffuse',2].r == 0.5
|
19
|
+
|
20
|
+
# When we do not unlink, values remain shared
|
21
|
+
cubemat['diffuse',1].r = 1
|
22
|
+
cubemat['diffuse',2].r = 0.2
|
23
|
+
assert cubemat['diffuse',1].r == cubemat['diffuse',2].r
|
24
|
+
|
25
|
+
# Ensure that we can unlink an attribute and vary the values per slide
|
26
|
+
cubemat['diffuse'].unlink
|
27
|
+
assert !cubemat['diffuse'].linked?
|
28
|
+
cubemat['diffuse',1].r = 1
|
29
|
+
cubemat['diffuse',2].r = 0.2
|
30
|
+
assert cubemat['diffuse',1].r == 1
|
31
|
+
assert cubemat['diffuse',2].r == 0.2
|
32
|
+
|
33
|
+
# We can swap a material with a referenced material
|
34
|
+
model = cubemat.parent
|
35
|
+
assert model
|
36
|
+
ref = cubemat.replace_with_referenced_material
|
37
|
+
assert cubemat.parent.nil? # The old material is removed from the graph
|
38
|
+
assert ref.parent==model # The new material is where the old was
|
39
|
+
assert ref['id'] == cubemat['id'] # The new material has the same id and name
|
40
|
+
assert ref.name == 'Material'
|
41
|
+
assert ref['referencedmaterial',0].object.nil? # New referenced materials start out with no reference
|
42
|
+
assert ref['referencedmaterial',0].type == :absolute # New references default to absolute
|
43
|
+
|
44
|
+
ref['referencedmaterial'].unlink
|
45
|
+
%w[Sphere Sphere2].each.with_index do |name,s|
|
46
|
+
# You can set a reference directly to an object, or alternatively
|
47
|
+
# ref['referencedmaterial',1].object = layer/name/"Material"
|
48
|
+
ref['referencedmaterial',s+1] = layer/name/"Material"
|
49
|
+
ref['referencedmaterial',s+1].type = :path
|
50
|
+
end
|
51
|
+
|
52
|
+
app.save_all!
|
data/test/usage.ruic
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
metadata 'MetaData.xml' # optional; also may be set via -m flag
|
2
|
-
# uia 'projects/CustomClasses/CustomClasses.uia' # required before other commands
|
3
|
-
uia 'projects/BMW_Cluster/BMW_Cluster.uia' # required before other commands
|
4
|
-
show app.errors if app.errors?
|
5
|
-
|
6
|
-
show app.image_usage # hash mapping image paths, relative to uia, to arrays of things referencing them: materials; scxml visual actions; effects;
|
7
|
-
show app.image_paths # Just the paths
|
8
|
-
show app.mesh_usage # mapping mesh paths (postfixed with version numbers) to referencing elements
|
9
|
-
show app.mesh_paths # Just the paths (no version number information)
|
10
|
-
show app.script_usage # hash mapping lua paths, relative to uia, to arrays of things referencing them: presentation/application behaviors
|
11
|
-
show app.script_paths # just the paths
|
12
|
-
show app.material_usage # hash mapping materials paths, relative to uia, to arrays referencing material elements
|
13
|
-
show app.material_paths # just the paths
|
14
|
-
show app.font_usage # hash mapping font paths, relative to uia, to arrays of referencing text elements
|
15
|
-
show app.font_paths # just the paths
|
16
|
-
show app.effect_usage # hash mapping effect paths, relative to uia, to arrays of referencing effect elements
|
17
|
-
show app.effect_paths # just the paths
|
18
|
-
|
19
|
-
show app.referenced_paths
|
20
|
-
show app.unused_files # Remember to check for .uip and .scxml not referenced by .uia
|
1
|
+
metadata 'MetaData.xml' # optional; also may be set via -m flag
|
2
|
+
# uia 'projects/CustomClasses/CustomClasses.uia' # required before other commands
|
3
|
+
uia 'projects/BMW_Cluster/BMW_Cluster.uia' # required before other commands
|
4
|
+
show app.errors if app.errors?
|
5
|
+
|
6
|
+
show app.image_usage # hash mapping image paths, relative to uia, to arrays of things referencing them: materials; scxml visual actions; effects;
|
7
|
+
show app.image_paths # Just the paths
|
8
|
+
show app.mesh_usage # mapping mesh paths (postfixed with version numbers) to referencing elements
|
9
|
+
show app.mesh_paths # Just the paths (no version number information)
|
10
|
+
show app.script_usage # hash mapping lua paths, relative to uia, to arrays of things referencing them: presentation/application behaviors
|
11
|
+
show app.script_paths # just the paths
|
12
|
+
show app.material_usage # hash mapping materials paths, relative to uia, to arrays referencing material elements
|
13
|
+
show app.material_paths # just the paths
|
14
|
+
show app.font_usage # hash mapping font paths, relative to uia, to arrays of referencing text elements
|
15
|
+
show app.font_paths # just the paths
|
16
|
+
show app.effect_usage # hash mapping effect paths, relative to uia, to arrays of referencing effect elements
|
17
|
+
show app.effect_paths # just the paths
|
18
|
+
|
19
|
+
show app.referenced_paths
|
20
|
+
show app.unused_files # Remember to check for .uip and .scxml not referenced by .uia
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: RUIC
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gavin Kistner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: ripl-irb
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
description: RUIC is a library that understands the XML formats used by NVIDIA's "UI
|
56
70
|
Composer" tool suite. In addition to APIs for analyzing and manipulating these files—the
|
57
71
|
UIC portion of the library—it also includes a mini DSL for writing scripts that
|
@@ -149,6 +163,8 @@ files:
|
|
149
163
|
- test/projects/CustomClasses/maps/materials/spherical_checker.png
|
150
164
|
- test/projects/ReferencedMaterials/ReferencedMaterials.uia
|
151
165
|
- test/projects/ReferencedMaterials/ReferencedMaterials.uip
|
166
|
+
- test/projects/SimpleScene/SimpleScene.uia
|
167
|
+
- test/projects/SimpleScene/SimpleScene.uip
|
152
168
|
- test/properties.ruic
|
153
169
|
- test/referencematerials.ruic
|
154
170
|
- test/usage.ruic
|
@@ -172,8 +188,26 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
172
188
|
version: '0'
|
173
189
|
requirements: []
|
174
190
|
rubyforge_project:
|
175
|
-
rubygems_version: 2.
|
191
|
+
rubygems_version: 2.4.2
|
176
192
|
signing_key:
|
177
193
|
specification_version: 4
|
178
194
|
summary: Library and DSL analyzing and manipulating UI Composer applications and presentations.
|
179
|
-
test_files:
|
195
|
+
test_files:
|
196
|
+
- test/MetaData.xml
|
197
|
+
- test/customclasses.ruic
|
198
|
+
- test/filtering.ruic
|
199
|
+
- test/nonmaster.ruic
|
200
|
+
- test/projects/CustomClasses/Brush Strokes.effect
|
201
|
+
- test/projects/CustomClasses/CustomClasses.uia
|
202
|
+
- test/projects/CustomClasses/CustomClasses.uip
|
203
|
+
- test/projects/CustomClasses/copper.material
|
204
|
+
- test/projects/CustomClasses/maps/UV-Checker.png
|
205
|
+
- test/projects/CustomClasses/maps/effects/brushnoise.dds
|
206
|
+
- test/projects/CustomClasses/maps/materials/spherical_checker.png
|
207
|
+
- test/projects/ReferencedMaterials/ReferencedMaterials.uia
|
208
|
+
- test/projects/ReferencedMaterials/ReferencedMaterials.uip
|
209
|
+
- test/projects/SimpleScene/SimpleScene.uia
|
210
|
+
- test/projects/SimpleScene/SimpleScene.uip
|
211
|
+
- test/properties.ruic
|
212
|
+
- test/referencematerials.ruic
|
213
|
+
- test/usage.ruic
|