Skip to content

Animation.set_default #3142

@wildmathing

Description

@wildmathing

Description of proposed feature

One of the useful things in ManimCE for me is set_default method, that can be applied to any subclass of Mobject. Code without duplicates of **mob_kwargs is always nice to look at. What about Animations? I often correct the default values of Create and Uncreate, Write and Unwrite, Indicate, DrawBorderThenFill, Flash and AnimationGroup. Not only run_time, but rate_func, lag_ratio and so on. The values depend on project, that's why editing them in a single Scene is more convinient then editing the source code. Maybe other creators find this feature usefull too.

How can the new feature be used?

Indicate.set_default(run_time=3, scale_factor=1.5)
Flash.set_default(num_lines=24)
AnimationGroup.set_default(lag_ratio=0.1)

Additional comments

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    experimentalnew featureEnhancement specifically adding a new feature (feature request should be used for issues instead)

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions