Repository: ManimCommunity/manim

Issue:
Scene caching doesn't account for mobject order
## Description of bug / unexpected behavior
<!-- Add a clear and concise description of the problem you encountered. -->
Rendering two scenes containing mobjects in the same positions but in different order consecutively and while using scene caching results in the same scene. More specifically, starting with a clean cache and rendering this scene:
```python
from manim import *


class DraftScene(MovingCameraScene):
    def construct(self):
        circle = Circle().set_fill(color=RED, opacity=1)
        square = Square().set_fill(color=GREEN, opacity=1).shift(0.5 * UP)
        rectangle = Rectangle().set_fill(color=BLUE, opacity=1).shift(1 * UP)

        self.add(rectangle)
        self.add(square)
        self.add(circle)
        self.wait()
```
generates a scene with this still image
![DraftScene](https://user-images.githubusercontent.com/43117506/101304655-9f0ee200-37f5-11eb-9eda-6811c22591ca.png)

then afterward rendering this scene:
```python
from manim import *


class DraftScene(MovingCameraScene):
    def construct(self):
        circle = Circle().set_fill(color=RED, opacity=1)
        square = Square().set_fill(color=GREEN, opacity=1).shift(0.5 * UP)
        rectangle = Rectangle().set_fill(color=BLUE, opacity=1).shift(1 * UP)

        self.add(rectangle)
        self.add(circle)  # the circle and square are swapped.
        self.add(square)
        self.wait()
```
generates the same still frame. The problem doesn't occur if scene caching is disabled or if an image is generated rather than a scene with the `-s` flag.


## Expected behavior
<!-- Add a clear and concise description of what you expected to happen. -->
The scene should change when the order of the mobjects is changed.


## Logs
<details><summary>Terminal output</summary>
<!-- Add "-v DEBUG" when calling manim to generate more detailed logs -->

```
[12/06/20 19:09:30] WARNING  creating dummy animation                                                   animation.py:57
                    DEBUG    Hashing ...                                                                 hashing.py:239
                    DEBUG    Hashing done in 0.005885 s.                                                 hashing.py:254
                    DEBUG    Hash generated :  358529350_3669990374_3864889042                           hashing.py:258
                    INFO     Animation 0 : Using cached data (hash : 358529350_3669990374_3864889042)     caching.py:39
                    DEBUG    List of the first few animation hashes of the scene:                         caching.py:48
                             ['358529350_3669990374_3864889042']
                    DEBUG    Partial movie files to combine (1 files): ['/home/devneal/github/ scene_file_writer.py:429
                             manim/media/videos/draft/480p15/partial_movie_files/DraftScene/35
                             8529350_3669990374_3864889042.mp4']
                    INFO                                                                       scene_file_writer.py:551
                             File ready at /home/devneal/github/manim/media/videos/draft/480p1
                             5/DraftScene.mp4

                    INFO     Rendered DraftScene                                                           scene.py:104
                             Played 1 animations

```

<!-- Insert screenshots here (only when absolutely necessary, we prefer copy/pasted output!) -->

</details>


## System specifications

<details><summary>System Details</summary>

- OS (with version, e.g Windows 10 v2004 or macOS 10.15 (Catalina)): Arch Linux
- RAM: 16GB
- Python version (`python/py/python3 --version`): 3.8
- Installed modules (provide output from `pip list`): N/A

</details>

<details><summary>FFMPEG</summary>

Output of `ffmpeg -version`: N/A

</details>



Discussion:
The rendering order is (for now) determined by the order of the `Scene.mobjects` list. Is that list not being cached? cc @ManimCommunity/scene-caching 

Resolving patch:
diff --git a/manim/utils/hashing.py b/manim/utils/hashing.py
--- a/manim/utils/hashing.py
+++ b/manim/utils/hashing.py
@@ -243,9 +243,7 @@ def get_hash_from_play_call(
     t_start = perf_counter()
     camera_json = get_json(get_camera_dict_for_hashing(camera_object))
     animations_list_json = [get_json(x) for x in sorted(animations_list, key=str)]
-    current_mobjects_list_json = [
-        get_json(x) for x in sorted(current_mobjects_list, key=str)
-    ]
+    current_mobjects_list_json = [get_json(x) for x in current_mobjects_list]
     hash_camera, hash_animations, hash_current_mobjects = [
         zlib.crc32(repr(json_val).encode())
         for json_val in [camera_json, animations_list_json, current_mobjects_list_json]
@@ -290,9 +288,7 @@ def get_hash_from_wait_call(
     # We add the scene object within the ALREADY_PROCESSED_ID, as we don't want to process because pretty much all of its attributes will be soon or later processed (in one of the three hashes).
     ALREADY_PROCESSED_ID = {id(scene_object): scene_object}
     camera_json = get_json(get_camera_dict_for_hashing(camera_object))
-    current_mobjects_list_json = [
-        get_json(x) for x in sorted(current_mobjects_list, key=str)
-    ]
+    current_mobjects_list_json = [get_json(x) for x in current_mobjects_list]
     hash_current_mobjects = zlib.crc32(repr(current_mobjects_list_json).encode())
     hash_camera = zlib.crc32(repr(camera_json).encode())
     if stop_condition_function is not None:


Test patch: