openalea / plantgl

An open-source graphic toolkit for the creation, simulation and analysis of 3D virtual plants.
Other
52 stars 24 forks source link

Blank Canvas (Unflushed Rendering) of PlantGL from L-Py animate() #58

Open deltayoung opened 10 months ago

deltayoung commented 10 months ago

I would like to report a rendering issue that appears since the migration of L-py / PlantGL libraries from Python 2 to Python 3.

From third-party program, OpenAlea.lpy.lsystem.animate() will open PlantGL Viewer to show animation of an L-system in Python 2 without problem.

However, if I run animate() in Python 3, it results in a blank canvas on PlantGL Viewer. I can only display the last frame of the animation if I put some input line such as "input()" or "raw_input()" following the animate() that seems to flush the rendering to show the last frame onto the blank canvas.

I tried to locate the implementation of lsystem.animate() in openalea Github repo to fix it on my end but could not find it. Kindly help. Thanks!

fredboudon commented 10 months ago

If you use it in a Qt application, it should not be a pb. If you use it in a shell script, you should use ipython --gui=qt5.