question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorporating own code into manimlib

See original GitHub issue

I would like to add functions to the manimlib that are callable in any new scene class.

Therefore, I created some new classes (e.g. class_name) with respective functions, in function.py and added a map to the manimlib folder, say functions. The I added a line to the imports.py file found in the manimlib folder:

from manimlib.functions.function import *

Now when I start a new Scene, I can indeed reach those new functions, when I type

class_name.function_name(parameters) but Visual Code does not seem to recognize those. That is, they run and they work just as they should, but Visual Studio does not auto-complete or suggest the functions or parameters. Is this solvable? Because this now takes a lot of going back and forth and the whole idea to automatize this is lost.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
Aathish04commented, May 2, 2020

I don’t think this is a Manim issue. It seems to be more related to VSCode.

I use VSCode myself, and can’t get any Manim objects to show up in IntelliSense, which I find pretty funny.

1reaction
Aathish04commented, May 3, 2020

Yea this seems like a VSCode issue if you could let us know if you find a solution in the future that would be great but as of now we should probably close this issue

But can you confirm this does not occur when using other IDE?

I know for a fact that users of Vim have it autocomplete even custom manim stuff for them.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Overall Structure of Manim and your first Basic ... - YouTube
We will do a tutorial on the most basic animations and the overall structure of the ... =D Code used: from manimlib.imports import...
Read more >
VSCode Tips for Python and Manim - YouTube
We take a look into the PyLance Server, creating our own tasks and a couple of more things along the way that can...
Read more >
[Example code]-Cannot install this manim lib for python
I'm trying to install manim, (see here: https://github.com/3b1b/manim). I'm using python version 3.7.7. I've followed the steps of this video ...
Read more >
Top 5 manimlib Code Examples - Snyk
Learn more about how to use manimlib, based on manimlib code examples created from the most popular ways it is used in public...
Read more >
Manim | Animation Engine for Explanatory Math Videos - Morioh
If you want to hack on manimlib itself, clone this repository and in that ... and feel free to look through the code...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found