Skip to content

fix(init): reverse default resolution when using manim init project --default - #4839

Merged
chopan050 merged 2 commits into
ManimCommunity:mainfrom
aoxiangtianyu-go:fix/correct-CFG_DEFAULTS
Jul 8, 2026
Merged

fix(init): reverse default resolution when using manim init project --default#4839
chopan050 merged 2 commits into
ManimCommunity:mainfrom
aoxiangtianyu-go:fix/correct-CFG_DEFAULTS

Conversation

@aoxiangtianyu-go

Copy link
Copy Markdown
Contributor

Overview: What does this pull request change?

This PR fixes a resolution inconsistency between the --default project initialization path and the interactive resolution selection flow.

The current CFG_DEFAULTS defines:

"resolution": (1920, 1080)

which is interpreted as (pixel_height, pixel_width) in the configuration system, resulting in an inverted default resolution compared to the interactive 1080p selection path and QUALITIES definitions.

It is updated to:

"resolution": (1080, 1920)

to align the --default initialization behavior with the rest of the CLI resolution pipeline.


Motivation and Explanation: Why and how do your changes improve the library?

There is an inconsistency in how resolution tuples are represented during initialization:

  • select_resolution() returns (pixel_height, pixel_width)
  • QUALITIES defines resolution explicitly using pixel_height and pixel_width
  • update_cfg() interprets resolution tuples as (height, width)

However, CFG_DEFAULTS previously defined resolution as (1920, 1080), which is inconsistent with this convention and leads to inverted default behavior when using manim init --default.

This reduces ambiguity and prevents unexpected inversion of width/height when using default project initialization.


Links to added or changed documentation pages

No documentation changes are required for this fix.


Further Information and Comments

There are broader architectural inconsistencies in how resolution is represented across the initialization pipeline (tuple-based vs explicit pixel_height/pixel_width fields).

This change is intentionally minimal and scoped only to correcting the default initialization value.

@chopan050 chopan050 changed the title fix(init): correct resolution tuple ordering in CFG_DEFAULTS fix(init): reverse default resolution when using manim init project --default Jul 8, 2026
@chopan050
chopan050 enabled auto-merge (squash) July 8, 2026 18:45

@chopan050 chopan050 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for this fix!

@chopan050
chopan050 merged commit fa8f9da into ManimCommunity:main Jul 8, 2026
16 of 17 checks passed
@behackl behackl added the pr:bugfix Bug fix for use in PRs solving a specific issue:bug label Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:bugfix Bug fix for use in PRs solving a specific issue:bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants