]> git.sesse.net Git - casparcg/blobdiff - core/producer/scene/scene.xsd
[scene_producer] Added possibility to CALL/CG PLAY/CG STOP/CG NEXT/CG INVOKE layers...
[casparcg] / core / producer / scene / scene.xsd
index ea0f78151b20141ed3e0c5809a46c858d1808812..4fcffe0bbc0222dd7f8f6edf57acb1092864540b 100644 (file)
@@ -1,7 +1,7 @@
 <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">
   <xs:element name="scene">
     <xs:complexType>
-      <xs:sequence>
+      <xs:all>
         <xs:element name="variables">
           <xs:annotation>
             <xs:documentation>
@@ -10,8 +10,9 @@
               Public variables are accessible as CG parameters and by the parent scene when nested inside another.
               There are some variables that are always defined like
               "frame" which stores the number of frames that have gone by since the scene producer started,
-              "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) and
-              "timeline_frame" which differs from "frame" in that it can rewind and jump, depending on where the timeline is at the moment.
+              "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),
+              "timeline_frame" which differs from "frame" in that it can rewind and jump, depending on where the timeline is at the moment and
+              "scene_width" and "scene_height" which contains the dimensions of the scene coordinate system.
             </xs:documentation>
           </xs:annotation>
           <xs:complexType>
@@ -35,7 +36,7 @@
                     <xs:extension base="any_expression">
                       <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>
                       <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>
-                      <xs:attribute type="boolean" name="public" use="required"><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>
+                      <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>
                     </xs:extension>
                   </xs:simpleContent>
                 </xs:complexType>
@@ -81,7 +82,7 @@
                     <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>
                     <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>
                     <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>
-                    <xs:element name="adjustment" minOccurs="0">
+                    <xs:element name="adjustments" minOccurs="0">
                       <xs:annotation>
                         <xs:documentation>
                           Properties regarding image adjustments. They are addressable from expressions as layer.[id].adjustment.[property].
                         <xs:documentation>
                           Each keyframe specifies a value that the variable should have at a specific timeline frame.
                           The value can be either immediately changed if no easing is specified, otherwise it is animated to the value with the given easing curve.
+                          The actual value to animate to can itself be an expression.
                         </xs:documentation>
                       </xs:annotation>
                       <xs:complexType>
                         <xs:simpleContent>
-                          <xs:extension base="xs:decimal">
+                          <xs:extension base="number_expression">
                             <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>
                             <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>
                           </xs:extension>
             <xs:field xpath="@variable" />
           </xs:unique>
         </xs:element>
-      </xs:sequence>
+        <xs:element name="tasks" minOccurs="0">
+          <xs:annotation>
+            <xs:documentation>
+              Tasks are scheduled to happen whenever a certain condition arises.
+              Use the at attribute to let the condition be that the timeline arrives at a specific frame
+              or the when attribute to specify a custom bool expression that when becomes true triggers the task.
+            </xs:documentation>
+          </xs:annotation>
+          <xs:complexType>
+            <xs:choice minOccurs="0" maxOccurs="unbounded">
+              <xs:element name="call">
+                <xs:annotation><xs:documentation>Performs the equivalent of an AMCP CALL on the specified layer.</xs:documentation></xs:annotation>
+                <xs:complexType>
+                  <xs:sequence maxOccurs="unbounded">
+                    <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>
+                  </xs:sequence>
+                  <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>
+                  <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>
+                  <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>
+                </xs:complexType>
+              </xs:element>
+              <xs:element name="cg_play">
+                <xs:annotation><xs:documentation>Performs the equivalent of a CG PLAY on the specified layer.</xs:documentation></xs:annotation>
+                <xs:complexType>
+                  <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>
+                  <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>
+                  <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>
+                </xs:complexType>
+              </xs:element>
+              <xs:element name="cg_stop">
+                <xs:annotation><xs:documentation>Performs the equivalent of a CG STOP on the specified layer.</xs:documentation></xs:annotation>
+                <xs:complexType>
+                  <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>
+                  <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>
+                  <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>
+                </xs:complexType>
+              </xs:element>
+              <xs:element name="cg_next">
+                <xs:annotation><xs:documentation>Performs the equivalent of a CG NEXT on the specified layer.</xs:documentation></xs:annotation>
+                <xs:complexType>
+                  <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>
+                  <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>
+                  <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>
+                </xs:complexType>
+              </xs:element>
+              <xs:element name="cg_invoke">
+                <xs:annotation><xs:documentation>Performs the equivalent of a CG INVOKE on the specified layer with the specified label.</xs:documentation></xs:annotation>
+                <xs:complexType>
+                  <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>
+                  <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>
+                  <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>
+                  <xs:attribute name="label" use="required" type="nonEmptyString"><xs:annotation><xs:documentation>The label that will be invoked.</xs:documentation></xs:annotation></xs:attribute>
+                </xs:complexType>
+              </xs:element>
+            </xs:choice>
+          </xs:complexType>
+        </xs:element>
+      </xs:all>
       <xs:attribute type="xs:positiveInteger" name="width" use="required" />
       <xs:attribute type="xs:positiveInteger" name="height" use="required" />
     </xs:complexType>