p:transition (CT_SlideTransition, ECMA-376 Part 1 19.3.1.50) describes how a slide appears. It is stored on the
slide that is shown after the transition, a child of p:sld between p:clrMapOvr and
p:timing (python-pptx's CT_Slide child order is cSld, clrMapOvr, transition,
timing, extLst). Effects of individual shapes are on the
Animations page.
Structure
Children, in order (Part 1 Annex A): at most one effect element from the table below, then optional sndAc (sound action), then
optional extLst.
| Attribute | Type, default | Meaning |
|---|---|---|
spd | ST_TransitionSpeed (slow, med, fast), default fast | Speed of the effect (19.7.54). |
advClick | boolean, default true | Whether a mouse click advances the slide. |
advTm | unsignedInt, no default | Time in milliseconds after which the slide advances by itself. It may be combined with advClick; whichever comes first advances. |
Effects
| Element | Attributes (default) | Values |
|---|---|---|
blinds | dir (horz) | ST_Direction: horz, vert |
checker | dir (horz) | horz, vert |
circle | none | |
dissolve | none | |
comb | dir (horz) | horz, vert |
cover | dir (l) | eight-direction: l, u, r, d, lu, ru, ld, rd |
cut | thruBlk (false) | boolean: pass through black |
diamond | none | |
fade | thruBlk (false) | boolean |
newsflash | none | |
plus | none | |
pull | dir (l) | eight-direction |
push | dir (l) | side direction: l, u, r, d |
random | none | |
randomBar | dir (horz) | horz, vert |
split | orient (horz), dir (out) | orient: horz, vert; dir: in, out |
strips | dir (lu) | corner direction: lu, ru, ld, rd |
wedge | none | |
wheel | spokes (4) | unsignedInt number of spokes |
wipe | dir (l) | side direction |
zoom | dir (out) | in, out |
The direction types are ST_TransitionSideDirectionType (l, u, r, d, 19.7.53),
ST_TransitionCornerDirectionType (lu, ru, ld, rd, 19.7.50),
ST_TransitionEightDirectionType (the union of the two, 19.7.51) and ST_TransitionInOutDirectionType (in, out, 19.7.52).
(An earlier version of this page gave the numbers 19.7.50 to 19.7.53 in a different order; the order here is that of the headings of Part 1.)
What each effect does
From the descriptions in ECMA-376 Part 1 19.5 (research/ooxml/ecma376/p1/part1.txt, sections 19.5.18 to 19.5.97 for each effect). The standard
adds, for every effect, that the renderings shown are examples only and that the exact rendering is determined by the application, so the same
transition can look different in different programs.
| Element | Section | Description in the standard |
|---|---|---|
blinds | 19.5.18 | A set of horizontal or vertical bars, wiped left to right or top to bottom respectively, until the new slide is fully shown. |
checker | 19.5.24 | A set of horizontal or vertical checkerboard squares, wiped left to right or top to bottom respectively. |
circle | 19.5.26 | A circle pattern centred on the slide that grows until the new slide is fully shown. |
comb | 19.5.30 | A set of horizontal or vertical bars wiped from one end of the slide to the other. |
cover | 19.5.32 | The new slide moves in from off screen, covering more and more of the previous slide. |
cut | 19.5.34 | The previous slide is replaced by the new one instantly, with no animation; thruBlk cuts to a black screen first. |
diamond | 19.5.35 | A diamond pattern centred on the slide that grows until the new slide is fully shown. |
dissolve | 19.5.36 | Randomly placed squares that keep being added until the new slide is fully shown. |
fade | 19.5.41 | The previous slide fades smoothly to the new one, or, with thruBlk, first to black and then to the new slide. |
newsflash | 19.5.50 | The new slide grows and spins counter-clockwise into place over the previous one. |
plus | 19.5.54 | A plus pattern centred on the slide that grows until the new slide is fully shown. |
pull | 19.5.58 | The previous slide moves off screen, revealing more and more of the new slide. |
push | 19.5.59 | The new slide moves in from off screen and pushes the previous slide off to the opposite side. |
random | 19.5.60 | A transition chosen at random from the set the application offers, so it can differ every time. |
randomBar | 19.5.61 | Randomly placed horizontal or vertical bars that keep being added until the new slide is fully shown. |
split | 19.5.71 | The new slide is revealed on top of the previous one by a horizontal or vertical wipe, from the outside in or the inside out. |
strips | 19.5.74 | Staggered bars wiped across the screen in a corner direction. |
wedge | 19.5.94 | Two radial edges wipe from top to bottom in opposite directions. |
wheel | 19.5.95 | Radial edges ("pie pieces", the number being spokes) wiped clockwise. |
wipe | 19.5.96 | The new slide is wiped over the previous one from one edge of the screen to the opposite one. |
zoom | 19.5.97 | A box pattern centred on the slide that grows (in or out) until the new slide is fully shown. |
The examples in the standard use strips with ld, lu, rd and ru, and wheel with 1, 2, 3, 4 and 8
spokes. The defaults in the table above agree with the schema types CT_SideDirectionTransition, CT_CornerDirectionTransition,
CT_EightDirectionTransition, CT_OrientationTransition, CT_InOutTransition, CT_OptionalBlackTransition,
CT_SplitTransition and CT_WheelTransition in the Annex A text of Part 1 (checked).
PowerPoint behaviour
For wheel, PowerPoint supports 1, 2, 3, 4 and 8 spokes; any other spokes value is mapped to the nearest supported one
(MS-OI29500 2.1.1186).
Microsoft extension transitions
[MS-PPTX] v20240820 (research/ooxml/ms/MS-PPTX.txt) 2.2.1 extends p:sld, p:sldLayout and p:sldMaster
with an mc:AlternateContent child whose mc:Choice elements each hold a p:transition, one for each of the namespaces
http://schemas.microsoft.com/office/powerpoint/2010/main (prefix p14 here), .../2012/main (p15) and .../2015/09/main (called p159 on this page; the standard does not fix prefixes), and whose
mc:Fallback holds a plain p:transition that any reader can use. The p:transition element gets the new effect elements in
the table below added to its choice, and the new attribute p14:dur (2.3.2.3, type ST_UniversalTimeOffset 2.3.4.6), the time the
transition takes from start to finish. The standard's own example (3.1) is:
<mc:AlternateContent>
<mc:Choice Requires="p14">
<p:transition spd="slow" p14:dur="1500"><p14:ripple dir="ld"/></p:transition>
</mc:Choice>
<mc:Fallback>
<p:transition spd="slow"><p:fade/></p:transition>
</mc:Fallback>
</mc:AlternateContent>
The text says dur="1500" means the transition runs for 1.5 seconds (3.1); ST_UniversalTimeOffset is a number with an optional unit, and a number
alone is milliseconds. A reader that does not know p14 takes the fallback, so a file that uses a new effect always also names an older one.
| Element | Namespace, section | Type, attributes (default) |
|---|---|---|
vortex, pan | p14, 2.3.1.30, 2.3.1.21 | p:CT_SideDirectionTransition: dir (l) |
switch, flip, ferris, gallery, conveyor | p14, 2.3.1.29, .11, .9, .13, .3 | CT_LeftRightDirectionTransition (2.3.3.10): dir, l or r (2.3.4.3); the schema fragment shows no default |
ripple | p14, 2.3.1.24 | CT_RippleTransition (2.3.3.23): dir (center): a corner (lu, ru, ld, rd) or center (2.3.4.2) |
honeycomb, flash | p14, 2.3.1.15, 2.3.1.10 | p:CT_Empty: no attributes |
prism | p14, 2.3.1.22 | CT_PrismTransition (2.3.3.20): dir (l), isContent (false: content and background drawn separately when true), isInverted (false: concave instead of convex when true) |
doors, window | p14, 2.3.1.7, 2.3.1.33 | p:CT_OrientationTransition: dir (horz) |
glitter | p14, 2.3.1.14 | CT_GlitterTransition (2.3.3.6): dir (l), pattern (diamond; or hexagon, 2.3.4.4) |
warp | p14, 2.3.1.31 | p:CT_InOutTransition: dir (out) |
flythrough | p14, 2.3.1.12 | CT_FlyThroughTransition (2.3.3.5): dir (in), hasBounce (false) |
shred | p14, 2.3.1.28 | CT_ShredTransition (2.3.3.30): pattern (strip, or rectangle, 2.3.4.5), dir (in) |
reveal | p14, 2.3.1.23 | CT_RevealTransition (2.3.3.22): thruBlk (false), dir (l; l or r) |
wheelReverse | p14, 2.3.1.32 | p:CT_WheelTransition: spokes (4) |
prstTrans | p15, 2.4.3.8 | CT_PresetTransition: prst (string, the name of an internal resource of the program), invX (false), invY (false): invert the X or Y coordinates, which turns a left preset into a right one or an up preset into a down one |
morph | p159, 2.6.1.1, 2.6.3.1 | option (required): byObject, byWord or byChar: match and move objects only, objects and words, or objects and characters (2.6.4.1) |
The defaults of the p: types (CT_SideDirectionTransition, CT_OrientationTransition, CT_InOutTransition, CT_WheelTransition) are those of the
table above (Part 1 Annex A, as the preceding section says). The preset names that [MS-PPTX] 2.4.3.8 lists for prstTrans@prst are
fallOver, drape, curtains, wind, prestige, fracture, crush,
peelOff, pageCurlDouble, pageCurlSingle, airplane and origami. The text only shows each as a figure; the
type is a free string, so other names can occur.
Sound
sndAc (CT_TransitionSoundAction) holds one of stSnd (start sound) or endSnd (stop the sound currently playing,
empty). stSnd contains snd, a reference to an embedded WAV audio file (the relationship is given in r:embed, with an optional name),
and has the attribute loop (boolean, default false) to repeat the sound until the next sound or slide.
What the programs do
python-pptx declares p:transition in the slide's child order but has no transition API; the element is passed through unchanged
(pptx/oxml/slide.py).
In the explorer
The explorer shows the transition element and its attributes in the tree. The presentation view lists, for each slide, the effect with its attributes
(for example ripple (dir=ld)), the attributes of p:transition (spd, advTm, dur) and the sound
action. For an mc:AlternateContent it lists the first mc:Choice, not the fallback. Transitions are not played: no effect, standard or
extension, is animated.
Per effect: none of the 21 standard effects (blinds, checker, circle, comb, cover,
cut, diamond, dissolve, fade, newsflash, plus, pull,
push, random, randomBar, split, strips, wedge, wheel,
wipe, zoom) is played. The reason is the standard itself: it fixes the direction, orientation, spoke count and speed
keyword (spd), but gives no frames, no easing, no square or bar size and no duration in seconds for any of them, and says the exact rendering
is determined by the application (see above); random and dissolve are random by definition. An invented animation would be the
explorer’s own look, not the format’s, so none is drawn. cut is the one effect with no motion; the explorer shows the new slide at
once, as everywhere, and does not show the black screen of thruBlk. The Microsoft extension effects (the p14: ones above) have
the same limit, and their fallback transition is not played either.
Sources
- ECMA-376 Part 1: 19.3.1.50, 19.5 (the transition effect elements), 19.7.50 to 19.7.54, Annex A (CT_SlideTransition).
- MS-OI29500: 2.1.1186.
- [MS-PPTX] v20240820: 2.2.1, 2.3.1.3 to 2.3.1.33 (the transition elements), 2.3.2.3, 2.3.3.5, 2.3.3.6, 2.3.3.10, 2.3.3.20, 2.3.3.22, 2.3.3.23, 2.3.3.30, 2.3.4.1 to 2.3.4.6, 2.4.3.8, 2.6, 3.1.
- python-pptx
pptx/oxml/slide.py.