ManimCommunity / manim_editor

Web Presenter for Mathematical Animations using Manim.
https://docs.editor.manim.community
MIT License
257 stars 12 forks source link

Manedit don't detect projects although the directory exists #76

Closed clementpoiret closed 2 years ago

clementpoiret commented 2 years ago

Hey, it's me again, sorry for opening so many issues in such a shot period of time! I'm still working on the same project, but this time I updated to manedit 0.3.4.

Unlike v0.3.3, it doesn't find created projects in the main "Project Selection" page, but detects that a project already exists when we want to create a project with the same name.

Steps to reproduce:

christopher-besch commented 2 years ago

I'll look at it, but I might not finish it today.

christopher-besch commented 2 years ago

I failed to replicate the problem. I ran manim --save_sections hsf.py Segmentation and then manim_editor in the same directory. In the Manim Editor I selected create a new project, called it HSF, selected the Segmentation scene and confirmed. Then I got to see this: image

Did you do anything differently?

clementpoiret commented 2 years ago

Hmm that's strange. Here is my full folder after running manim --save_sections hsf.py, as you can see, nothing is found by manedit

HSF.tar.gz

2021-11-22 09 57 19 localhost c4db016ee442

clementpoiret commented 2 years ago

By exporting only with manim --save_sections hsf.py Segmentation (like you did), manedit works as expected, showing the project. I personnaly exported all but BaseHsf, and tried to create a project on manedit with either all sections, or only one (in the case I uploaded in previous post, only preprocessing)

christopher-besch commented 2 years ago

Hmm that's strange. Here is my full folder after running manim --save_sections hsf.py, as you can see, nothing is found by manedit

HSF.tar.gz

2021-11-22 09 57 19 localhost c4db016ee442

After rendering with Manim, there shouldn't be any project folders. So this is the expected behaviour. They only get created when creating one with the Manim Editor. Or am I misunderstanding something?

PS: I currently can't take a look at the tar.gz I'll do that later today.

clementpoiret commented 2 years ago

Oops sorry, I should have been unclear. Yes, I know that manim doesn't create the project, it's created by manedit. But, when I export only one section using manim (like you did), I can create a project and see it on manedit. So I can replicate what you did. However, when I export everything with manim (actually all but not the BaseHsf), manedit creates the project but I can't see it in the project selection page

christopher-besch commented 2 years ago

Copy that. I'll look into it later today.

christopher-besch commented 2 years ago

I managed to reproduce the problem and fixed it. Could you check v0.3.5 and see if it's still there? Feel free to close the issue when everything is resolved.

And don't sorry for opening many issues; this kind of feedback is exactly what I need. Thanks a lot again!

PS: If you're interested in knowing what caused this: I'm using JSON Schema files to check if a project.json really belongs to a Manim Editor project. These schemas contain information on how the different fields in the JSON should look like. You can create these schema files from an example JSON, which I've done. The problem was that the duration of all sections in that example were integers. So the Schema set that as the type for the duration parameter. Your example has a float somewhere though, so it just refused to load.

clementpoiret commented 2 years ago

Amazing! :D I tried and it works as expected.

Thanks for your reactivity and the explanation!