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
@@ -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,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: RUIC
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gavin Kistner
|
@@ -167,6 +167,8 @@ files:
|
|
167
167
|
- test/projects/CustomClasses/maps/UV-Checker.png
|
168
168
|
- test/projects/CustomClasses/maps/effects/brushnoise.dds
|
169
169
|
- test/projects/CustomClasses/maps/materials/spherical_checker.png
|
170
|
+
- test/projects/Paths/Paths.uia
|
171
|
+
- test/projects/Paths/Paths.uip
|
170
172
|
- test/projects/ReferencedMaterials/ReferencedMaterials.uia
|
171
173
|
- test/projects/ReferencedMaterials/ReferencedMaterials.uip
|
172
174
|
- test/projects/SimpleScene/SimpleScene.uia
|
@@ -194,9 +196,33 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
194
196
|
version: '0'
|
195
197
|
requirements: []
|
196
198
|
rubyforge_project:
|
197
|
-
rubygems_version: 2.
|
199
|
+
rubygems_version: 2.4.2
|
198
200
|
signing_key:
|
199
201
|
specification_version: 4
|
200
202
|
summary: Library and DSL analyzing and manipulating UI Composer applications and presentations.
|
201
|
-
test_files:
|
203
|
+
test_files:
|
204
|
+
- test/MetaData-simple.xml
|
205
|
+
- test/MetaData.xml
|
206
|
+
- test/customclasses.ruic
|
207
|
+
- test/filtering.ruic
|
208
|
+
- test/futureassets.ruic
|
209
|
+
- test/nonmaster.ruic
|
210
|
+
- test/paths.ruic
|
211
|
+
- test/projects/CustomClasses/Brush Strokes.effect
|
212
|
+
- test/projects/CustomClasses/CustomClasses.uia
|
213
|
+
- test/projects/CustomClasses/CustomClasses.uip
|
214
|
+
- test/projects/CustomClasses/FutureAsset.uip
|
215
|
+
- test/projects/CustomClasses/copper.material
|
216
|
+
- test/projects/CustomClasses/maps/UV-Checker.png
|
217
|
+
- test/projects/CustomClasses/maps/effects/brushnoise.dds
|
218
|
+
- test/projects/CustomClasses/maps/materials/spherical_checker.png
|
219
|
+
- test/projects/Paths/Paths.uia
|
220
|
+
- test/projects/Paths/Paths.uip
|
221
|
+
- test/projects/ReferencedMaterials/ReferencedMaterials.uia
|
222
|
+
- test/projects/ReferencedMaterials/ReferencedMaterials.uip
|
223
|
+
- test/projects/SimpleScene/SimpleScene.uia
|
224
|
+
- test/projects/SimpleScene/SimpleScene.uip
|
225
|
+
- test/properties.ruic
|
226
|
+
- test/referencematerials.ruic
|
227
|
+
- test/usage.ruic
|
202
228
|
has_rdoc:
|