Skip to content

Text repr to display current text #3915

@tuncbkose

Description

@tuncbkose

Currently, Text objects have

def __repr__(self):
return f"Text({repr(self.original_text)})"

and similarly for SingleStringMathTex
def __repr__(self):
return f"{type(self).__name__}({repr(self.tex_string)})"

I recently made an animation that involved Transforming text objects repeatedly, during which the logging displays the original text of the objects and not their current state. This makes debugging problems slightly more work, as it can be more difficult to differentiate at what part of the scene something went wrong.

Is there a reason for the current behavior? And is there interest in changing it to display updated information? I imagine self.original_text may be changed to self.text and maybe the Transform can update tex_string itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions