Skip to content

Use time.sleep() to draw and remove objects delayed #144

Answered by spakin
Rene36 asked this question in Q&A
Discussion options

You must be logged in to vote

Unfortunately, Inkscape extensions can't render animations like you'd hope. Modifications to the image are applied all at once and only if the extension returns a success code. That's why in your first script, you see nothing on the canvas: the final canvas state at the end of the script, which happened to take 5s to run, has no new rectangles on it. By the same logic, the final canvas state at the end of your second script, which also takes 5s to run, has two new rectangles on it. In other words, no reordering is occurring; the canvas simply is not updating in real time.

Let me instead recommend using Simple Inkscape Scripting's animate method to produce an animated SVG file. The result …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Rene36
Comment options

Answer selected by Rene36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants