RUIC 0.0.1
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 +7 -0
- data/LICENSE +21 -0
- data/README.md +201 -0
- data/bin/ruic +52 -0
- data/gui/MetaData.xml +387 -0
- data/gui/TODO +2 -0
- data/gui/appattributesmodel.rb +51 -0
- data/gui/appelementsmodel.rb +126 -0
- data/gui/launch.rb +20 -0
- data/gui/makefile +14 -0
- data/gui/resources.qrc +37 -0
- data/gui/resources/images/Objects-Behavior-Normal.png +0 -0
- data/gui/resources/images/Objects-Camera-Normal.png +0 -0
- data/gui/resources/images/Objects-Component-Normal.png +0 -0
- data/gui/resources/images/Objects-Effect-Normal.png +0 -0
- data/gui/resources/images/Objects-Group-Normal.png +0 -0
- data/gui/resources/images/Objects-Image-Normal.png +0 -0
- data/gui/resources/images/Objects-Layer-Normal.png +0 -0
- data/gui/resources/images/Objects-Light-Normal.png +0 -0
- data/gui/resources/images/Objects-Material-Normal.png +0 -0
- data/gui/resources/images/Objects-Model-Normal.png +0 -0
- data/gui/resources/images/Objects-Music-Normal.png +0 -0
- data/gui/resources/images/Objects-Property-Normal.png +0 -0
- data/gui/resources/images/Objects-References-Normal.png +0 -0
- data/gui/resources/images/Objects-Scene-Normal.png +0 -0
- data/gui/resources/images/Objects-Sound-Normal.png +0 -0
- data/gui/resources/images/Objects-Text-Normal.png +0 -0
- data/gui/resources/images/Objects-Unknown-Normal.png +0 -0
- data/gui/resources/images/Objects-Video-Normal.png +0 -0
- data/gui/resources/images/SCXML.ico +0 -0
- data/gui/resources/images/TSCXML.ico +0 -0
- data/gui/resources/images/UIA.ico +0 -0
- data/gui/resources/images/clipboard.png +0 -0
- data/gui/resources/images/console_arrow.png +0 -0
- data/gui/resources/images/cross.png +0 -0
- data/gui/resources/images/currentline.png +0 -0
- data/gui/resources/images/disk-black.png +0 -0
- data/gui/resources/images/disks-black.png +0 -0
- data/gui/resources/images/document--plus.png +0 -0
- data/gui/resources/images/document-copy.png +0 -0
- data/gui/resources/images/executable-actions-delete-active.png +0 -0
- data/gui/resources/images/executable-actions-delete-idle.png +0 -0
- data/gui/resources/images/executable-actions-enter-badge.png +0 -0
- data/gui/resources/images/executable-actions-exit-badge.png +0 -0
- data/gui/resources/images/folder-horizontal--plus.png +0 -0
- data/gui/resources/images/folder-horizontal-open.png +0 -0
- data/gui/resources/images/gear.png +0 -0
- data/gui/resources/images/invalid_breakpoint.png +0 -0
- data/gui/resources/images/scissors-blue.png +0 -0
- data/gui/resources/images/slide-16-active.png +0 -0
- data/gui/resources/images/slide-16-master.png +0 -0
- data/gui/resources/images/slide-16-normal.png +0 -0
- data/gui/resources/images/slide-32-active.png +0 -0
- data/gui/resources/images/slide-32-master.png +0 -0
- data/gui/resources/images/slide-32-normal.png +0 -0
- data/gui/resources/images/studio_architect32.ico +0 -0
- data/gui/resources/images/studio_architect32.png +0 -0
- data/gui/resources/images/textfile_icon.png +0 -0
- data/gui/resources/style/checkbox.png +0 -0
- data/gui/resources/style/dark.qss +459 -0
- data/gui/resources/style/down_arrow.png +0 -0
- data/gui/resources/style/handle.png +0 -0
- data/gui/window.rb +90 -0
- data/gui/window.ui +753 -0
- data/lib/ruic.rb +59 -0
- data/lib/ruic/application.rb +129 -0
- data/lib/ruic/asset_classes.rb +448 -0
- data/lib/ruic/behaviors.rb +31 -0
- data/lib/ruic/interfaces.rb +36 -0
- data/lib/ruic/presentation.rb +354 -0
- data/lib/ruic/statemachine.rb +111 -0
- data/lib/ruic/version.rb +3 -0
- data/ruic.gemspec +23 -0
- data/test/MetaData.xml +387 -0
- data/test/customclasses.ruic +21 -0
- data/test/filtering.ruic +39 -0
- data/test/nonmaster.ruic +21 -0
- data/test/projects/CustomClasses/Brush Strokes.effect +38 -0
- data/test/projects/CustomClasses/CustomClasses.uia +6 -0
- data/test/projects/CustomClasses/CustomClasses.uip +34 -0
- data/test/projects/CustomClasses/copper.material +194 -0
- data/test/projects/CustomClasses/maps/UV-Checker.png +0 -0
- data/test/projects/CustomClasses/maps/effects/brushnoise.dds +0 -0
- data/test/projects/CustomClasses/maps/materials/spherical_checker.png +0 -0
- data/test/projects/ReferencedMaterials/ReferencedMaterials.uia +6 -0
- data/test/projects/ReferencedMaterials/ReferencedMaterials.uip +39 -0
- data/test/properties.ruic +81 -0
- data/test/referencematerials.ruic +53 -0
- data/test/usage.ruic +20 -0
- metadata +166 -0
data/lib/ruic/version.rb
ADDED
data/ruic.gemspec
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
$: << File.expand_path("../lib", __FILE__)
|
3
|
+
require "ruic/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "RUIC"
|
7
|
+
s.version = RUIC::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Gavin Kistner"]
|
10
|
+
s.email = ["gavin@phrogz.net"]
|
11
|
+
s.license = "MIT License"
|
12
|
+
s.summary = %q{Library and DSL analyzing and manipulating UI Composer applications and presentations.}
|
13
|
+
s.description = %q{RUIC is a library that understands the XML formats used by NVIDIA's "UI Composer" tool suite. In addition to APIs for analyzing and manipulating these files—the UIC portion of the library—it also includes a mini DSL for writing scripts that can be run by the `ruic` interpreter.}
|
14
|
+
s.homepage = "https://github.com/Phrogz/RUIC"
|
15
|
+
|
16
|
+
s.add_runtime_dependency "nokogiri", '~> 1'
|
17
|
+
|
18
|
+
s.files = `git ls-files`.split("\n")
|
19
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
20
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
21
|
+
s.require_paths = ["lib"]
|
22
|
+
s.bindir = 'bin'
|
23
|
+
end
|
data/test/MetaData.xml
ADDED
@@ -0,0 +1,387 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
2
|
+
<MetaData>
|
3
|
+
<Category name="Custom Events" description="Custom events exposed on the behavior." icon="Objects-Behavior-Normal.png" highlightIcon="Objects-Behavior-Highlight.png" />
|
4
|
+
<Category name="Default" description="Default events on all objects" icon="Objects-Folder-Highlight.png" highlightIcon="Objects-Folder-Highlight.png" />
|
5
|
+
<Category name="Gesture" description="Input from the touch screen or the mouse" icon="Objects-Folder-Highlight.png" highlightIcon="Objects-Folder-Highlight.png" />
|
6
|
+
<Category name="Slide" description="Events generated when a slide is changing." icon="Objects-Folder-Normal.png" highlightIcon="Objects-Folder-Highlight.png" />
|
7
|
+
<Category name="Asset" description="Handlers exposed on the asset." icon="Objects-Folder-Normal.png" highlightIcon="Objects-Folder-Highlight.png" />
|
8
|
+
<Category name="Custom Handlers" description="Custom Handlers exposed on the behavior." icon="Objects-Behavior-Normal.png" highlightIcon="Objects-Behavior-Highlight.png" />
|
9
|
+
<Category name="Time" description="Handlers exposed on the asset's time." icon="Objects-Folder-Normal.png" highlightIcon="Objects-Folder-Highlight.png" />
|
10
|
+
<Alias>
|
11
|
+
<Property name="name" formalName="Name" type="String" default="Alias" hidden="True" />
|
12
|
+
<Property name="referencednode" formalName="Reference" description="Original element (e.g. group, component, model) to clone" type="ObjectRef" />
|
13
|
+
</Alias>
|
14
|
+
<Asset>
|
15
|
+
<Property name="starttime" formalName="Start Time" type="Long" hidden="True" />
|
16
|
+
<Property name="endtime" formalName="End Time" type="Long" default="10000" hidden="True" />
|
17
|
+
<Property name="eyeball" formalName="Visible" type="Boolean" default="True" hidden="True" />
|
18
|
+
<Property name="shy" formalName="Shy" type="Boolean" hidden="True" />
|
19
|
+
<Property name="sourcepath" type="String" hidden="True" />
|
20
|
+
<Property name="importfile" type="String" hidden="True" />
|
21
|
+
|
22
|
+
<Handler name="Set Property" category="Asset" description="Set a property to a new value.">
|
23
|
+
<Argument name="Property Name" formalName="Property" description="Property to change" type="Slide" argumentType="Property" />
|
24
|
+
<Argument name="Property Value" formalName="New Value" description="New value for the property" type="None" argumentType="Dependent" />
|
25
|
+
</Handler>
|
26
|
+
<Handler name="Fire Event" category="Asset" description="Fire an event on the target.">
|
27
|
+
<Argument name="Event" description="The event to fire" type="None" argumentType="Event" />
|
28
|
+
</Handler>
|
29
|
+
</Asset>
|
30
|
+
<Behavior>
|
31
|
+
<Property name="name" formalName="Name" type="String" default="Behavior" hidden="True" />
|
32
|
+
</Behavior>
|
33
|
+
<Camera>
|
34
|
+
<Property name="name" formalName="Name" type="String" default="Camera" hidden="True" />
|
35
|
+
<Property name="opacity" formalName="Opacity" min="0" max="100" default="100" hidden="True" />
|
36
|
+
<Property name="orthographic" formalName="Orthographic" description="Remove all perspective from the camera?" type="Boolean" animatable="False" />
|
37
|
+
<Property name="position" formalName="Position" description="Location in local space" type="Vector" default="0 0 -600" />
|
38
|
+
<Property name="rotation" formalName="Rotation" description="Rotation around local axes" type="Rotation" />
|
39
|
+
<Property name="scale" formalName="Scale" description="Size adjustments along local axes" type="Vector" default="1 1 1" />
|
40
|
+
<Property name="pivot" formalName="Pivot" description="Offset of the contents away from the local center" type="Vector" />
|
41
|
+
<Property name="fov" formalName="Field of View" description="Viewing angle of the camera (how much it can see)" min="1" max="180" default="60">
|
42
|
+
<ShowIfEqual property="orthographic" value="False"/>
|
43
|
+
</Property>
|
44
|
+
<Property name="clipnear" formalName="Clipping Start" description="Near distance at which objects disappear" min="1" max="1000" default="10" />
|
45
|
+
<Property name="clipfar" formalName="Clipping End" description="Far distance at which objects disappear" default="5000" />
|
46
|
+
<Property name="scalemode" formalName="Scale Mode" description="Render more content as the layer expands (same size) or scale up the content (fit)" list="Same Size:Fit:Fit Horizontal:Fit Vertical" default="Fit" />
|
47
|
+
<Property name="scaleanchor" formalName="Scale Anchor" description="Corner of the content to pin as the layer size changes" list="Center:N:NE:E:SE:S:SW:W:NW" default="Center"/>
|
48
|
+
</Camera>
|
49
|
+
<Component>
|
50
|
+
<Property name="name" formalName="Name" type="String" default="Component" hidden="True" />
|
51
|
+
</Component>
|
52
|
+
<Effect>
|
53
|
+
<Property name="name" formalName="Name" type="String" default="Effect" hidden="True" />
|
54
|
+
</Effect>
|
55
|
+
<Group>
|
56
|
+
<Property name="name" formalName="Name" type="String" default="Group" hidden="True" />
|
57
|
+
<Property name="sourcepath" formalName="Import" description="Path to the source of this group" type="Import" />
|
58
|
+
</Group>
|
59
|
+
<Image>
|
60
|
+
<!--Images and materials don't have lifetimes, so we use a value that we know just won't cause any issues-->
|
61
|
+
<Property name="endtime" formalName="End Time" type="Long" default="2147483647" hidden="True" />
|
62
|
+
<Property name="name" formalName="Name" type="String" default="Image" hidden="True" />
|
63
|
+
<Property name="scaleu" formalName="U Repeat" description="Number of times the image is tiled on the U direction of the material" default="1" />
|
64
|
+
<Property name="scalev" formalName="V Repeat" description="Number of times the image is tiled on the V direction of the material" default="1" />
|
65
|
+
<Property name="mappingmode" formalName="Texture Mapping" description="How the image is applied to the material" list="UV Mapping:Environmental Mapping:Light Probe" default="UV Mapping" />
|
66
|
+
<Property name="tilingmodehorz" formalName="U Tiling" description="How the image is tiled in the U direction" list="Tiled:Mirrored:No Tiling" default="No Tiling" />
|
67
|
+
<Property name="tilingmodevert" formalName="V Tiling" description="How the image is tiled in the V direction" list="Tiled:Mirrored:No Tiling" default="No Tiling" />
|
68
|
+
<Property name="rotationuv" formalName="UV Rotation" description="Rotate the image's coordinates" />
|
69
|
+
<Property name="positionu" formalName="U Position" description="Offset of the image along the U direction of the material" />
|
70
|
+
<Property name="positionv" formalName="V Position" description="Offset of the image along the V direction of the material" />
|
71
|
+
<Property name="pivotu" formalName="U Pivot" description="Offset the image in the U direction without affecting rotation center" />
|
72
|
+
<Property name="pivotv" formalName="V Pivot" description="Offset the image in the V direction without affecting rotation center" />
|
73
|
+
<Property name="subpresentation" formalName="Sub-Presentation" description="Presentation (or plugin) to use instead of the image" type="Renderable" />
|
74
|
+
</Image>
|
75
|
+
<Layer>
|
76
|
+
<Property name="name" formalName="Name" type="String" default="Layer" hidden="True" />
|
77
|
+
<Property name="disabledepthtest" formalName="Disable Depth Test" description="Optimize render speed for layers with mostly transparent objects?" type="Boolean" animatable="False"/>
|
78
|
+
<Property name="progressiveaa" formalName="Progressive AA" description="Improves the visual quality when no items are moving" list="None:2x:4x:8x" default="None" />
|
79
|
+
<Property name="multisampleaa" formalName="Multisample AA" description="Improves geometry quality, e.g. silhouettes." list="None:2x:4x" default="None" />
|
80
|
+
<Property name="temporalaa" formalName="Temporal AA" description="Improve overall quality using camera jittering and frame blending?" type="Boolean" default="False"/>
|
81
|
+
<Property name="background" formalName="Layer Background" description="The color to use for the layer each frame" list="Transparent:SolidColor:Unspecified" default="Transparent" />
|
82
|
+
<Property name="backgroundcolor" formalName="Background Color" description="The background color for the layer" type="Color" animatable="False">
|
83
|
+
<ShowIfEqual property="background" value="SolidColor"/>
|
84
|
+
</Property>
|
85
|
+
<Property name="horzfields" formalName="Horizontal Fields" description="Properties to use to control the horizontal size and placement" list="Left/Width:Left/Right:Width/Right" default="Left/Width" />
|
86
|
+
<Property name="left" formalName="Left" description="Distance between presentation and layer left edges">
|
87
|
+
<ShowIfEqual property="horzfields" value="Left/Width"/>
|
88
|
+
<ShowIfEqual property="horzfields" value="Left/Right"/>
|
89
|
+
</Property>
|
90
|
+
<Property name="leftunits" formalName="Left Units" description="Left distance is percent of overall width or absolute pixels" list="percent:pixels" default="percent">
|
91
|
+
<ShowIfEqual property="horzfields" value="Left/Width"/>
|
92
|
+
<ShowIfEqual property="horzfields" value="Left/Right"/>
|
93
|
+
</Property>
|
94
|
+
<Property name="width" formalName="Width" description="Overall layer width" default="100">
|
95
|
+
<ShowIfEqual property="horzfields" value="Left/Width"/>
|
96
|
+
<ShowIfEqual property="horzfields" value="Width/Right"/>
|
97
|
+
</Property>
|
98
|
+
<Property name="widthunits" formalName="Width Units" description="Width is percent of overall width or absolute pixels" list="percent:pixels" default="percent">
|
99
|
+
<ShowIfEqual property="horzfields" value="Left/Width"/>
|
100
|
+
<ShowIfEqual property="horzfields" value="Width/Right"/>
|
101
|
+
</Property>
|
102
|
+
<Property name="right" formalName="Right" description="Distance between presentation and layer right edges">
|
103
|
+
<ShowIfEqual property="horzfields" value="Left/Right"/>
|
104
|
+
<ShowIfEqual property="horzfields" value="Width/Right"/>
|
105
|
+
</Property>
|
106
|
+
<Property name="rightunits" formalName="Right Units" description="Right distance is percent of overall width or absolute pixels" list="percent:pixels" default="percent">
|
107
|
+
<ShowIfEqual property="horzfields" value="Left/Right"/>
|
108
|
+
<ShowIfEqual property="horzfields" value="Width/Right"/>
|
109
|
+
</Property>
|
110
|
+
<Property name="vertfields" formalName="Vertical Fields" description="Properties to use to control the vertical size and placement" list="Top/Height:Top/Bottom:Height/Bottom" default="Top/Height" />
|
111
|
+
<Property name="top" formalName="Top" description="Distance between presentation and layer top edges.">
|
112
|
+
<ShowIfEqual property="vertfields" value="Top/Height"/>
|
113
|
+
<ShowIfEqual property="vertfields" value="Top/Bottom"/>
|
114
|
+
</Property>
|
115
|
+
<Property name="topunits" formalName="Top Units" description="Top distance is percent of overall height or absolute pixels" list="percent:pixels" default="percent">
|
116
|
+
<ShowIfEqual property="vertfields" value="Top/Height"/>
|
117
|
+
<ShowIfEqual property="vertfields" value="Top/Bottom"/>
|
118
|
+
</Property>
|
119
|
+
<Property name="height" formalName="Height" description="Overall layer height." default="100">
|
120
|
+
<ShowIfEqual property="vertfields" value="Top/Height"/>
|
121
|
+
<ShowIfEqual property="vertfields" value="Height/Bottom"/>
|
122
|
+
</Property>
|
123
|
+
<Property name="heightunits" formalName="Height Units" description="Height is percent of overall height or absolute pixels" list="percent:pixels" default="percent">
|
124
|
+
<ShowIfEqual property="vertfields" value="Top/Height"/>
|
125
|
+
<ShowIfEqual property="vertfields" value="Height/Bottom"/>
|
126
|
+
</Property>
|
127
|
+
<Property name="bottom" formalName="Bottom" description="Distance between presentation and layer bottom edges">
|
128
|
+
<ShowIfEqual property="vertfields" value="Top/Bottom"/>
|
129
|
+
<ShowIfEqual property="vertfields" value="Height/Bottom"/>
|
130
|
+
</Property>
|
131
|
+
<Property name="bottomunits" formalName="Bottom Units" description="Bottom distance is percent of overall height or absolute pixels" list="percent:pixels" default="percent">
|
132
|
+
<ShowIfEqual property="vertfields" value="Top/Bottom"/>
|
133
|
+
<ShowIfEqual property="vertfields" value="Height/Bottom"/>
|
134
|
+
</Property>
|
135
|
+
<Property name="sourcepath" formalName="Sub-Presentation" description="Presentation (or plugin) to render for this layer" type="Renderable" />
|
136
|
+
<!-- Restating the node properties so they appear at the bottom of the list because they won't be used quite as much -->
|
137
|
+
<!--CN - removing properties that may force the layer to render offscreen. We aren't ready to support this feature-->
|
138
|
+
<Property name="position" formalName="Position" description="Position" type="Vector" hidden="True"/>
|
139
|
+
<Property name="rotation" formalName="Rotation" description="Rotation" type="Rotation" hidden="True" />
|
140
|
+
<Property name="scale" formalName="Scale" description="Scale" type="Vector" default="1 1 1" hidden="True" />
|
141
|
+
<Property name="pivot" formalName="Pivot" description="Pivot" type="Vector" hidden="True" />
|
142
|
+
<Property name="opacity" formalName="Opacity" min="0" max="100" default="100" hidden="True" />
|
143
|
+
|
144
|
+
<Property name="aostrength" formalName="Ambient Occlusion" description="Amount of ambient occlusion shading to apply" min="0" max="100" default="0">
|
145
|
+
<ShowIfEqual property="sourcepath" value=""/>
|
146
|
+
</Property>
|
147
|
+
<Property name="aodistance" formalName="AO Distance" description="Size of the ambient occlusion shading" default="5">
|
148
|
+
<HideIfEqual property="aostrength" value="0"/>
|
149
|
+
<ShowIfEqual property="sourcepath" value=""/>
|
150
|
+
</Property>
|
151
|
+
<Property name="aosoftness" formalName="AO Softness" description="Magnitude of the blurring used to soften shading" min="0" max="50" default="50">
|
152
|
+
<HideIfEqual property="aostrength" value="0"/>
|
153
|
+
<ShowIfEqual property="sourcepath" value=""/>
|
154
|
+
</Property>
|
155
|
+
<Property name="aobias" formalName="AO Threshold" description="Remove AO from flat surfaces to prevent artifacts" default="0">
|
156
|
+
<HideIfEqual property="aostrength" value="0"/>
|
157
|
+
<ShowIfEqual property="sourcepath" value=""/>
|
158
|
+
</Property>
|
159
|
+
<Property name="aosamplerate" formalName="AO Sampling Rate" description="Quality of AO sampling" type="Long" default="2" min="2" max="4">
|
160
|
+
<HideIfEqual property="aostrength" value="0"/>
|
161
|
+
<ShowIfEqual property="sourcepath" value=""/>
|
162
|
+
</Property>
|
163
|
+
<Property name="aodither" formalName="AO Detail" description="Use close-range detail AO" type="Boolean" default="True">
|
164
|
+
<HideIfEqual property="aostrength" value="0"/>
|
165
|
+
<ShowIfEqual property="sourcepath" value=""/>
|
166
|
+
</Property>
|
167
|
+
|
168
|
+
<Property name="shadowstrength" formalName="Shadow Strength" description="Amount of shadowing to apply" min="0" max="100" default="0" hidden="True">
|
169
|
+
<ShowIfEqual property="sourcepath" value=""/>
|
170
|
+
</Property>
|
171
|
+
<Property name="shadowdist" formalName="Shadow Distance" description="Maximum distance to ray march for shadows test" default="10" hidden="True">
|
172
|
+
<HideIfEqual property="shadowstrength" value="0"/>
|
173
|
+
<ShowIfEqual property="sourcepath" value=""/>
|
174
|
+
</Property>
|
175
|
+
<Property name="shadowsoftness" formalName="Shadow Softness" description="Amount of softening of the shadow edges" min="0" max="100" default="100" hidden="True">
|
176
|
+
<HideIfEqual property="shadowstrength" value="0"/>
|
177
|
+
<ShowIfEqual property="sourcepath" value=""/>
|
178
|
+
</Property>
|
179
|
+
<Property name="shadowbias" formalName="Shadow Threshold" description="Remove self-shadowing from flat surfaces" default="0" hidden="True">
|
180
|
+
<HideIfEqual property="shadowstrength" value="0"/>
|
181
|
+
<ShowIfEqual property="sourcepath" value=""/>
|
182
|
+
</Property>
|
183
|
+
|
184
|
+
<Property name="lightprobe" formalName="Light Probe" description="Image used for image-based lighting and reflections" type="Image" />
|
185
|
+
<Property name="fastibl" formalName="Fast IBL" description="Use a faster approximation to image-based lighting" type="Boolean" default="True" hidden="True" />
|
186
|
+
<Property name="probehorizon" formalName="IBL Horizon Cutoff" description="Upper limit for horizon darkening of the light probe" min="-1" max="-0.001" default="-1">
|
187
|
+
<HideIfEqual property="lightprobe" value=""/>
|
188
|
+
</Property>
|
189
|
+
<Property name="lightprobe2" formalName="Secondary Light Probe" description="Image to blend over the primary light probe" type="Image">
|
190
|
+
<HideIfEqual property="lightprobe" value=""/>
|
191
|
+
</Property>
|
192
|
+
<Property name="probe2fade" formalName="Probe Crossfade" description="Blend amount between the primary and seconary probes" min="0.0" max="1.0" default="1.0">
|
193
|
+
<HideIfEqual property="lightprobe" value=""/>
|
194
|
+
<HideIfEqual property="lightprobe2" value=""/>
|
195
|
+
</Property>
|
196
|
+
<Property name="probe2window" formalName="Secondary Probe Window" description="Texture-U window size used for the moving window (for scrolling textures" min="0.01" max="1.0" default="1.0" hidden="True">
|
197
|
+
<HideIfEqual property="lightprobe" value=""/>
|
198
|
+
<HideIfEqual property="lightprobe2" value=""/>
|
199
|
+
</Property>
|
200
|
+
<Property name="probe2pos" formalName="Secondary Probe Offset" description="Texture-U window offset used for the moving window" default="0.5" hidden="True">
|
201
|
+
<HideIfEqual property="lightprobe" value=""/>
|
202
|
+
<HideIfEqual property="lightprobe2" value=""/>
|
203
|
+
</Property>
|
204
|
+
</Layer>
|
205
|
+
<Light>
|
206
|
+
<Property name="name" formalName="Name" type="String" default="Light" hidden="True" />
|
207
|
+
<Property name="opacity" formalName="Opacity" min="0" max="100" default="100" hidden="True" />
|
208
|
+
<Property name='scope' formalName="Scope" description="Sub portion of the scene graph this light affects. No object means entire scene graph" type='ObjectRef' />
|
209
|
+
<Property name="lighttype" formalName="Light Type" description="Type of illumination to use" list="Directional:Point:Area" default="Directional" />
|
210
|
+
<Property name="position" formalName="Position" description="Location in local space" type="Vector"/>
|
211
|
+
<Property name="rotation" formalName="Rotation" description="Rotation around local axes" type="Rotation" />
|
212
|
+
<Property name="scale" formalName="Scale" description="Size adjustments along local axes" type="Vector" default="1 1 1" />
|
213
|
+
<Property name="pivot" formalName="Pivot" description="Offset of the contents away from the local center" type="Vector" />
|
214
|
+
<Property name="lightdiffuse" formalName="Light Color" description="Color of diffuse lighting effect" type="Color" default="1 1 1"/>
|
215
|
+
<Property name="lightspecular" formalName="Specular Color" description="Color of specular lighting highlights" type="Color" default="1 1 1"/>
|
216
|
+
<Property name="lightambient" formalName="Ambient Color" description="Color of unlit areas (black for none)" type="Color"/>
|
217
|
+
<Property name="brightness" formalName="Brightness" description="Strength of the light" default="100"/>
|
218
|
+
<Property name="linearfade" formalName="Linear Fade" description="Falloff of the point light" min="0" max="100">
|
219
|
+
<ShowIfEqual property="lighttype" value="Point"/>
|
220
|
+
</Property>
|
221
|
+
<Property name="expfade" formalName="Exponential Fade" description="Additional falloff" min="0" max="100">
|
222
|
+
<ShowIfEqual property="lighttype" value="Point"/>
|
223
|
+
</Property>
|
224
|
+
<Property name="areawidth" formalName="Width" description="Width of the surface of the area light" min="0" default="100" hidden="True">
|
225
|
+
<ShowIfEqual property="lighttype" value="Area"/>
|
226
|
+
</Property>
|
227
|
+
<Property name="areaheight" formalName="Height" description="Height of the surface of the area light" min="0" default="100" hidden="True">
|
228
|
+
<ShowIfEqual property="lighttype" value="Area"/>
|
229
|
+
</Property>
|
230
|
+
</Light>
|
231
|
+
<MaterialBase>
|
232
|
+
<Property name="name" formalName="Name" type="String" default="MaterialBase" hidden="True" />
|
233
|
+
</MaterialBase>
|
234
|
+
<Material>
|
235
|
+
<Property name="name" formalName="Name" type="String" default="Material" hidden="True" />
|
236
|
+
<Property name="shaderlighting" formalName="Lighting" description="Light model; (vertex is faster but does not support some effects)" list="Vertex:Pixel:None" default="Vertex" />
|
237
|
+
<Property name="blendmode" formalName="Blending Mode" description="How this material blends with content behind it" list="Normal:Screen:Multiply" default="Normal" />
|
238
|
+
<Property name="diffuse" formalName="Diffuse Color" description="Color when lit from any direction" type="Color" default="1 1 1" />
|
239
|
+
<Property name="diffusemap" formalName="Diffuse Map" description="Image to multiply with diffuse color" type="Image" />
|
240
|
+
<Property name="diffusemap2" formalName="Diffuse Map 2" description="Image to multiply with diffuse color" type="Image" />
|
241
|
+
<Property name="diffusemap3" formalName="Diffuse Map 3" description="Image to multiply with diffuse color" type="Image" />
|
242
|
+
<Property name="specularreflection" formalName="Specular Reflection" description="Image to use as a faked reflection" type="Image" />
|
243
|
+
<Property name="speculartint" formalName="Specular Tint" type="Color" description="Coloration applied to specular reflections" default="1 1 1"/>
|
244
|
+
<Property name="specularamount" formalName="Specular Amount" description="Amount of shine/gloss" />
|
245
|
+
<Property name="specularmap" formalName="Specular Map" description="Image to vary the specular amount across the material" type="Image">
|
246
|
+
<HideIfEqual property="specularamount" value='0'/>
|
247
|
+
</Property>
|
248
|
+
<Property name="specularmodel" formalName="Specular Model" description="Equation to use when calculating specular highlights for CG lights" list="Default:KGGX:KWard" default="Default">
|
249
|
+
<HideIfEqual property="specularamount" value='0'/>
|
250
|
+
</Property>
|
251
|
+
<Property name="specularroughness" formalName="Specular Roughness" description="Softening applied to reflections and highlights" min='0.001' max='1'>
|
252
|
+
<HideIfEqual property="specularamount" value='0'/>
|
253
|
+
</Property>
|
254
|
+
<Property name="fresnelPower" formalName="Fresnel Power" description="Damping of head-on reflections" />
|
255
|
+
<Property name="ior" formalName="Index of Refraction" description="Angle at which fresnel reflection damping applies" min="0" max="1" default=".2">
|
256
|
+
<HideIfEqual property="fresnelPower" value="0"/>
|
257
|
+
</Property>
|
258
|
+
<Property name="bumpmap" formalName="Bump Map" description="Grayscale image simulating roughness in the lighting" type="Image"/>
|
259
|
+
<Property name="normalmap" formalName="Normal Map" description="Special RGB image describing surface roughness" type="Image"/>
|
260
|
+
<Property name="bumpamount" formalName="Bump Amount" description="Strength of bump/normal map effect" type="float" default=".5"/>
|
261
|
+
<Property name="displacementmap" formalName="Displacement Map" description="Grayscale image used to offset vertices of the geometry" type="Image"/>
|
262
|
+
<Property name="displaceamount" formalName="Displacement Amount" description="Distance to offset vertices" type="float" default="20">
|
263
|
+
<HideIfEqual property="displacementmap" value=""/>
|
264
|
+
</Property>
|
265
|
+
<Property name="opacity" formalName="Opacity" description="Visibility of the geometry for this material." min="0" max="100" default="100" />
|
266
|
+
<Property name="opacitymap" formalName="Opacity Map" description="Image to vary the opacity across the material" type="Image" />
|
267
|
+
<Property name="emissivepower" formalName="Emissive Power" description="Amount of self-illumination for this material (will not light other objects)" />
|
268
|
+
<Property name="emissivemap" formalName="Emissive Map" description="Image to vary the emissive power across the material" type="Image" />
|
269
|
+
<Property name="translucencymap" formalName="Translucency Map" description="Grayscale image controlling how much light can pass through the material from behind" type="Image"/>
|
270
|
+
<Property name="translucentfalloff" formalName="Translucent Falloff" type="float" default="1">
|
271
|
+
<HideIfEqual property="translucencymap" value=""/>
|
272
|
+
</Property>
|
273
|
+
<Property name="diffuselightwrap" formalName="Diffuse Light Wrap" type="float" min='0.0' max='1.0'>
|
274
|
+
<HideIfEqual property="translucencymap" value=""/>
|
275
|
+
</Property>
|
276
|
+
</Material>
|
277
|
+
<ReferencedMaterial>
|
278
|
+
<Property name="name" formalName="Name" type="String" default="Material" hidden="True" />
|
279
|
+
<Property name="referencedmaterial" formalName="Referenced Material" description="Material to use all settings from" type="ObjectRef" />
|
280
|
+
</ReferencedMaterial>
|
281
|
+
<Model>
|
282
|
+
<Property name="name" formalName="Name" type="String" default="Model" hidden="True" />
|
283
|
+
<Property name="sourcepath" formalName="Mesh" description="Geometry to use for this model" type="Mesh" />
|
284
|
+
<Property name="poseroot" hidden="True" type="Long" default="-1" />
|
285
|
+
<Property name="tessellation" formalName="Tessellation Mode" description="Type of tessellation to subdivide the geometry" list="None:Linear:Phong:NPatch" default="None" />
|
286
|
+
<Property name="edgetess" formalName="Edge Tessellation Value" description="Max Tessellation amount" min="1" max="64" default="4">
|
287
|
+
<HideIfEqual property="tessellation" value="None"/>
|
288
|
+
</Property>
|
289
|
+
<Property name="innertess" formalName="Inner Tessellation Value" description="Min Tessellation amount" min="1" max="64" default="4">
|
290
|
+
<HideIfEqual property="tessellation" value="None"/>
|
291
|
+
</Property>
|
292
|
+
</Model>
|
293
|
+
<Node>
|
294
|
+
<Event name="onPressureDown" category="Gesture" />
|
295
|
+
<Event name="onPressureUp" category="Gesture" />
|
296
|
+
<Event name="onTap" category="Gesture" />
|
297
|
+
<Event name="onSingleTap" category="Gesture" />
|
298
|
+
<Event name="onDoubleTap" category="Gesture" />
|
299
|
+
<Event name="onOnePointDragStart" category="Gesture" />
|
300
|
+
<Event name="onOnePointDrag" category="Gesture" />
|
301
|
+
<Event name="onOnePointDragRelease" category="Gesture" />
|
302
|
+
<Event name="onTwoPointDragStart" category="Gesture" />
|
303
|
+
<Event name="onTwoPointDrag" category="Gesture" />
|
304
|
+
<Event name="onTwoPointDragRelease" category="Gesture" />
|
305
|
+
<Event name="onSwipeLeft" category="Gesture" />
|
306
|
+
<Event name="onSwipeRight" category="Gesture" />
|
307
|
+
<Event name="onSwipeUp" category="Gesture" />
|
308
|
+
<Event name="onSwipeDown" category="Gesture" />
|
309
|
+
<Event name="onTwoPointSwipeLeft" category="Gesture" />
|
310
|
+
<Event name="onTwoPointSwipeRight" category="Gesture" />
|
311
|
+
<Event name="onTwoPointSwipeUp" category="Gesture" />
|
312
|
+
<Event name="onTwoPointSwipeDown" category="Gesture" />
|
313
|
+
|
314
|
+
<Property name="position" formalName="Position" description="Location in local space" type="Vector"/>
|
315
|
+
<Property name="rotation" formalName="Rotation" description="Rotation around local axes" type="Rotation" />
|
316
|
+
<Property name="scale" formalName="Scale" description="Size adjustments along local axes" type="Vector" default="1 1 1" />
|
317
|
+
<Property name="pivot" formalName="Pivot" description="Offset of the contents away from the local center" type="Vector" />
|
318
|
+
<Property name="opacity" formalName="Opacity" description="How much the element (and its children) occlude items behind them" min="0" max="100" default="100" />
|
319
|
+
<Property name="rotationorder" formalName="Rotation Order" description="Rotation Order" list="XYZ:YZX:ZXY:XZY:YXZ:ZYX:XYZr:YZXr:ZXYr:XZYr:YXZr:ZYXr" default="YXZ" hidden="True"/>
|
320
|
+
<Property name="orientation" formalName="Orientation" description="Orientation" list="Left Handed:Right Handed" default="Left Handed" hidden="True"/>
|
321
|
+
<Property name="boneid" type="Long" hidden="True" default="-1" />
|
322
|
+
<Property name="ignoresparent" type="Boolean" hidden="True" default="False" />
|
323
|
+
</Node>
|
324
|
+
<RenderPlugin>
|
325
|
+
<Property name="name" formalName="Name" type="String" default="RenderPlugin" hidden="True" />
|
326
|
+
</RenderPlugin>
|
327
|
+
<Scene>
|
328
|
+
<Property name="name" formalName="Name" type="String" default="Scene" hidden="True" />
|
329
|
+
<Property name="bgcolorenable" formalName="Use Background" description="Clear the contents to a solid color before each frame?" type="Boolean" default="True" />
|
330
|
+
<Property name="backgroundcolor" formalName="Background Color" description="Color to use for the background" type="Color" animatable="False">
|
331
|
+
<ShowIfEqual property="bgcolorenable" value="True"/>
|
332
|
+
</Property>
|
333
|
+
<Event name="onPressureDown" category="Gesture" />
|
334
|
+
<Event name="onPressureUp" category="Gesture" />
|
335
|
+
<Event name="onTap" category="Gesture" />
|
336
|
+
<Event name="onSingleTap" category="Gesture" />
|
337
|
+
<Event name="onDoubleTap" category="Gesture" />
|
338
|
+
<Event name="onOnePointDragStart" category="Gesture" />
|
339
|
+
<Event name="onOnePointDrag" category="Gesture" />
|
340
|
+
<Event name="onOnePointDragRelease" category="Gesture" />
|
341
|
+
<Event name="onTwoPointDragStart" category="Gesture" />
|
342
|
+
<Event name="onTwoPointDrag" category="Gesture" />
|
343
|
+
<Event name="onTwoPointDragRelease" category="Gesture" />
|
344
|
+
<Event name="onSwipeLeft" category="Gesture" />
|
345
|
+
<Event name="onSwipeRight" category="Gesture" />
|
346
|
+
<Event name="onSwipeUp" category="Gesture" />
|
347
|
+
<Event name="onSwipeDown" category="Gesture" />
|
348
|
+
<Event name="onTwoPointSwipeLeft" category="Gesture" />
|
349
|
+
<Event name="onTwoPointSwipeRight" category="Gesture" />
|
350
|
+
<Event name="onTwoPointSwipeUp" category="Gesture" />
|
351
|
+
<Event name="onTwoPointSwipeDown" category="Gesture" />
|
352
|
+
</Scene>
|
353
|
+
<Slide>
|
354
|
+
<Property name="playmode" formalName="Play Mode" description="Action to take when reaching the end of all timebars on this slide" list="Stop at end:Looping:PingPong:Ping:Play Through To..." default="Stop at end" animatable="False" />
|
355
|
+
<Property name="playthroughto" formalName="Play Through To" description="Slide to go to after this one" type="StringListOrInt" list="Next:Previous" default="Next" animatable="False">
|
356
|
+
<ShowIfEqual property="playmode" value="Play Through To..."/>
|
357
|
+
</Property>
|
358
|
+
<Property name="initialplaystate" formalName="Initial Play State" description="Do animations start when coming to this slide?" list="Play:Pause" default="Play" animatable="False" />
|
359
|
+
</Slide>
|
360
|
+
<SlideOwner>
|
361
|
+
<Event name="onSlideEnter" category="Slide" description="Fired when the slide is changing" />
|
362
|
+
<Event name="onSlideExit" category="Slide" description="Fired when the slide is changing" />
|
363
|
+
<Handler name="Go to Time" category="Time" description="Set the current time on the component.">
|
364
|
+
<Argument name="Time" description="Time to go do" />
|
365
|
+
<Argument name="Pause" description="Pause playback at the new time?" type="Boolean" />
|
366
|
+
</Handler>
|
367
|
+
<Handler name="Play" category="Time" description="Start the component's time playing." />
|
368
|
+
<Handler name="Pause" category="Time" description="Pause the component's time." />
|
369
|
+
<Handler name="Go to Slide" category="Slide" description="Go to a specified slide of the component.">
|
370
|
+
<Argument name="Slide" description="Target slide to go to" type="Slide" argumentType="Slide" />
|
371
|
+
</Handler>
|
372
|
+
<Handler name="Next Slide" category="Slide" description="Activate the next slide of the component." />
|
373
|
+
<Handler name="Previous Slide" category="Slide" description="Activate the previous slide of the component." />
|
374
|
+
<Handler name="Preceding Slide" category="Slide" description="Activate the slide that was previously active." />
|
375
|
+
</SlideOwner>
|
376
|
+
<Text>
|
377
|
+
<Property name="name" formalName="Name" type="String" default="Text" hidden="True" />
|
378
|
+
<Property name="textstring" formalName="Text String" description="Text String" type="MultiLineString" default="Text" />
|
379
|
+
<Property name="textcolor" formalName="Text Color" description="Text Color" type="Color" default="1 1 1" />
|
380
|
+
<Property name="font" formalName="Font" description="Font" type="Font" default="Arimo-Regular" />
|
381
|
+
<Property name="size" formalName="Font Size" description="Font Size" type="FontSize" default="24" animatable="False" />
|
382
|
+
<Property name="horzalign" formalName="Horizontal Alignment" description="Horizontal Alignment" list="Left:Center:Right" default="Center" />
|
383
|
+
<Property name="vertalign" formalName="Vertical Alignment" description="Vertical Alignment" list="Top:Middle:Bottom" default="Middle" />
|
384
|
+
<Property name="leading" formalName="Leading" description="Leading" />
|
385
|
+
<Property name="tracking" formalName="Tracking" description="Tracking" />
|
386
|
+
</Text>
|
387
|
+
</MetaData>
|
@@ -0,0 +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 == 11 # 6 shared asset, 1 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
ADDED
@@ -0,0 +1,39 @@
|
|
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', attributes:{position:[-150,60,0]} ).length==2
|
13
|
+
assert main.find( type:'Model', attributes:{position:[-150,60,0]} ).length==2
|
14
|
+
assert main.find( type:'Model', attributes:{position:[nil,60,nil]} ).length==4
|
15
|
+
assert main.find( type:'Model', attributes:{sourcepath:'#Cube'} ).length==1
|
16
|
+
assert main.find( under:main/"Scene.Layer.Sphere1" ).length==1
|
17
|
+
assert main.find( attributes:{name:'Material'} ).length==4
|
18
|
+
assert main.find( attributes:{name:/^Sphere/} ).length==2
|
19
|
+
|
20
|
+
# You can use name not as an attribute
|
21
|
+
assert main.find( name:'Material' ).length==4
|
22
|
+
assert main.find( name:/^Sphere/ ).length==2
|
23
|
+
|
24
|
+
# Return values are in Scene graph order
|
25
|
+
assert main.find.first == main/"Scene"
|
26
|
+
assert main.find.last == main/"Scene.Layer.NonMaster.Material"
|
27
|
+
|
28
|
+
# Any asset can be used as the 'root'
|
29
|
+
sphere = main/"Scene.Layer.Sphere1"
|
30
|
+
assert sphere.find.length==1
|
31
|
+
|
32
|
+
# Supplying a block will iterate, including the index
|
33
|
+
expected = main.find type:'Model'
|
34
|
+
found = 0
|
35
|
+
main.find type:'Model' do |mod,i|
|
36
|
+
found += 1
|
37
|
+
assert mod == expected[i]
|
38
|
+
end
|
39
|
+
assert found==4
|