Skip to content

AI turns documents or topics into real, native PowerPoint decks—with native shapes, transitions and animations, data-backed charts and tables on demand, audio narration from speaker notes, and support for your own .pptx templates. · by Hugo He

fix(workflows): preserve source motion and sparse overrides

hugohe3496adac926de
diff --git a/skills/ppt-master/scripts/native_enhance_pptx_core.py b/skills/ppt-master/scripts/native_enhance_pptx_core.py
index 0c8ef1fd..1df2c525 100644
--- a/skills/ppt-master/scripts/native_enhance_pptx_core.py
+++ b/skills/ppt-master/scripts/native_enhance_pptx_core.py
@@ -1505,6 +1505,13 @@ def _resolve_transition_plan(
apply_without_audio = (
cli_apply_without_audio or raw_apply_without_audio
)
+ if (
+ "audio" not in modules
+ and ("transitions" in modules or cli_effect is not None)
+ ):
+ # A confirmed global transition is independently actionable. The
+ # narrated-only scope switch matters only while audio is enabled.
+ apply_without_audio = True
raw_slides = transitions_cfg.get("slides", {})
if not isinstance(raw_slides, dict):
@@ -1536,17 +1543,6 @@ def _resolve_transition_plan(
slide_index=slide_index,
)
- if (
- ("transitions" in modules or cli_effect is not None)
- and "audio" not in modules
- and not apply_without_audio
- and not slide_enters
- ):
- raise ValueError(
- "transitions is enabled, but no slides are reachable: enable audio, "
- "set apply_without_audio=true, or add transitions.slides entries"
- )
-
return ResolvedTransitionPlan(
global_enter=global_enter,
slide_enters=slide_enters,
@@ -2280,7 +2276,10 @@ def build_parser() -> argparse.ArgumentParser:
init.add_argument(
"--apply-transition-without-audio",
action="store_true",
- help="draft the plan with page transitions for slides without audio",
+ help=(
+ "when audio is enabled, draft transitions for slides without audio "
+ "as well"
+ ),
)
init.set_defaults(func=init_project)
@@ -2309,7 +2308,10 @@ def build_parser() -> argparse.ArgumentParser:
"--apply-transition-without-audio",
action="store_true",
default=None,
- help="include page transitions for slides without audio",
+ help=(
+ "when audio is enabled, include page transitions for slides "
+ "without audio"
+ ),
)
plan.set_defaults(func=plan_project)
@@ -2332,7 +2334,10 @@ def build_parser() -> argparse.ArgumentParser:
apply.add_argument(
"--apply-transition-without-audio",
action="store_true",
- help="also write page transitions on slides that do not have audio",
+ help=(
+ "when audio is enabled, also write page transitions on slides "
+ "without audio"
+ ),
)
apply.set_defaults(func=apply_project)
diff --git a/skills/ppt-master/scripts/svg_to_pptx/animation_config.py b/skills/ppt-master/scripts/svg_to_pptx/animation_config.py
index 1b7d0010..8f78cae5 100644
--- a/skills/ppt-master/scripts/svg_to_pptx/animation_config.py
+++ b/skills/ppt-master/scripts/svg_to_pptx/animation_config.py
@@ -912,8 +912,9 @@ def validate_animation_config(
"""Return sidecar-reference diagnostics for ``svg_output``.
Fatal field/type/value checks are owned by
- :func:`validate_animation_config_errors`. Anonymous groups are warnings;
- missing slides/groups and structural targets are fatal at export call sites.
+ :func:`validate_animation_config_errors`. Anonymous groups are warnings;
+ references to missing slides/groups and structural targets are fatal at
+ export call sites. Slides omitted from a sparse sidecar inherit defaults.
"""
if config is None:
config = load_animation_config(project_path, config_path)
@@ -945,9 +946,6 @@ def validate_animation_config(
slides = config.get('slides', {})
if not isinstance(slides, dict):
return list(dict.fromkeys(warnings))
- for slide_name in sorted(known_slides - set(slides)):
- warnings.append(f'animations.json omits slide: {slide_name}')
-
for slide_name, slide_cfg in slides.items():
if slide_name not in known_slides:
warnings.append(f'animations.json references missing slide: {slide_name}')
diff --git a/skills/ppt-master/scripts/template_fill_pptx/cli.py b/skills/ppt-master/scripts/template_fill_pptx/cli.py
index d2125d34..a04aa0e2 100644
--- a/skills/ppt-master/scripts/template_fill_pptx/cli.py
+++ b/skills/ppt-master/scripts/template_fill_pptx/cli.py
@@ -127,11 +127,11 @@ def build_parser() -> argparse.ArgumentParser:
],
default=DEFAULT_TRANSITION,
help=(
- "Page-to-page transition applied to every cloned slide "
+ "Page-to-page transition policy for every cloned slide "
"(per-slide 'transition' in the plan overrides this). "
"Use a PowerPoint-native key; old names are compatibility inputs. "
- f"Default: {DEFAULT_TRANSITION}. Use 'none' for no motion, "
- "or 'keep' to preserve each source slide's existing transition."
+ f"Default: {DEFAULT_TRANSITION} (preserve the source). "
+ "Use 'none' to remove visual motion."
),
)
apply.add_argument(
diff --git a/skills/ppt-master/scripts/template_fill_pptx/transitions.py b/skills/ppt-master/scripts/template_fill_pptx/transitions.py
index 3ba86623..fd5d942a 100644
--- a/skills/ppt-master/scripts/template_fill_pptx/transitions.py
+++ b/skills/ppt-master/scripts/template_fill_pptx/transitions.py
@@ -1,9 +1,8 @@
"""apply: page-to-page transitions for cloned slides.
-Native templates usually ship an empty ``<p:transition/>`` that renders as no
-motion, so ``apply`` injects a default transition unless told to ``keep`` the
-source or set ``none``. Effects and OOXML mutation come from the shared
-``pptx_transitions`` core so every PPTX path uses the same writer.
+Template Fill preserves each source transition unless the CLI or a per-slide
+plan entry requests a replacement. Effects and OOXML mutation come from the
+shared ``pptx_transitions`` core so every PPTX path uses the same writer.
"""
from __future__ import annotations
@@ -19,12 +18,11 @@ from pptx_transitions import (
validate_seconds,
)
-# Default page transition injected by `apply` when neither the CLI flag nor a
-# per-slide plan field asks for something else. Use `keep` to preserve the
-# source transitions instead.
-DEFAULT_TRANSITION = "fade"
-DEFAULT_TRANSITION_DURATION = 0.5
KEEP_TRANSITION = "keep"
+# Preserve source transitions unless the CLI or a per-slide plan entry selects
+# a replacement. The duration is consumed only when a visual effect is written.
+DEFAULT_TRANSITION = KEEP_TRANSITION
+DEFAULT_TRANSITION_DURATION = 0.5
_UNSET = object()