Skip to content

Support classless construct #4933

Description

@GniLudio

Description of proposed feature

It would be nice if the manim commands supports construct functions with a surrounding class, similar to how the manimator does it on discord.

from manim import *

def construct(self: Scene) -> None:
    self.add(Circle())

How can the new feature be used?

  1. Makes it easier to set up small scenes.
  2. Makes it easier to use snippets that were shared on discord.

Additional comments

The manimator also supports omitting the

from manim import *

but I haven't decided on whether I would like to see support of that too.

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions