ManimCommunity / ManimCommunity/manim

:class:`~.Unwrite` is affected by the direction of :class:`~.Write` previously applied to the text

Open
#1,795 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

issue:bug
Dominant language
Python
Stars
40.9k
Forks
3.1k
Avg merge
3d 12h
Merged PRs (30d)
25

Description

## Description of bug / unexpected behavior
Tested with the following code:

```py
class Test(Scene):
def construct(self):
a = Text("Hello").scale(3)
self.play(Write(a))
self.play(Unwrite(a))
```

results in:

https://user-images.githubusercontent.com/9102529/125365556-08b42780-e3a7-11eb-8c90-0e2fe7de53f5.mp4

but

```py
class Test(Scene):
def construct(self):
a = Text("Hello").scale(3)
self.play(Write(a), reverse=True)
self.play(Unwrite(a))
```

results in

https://user-images.githubusercontent.com/9102529/125365612-28e3e680-e3a7-11eb-880d-428d11201137.mp4

Changing the direction of `Write` changes the direction of `Unwrite`, which shouldn't be the case.

## Expected behavior

## How to reproduce the issue

Code for reproducing the problem

```py
Paste your code here.
```

## Additional media files

Images/GIFs

## Logs
Terminal output

```
PASTE HERE OR PROVIDE LINK TO https://pastebin.com/ OR SIMILAR
```

## System specifications

System Details

- OS (with version, e.g Windows 10 v2004 or macOS 10.15 (Catalina)):
- RAM:
- Python version (`python/py/python3 --version`):
- Installed modules (provide output from `pip list`):
```
PASTE HERE
```

LaTeX details

+ LaTeX distribution (e.g. TeX Live 2020):
+ Installed LaTeX packages:

FFMPEG

Output of `ffmpeg -version`:

```
PASTE HERE
```

## Additional comments

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the behavior with the provided Scene example, comparing Unwrite after Write(a) and after Write(a, reverse=True). Start by reading the Write and Unwrite implementations; done means changing Write's direction no longer changes the direction used by the subsequent Unwrite animation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.