]> git.sesse.net Git - casparcg/blob - core/producer/scene/scene.xsd
47844ca691253921d9e2d26f6c7a960ceb6501d3
[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 name="clip" minOccurs="0">
71                       <xs:annotation>
72                         <xs:documentation>
73                           Properties regarding viewport clipping. The coordinates are relative to the scene coordinate system. They are addressable from expressions as layer.[id].clip.[property].
74                         </xs:documentation>
75                       </xs:annotation>
76                       <xs:complexType>
77                         <xs:all>
78                           <xs:element type="number_expression" name="upper_left_x" minOccurs="0" default="0">                <xs:annotation><xs:documentation>The X position within the scene coordinate system to clip the upper left corner. Can be an expression.</xs:documentation></xs:annotation></xs:element>
79                           <xs:element type="number_expression" name="upper_left_y" minOccurs="0" default="0">                <xs:annotation><xs:documentation>The Y position within the scene coordinate system to clip the upper left corner. Can be an expression.</xs:documentation></xs:annotation></xs:element>
80                           <xs:element type="number_expression" name="lower_right_x" minOccurs="0">                           <xs:annotation><xs:documentation>The X position within the scene coordinate system to clip the lower right corner. Can be an expression.</xs:documentation></xs:annotation></xs:element>
81                           <xs:element type="number_expression" name="lower_right_y" minOccurs="0">                           <xs:annotation><xs:documentation>The Y position within the scene coordinate system to clip the lower right corner. Can be an expression.</xs:documentation></xs:annotation></xs:element>
82                         </xs:all>
83                       </xs:complexType>
84                     </xs:element>
85                     <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>
86                     <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>
87                     <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>
88                     <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>
89                     <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>
90                     <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>
91                     <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>
92                     <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>
93                     <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>
94                     <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>
95                     <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>
96                     <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>
97                     <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>
98                     <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>
99                     <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>
100                     <xs:element name="adjustments" minOccurs="0">
101                       <xs:annotation>
102                         <xs:documentation>
103                           Properties regarding image adjustments. They are addressable from expressions as layer.[id].adjustment.[property].
104                         </xs:documentation>
105                       </xs:annotation>
106                       <xs:complexType>
107                         <xs:all>
108                           <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>
109                           <xs:element type="number_expression" name="contrast" minOccurs="0" default="1.0">                 <xs:annotation><xs:documentation>The contrast of the layer. Can be an expression.</xs:documentation></xs:annotation></xs:element>
110                           <xs:element type="number_expression" name="saturation" minOccurs="0" default="1.0">               <xs:annotation><xs:documentation>The saturation of the layer. Can be an expression.</xs:documentation></xs:annotation></xs:element>
111                           <xs:element type="number_expression" name="brightness" minOccurs="0" default="1.0">               <xs:annotation><xs:documentation>The brightness of the layer. Can be an expression.</xs:documentation></xs:annotation></xs:element>
112                         </xs:all>
113                       </xs:complexType>
114                     </xs:element>
115                     <xs:element name="levels" minOccurs="0">
116                       <xs:annotation>
117                         <xs:documentation>
118                           Properties regarding level adjustments. They are addressable from expressions as layer.[id].level.[property].
119                         </xs:documentation>
120                       </xs:annotation>
121                       <xs:complexType>
122                         <xs:all>
123                           <xs:element type="number_expression" name="min_input" minOccurs="0" default="0.0">                <xs:annotation><xs:documentation>The minimum input level of the layer. Can be an expression.</xs:documentation></xs:annotation></xs:element>
124                           <xs:element type="number_expression" name="max_input" minOccurs="0" default="1.0">                <xs:annotation><xs:documentation>The maximum input level of the layer. Can be an expression.</xs:documentation></xs:annotation></xs:element>
125                           <xs:element type="number_expression" name="gamma" minOccurs="0" default="1.0">                    <xs:annotation><xs:documentation>The gamma correction of the layer. Can be an expression.</xs:documentation></xs:annotation></xs:element>
126                           <xs:element type="number_expression" name="min_output" minOccurs="0" default="0.0">               <xs:annotation><xs:documentation>The minimum output level of the layer. Can be an expression.</xs:documentation></xs:annotation></xs:element>
127                           <xs:element type="number_expression" name="max_output" minOccurs="0" default="1.0">               <xs:annotation><xs:documentation>The maximum output level of the layer. Can be an expression.</xs:documentation></xs:annotation></xs:element>
128                         </xs:all>
129                       </xs:complexType>
130                     </xs:element>
131                     <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>
132                     <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>
133                     <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>
134                     <xs:element name="chroma_key" minOccurs="0">
135                       <xs:complexType>
136                         <xs:all>
137                           <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>
138                           <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>
139                           <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>
140                           <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>
141                           <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>
142                           <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>
143                           <xs:element type="number_expression" name="spill_suppress" minOccurs="0" default="0.0">           <xs:annotation><xs:documentation>How much to suppress spill by within 0.0-180.0. It works by taking all hue values within +- this value from target_hue and clamps it to either target_hue - this value or target_hue + this value depending on which side it is closest to. Can be an expression.</xs:documentation></xs:annotation></xs:element>
144                           <xs:element type="number_expression" name="spill_suppress_saturation" minOccurs="0" default="1.0"><xs:annotation><xs:documentation>Controls how much saturation should be kept on colors affected by spill_suppress within 0.0-1.0. Full saturation may not always be desirable to be kept on suppressed colors. Can be an expression.</xs:documentation></xs:annotation></xs:element>
145                         </xs:all>
146                       </xs:complexType>
147                     </xs:element>
148                     <xs:element type="number_expression" name="volume" minOccurs="0" default="1.0">                         <xs:annotation><xs:documentation>The audio volume of the layer. Can be an expression.</xs:documentation></xs:annotation></xs:element>
149                     <xs:element name="parameters" minOccurs="0">
150                       <xs:annotation>
151                         <xs:documentation>
152                           A producer can expose variables that can be referenced from the scene.
153                           The element names used here should reflect the name of the parameter that should be set.
154                           Even if a parameter is not defined here they can still be accessed by other expressions under layer.[id].parameter.[variable].
155                           If a scene producer is nested inside a scene producer its variables marked public will be available.
156                           If a text producer exposes "text", "tracking", "current_bearing_y" and "current_protrude_under_y"
157                         </xs:documentation>
158                       </xs:annotation>
159                       <xs:complexType>
160                         <xs:sequence>
161                           <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip" />
162                         </xs:sequence>
163                       </xs:complexType>
164                     </xs:element>
165                   </xs:all>
166                   <xs:attribute type="identifier" name="id" use="required" />
167                 </xs:complexType>
168               </xs:element>
169             </xs:sequence>
170           </xs:complexType>
171           <xs:unique name="uniqueLayerNames">
172             <xs:selector xpath="layer" />
173             <xs:field xpath="@id" />
174           </xs:unique>
175         </xs:element>
176         <xs:element name="marks" minOccurs="0">
177           <xs:annotation>
178             <xs:documentation>
179               Marks are placed on specific timeline frames and marks start of animation sequences, stop of animation sequence and removal of the entire scene.
180               They affect what happens when CG PLAY, CG STOP, CG INVOKE and CG NEXT are sent via AMCP.
181             </xs:documentation>
182           </xs:annotation>
183           <xs:complexType>
184             <xs:sequence>
185               <xs:element name="mark" minOccurs="0" maxOccurs="unbounded">
186                 <xs:annotation>
187                   <xs:documentation>
188                     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.
189                     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.
190                     The "jump_to" mark type tells the timeline to jump to another "start" whenever reached, enabling the possibility of creating animation loops.
191                     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.
192                     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.
193                   </xs:documentation>
194                 </xs:annotation>
195                 <xs:complexType>
196                   <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>
197                   <xs:attribute type="mark_action" name="type" use="required">
198                     <xs:annotation>
199                       <xs:documentation>
200                         The type of mark.
201                         "start" marks the start of an animation sequence.
202                         "stop" means that any animation should stop at the marked frame.
203                         "jump_to" means that the entire timeline should jump to the mentioned start label whenever the frame is encountered.
204                         "remove" is usually the end of the "outro" animation and causes the scene to stop rendering completely.
205                       </xs:documentation>
206                     </xs:annotation>
207                   </xs:attribute>
208                   <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>
209                 </xs:complexType>
210               </xs:element>
211             </xs:sequence>
212           </xs:complexType>
213         </xs:element>
214         <xs:element name="timelines" minOccurs="0">
215           <xs:annotation>
216             <xs:documentation>
217               Each variable/layer property may be manipulated by a timeline to animate the value based on keyframes.
218               The timelines are collectively moved forward in time based on the marks section and the CG command interaction from the outside.
219             </xs:documentation>
220           </xs:annotation>
221           <xs:complexType>
222             <xs:sequence>
223               <xs:element name="timeline" minOccurs="0" maxOccurs="unbounded">
224                 <xs:annotation>
225                   <xs:documentation>
226                     A timeline manipulates only one variable/layer property.
227                     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.
228                     If the variable/layer property is already bound to an expression it will be overridden by the timeline.
229                     Currently only number variables/layer properties are supported on timelines.
230                   </xs:documentation>
231                 </xs:annotation>
232                 <xs:complexType>
233                   <xs:sequence>
234                     <xs:element name="keyframe" minOccurs="0" maxOccurs="unbounded">
235                       <xs:annotation>
236                         <xs:documentation>
237                           Each keyframe specifies a value that the variable should have at a specific timeline frame.
238                           The value can be either immediately changed if no easing is specified, otherwise it is animated to the value with the given easing curve.
239                           The actual value to animate to can itself be an expression.
240                         </xs:documentation>
241                       </xs:annotation>
242                       <xs:complexType>
243                         <xs:simpleContent>
244                           <xs:extension base="number_expression">
245                             <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>
246                             <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>
247                           </xs:extension>
248                         </xs:simpleContent>
249                       </xs:complexType>
250                     </xs:element>
251                   </xs:sequence>
252                   <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>
253                 </xs:complexType>
254               </xs:element>
255             </xs:sequence>
256           </xs:complexType>
257           <xs:unique name="oneTimelinePerVariable">
258             <xs:selector xpath="timeline" />
259             <xs:field xpath="@variable" />
260           </xs:unique>
261         </xs:element>
262         <xs:element name="tasks" minOccurs="0">
263           <xs:annotation>
264             <xs:documentation>
265               Tasks are scheduled to happen whenever a certain condition arises.
266               Use the at attribute to let the condition be that the timeline arrives at a specific frame
267               or the when attribute to specify a custom bool expression that when becomes true triggers the task.
268             </xs:documentation>
269           </xs:annotation>
270           <xs:complexType>
271             <xs:choice minOccurs="0" maxOccurs="unbounded">
272               <xs:element name="call">
273                 <xs:annotation><xs:documentation>Performs the equivalent of an AMCP CALL on the specified layer.</xs:documentation></xs:annotation>
274                 <xs:complexType>
275                   <xs:sequence maxOccurs="unbounded">
276                     <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>
277                   </xs:sequence>
278                   <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>
279                   <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>
280                   <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>
281                 </xs:complexType>
282               </xs:element>
283               <xs:element name="cg_play">
284                 <xs:annotation><xs:documentation>Performs the equivalent of a CG PLAY on the specified layer.</xs:documentation></xs:annotation>
285                 <xs:complexType>
286                   <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>
287                   <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>
288                   <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>
289                 </xs:complexType>
290               </xs:element>
291               <xs:element name="cg_stop">
292                 <xs:annotation><xs:documentation>Performs the equivalent of a CG STOP on the specified layer.</xs:documentation></xs:annotation>
293                 <xs:complexType>
294                   <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>
295                   <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>
296                   <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>
297                 </xs:complexType>
298               </xs:element>
299               <xs:element name="cg_next">
300                 <xs:annotation><xs:documentation>Performs the equivalent of a CG NEXT on the specified layer.</xs:documentation></xs:annotation>
301                 <xs:complexType>
302                   <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>
303                   <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>
304                   <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>
305                 </xs:complexType>
306               </xs:element>
307               <xs:element name="cg_invoke">
308                 <xs:annotation><xs:documentation>Performs the equivalent of a CG INVOKE on the specified layer with the specified label.</xs:documentation></xs:annotation>
309                 <xs:complexType>
310                   <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>
311                   <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>
312                   <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>
313                   <xs:attribute name="label" use="required" type="nonEmptyString"><xs:annotation><xs:documentation>The label that will be invoked.</xs:documentation></xs:annotation></xs:attribute>
314                 </xs:complexType>
315               </xs:element>
316               <xs:element name="goto_mark">
317                 <xs:annotation><xs:documentation>Makes the scene go to a specific start mark given a specific condition becoming true.</xs:documentation></xs:annotation>
318                 <xs:complexType>
319                   <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>
320                   <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>
321                 </xs:complexType>
322               </xs:element>
323             </xs:choice>
324           </xs:complexType>
325         </xs:element>
326       </xs:all>
327       <xs:attribute type="xs:positiveInteger" name="width" use="required" />
328       <xs:attribute type="xs:positiveInteger" name="height" use="required" />
329     </xs:complexType>
330   </xs:element>
331   <xs:simpleType name="type">
332     <xs:restriction base="xs:string">
333       <xs:whiteSpace value="collapse" />
334       <xs:enumeration value="string" />
335       <xs:enumeration value="number" />
336       <xs:enumeration value="bool" />
337     </xs:restriction>
338   </xs:simpleType>
339   <xs:simpleType name="identifier">
340     <xs:restriction base="xs:string">
341       <xs:whiteSpace value="collapse" />
342       <xs:pattern value="[a-zA-Z_][a-zA-Z0-9_]*" />
343     </xs:restriction>
344   </xs:simpleType>
345   <xs:simpleType name="variable_reference">
346     <xs:restriction base="xs:string">
347       <xs:whiteSpace value="collapse" />
348       <xs:pattern value="[a-zA-Z_][a-z\.A-Z0-9_]*" />
349     </xs:restriction>
350   </xs:simpleType>
351   <xs:simpleType name="nonEmptyString">
352     <xs:restriction base="xs:string">
353       <xs:whiteSpace value="collapse" />
354       <xs:minLength value="1" />
355     </xs:restriction>
356   </xs:simpleType>
357   <xs:simpleType name="boolean">
358     <xs:restriction base="xs:string">
359       <xs:whiteSpace value="collapse" />
360       <xs:enumeration value="true" />
361       <xs:enumeration value="false" />
362     </xs:restriction>
363   </xs:simpleType>
364
365   <xs:simpleType name="expression">
366     <xs:restriction base="xs:string">
367       <xs:annotation>
368         <xs:documentation>
369         </xs:documentation>
370       </xs:annotation>
371       <xs:whiteSpace value="collapse" />
372       <xs:pattern value="$\{.+\}" />
373     </xs:restriction>
374   </xs:simpleType>
375
376   <xs:simpleType name="string_expression_examples">
377     <xs:restriction base="xs:string">
378       <xs:enumeration value="A string constant" />
379       <xs:enumeration value="${&quot;A string constant&quot;}" />
380       <xs:enumeration value="${variable.some_string + &quot; will be concatenated&quot;}" />
381       <xs:enumeration value="${to_lower(variable.some_string)}" />
382       <xs:enumeration value="${to_upper(variable.some_string)}" />
383       <xs:enumeration value="${&quot;Concatenate string with number: &quot; + variable.some_number}" />
384       <xs:enumeration value="${&quot;Concatenate string with different strings based on bool: &quot; + (variable.some_bool ? &quot;Enabled&quot; : &quot;Disabled&quot;)}" />
385       <xs:enumeration value="${mouse_x &lt; 640 ? &quot;Left of middle&quot; : variable.message_when_right_of_middle}" />
386     </xs:restriction>
387   </xs:simpleType>
388   <xs:simpleType name="string_expression">
389     <xs:union memberTypes="xs:string expression string_expression_examples" />
390   </xs:simpleType>
391
392   <xs:simpleType name="available_blend_modes">
393     <xs:restriction base="xs:string">
394       <xs:enumeration value="normal" />
395       <xs:enumeration value="lighten" />
396       <xs:enumeration value="darken" />
397       <xs:enumeration value="multiply" />
398       <xs:enumeration value="average" />
399       <xs:enumeration value="add" />
400       <xs:enumeration value="subtract" />
401       <xs:enumeration value="difference" />
402       <xs:enumeration value="negation" />
403       <xs:enumeration value="exclusion" />
404       <xs:enumeration value="screen" />
405       <xs:enumeration value="overlay" />
406       <xs:enumeration value="soft_light" />
407       <xs:enumeration value="hard_light" />
408       <xs:enumeration value="color_dodge" />
409       <xs:enumeration value="color_burn" />
410       <xs:enumeration value="linear_dodge" />
411       <xs:enumeration value="linear_burn" />
412       <xs:enumeration value="linear_light" />
413       <xs:enumeration value="vivid_light" />
414       <xs:enumeration value="pin_light" />
415       <xs:enumeration value="hard_mix" />
416       <xs:enumeration value="reflect" />
417       <xs:enumeration value="glow" />
418       <xs:enumeration value="phoenix" />
419       <xs:enumeration value="contrast" />
420       <xs:enumeration value="saturation" />
421       <xs:enumeration value="color" />
422       <xs:enumeration value="luminosity" />
423     </xs:restriction>
424   </xs:simpleType>
425   <xs:simpleType name="blend_mode_expression_examples">
426     <xs:restriction base="xs:string">
427       <xs:enumeration value="${should_lighten ? &quot;lighten&quot; : &quot;normal&quot;}" />
428     </xs:restriction>
429   </xs:simpleType>
430   <xs:simpleType name="blend_mode">
431     <xs:union memberTypes="available_blend_modes expression blend_mode_expression_examples" />
432   </xs:simpleType>
433
434   <xs:simpleType name="number_expression_examples">
435     <xs:restriction base="xs:string">
436       <xs:whiteSpace value="collapse" />
437       <xs:enumeration value="0" />
438       <xs:enumeration value="0.0" />
439       <xs:enumeration value="${0.0}" />
440       <xs:enumeration value="${variable.foo + variable.bar}" />
441       <xs:enumeration value="${layer.foo.x + layer.foo.width + variable.bar_offset_x}" />
442       <xs:enumeration value="${variable.foo + 640.0}" />
443       <xs:enumeration value="${variable.foo - variable.bar}" />
444       <xs:enumeration value="${1.0 - variable.bar}" />
445       <xs:enumeration value="${variable.foo * variable.bar}" />
446       <xs:enumeration value="${variable.foo / variable.bar}" />
447       <xs:enumeration value="${variable.foo % variable.bar}" />
448       <xs:enumeration value="${(variable.a + variable.b) * variable.c}" />
449       <xs:enumeration value="${frame &lt; 50 ? variable.initial_value : variable.value_after_a_while}" />
450       <xs:enumeration value="${sin(angle)}" />
451       <xs:enumeration value="${cos(angle)}" />
452       <xs:enumeration value="${abs(value)}" />
453       <xs:enumeration value="${floor(value)}" />
454       <xs:enumeration value="${length(str)}" />
455       <xs:enumeration value="${animate(expression_to_animate, duration, tweener)}" />
456       <xs:enumeration value="${animate(layer.to_follow.x, 200, &quot;easeoutelastic&quot;)}" />
457     </xs:restriction>
458   </xs:simpleType>
459   <xs:simpleType name="number_expression">
460     <xs:union memberTypes="xs:decimal expression number_expression_examples" />
461   </xs:simpleType>
462
463   <xs:simpleType name="bool_expression_examples">
464     <xs:restriction base="xs:string">
465       <xs:whiteSpace value="collapse" />
466       <xs:enumeration value="${variable.some_number == 50}" />
467       <xs:enumeration value="${variable.some_number != 50}" />
468       <xs:enumeration value="${variable.some_string == &quot;true when strings are equal&quot;}" />
469       <xs:enumeration value="${variable.some_string != &quot;false when strings are equal&quot;}" />
470       <xs:enumeration value="${frame &gt; 50}" />
471       <xs:enumeration value="${frame &lt; 50}" />
472       <xs:enumeration value="${frame &gt;= 50}" />
473       <xs:enumeration value="${frame &lt;= 50}" />
474       <xs:enumeration value="${!variable.some_bool}" />
475     </xs:restriction>
476   </xs:simpleType>
477   <xs:simpleType name="bool_expression">
478     <xs:union memberTypes="boolean expression bool_expression_examples" />
479   </xs:simpleType>
480
481   <xs:simpleType name="any_expression">
482     <xs:union memberTypes="string_expression number_expression bool_expression" />
483   </xs:simpleType>
484
485   <xs:simpleType name="producer_examples">
486     <xs:restriction base="xs:string">
487       <xs:whiteSpace value="collapse" />
488       <xs:enumeration value="RED" />
489       <xs:enumeration value="#AA0000AA" />
490       <xs:enumeration value="amb LOOP" />
491       <xs:enumeration value="rtmp://example.com/stream" />
492       <xs:enumeration value="[HTML] http://casparcg.com" />
493       <xs:enumeration value="[TEXT] &quot;&quot; 0 0 size 30 color #1b698d font ArialMT" />
494       <xs:enumeration value="[TEXT] &quot;Initial text before bound via layer.text_layer.param.text&quot; 0 0 size 30 color #1b698d font ArialMT" />
495       <xs:enumeration value="route://1" />
496       <xs:enumeration value="route://1-10" />
497       <xs:enumeration value="child_scene" />
498       <xs:enumeration value="DECKLINK 8 FORMAT 1080i5000 FILTER DEINTERLACE_BOB" />
499     </xs:restriction>
500   </xs:simpleType>
501
502   <xs:simpleType name="producer_string">
503     <xs:union memberTypes="nonEmptyString producer_examples" />
504   </xs:simpleType>
505
506   <xs:simpleType name="mark_action">
507     <xs:restriction base="xs:string">
508       <xs:whiteSpace value="collapse" />
509       <xs:enumeration value="start" />
510       <xs:enumeration value="stop" />
511       <xs:enumeration value="jump_to" />
512       <xs:enumeration value="remove" />
513     </xs:restriction>
514   </xs:simpleType>
515   <xs:simpleType name="easing">
516     <xs:restriction base="xs:string">
517       <xs:enumeration value="linear" />
518       <xs:enumeration value="easeinquad" />
519       <xs:enumeration value="easeoutquad" />
520       <xs:enumeration value="easeinoutquad" />
521       <xs:enumeration value="easeoutinquad" />
522       <xs:enumeration value="easeincubic" />
523       <xs:enumeration value="easeoutcubic" />
524       <xs:enumeration value="easeinoutcubic" />
525       <xs:enumeration value="easeoutincubic" />
526       <xs:enumeration value="easeinquart" />
527       <xs:enumeration value="easeoutquart" />
528       <xs:enumeration value="easeinoutquart" />
529       <xs:enumeration value="easeoutinquart" />
530       <xs:enumeration value="easeinquint" />
531       <xs:enumeration value="easeoutquint" />
532       <xs:enumeration value="easeinoutquint" />
533       <xs:enumeration value="easeoutinquint" />
534       <xs:enumeration value="easeinsine" />
535       <xs:enumeration value="easeoutsine" />
536       <xs:enumeration value="easeinoutsine" />
537       <xs:enumeration value="easeoutinsine" />
538       <xs:enumeration value="easeinexpo" />
539       <xs:enumeration value="easeoutexpo" />
540       <xs:enumeration value="easeinoutexpo" />
541       <xs:enumeration value="easeoutinexpo" />
542       <xs:enumeration value="easeincirc" />
543       <xs:enumeration value="easeoutcirc" />
544       <xs:enumeration value="easeinoutcirc" />
545       <xs:enumeration value="easeoutincirc" />
546       <xs:enumeration value="easeinelastic" />
547       <xs:enumeration value="easeoutelastic" />
548       <xs:enumeration value="easeinoutelastic" />
549       <xs:enumeration value="easeoutinelastic" />
550       <xs:enumeration value="easeinback" />
551       <xs:enumeration value="easeoutback" />
552       <xs:enumeration value="easeinoutback" />
553       <xs:enumeration value="easeoutintback" />
554       <xs:enumeration value="easeoutbounce" />
555       <xs:enumeration value="easeinbounce" />
556       <xs:enumeration value="easeinoutbounce" />
557       <xs:enumeration value="easeoutinbounce" />
558     </xs:restriction>
559   </xs:simpleType>
560 </xs:schema>