]> git.sesse.net Git - casparcg/blob - core/producer/scene/scene.xsd
2184a92cd193a765db019b4544e286ca8b5f708a
[casparcg] / core / producer / scene / scene.xsd
1 <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" vc:minVersion="1.1">
2   <xs:element name="scene">
3     <xs:complexType>
4       <xs:all>
5         <xs:element name="variables">
6           <xs:annotation>
7             <xs:documentation>
8               Variables are the core of the scene producer realtime animation possibilities.
9               In this section the user defined variables are specified.
10               Public variables are accessible as CG parameters and by the parent scene when nested inside another.
11               There are some variables that are always defined like
12               "frame" which stores the number of frames that have gone by since the scene producer started,
13               "mouse_x" and "mouse_y" which reflect the X and Y position of the mouse at all times relative to the scene coordinate system (requires interaction aware consumer like screen_consumer),
14               "timeline_frame" which differs from "frame" in that it can rewind and jump, depending on where the timeline is at the moment and
15               "scene_width" and "scene_height" which contains the dimensions of the scene coordinate system.
16             </xs:documentation>
17           </xs:annotation>
18           <xs:complexType>
19             <xs:sequence>
20               <xs:element name="variable" maxOccurs="unbounded" minOccurs="0">
21                 <xs:annotation>
22                   <xs:documentation>
23                     A scene variable can be referenced in expressions.
24                     It is defined under variable.[id] unless it is public because then it is in the global namespace [id].
25                   </xs:documentation>
26                 </xs:annotation>
27                 <xs:complexType>
28                   <xs:simpleContent>
29                     <xs:annotation>
30                       <xs:documentation>
31                         Could be a constant or an expression.
32                         An expression is written as ${expr}.
33                         Must be parseable/resolved as the type specified.
34                       </xs:documentation>
35                     </xs:annotation>
36                     <xs:extension base="any_expression">
37                       <xs:attribute type="identifier" name="id" use="required"><xs:annotation><xs:documentation>The unique variable name. Will be exposed as [id] if the variable is public or variable.[id] otherwise.</xs:documentation></xs:annotation></xs:attribute>
38                       <xs:attribute type="type" name="type" use="required"><xs:annotation><xs:documentation>The variable type. The value/expression of the variable must be parseable/resolvable as/to this type.</xs:documentation></xs:annotation></xs:attribute>
39                       <xs:attribute type="boolean" name="public" default="false"><xs:annotation><xs:documentation>Whether the variable should be accessible from outside the scene or not. Public variables can be accessed via CG UPDATE, CG ADD and as layer.[layerid].parameter.[id] when nested inside another scene.</xs:documentation></xs:annotation></xs:attribute>
40                     </xs:extension>
41                   </xs:simpleContent>
42                 </xs:complexType>
43               </xs:element>
44             </xs:sequence>
45           </xs:complexType>
46           <xs:unique name="uniqueVariableNames">
47             <xs:selector xpath="variable" />
48             <xs:field xpath="@id" />
49           </xs:unique>
50         </xs:element>
51         <xs:element name="layers">
52           <xs:annotation>
53             <xs:documentation>
54               The layers of the scene.
55               The layers defined first will be above the ones defined after.
56               All properties of each layer are addressable from expressions as layer.[id].[property].
57             </xs:documentation>
58           </xs:annotation>
59           <xs:complexType>
60             <xs:sequence>
61               <xs:element name="layer" minOccurs="0" maxOccurs="unbounded">
62                 <xs:complexType>
63                   <xs:all>
64                     <xs:element type="producer_string" name="producer">                                             <xs:annotation><xs:documentation>The same syntax as in AMCP after for example PLAY 1-10. Cannot be an expression.</xs:documentation></xs:annotation></xs:element>
65                     <xs:element type="bool_expression" name="hidden" minOccurs="0" default="false">                 <xs:annotation><xs:documentation>Hides the layer if true. Can be an expression.</xs:documentation></xs:annotation></xs:element>
66                     <xs:element type="number_expression" name="x">                                                  <xs:annotation><xs:documentation>The X coordinate of the layer in the scene coordinate system. Can be an expression.</xs:documentation></xs:annotation></xs:element>
67                     <xs:element type="number_expression" name="y">                                                  <xs:annotation><xs:documentation>The Y coordinate of the layer in the scene coordinate system. Can be an expression.</xs:documentation></xs:annotation></xs:element>
68                     <xs:element type="number_expression" name="width" minOccurs="0">                                <xs:annotation><xs:documentation>The width of the layer. Is by default calculated by the producer itself but can be overridden. Can be an expression.</xs:documentation></xs:annotation></xs:element>
69                     <xs:element type="number_expression" name="height" minOccurs="0">                               <xs:annotation><xs:documentation>The height of the layer. Is by default calculated by the producer itself but can be overridden. Can be an expression.</xs:documentation></xs:annotation></xs:element>
70                     <xs:element type="number_expression" name="anchor_x" minOccurs="0" default="0">                 <xs:annotation><xs:documentation>The X anchor within the layer coordinate system where position and rotation are done relative to/around. Can be an expression.</xs:documentation></xs:annotation></xs:element>
71                     <xs:element type="number_expression" name="anchor_y" minOccurs="0" default="0">                 <xs:annotation><xs:documentation>The Y anchor within the layer coordinate system where position and rotation are done relative to/around. Can be an expression.</xs:documentation></xs:annotation></xs:element>
72                     <xs:element type="number_expression" name="rotation" minOccurs="0" default="0.0">               <xs:annotation><xs:documentation>The rotation of the layer around anchor_x/anchor_y expressed in degrees. Can be an expression.</xs:documentation></xs:annotation></xs:element>
73                     <xs:element type="number_expression" name="crop_upper_left_x" minOccurs="0" default="0">        <xs:annotation><xs:documentation>The X position within the layer coordinate system to crop the upper left corner. Can be an expression.</xs:documentation></xs:annotation></xs:element>
74                     <xs:element type="number_expression" name="crop_upper_left_y" minOccurs="0" default="0">        <xs:annotation><xs:documentation>The Y position within the layer coordinate system to crop the upper left corner. Can be an expression.</xs:documentation></xs:annotation></xs:element>
75                     <xs:element type="number_expression" name="crop_lower_right_x" minOccurs="0">                   <xs:annotation><xs:documentation>The X position within the layer coordinate system to crop the lower right corner. Can be an expression.</xs:documentation></xs:annotation></xs:element>
76                     <xs:element type="number_expression" name="crop_lower_right_y" minOccurs="0">                   <xs:annotation><xs:documentation>The Y position within the layer coordinate system to crop the lower right corner. Can be an expression.</xs:documentation></xs:annotation></xs:element>
77                     <xs:element type="number_expression" name="perspective_upper_left_x" minOccurs="0" default="0"> <xs:annotation><xs:documentation>The X position within the layer coordinate system to corner pin the upper left corner. Can be an expression.</xs:documentation></xs:annotation></xs:element>
78                     <xs:element type="number_expression" name="perspective_upper_left_y" minOccurs="0" default="0"> <xs:annotation><xs:documentation>The Y position within the layer coordinate system to corner pin the upper left corner. Can be an expression.</xs:documentation></xs:annotation></xs:element>
79                     <xs:element type="number_expression" name="perspective_upper_right_x" minOccurs="0">            <xs:annotation><xs:documentation>The X position within the layer coordinate system to corner pin the upper right corner. Can be an expression.</xs:documentation></xs:annotation></xs:element>
80                     <xs:element type="number_expression" name="perspective_upper_right_y" minOccurs="0" default="0"><xs:annotation><xs:documentation>The Y position within the layer coordinate system to corner pin the upper right corner. Can be an expression.</xs:documentation></xs:annotation></xs:element>
81                     <xs:element type="number_expression" name="perspective_lower_right_x" minOccurs="0">            <xs:annotation><xs:documentation>The X position within the layer coordinate system to corner pin the lower right corner. Can be an expression.</xs:documentation></xs:annotation></xs:element>
82                     <xs:element type="number_expression" name="perspective_lower_right_y" minOccurs="0">            <xs:annotation><xs:documentation>The Y position within the layer coordinate system to corner pin the lower right corner. Can be an expression.</xs:documentation></xs:annotation></xs:element>
83                     <xs:element type="number_expression" name="perspective_lower_left_x" minOccurs="0" default="0"> <xs:annotation><xs:documentation>The X position within the layer coordinate system to corner pin the lower left corner. Can be an expression.</xs:documentation></xs:annotation></xs:element>
84                     <xs:element type="number_expression" name="perspective_lower_left_y" minOccurs="0">             <xs:annotation><xs:documentation>The Y position within the layer coordinate system to corner pin the lower left corner. Can be an expression.</xs:documentation></xs:annotation></xs:element>
85                     <xs:element name="adjustments" minOccurs="0">
86                       <xs:annotation>
87                         <xs:documentation>
88                           Properties regarding image adjustments. They are addressable from expressions as layer.[id].adjustment.[property].
89                         </xs:documentation>
90                       </xs:annotation>
91                       <xs:complexType>
92                         <xs:all>
93                           <xs:element type="number_expression" name="opacity" minOccurs="0" default="1.0">          <xs:annotation><xs:documentation>The opacity of the layer. Can be an expression.</xs:documentation></xs:annotation></xs:element>
94                         </xs:all>
95                       </xs:complexType>
96                     </xs:element>
97                     <xs:element type="bool_expression" name="is_key" minOccurs="0" default="false">                 <xs:annotation><xs:documentation>If true causes the layer to key the layer above. Can be an expression.</xs:documentation></xs:annotation></xs:element>
98                     <xs:element type="bool_expression" name="use_mipmap" minOccurs="0" default="false">             <xs:annotation><xs:documentation>Whether to enable mipmapping on the layer or not. Can be an expression.</xs:documentation></xs:annotation></xs:element>
99                     <xs:element type="blend_mode" name="blend_mode" minOccurs="0" default="normal">                 <xs:annotation><xs:documentation>The blend mode to use. Can be an expression.</xs:documentation></xs:annotation></xs:element>
100                     <xs:element name="chroma_key" minOccurs="0">
101                       <xs:complexType>
102                         <xs:all>
103                           <xs:element type="bool_expression" name="enable" minOccurs="0" default="false">           <xs:annotation><xs:documentation>Whether to enable chroma keying on the layer or not. Can be an expression.</xs:documentation></xs:annotation></xs:element>
104                           <xs:element type="number_expression" name="target_hue" minOccurs="0" default="120.0">     <xs:annotation><xs:documentation>The degrees within 0-360 of the hue window centrum of the color to key. Can be an expression.</xs:documentation></xs:annotation></xs:element>
105                           <xs:element type="number_expression" name="hue_width" minOccurs="0" default="0.1">        <xs:annotation><xs:documentation>How wide within 0.0-1.0 the hue window of the color to key should be. Can be an expression.</xs:documentation></xs:annotation></xs:element>
106                           <xs:element type="number_expression" name="min_saturation" minOccurs="0" default="0.0">   <xs:annotation><xs:documentation>The minimum saturation within 0.0-1.0 of the color to key. Can be an expression.</xs:documentation></xs:annotation></xs:element>
107                           <xs:element type="number_expression" name="min_brightness" minOccurs="0" default="0.0">   <xs:annotation><xs:documentation>The minimum brightness within 0.0-1.0 of the color to key. Can be an expression.</xs:documentation></xs:annotation></xs:element>
108                           <xs:element type="number_expression" name="softness" minOccurs="0" default="0.0">         <xs:annotation><xs:documentation>How soft the chroma key window should be within 0.0-1.0. Can be an expression.</xs:documentation></xs:annotation></xs:element>
109                           <xs:element type="number_expression" name="spill" minOccurs="0" default="1.0">            <xs:annotation><xs:documentation>How much of the chroma fringing should be left within 0.0-1.0. Values below 1.0 gradually replaces the fringe with a gray scale and more transparent equivalent. Can be an expression.</xs:documentation></xs:annotation></xs:element>
110                           <xs:element type="number_expression" name="spill_darken" minOccurs="0" default="2.0">     <xs:annotation><xs:documentation>Defined how dark the spill replacement gray scale should be. The default is 2.0 but can be anywhere between 0.0 and up. Can be an expression.</xs:documentation></xs:annotation></xs:element>
111                         </xs:all>
112                       </xs:complexType>
113                     </xs:element>
114                     <xs:element name="parameters" minOccurs="0">
115                       <xs:annotation>
116                         <xs:documentation>
117                           A producer can expose variables that can be referenced from the scene.
118                           The element names used here should reflect the name of the parameter that should be set.
119                           Even if a parameter is not defined here they can still be accessed by other expressions under layer.[id].parameter.[variable].
120                           If a scene producer is nested inside a scene producer its variables marked public will be available.
121                           If a text producer exposes "text", "tracking", "current_bearing_y" and "current_protrude_under_y"
122                         </xs:documentation>
123                       </xs:annotation>
124                       <xs:complexType>
125                         <xs:sequence>
126                           <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip" />
127                         </xs:sequence>
128                       </xs:complexType>
129                     </xs:element>
130                   </xs:all>
131                   <xs:attribute type="identifier" name="id" use="required" />
132                 </xs:complexType>
133               </xs:element>
134             </xs:sequence>
135           </xs:complexType>
136           <xs:unique name="uniqueLayerNames">
137             <xs:selector xpath="layer" />
138             <xs:field xpath="@id" />
139           </xs:unique>
140         </xs:element>
141         <xs:element name="marks" minOccurs="0">
142           <xs:annotation>
143             <xs:documentation>
144               Marks are placed on specific timeline frames and marks start of animation sequences, stop of animation sequence and removal of the entire scene.
145               They affect what happens when CG PLAY, CG STOP, CG INVOKE and CG NEXT are sent via AMCP.
146             </xs:documentation>
147           </xs:annotation>
148           <xs:complexType>
149             <xs:sequence>
150               <xs:element name="mark" minOccurs="0" maxOccurs="unbounded">
151                 <xs:annotation>
152                   <xs:documentation>
153                     One of the mark types is "start" which marks the start of a named animation. There is an implicit start mark at frame 0 called "intro" which is started when CG PLAY is executed. The "intro" animation can be defined at another frame if desired. There is another start mark that should be called "outro" which is coupled to CG STOP. Any other start mark is used with CG INVOKE.
154                     Another mark type is "stop" which makes the timeline stop when reached. The only thing that can make the timeline move again is a CG NEXT, CG STOP or a CG INVOKE.
155                     The "jump_to" mark type tells the timeline to jump to another "start" whenever reached, enabling the possibility of creating animation loops.
156                     The last mark type is "remove" with the only purpose of completely stopping rendering when reached. It is used instead of "stop" to mark the end of the "outro" animation.
157                     Note that a "stop" or "jump_to" can be on the same frame as a "start" for example on end of intro and start of outro. There will be no conflict in this case when outro is started.
158                   </xs:documentation>
159                 </xs:annotation>
160                 <xs:complexType>
161                   <xs:attribute type="xs:nonNegativeInteger" name="at" use="required"><xs:annotation><xs:documentation>The timeline frame to place the mark at.</xs:documentation></xs:annotation></xs:attribute>
162                   <xs:attribute type="mark_action" name="type" use="required">
163                     <xs:annotation>
164                       <xs:documentation>
165                         The type of mark.
166                         "start" marks the start of an animation sequence.
167                         "stop" means that any animation should stop at the marked frame.
168                         "jump_to" means that the entire timeline should jump to the mentioned start label whenever the frame is encountered.
169                         "remove" is usually the end of the "outro" animation and causes the scene to stop rendering completely.
170                       </xs:documentation>
171                     </xs:annotation>
172                   </xs:attribute>
173                   <xs:attribute type="identifier" name="label" use="optional"><xs:annotation><xs:documentation>Is only used for "start" and "jump_to" marks and defines the name of the animation for "start" and the destination start for "jump_to".</xs:documentation></xs:annotation></xs:attribute>
174                 </xs:complexType>
175               </xs:element>
176             </xs:sequence>
177           </xs:complexType>
178         </xs:element>
179         <xs:element name="timelines" minOccurs="0">
180           <xs:annotation>
181             <xs:documentation>
182               Each variable/layer property may be manipulated by a timeline to animate the value based on keyframes.
183               The timelines are collectively moved forward in time based on the marks section and the CG command interaction from the outside.
184             </xs:documentation>
185           </xs:annotation>
186           <xs:complexType>
187             <xs:sequence>
188               <xs:element name="timeline" minOccurs="0" maxOccurs="unbounded">
189                 <xs:annotation>
190                   <xs:documentation>
191                     A timeline manipulates only one variable/layer property.
192                     The position on the timeline at any given time is globally controlled via the marks of the scene, so all timelines are always at the same frame as each other.
193                     If the variable/layer property is already bound to an expression it will be overridden by the timeline.
194                     Currently only number variables/layer properties are supported on timelines.
195                   </xs:documentation>
196                 </xs:annotation>
197                 <xs:complexType>
198                   <xs:sequence>
199                     <xs:element name="keyframe" minOccurs="0" maxOccurs="unbounded">
200                       <xs:annotation>
201                         <xs:documentation>
202                           Each keyframe specifies a value that the variable should have at a specific timeline frame.
203                           The value can be either immediately changed if no easing is specified, otherwise it is animated to the value with the given easing curve.
204                           The actual value to animate to can itself be an expression.
205                         </xs:documentation>
206                       </xs:annotation>
207                       <xs:complexType>
208                         <xs:simpleContent>
209                           <xs:extension base="number_expression">
210                             <xs:attribute name="at" type="xs:nonNegativeInteger" use="required"><xs:annotation><xs:documentation>The frame to place the keyframe at.</xs:documentation></xs:annotation></xs:attribute>
211                             <xs:attribute name="easing" type="easing" use="optional"><xs:annotation><xs:documentation>If omitted there will be no animation but an immediate value change instead.</xs:documentation></xs:annotation></xs:attribute>
212                           </xs:extension>
213                         </xs:simpleContent>
214                       </xs:complexType>
215                     </xs:element>
216                   </xs:sequence>
217                   <xs:attribute name="variable" type="variable_reference" use="required"><xs:annotation><xs:documentation>The variable/layer property to manipulate. If it already has an expression the expression will be overridden.</xs:documentation></xs:annotation></xs:attribute>
218                 </xs:complexType>
219               </xs:element>
220             </xs:sequence>
221           </xs:complexType>
222           <xs:unique name="oneTimelinePerVariable">
223             <xs:selector xpath="timeline" />
224             <xs:field xpath="@variable" />
225           </xs:unique>
226         </xs:element>
227         <xs:element name="tasks" minOccurs="0">
228           <xs:annotation>
229             <xs:documentation>
230               Tasks are scheduled to happen whenever a certain condition arises.
231               Use the at attribute to let the condition be that the timeline arrives at a specific frame
232               or the when attribute to specify a custom bool expression that when becomes true triggers the task.
233             </xs:documentation>
234           </xs:annotation>
235           <xs:complexType>
236             <xs:choice minOccurs="0" maxOccurs="unbounded">
237               <xs:element name="call">
238                 <xs:annotation><xs:documentation>Performs the equivalent of an AMCP CALL on the specified layer.</xs:documentation></xs:annotation>
239                 <xs:complexType>
240                   <xs:sequence maxOccurs="unbounded">
241                     <xs:element name="arg" type="xs:string"><xs:annotation><xs:documentation>See the producer documentation for the possible arguments.</xs:documentation></xs:annotation></xs:element>
242                   </xs:sequence>
243                   <xs:attribute name="at" use="optional" type="xs:nonNegativeInteger"><xs:annotation><xs:documentation>Trigger the CALL when the timeline gets to this specific frame.</xs:documentation></xs:annotation></xs:attribute>
244                   <xs:attribute name="when" use="optional" type="bool_expression"><xs:annotation><xs:documentation>Trigger the CALL when the specified bool expression becomes true.</xs:documentation></xs:annotation></xs:attribute>
245                   <xs:attribute name="to_layer" use="required" type="identifier"><xs:annotation><xs:documentation>The producer on this layer will receive the CALL.</xs:documentation></xs:annotation></xs:attribute>
246                 </xs:complexType>
247               </xs:element>
248               <xs:element name="cg_play">
249                 <xs:annotation><xs:documentation>Performs the equivalent of a CG PLAY on the specified layer.</xs:documentation></xs:annotation>
250                 <xs:complexType>
251                   <xs:attribute name="at" use="optional" type="xs:nonNegativeInteger"><xs:annotation><xs:documentation>Trigger the CG PLAY when the timeline gets to this specific frame.</xs:documentation></xs:annotation></xs:attribute>
252                   <xs:attribute name="when" use="optional" type="bool_expression"><xs:annotation><xs:documentation>Trigger the CG PLAY when the specified bool expression becomes true.</xs:documentation></xs:annotation></xs:attribute>
253                   <xs:attribute name="to_layer" use="required" type="identifier"><xs:annotation><xs:documentation>The CG producer on this layer will receive the CG PLAY.</xs:documentation></xs:annotation></xs:attribute>
254                 </xs:complexType>
255               </xs:element>
256               <xs:element name="cg_stop">
257                 <xs:annotation><xs:documentation>Performs the equivalent of a CG STOP on the specified layer.</xs:documentation></xs:annotation>
258                 <xs:complexType>
259                   <xs:attribute name="at" use="optional" type="xs:nonNegativeInteger"><xs:annotation><xs:documentation>Trigger the CG STOP when the timeline gets to this specific frame.</xs:documentation></xs:annotation></xs:attribute>
260                   <xs:attribute name="when" use="optional" type="bool_expression"><xs:annotation><xs:documentation>Trigger the CG STOP when the specified bool expression becomes true.</xs:documentation></xs:annotation></xs:attribute>
261                   <xs:attribute name="to_layer" use="required" type="identifier"><xs:annotation><xs:documentation>The CG producer on this layer will receive the CG STOP.</xs:documentation></xs:annotation></xs:attribute>
262                 </xs:complexType>
263               </xs:element>
264               <xs:element name="cg_next">
265                 <xs:annotation><xs:documentation>Performs the equivalent of a CG NEXT on the specified layer.</xs:documentation></xs:annotation>
266                 <xs:complexType>
267                   <xs:attribute name="at" use="optional" type="xs:nonNegativeInteger"><xs:annotation><xs:documentation>Trigger the CG NEXT when the timeline gets to this specific frame.</xs:documentation></xs:annotation></xs:attribute>
268                   <xs:attribute name="when" use="optional" type="bool_expression"><xs:annotation><xs:documentation>Trigger the CG NEXT when the specified bool expression becomes true.</xs:documentation></xs:annotation></xs:attribute>
269                   <xs:attribute name="to_layer" use="required" type="identifier"><xs:annotation><xs:documentation>The CG producer on this layer will receive the CG NEXT.</xs:documentation></xs:annotation></xs:attribute>
270                 </xs:complexType>
271               </xs:element>
272               <xs:element name="cg_invoke">
273                 <xs:annotation><xs:documentation>Performs the equivalent of a CG INVOKE on the specified layer with the specified label.</xs:documentation></xs:annotation>
274                 <xs:complexType>
275                   <xs:attribute name="at" use="optional" type="xs:nonNegativeInteger"><xs:annotation><xs:documentation>Trigger the CG INVOKE when the timeline gets to this specific frame.</xs:documentation></xs:annotation></xs:attribute>
276                   <xs:attribute name="when" use="optional" type="bool_expression"><xs:annotation><xs:documentation>Trigger the CG INVOKE when the specified bool expression becomes true.</xs:documentation></xs:annotation></xs:attribute>
277                   <xs:attribute name="to_layer" use="required" type="identifier"><xs:annotation><xs:documentation>The CG producer on this layer will receive the CG INVOKE.</xs:documentation></xs:annotation></xs:attribute>
278                   <xs:attribute name="label" use="required" type="nonEmptyString"><xs:annotation><xs:documentation>The label that will be invoked.</xs:documentation></xs:annotation></xs:attribute>
279                 </xs:complexType>
280               </xs:element>
281               <xs:element name="goto_mark">
282                 <xs:annotation><xs:documentation>Makes the scene go to a specific start mark given a specific condition becoming true.</xs:documentation></xs:annotation>
283                 <xs:complexType>
284                   <xs:attribute name="when" use="required" type="bool_expression"><xs:annotation><xs:documentation>Go to the start mark when the specified bool expression becomes true.</xs:documentation></xs:annotation></xs:attribute>
285                   <xs:attribute name="label" use="required" type="nonEmptyString"><xs:annotation><xs:documentation>The label of the start mark that the scene should go to.</xs:documentation></xs:annotation></xs:attribute>
286                 </xs:complexType>
287               </xs:element>
288             </xs:choice>
289           </xs:complexType>
290         </xs:element>
291       </xs:all>
292       <xs:attribute type="xs:positiveInteger" name="width" use="required" />
293       <xs:attribute type="xs:positiveInteger" name="height" use="required" />
294     </xs:complexType>
295   </xs:element>
296   <xs:simpleType name="type">
297     <xs:restriction base="xs:string">
298       <xs:whiteSpace value="collapse" />
299       <xs:enumeration value="string" />
300       <xs:enumeration value="number" />
301       <xs:enumeration value="bool" />
302     </xs:restriction>
303   </xs:simpleType>
304   <xs:simpleType name="identifier">
305     <xs:restriction base="xs:string">
306       <xs:whiteSpace value="collapse" />
307       <xs:pattern value="[a-zA-Z_][a-zA-Z0-9_]*" />
308     </xs:restriction>
309   </xs:simpleType>
310   <xs:simpleType name="variable_reference">
311     <xs:restriction base="xs:string">
312       <xs:whiteSpace value="collapse" />
313       <xs:pattern value="[a-zA-Z_][a-z\.A-Z0-9_]*" />
314     </xs:restriction>
315   </xs:simpleType>
316   <xs:simpleType name="nonEmptyString">
317     <xs:restriction base="xs:string">
318       <xs:whiteSpace value="collapse" />
319       <xs:minLength value="1" />
320     </xs:restriction>
321   </xs:simpleType>
322   <xs:simpleType name="boolean">
323     <xs:restriction base="xs:string">
324       <xs:whiteSpace value="collapse" />
325       <xs:enumeration value="true" />
326       <xs:enumeration value="false" />
327     </xs:restriction>
328   </xs:simpleType>
329
330   <xs:simpleType name="expression">
331     <xs:restriction base="xs:string">
332       <xs:annotation>
333         <xs:documentation>
334         </xs:documentation>
335       </xs:annotation>
336       <xs:whiteSpace value="collapse" />
337       <xs:pattern value="$\{.+\}" />
338     </xs:restriction>
339   </xs:simpleType>
340
341   <xs:simpleType name="string_expression_examples">
342     <xs:restriction base="xs:string">
343       <xs:enumeration value="A string constant" />
344       <xs:enumeration value="${&quot;A string constant&quot;}" />
345       <xs:enumeration value="${variable.some_string + &quot; will be concatenated&quot;}" />
346       <xs:enumeration value="${&quot;Concatenate string with number: &quot; + variable.some_number}" />
347       <xs:enumeration value="${&quot;Concatenate string with different strings based on bool: &quot; + (variable.some_bool ? &quot;Enabled&quot; : &quot;Disabled&quot;)}" />
348       <xs:enumeration value="${mouse_x &lt; 640 ? &quot;Left of middle&quot; : variable.message_when_right_of_middle}" />
349     </xs:restriction>
350   </xs:simpleType>
351   <xs:simpleType name="string_expression">
352     <xs:union memberTypes="xs:string expression string_expression_examples" />
353   </xs:simpleType>
354
355   <xs:simpleType name="available_blend_modes">
356     <xs:restriction base="xs:string">
357       <xs:enumeration value="normal" />
358       <xs:enumeration value="lighten" />
359       <xs:enumeration value="darken" />
360       <xs:enumeration value="multiply" />
361       <xs:enumeration value="average" />
362       <xs:enumeration value="add" />
363       <xs:enumeration value="subtract" />
364       <xs:enumeration value="difference" />
365       <xs:enumeration value="negation" />
366       <xs:enumeration value="exclusion" />
367       <xs:enumeration value="screen" />
368       <xs:enumeration value="overlay" />
369       <xs:enumeration value="soft_light" />
370       <xs:enumeration value="hard_light" />
371       <xs:enumeration value="color_dodge" />
372       <xs:enumeration value="color_burn" />
373       <xs:enumeration value="linear_dodge" />
374       <xs:enumeration value="linear_burn" />
375       <xs:enumeration value="linear_light" />
376       <xs:enumeration value="vivid_light" />
377       <xs:enumeration value="pin_light" />
378       <xs:enumeration value="hard_mix" />
379       <xs:enumeration value="reflect" />
380       <xs:enumeration value="glow" />
381       <xs:enumeration value="phoenix" />
382       <xs:enumeration value="contrast" />
383       <xs:enumeration value="saturation" />
384       <xs:enumeration value="color" />
385       <xs:enumeration value="luminosity" />
386     </xs:restriction>
387   </xs:simpleType>
388   <xs:simpleType name="blend_mode_expression_examples">
389     <xs:restriction base="xs:string">
390       <xs:enumeration value="${should_lighten ? &quot;lighten&quot; : &quot;normal&quot;}" />
391     </xs:restriction>
392   </xs:simpleType>
393   <xs:simpleType name="blend_mode">
394     <xs:union memberTypes="available_blend_modes expression blend_mode_expression_examples" />
395   </xs:simpleType>
396
397   <xs:simpleType name="number_expression_examples">
398     <xs:restriction base="xs:string">
399       <xs:whiteSpace value="collapse" />
400       <xs:enumeration value="0" />
401       <xs:enumeration value="0.0" />
402       <xs:enumeration value="${0.0}" />
403       <xs:enumeration value="${variable.foo + variable.bar}" />
404       <xs:enumeration value="${layer.foo.x + layer.foo.width + variable.bar_offset_x}" />
405       <xs:enumeration value="${variable.foo + 640.0}" />
406       <xs:enumeration value="${variable.foo - variable.bar}" />
407       <xs:enumeration value="${1.0 - variable.bar}" />
408       <xs:enumeration value="${variable.foo * variable.bar}" />
409       <xs:enumeration value="${variable.foo / variable.bar}" />
410       <xs:enumeration value="${variable.foo % variable.bar}" />
411       <xs:enumeration value="${(variable.a + variable.b) * variable.c}" />
412       <xs:enumeration value="${frame &lt; 50 ? variable.initial_value : variable.value_after_a_while}" />
413       <xs:enumeration value="${sin(angle)}" />
414       <xs:enumeration value="${cos(angle)}" />
415       <xs:enumeration value="${abs(value)}" />
416       <xs:enumeration value="${animate(expression_to_animate, duration, tweener)}" />
417       <xs:enumeration value="${animate(layer.to_follow.x, 200, &quot;easeoutelastic&quot;)}" />
418     </xs:restriction>
419   </xs:simpleType>
420   <xs:simpleType name="number_expression">
421     <xs:union memberTypes="xs:decimal expression number_expression_examples" />
422   </xs:simpleType>
423
424   <xs:simpleType name="bool_expression_examples">
425     <xs:restriction base="xs:string">
426       <xs:whiteSpace value="collapse" />
427       <xs:enumeration value="${variable.some_number == 50}" />
428       <xs:enumeration value="${variable.some_number != 50}" />
429       <xs:enumeration value="${variable.some_string == &quot;true when strings are equal&quot;}" />
430       <xs:enumeration value="${variable.some_string != &quot;false when strings are equal&quot;}" />
431       <xs:enumeration value="${frame &gt; 50}" />
432       <xs:enumeration value="${frame &lt; 50}" />
433       <xs:enumeration value="${frame &gt;= 50}" />
434       <xs:enumeration value="${frame &lt;= 50}" />
435       <xs:enumeration value="${!variable.some_bool}" />
436     </xs:restriction>
437   </xs:simpleType>
438   <xs:simpleType name="bool_expression">
439     <xs:union memberTypes="boolean expression bool_expression_examples" />
440   </xs:simpleType>
441
442   <xs:simpleType name="any_expression">
443     <xs:union memberTypes="string_expression number_expression bool_expression" />
444   </xs:simpleType>
445
446   <xs:simpleType name="producer_examples">
447     <xs:restriction base="xs:string">
448       <xs:whiteSpace value="collapse" />
449       <xs:enumeration value="RED" />
450       <xs:enumeration value="#AA0000AA" />
451       <xs:enumeration value="amb LOOP" />
452       <xs:enumeration value="rtmp://example.com/stream" />
453       <xs:enumeration value="[HTML] http://casparcg.com" />
454       <xs:enumeration value="[TEXT] &quot;&quot; 0 0 size 30 color #1b698d font ArialMT" />
455       <xs:enumeration value="[TEXT] &quot;Initial text before bound via layer.text_layer.param.text&quot; 0 0 size 30 color #1b698d font ArialMT" />
456       <xs:enumeration value="route://1" />
457       <xs:enumeration value="route://1-10" />
458       <xs:enumeration value="child_scene" />
459       <xs:enumeration value="DECKLINK 8 FORMAT 1080i5000 FILTER DEINTERLACE_BOB" />
460     </xs:restriction>
461   </xs:simpleType>
462
463   <xs:simpleType name="producer_string">
464     <xs:union memberTypes="nonEmptyString producer_examples" />
465   </xs:simpleType>
466
467   <xs:simpleType name="mark_action">
468     <xs:restriction base="xs:string">
469       <xs:whiteSpace value="collapse" />
470       <xs:enumeration value="start" />
471       <xs:enumeration value="stop" />
472       <xs:enumeration value="jump_to" />
473       <xs:enumeration value="remove" />
474     </xs:restriction>
475   </xs:simpleType>
476   <xs:simpleType name="easing">
477     <xs:restriction base="xs:string">
478       <xs:enumeration value="linear" />
479       <xs:enumeration value="easeinquad" />
480       <xs:enumeration value="easeoutquad" />
481       <xs:enumeration value="easeinoutquad" />
482       <xs:enumeration value="easeoutinquad" />
483       <xs:enumeration value="easeincubic" />
484       <xs:enumeration value="easeoutcubic" />
485       <xs:enumeration value="easeinoutcubic" />
486       <xs:enumeration value="easeoutincubic" />
487       <xs:enumeration value="easeinquart" />
488       <xs:enumeration value="easeoutquart" />
489       <xs:enumeration value="easeinoutquart" />
490       <xs:enumeration value="easeoutinquart" />
491       <xs:enumeration value="easeinquint" />
492       <xs:enumeration value="easeoutquint" />
493       <xs:enumeration value="easeinoutquint" />
494       <xs:enumeration value="easeoutinquint" />
495       <xs:enumeration value="easeinsine" />
496       <xs:enumeration value="easeoutsine" />
497       <xs:enumeration value="easeinoutsine" />
498       <xs:enumeration value="easeoutinsine" />
499       <xs:enumeration value="easeinexpo" />
500       <xs:enumeration value="easeoutexpo" />
501       <xs:enumeration value="easeinoutexpo" />
502       <xs:enumeration value="easeoutinexpo" />
503       <xs:enumeration value="easeincirc" />
504       <xs:enumeration value="easeoutcirc" />
505       <xs:enumeration value="easeinoutcirc" />
506       <xs:enumeration value="easeoutincirc" />
507       <xs:enumeration value="easeinelastic" />
508       <xs:enumeration value="easeoutelastic" />
509       <xs:enumeration value="easeinoutelastic" />
510       <xs:enumeration value="easeoutinelastic" />
511       <xs:enumeration value="easeinback" />
512       <xs:enumeration value="easeoutback" />
513       <xs:enumeration value="easeinoutback" />
514       <xs:enumeration value="easeoutintback" />
515       <xs:enumeration value="easeoutbounce" />
516       <xs:enumeration value="easeinbounce" />
517       <xs:enumeration value="easeinoutbounce" />
518       <xs:enumeration value="easeoutinbounce" />
519     </xs:restriction>
520   </xs:simpleType>
521 </xs:schema>