Skip to content

How to animate a scene? #39

Answered by jimy-byerley
clairexen asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @clairexen !
show() is not the way to do this. It is just a helper to make a view window on a scene and run Qt if not already started.

To make fancy things, like animations, events, callbacks, you need to get to the Qt level of things
Taking a quick look at show you can see that a madcad 3d view is a regular Qt widget, so you can build a window out of it, and use QTimer time update it periodically

To update the view periodically

You can schedule a rendering at any moment using View.update() (like any QWidget)
Depending on what you are looking for, you can trigger it periodically, or when you have changed something in the scene

app = QApplication()

# build the scene itself (can be s…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by clairexen
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