Skip to content

Bug: add_fixed_in_frame_mobjects in ThreeDScene is not working anymore #264

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kolibril13 opened this issue Aug 10, 2020 · 2 comments
Closed
Labels
pr:bugfix Bug fix for use in PRs solving a specific issue:bug

Comments

@kolibril13
Copy link
Member

When running this:

from manim import *
class Text3D(ThreeDScene):
    def construct(self):
        axes = ThreeDAxes()
        self.set_camera_orientation(phi=75 * DEGREES,theta=-45*DEGREES)
        text=TextMobject("This is a 3D text")
        self.add_fixed_in_frame_mobjects(text)
        self.add(axes)
        self.add(text)
        self.wait()

I get the following error:
AttributeError: 'tuple' object has no attribute 'sort'
I guess that is related to the z_index implementation, #122 , @PgBiel ?

@kolibril13 kolibril13 added the pr:bugfix Bug fix for use in PRs solving a specific issue:bug label Aug 11, 2020
@PgBiel
Copy link
Member

PgBiel commented Aug 12, 2020

  1. May you please provide a more complete log, indicating where the error occurred?
  2. (Regarding your question) Does replacing mobjects.sort(...) (camera.py, somewhere around line 418) by mobjects = sorted(mobjects, ...) fix it?

@kolibril13
Copy link
Member Author

Yes, it fixes it!
I will make a pull request.

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

No branches or pull requests

2 participants