RUIC 0.4.4 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3cd982f65f8cae25edc67f0619f9a5f11d36fd89
4
- data.tar.gz: 5600614882179d970952c0d67bc428a8e7f8ee73
3
+ metadata.gz: b65a0da81a7fc48e6d4ddd39c3c3a9bfd943cdc8
4
+ data.tar.gz: 19f566756b7e1692fa21dee2174679090d4e52e5
5
5
  SHA512:
6
- metadata.gz: 4aa749d218b876a2a13261063989ca02ee57dace463b291f80328673d7207622b49bd5e93ceb21c010f7b443230d0f31079e6d85779f41e2d8ba0d2bcd5aaaf7
7
- data.tar.gz: 97fdefc32b8356d2c8ca48d40c1cc19a3fc954564810677e64d331151077a1e3f66cce981d19ae26179a10ab578f4c4f53e3602793b1ed28564bf9642c6416d4
6
+ metadata.gz: 235f835326aa13a3d4f772b06b9f337b50990a00359492c047dbbc5cac9bbff18a621b3ec860d5bd526430dea3c2a1ce27f7b9e1a95804830dd3622bd2e640e6
7
+ data.tar.gz: c6b31e3dceb76d886f31545e7e0b0dc598344756d17a1f8d6c281c339510f74bf95bf1e74f6d50a51b33136b769fd70e8746a306ec946f5c0be4820d31950767
data/.yardopts CHANGED
@@ -1,4 +1,4 @@
1
- --no-private
2
- --markup markdown
3
- lib/**/*.rb -
1
+ --no-private
2
+ --markup markdown
3
+ lib/**/*.rb -
4
4
  README.md LICENSE
data/HISTORY ADDED
@@ -0,0 +1,52 @@
1
+ ## v0.4.5 - 2014-Nov-19
2
+
3
+ * Added a large amount of documentation.
4
+ * Minor code refactoring:
5
+ * Most (internal) Presentation methods that took a scene graph element as the argument now take an asset.
6
+ * All `FileBacked` assets now have `save!` and `save_as`.
7
+
8
+ ## v0.4.1 - 2014-Nov-16
9
+
10
+ * Update `MetaData.xml` for tests to newest version.
11
+ * Source paths for images/textures normalize the path (forward slashes and no leading `./`).
12
+ * Added `app.main` as a simpler alias for `app.main_presentation`.
13
+ * Add support for paths and anchor points, including `mypath.anchors` as an array of anchor points.
14
+ * Assets present in MetaData and presentation, but not yet hand-entered into the hierarchy, now work and default to inherit from `Asset`.
15
+
16
+ ## v0.4.0 - 2014-Nov-11
17
+ * Switch attribute filtering again; now all attributes are inline in the `find()` hash, and the four special keys are prefixed with an underscore: `_type`, `_slide`, `_master`, and `_under`.
18
+
19
+ ## v0.3.0 - 2014-Nov-10
20
+ * Switch attribute filtering to use `attr:{ … }` instead of `attributes:{ … }`
21
+ * Attribute matching now requires that a requested attribute be present, or else the asset matching fails.
22
+ * _For example, `main.find attr:{ diffusecolor:[nil,nil,nil] }` will now only find assets with a `diffusecolor` attribute._
23
+
24
+ ## v0.2.5 - 2014-Nov-10
25
+ * Re-adds blank line after REPL result.
26
+
27
+ ## v0.2.4 - 2014-Nov-10
28
+ * Fix bug with history editing in REPL (prompts no longer have a blank line before)
29
+ * Add temporary hack to make projects using Float2 load correctly
30
+
31
+ ## v0.2.3 - 2014-Nov-7
32
+ * Cleaner mechanism for creating a truly blank binding
33
+
34
+ ## v0.2.2 - 2014-Nov-7
35
+ * REPL shows version number when it starts
36
+
37
+ ## v0.2.1 - 2014-Nov-7
38
+ * REPL mode after script maintains binding of script (all local variables remain available)
39
+ * Customized `.irbrc` files will not cause warnings
40
+
41
+ ## v0.2.0 - 2014-Nov-7
42
+ * Add Presentation#save_as
43
+ * REPL working directory is same as .uia
44
+
45
+ ## v0.1.0 - 2014-Nov-7
46
+ * Add REPL mode for ruic binary
47
+
48
+ ## v0.0.1 - 2014-Nov-7
49
+ * Initial gem release
50
+ * Crawl presentations and modify attributes
51
+ * Batch find assets
52
+ * Save presentation changes back to disk
data/README.md CHANGED
@@ -1,278 +1,219 @@
1
- # What is RUIC?
2
- RUIC is a Ruby API for reading, analyzing, and manipulating application assets created by NVIDIA's [UI Composer][1]. Among other things, it allows you to:
3
-
4
- * See if an application is missing any assets (e.g. images or meshes) and what parts of the application are looking for those.
5
- * See if there are any files in the application folder that you can delete (e.g. images or materials that are no longer being used).
6
- * Read and modify the attributes of elements on different slides.
7
- * Batch change attributes (e.g. change all usage of one font or color to another).
8
- * Procedurally generate many models with automated placement in your scene.
9
-
10
- _Some of the features above are planned, but not yet implemented; see Known Limitations below._
11
-
12
- ## Table of Contents
13
- * [Installing RUIC](#installing-ruic)
14
- * [Using the RUIC DSL](#using-the-ruic-dsl)
15
- * [Creating and Accessing Applications](#creating-and-accessing-applications)
16
- * [Working with Presentations](#working-with-presentations)
17
- * [Finding Many Assets](#finding-many-assets)
18
- * [Working with References](#working-with-references)
19
- * [Writing Assertions](#writing-assertions)
20
- * [Locating MetaData.xml](#locating-metadataxml)
21
- * [Interactive RUIC](#interactive-ruic)
22
- * [Known Limitations (aka TODO)](#known-limitations-aka-todo)
23
- * [History](#history)
24
- * [License & Contact](#license--contact)
25
-
26
-
27
-
28
- # Installing RUIC
29
- RUIC can be installed via RubyGems (part of Ruby) via the command:
30
-
31
- gem install ruic # May need `sudo gem install ruic` depending on your setup
32
-
33
- Although RUIC is a pure-Ruby library, it relies on [Nokogiri][2] for all the XML processing and manipulation. Installing RUIC will also automatically install Nokogiri, which may require some compilation.
34
-
35
-
36
-
37
- # Using the RUIC DSL
38
-
39
- RUIC scripts are pure Ruby with a few convenience methods added. You run them via the `ruic` command-line script, e.g.
40
-
41
- ruic myscript.ruic # or .rb extension, for syntax highlighting while editing
42
-
43
-
44
- ## Creating and Accessing Applications
45
- RUIC scripts must start with `uia` commands to load an application and all its assets.
46
- After this you can access the application as `app`:
47
-
48
- ```ruby
49
- uia '../MyApp.uia' # Relative to the ruic script file, or absolute
50
-
51
- show app.file #=> /var/projects/UIC/MyApp/main/MyApp.uia
52
- show app.filename #=> MyApp.uia
53
-
54
- show app.assets.count #=> 7
55
- # You can ask for app.behaviors, app.presentations, app.statemachines, and app.renderplugins
56
- # for arrays of specific asset types
57
- ```
58
-
59
- _The `show` command prints the result; it is simply a nicer alias for `puts`._
60
-
61
- If you need to load multiple applications in the same script, subsequent `uia` commands will create
62
- `app2`, `app3`, etc. for you to use.
63
-
64
- ```ruby
65
- uia '../MyApp.uia' # Available as 'app'
66
- uia '../../v1/MyApp.uia' # Available as 'app2'
67
- ```
68
-
69
-
70
- ## Working with Presentations
71
-
72
- ```ruby
73
- uia '../MyApp.uia'
74
-
75
- main = app.main_presentation # The presentation displayed as the main presentation (regardless of id)
76
- sub = app['#nav'] # You can ask for an asset based on the id in the .uia...
77
- sub = app['Navigation.uip'] # or based on the path to the file (relative to the .uia)
78
-
79
-
80
- car = sub/"Scene.Vehicle.Group.Car" # Find elements in a presentation by presentation path…
81
- car = app/"nav:Scene.Vehicle.Group.Car" # …or absolute application path
82
-
83
- show car.name #=> Car
84
- show car.type #=> Model # Scene, Layer, Camera, Light, Group, Model, Material,
85
- # Image, Behavior, Effect, ReferencedMaterial, Text,
86
- # RenderPlugin, Component, (custom materials)
87
-
88
- show car.component? #=> false # Ask if an element is a component
89
- assert car.component==sub.scene # Ask for the owning component; may be the scene
90
- ```
91
-
92
- ## Finding Many Assets
93
-
94
- ```ruby
95
- uia 'MyApp.uia'
96
- main = app.main_presentation
97
-
98
- every_asset = main.find # Array of matching assets
99
- master_assets = main.find _master:true # Test for master/nonmaster
100
- models = main.find _type:'Model' # …or based on type
101
- slide2_assets = main.find _slide:2 # …or presence on slide
102
- rectangles = main.find sourcepath:'#Rectangle' # …or attribute values
103
- gamecovers = main.find name:'Game Cover' # …including the name
104
-
105
- # Combine tests to get more specific
106
- master_models = main.find _type:'Model', _master:true
107
- slide2_rects = main.find _type:'Model', _slide:2, sourcepath:'#Rectangle'
108
- nonmaster_s2 = main.find _slide:2, _master:false
109
- red_materials = main.find _type:'Material', diffuse:[1,0,0]
110
-
111
- # You can match values more loosely
112
- pistons = main.find name:/^Piston/ # Regex for batch finding
113
- bottom_row = main.find position:[nil,-200,nil] # nil for wildcards in vectors
114
-
115
- # Restrict the search to a sub-tree
116
- group = main/"Scene.Layer.Group"
117
- group_models = group.find _type:'Model' # Orig asset is never included
118
- group_models = main.find _under:group, _type:'Model' # Or, use `_under` to limit
119
-
120
- # Iterate the results as they are found
121
- main.find _type:'Model', name:/^Piston/ do |model, index| # Using the index is optional
122
- show "Model #{index} is named #{model.name}"
123
- end
124
- ```
125
-
126
- Notes:
127
- * `nil` inside an array is a "wildcard" value, allowing you to test only specific values
128
- * Numbers (both in vectors/colors/rotations and float/long values) must only be within `0.001` to match.
129
- * _For example, `attr:{diffuse:[1,0,0]}` will match a color with `diffuse=".9997 0.0003 0"`_
130
- * Results of `find` are always in scene-graph order.
131
-
132
-
133
- ## Working with References
134
-
135
- ```ruby
136
- uia 'MyApp.uia'
137
- mat1 = app/"main:Scene.Layer.Sphere.Material" # A normal UIC Material
138
- mat2 = app/"main:Scene.Layer.Cube.Material" # A normal UIC Material
139
- p mat2.type #=> "Material"
140
- ref = mat2.replace_with_referenced_material # A very specific method :)
141
- p ref.properties['referencedmaterial'].type #=> "ObjectRef"
142
- p ref['referencedmaterial',0].object #=> nil
143
- p ref['referencedmaterial',0].type #=> :absolute
144
- ref['referencedmaterial',0].object = mat1 #=> Sets an absolute reference
145
- ref['referencedmaterial',0].type = :path #=> Use a relative path instead
146
-
147
- # Alternatively, you can omit the .object when setting the reference:
148
- # ref['referencedmaterial',0] = mat1
149
-
150
- mat3 = ref['referencedmaterial',1].object #=> Get the asset pointed to
151
- assert mat1 == mat3 #=> They are the same! It worked!
152
-
153
- app.save_all! #=> Write presentations in place
154
- ```
155
-
156
- ## Writing Assertions
157
-
158
-
159
- ## Locating MetaData.xml
160
- RUIC needs access to a UIC `MetaData.xml` file to understand the properties in the various XML files.
161
- By default RUIC will look in the location specified by `RUIC::DEFAULTMETADATA`, e.g.
162
- `C:/Program Files (x86)/NVIDIA Corporation/UI Composer 8.0/res/DataModelMetadata/en-us/MetaData.xml`
163
-
164
- If this file is in another location, you can tell the script where to find it either:
165
-
166
- * on the command line: `ruic -m path/to/MetaData.xml myscript.ruic`
167
- * in your ruic script: `metadata 'path/to/MetaData.xml' # before any 'app' commands`
168
-
169
-
170
- # Interactive RUIC
171
- In addition to executing a standalone script, RUIC also has a REPL (like IRB) that allows you to
172
- interactively execute and test changes to your application/presentations before saving.
173
- There are two ways to enter interactive mode:
174
-
175
- * If you invoke the `ruic` binary with a `.uia` file as the argument the interpreter will load
176
- the application and enter the REPL:
177
- ```
178
- $ ruic myapp.uia
179
- (RUIC v0.2.2 interactive session; 'quit' or ctrl-d to end)
180
-
181
- uia "test/projects/SimpleScene/SimpleScene.uia"
182
- #=> <UIC::Application 'SimpleScene.uia'>
183
- ```
184
-
185
- * Alternatively, you can have RUIC execute a script and then enter the interactive REPL
186
- by supplying the `-i` command-line switch:
187
- ```
188
- $ ruic -i test/referencematerials.ruic
189
- (RUIC v0.2.2 interactive session; 'quit' or ctrl-d to end)
190
-
191
- app
192
- #=> <UIC::Application 'ReferencedMaterials.uia'>
193
-
194
- cubemat
195
- #=> <asset Material#Material_002>
196
- ```
197
- As shown above, all local variables created by the script continue to be available
198
- in the interactive session.
199
-
200
-
201
- # Known Limitations (aka TODO)
202
- _In decreasing priority…_
203
-
204
- - Report on image assets, their sizes
205
- - Report used assets (and where they are used)
206
- - Report unused assets (in a format suitable for automated destruction)
207
- - Report missing assets (and who was looking for them)
208
- - Gobs more unit tests
209
- - Parse .lua headers (in case one references an image)
210
- - Parse render plugins
211
- - Read/edit animation tracks
212
- - Find all colors, and where they are used
213
- - Visual actions for State Machines
214
- - Create new presentation assets (e.g. add a new sphere)
215
- - Modify the scene graph of presentations
216
- - Create new presentations/applications from code
217
- - Report on image asset file formats (e.g. find PNGs, find DXT1 vs DXT3 vs DXT Luminance…)
218
-
219
-
220
- # History
221
-
222
- ## v0.4.1 - 2014-Nov-16
223
-
224
- * Update `MetaData.xml` for tests to newest version.
225
- * Source paths for images/textures normalize the path (forward slashes and no leading `./`).
226
- * Added `app.main` as a simpler alias for `app.main_presentation`.
227
- * Add support for paths and anchor points, including `mypath.anchors` as an array of anchor points.
228
- * Assets present in MetaData and presentation, but not yet hand-entered into the hierarchy, now work and default to inherit from `Asset`.
229
-
230
- ## v0.4.0 - 2014-Nov-11
231
- * Switch attribute filtering again; now all attributes are inline in the `find()` hash, and the four special keys are prefixed with an underscore: `_type`, `_slide`, `_master`, and `_under`.
232
-
233
- ## v0.3.0 - 2014-Nov-10
234
- * Switch attribute filtering to use `attr:{ … }` instead of `attributes:{ … }`
235
- * Attribute matching now requires that a requested attribute be present, or else the asset matching fails.
236
- * _For example, `main.find attr:{ diffusecolor:[nil,nil,nil] }` will now only find assets with a `diffusecolor` attribute._
237
-
238
- ## v0.2.5 - 2014-Nov-10
239
- * Re-adds blank line after REPL result.
240
-
241
- ## v0.2.4 - 2014-Nov-10
242
- * Fix bug with history editing in REPL (prompts no longer have a blank line before)
243
- * Add temporary hack to make projects using Float2 load correctly
244
-
245
- ## v0.2.3 - 2014-Nov-7
246
- * Cleaner mechanism for creating a truly blank binding
247
-
248
- ## v0.2.2 - 2014-Nov-7
249
- * REPL shows version number when it starts
250
-
251
- ## v0.2.1 - 2014-Nov-7
252
- * REPL mode after script maintains binding of script (all local variables remain available)
253
- * Customized `.irbrc` files will not cause warnings
254
-
255
- ## v0.2.0 - 2014-Nov-7
256
- * Add Presentation#save_as
257
- * REPL working directory is same as .uia
258
-
259
- ## v0.1.0 - 2014-Nov-7
260
- * Add REPL mode for ruic binary
261
-
262
- ## v0.0.1 - 2014-Nov-7
263
- * Initial gem release
264
- * Crawl presentations and modify attributes
265
- * Batch find assets
266
- * Save presentation changes back to disk
267
-
268
-
269
-
270
- # License & Contact
271
- RUIC is copyright ©2014 by Gavin Kistner and is licensed under the [MIT License][3]. See the `LICENSE` file for more details.
272
-
273
- For bugs or feature requests please open [issues on GitHub][4]. For other communication you can [email the author directly](mailto:!@phrogz.net?subject=RUIC).
274
-
275
- [1]: http://uicomposer.nvidia.com
276
- [2]: http://nokogiri.org
277
- [3]: http://opensource.org/licenses/MIT
278
- [4]: https://github.com/Phrogz/RUIC/issues
1
+ # What is RUIC?
2
+ RUIC is a Ruby API for reading, analyzing, and manipulating application assets created by NVIDIA's [UI Composer][1]. Among other things, it allows you to:
3
+
4
+ * See if an application is missing any assets (e.g. images or meshes) and what parts of the application are looking for those.
5
+ * See if there are any files in the application folder that you can delete (e.g. images or materials that are no longer being used).
6
+ * Read and modify the attributes of elements on different slides.
7
+ * Batch change attributes (e.g. change all usage of one font or color to another).
8
+ * Procedurally generate many models with automated placement in your scene.
9
+
10
+ _Some of the features above are planned, but not yet implemented; see Known Limitations below._
11
+
12
+
13
+ # Documentation
14
+
15
+ In addition to the examples in this file full API documentation is available at:
16
+ http://www.rubydoc.info/gems/RUIC/
17
+
18
+
19
+
20
+ # Installing RUIC
21
+ RUIC can be installed via RubyGems (part of Ruby) via the command:
22
+
23
+ gem install ruic # May need `sudo gem install ruic` depending on your setup
24
+
25
+ Although RUIC is a pure-Ruby library, it relies on [Nokogiri][2] for all the XML processing and manipulation. Installing RUIC will also automatically install Nokogiri, which may require some compilation.
26
+
27
+
28
+
29
+ # Using the RUIC DSL
30
+
31
+ RUIC scripts are pure Ruby with a few convenience methods added. You run them via the `ruic` command-line script, e.g.
32
+
33
+ ruic myscript.ruic # or .rb extension, for syntax highlighting while editing
34
+
35
+
36
+ ## Creating and Accessing Applications
37
+ RUIC scripts must start with `uia` commands to load an application and all its assets.
38
+ After this you can access the application as `app`:
39
+
40
+ ```ruby
41
+ uia '../MyApp.uia' # Relative to the ruic script file, or absolute
42
+
43
+ show app.file #=> /var/projects/UIC/MyApp/main/MyApp.uia
44
+ show app.filename #=> MyApp.uia
45
+
46
+ show app.assets.count #=> 7
47
+ # You can ask for app.behaviors, app.presentations, app.statemachines, and app.renderplugins
48
+ # for arrays of specific asset types
49
+ ```
50
+
51
+ _The `show` command prints the result; it is simply a nicer alias for `puts`._
52
+
53
+ If you need to load multiple applications in the same script, subsequent `uia` commands will create
54
+ `app2`, `app3`, etc. for you to use.
55
+
56
+ ```ruby
57
+ uia '../MyApp.uia' # Available as 'app'
58
+ uia '../../v1/MyApp.uia' # Available as 'app2'
59
+ ```
60
+
61
+
62
+ ## Working with Presentations
63
+
64
+ ```ruby
65
+ uia '../MyApp.uia'
66
+
67
+ main = app.main_presentation # The presentation displayed as the main presentation (regardless of id)
68
+ sub = app['#nav'] # You can ask for an asset based on the id in the .uia...
69
+ sub = app['Navigation.uip'] # or based on the path to the file (relative to the .uia)
70
+
71
+
72
+ car = sub/"Scene.Vehicle.Group.Car" # Find elements in a presentation by presentation path…
73
+ car = app/"nav:Scene.Vehicle.Group.Car" # …or absolute application path
74
+
75
+ show car.name #=> Car
76
+ show car.type #=> Model # Scene, Layer, Camera, Light, Group, Model, Material,
77
+ # Image, Behavior, Effect, ReferencedMaterial, Text,
78
+ # RenderPlugin, Component, (custom materials)
79
+
80
+ show car.component? #=> false # Ask if an element is a component
81
+ assert car.component==sub.scene # Ask for the owning component; may be the scene
82
+ ```
83
+
84
+ ## Finding Many Assets
85
+
86
+ ```ruby
87
+ uia 'MyApp.uia'
88
+ main = app.main_presentation
89
+
90
+ every_asset = main.find # Array of matching assets
91
+ master_assets = main.find _master:true # Test for master/nonmaster
92
+ models = main.find _type:'Model' # …or based on type
93
+ slide2_assets = main.find _slide:2 # …or presence on slide
94
+ rectangles = main.find sourcepath:'#Rectangle' # …or attribute values
95
+ gamecovers = main.find name:'Game Cover' # …including the name
96
+
97
+ # Combine tests to get more specific
98
+ master_models = main.find _type:'Model', _master:true
99
+ slide2_rects = main.find _type:'Model', _slide:2, sourcepath:'#Rectangle'
100
+ nonmaster_s2 = main.find _slide:2, _master:false
101
+ red_materials = main.find _type:'Material', diffuse:[1,0,0]
102
+
103
+ # You can match values more loosely
104
+ pistons = main.find name:/^Piston/ # Regex for batch finding
105
+ bottom_row = main.find position:[nil,-200,nil] # nil for wildcards in vectors
106
+
107
+ # Restrict the search to a sub-tree
108
+ group = main/"Scene.Layer.Group"
109
+ group_models = group.find _type:'Model' # Orig asset is never included
110
+ group_models = main.find _under:group, _type:'Model' # Or, use `_under` to limit
111
+
112
+ # Iterate the results as they are found
113
+ main.find _type:'Model', name:/^Piston/ do |model, index| # Using the index is optional
114
+ show "Model #{index} is named #{model.name}"
115
+ end
116
+ ```
117
+
118
+ Notes:
119
+
120
+ * `nil` inside an array is a "wildcard" value, allowing you to test only specific values
121
+ * Numbers (both in vectors/colors/rotations and float/long values) must only be within `0.001` to match.
122
+ * _For example, `attr:{diffuse:[1,0,0]}` will match a color with `diffuse=".9997 0.0003 0"`_
123
+ * Results of `find` are always in scene-graph order.
124
+
125
+
126
+ ## Working with References
127
+
128
+ ```ruby
129
+ uia 'MyApp.uia'
130
+ mat1 = app/"main:Scene.Layer.Sphere.Material" # A normal UIC Material
131
+ mat2 = app/"main:Scene.Layer.Cube.Material" # A normal UIC Material
132
+ p mat2.type #=> "Material"
133
+ ref = mat2.replace_with_referenced_material # A very specific method :)
134
+ p ref.properties['referencedmaterial'].type #=> "ObjectRef"
135
+ p ref['referencedmaterial',0].object #=> nil
136
+ p ref['referencedmaterial',0].type #=> :absolute
137
+ ref['referencedmaterial',0].object = mat1 #=> Sets an absolute reference
138
+ ref['referencedmaterial',0].type = :path #=> Use a relative path instead
139
+
140
+ # Alternatively, you can omit the .object when setting the reference:
141
+ # ref['referencedmaterial',0] = mat1
142
+
143
+ mat3 = ref['referencedmaterial',1].object #=> Get the asset pointed to
144
+ assert mat1 == mat3 #=> They are the same! It worked!
145
+
146
+ app.save_all! #=> Write presentations in place
147
+ ```
148
+
149
+
150
+ ## Locating MetaData.xml
151
+ RUIC needs access to a UIC `MetaData.xml` file to understand the properties in the various XML files.
152
+ By default RUIC will look in the location specified by `RUIC::DEFAULTMETADATA`, e.g.
153
+ `C:/Program Files (x86)/NVIDIA Corporation/UI Composer 8.0/res/DataModelMetadata/en-us/MetaData.xml`
154
+
155
+ If this file is in another location, you can tell the script where to find it either:
156
+
157
+ * on the command line: `ruic -m path/to/MetaData.xml myscript.ruic`
158
+ * in your ruic script: `metadata 'path/to/MetaData.xml' # before any 'app' commands`
159
+
160
+
161
+ # Interactive RUIC
162
+ In addition to executing a standalone script, RUIC also has a REPL (like IRB) that allows you to
163
+ interactively execute and test changes to your application/presentations before saving.
164
+ There are two ways to enter interactive mode:
165
+
166
+ * If you invoke the `ruic` binary with a `.uia` file as the argument the interpreter will load
167
+ the application and enter the REPL:
168
+
169
+ $ ruic myapp.uia
170
+ (RUIC v0.2.2 interactive session; 'quit' or ctrl-d to end)
171
+
172
+ uia "test/projects/SimpleScene/SimpleScene.uia"
173
+ #=> <UIC::Application 'SimpleScene.uia'>
174
+
175
+ * Alternatively, you can have RUIC execute a script and then enter the interactive REPL
176
+ by supplying the `-i` command-line switch:
177
+
178
+ $ ruic -i test/referencematerials.ruic
179
+ (RUIC v0.2.2 interactive session; 'quit' or ctrl-d to end)
180
+
181
+ app
182
+ #=> <UIC::Application 'ReferencedMaterials.uia'>
183
+
184
+ cubemat
185
+ #=> <asset Material#Material_002>
186
+
187
+ As shown above, all local variables created by the script continue to be available
188
+ in the interactive session.
189
+
190
+
191
+ # Known Limitations (aka TODO)
192
+ _In decreasing priority…_
193
+
194
+ - Report on image assets, their sizes
195
+ - Report used assets (and where they are used)
196
+ - Report unused assets (in a format suitable for automated destruction)
197
+ - Report missing assets (and who was looking for them)
198
+ - Gobs more unit tests
199
+ - Parse .lua headers (in case one references an image)
200
+ - Parse render plugins
201
+ - Read/edit animation tracks
202
+ - Find all colors, and where they are used
203
+ - Visual actions for State Machines
204
+ - Create new presentation assets (e.g. add a new sphere)
205
+ - Modify the scene graph of presentations
206
+ - Create new presentations/applications from code
207
+ - Report on image asset file formats (e.g. find PNGs, find DXT1 vs DXT3 vs DXT Luminance…)
208
+
209
+
210
+
211
+ # License & Contact
212
+ RUIC is copyright ©2014 by Gavin Kistner and is licensed under the [MIT License][3]. See the `LICENSE` file for more details.
213
+
214
+ For bugs or feature requests please open [issues on GitHub][4]. For other communication you can [email the author directly](mailto:!@phrogz.net?subject=RUIC).
215
+
216
+ [1]: http://uicomposer.nvidia.com
217
+ [2]: http://nokogiri.org
218
+ [3]: http://opensource.org/licenses/MIT
219
+ [4]: https://github.com/Phrogz/RUIC/issues