Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Live update operator #4283

Closed
Durman opened this issue Aug 13, 2021 · 6 comments · Fixed by #4299
Closed

Upgrade Live update operator #4283

Durman opened this issue Aug 13, 2021 · 6 comments · Fixed by #4299
Assignees
Labels
Proposal 💡 Would be nice to have
Milestone

Comments

@Durman
Copy link
Collaborator

Durman commented Aug 13, 2021

Problem statement

JacquesLucke/animation_nodes#1769 (comment)

I used the scene update handler, but due to unknown reasons this handler was always executed. We only got a "real" scene changed handler reeelatively recently, using it sounds like a good idea.

Probably instead of timer the operator could use the scene changed handler. It would help to avoid useless updates (when nothing was changed). At least it's worth to experiment.

@Durman Durman added the Proposal 💡 Would be nice to have label Aug 13, 2021
@zeffii
Copy link
Collaborator

zeffii commented Aug 13, 2021

live operator was only implemented as a timed event because there was no true scene update handler that could be relied on to trigger as desired.

so yes, an alternative would be great.

@Durman
Copy link
Collaborator Author

Durman commented Aug 16, 2021

scen update test

scen update test2

@Durman Durman self-assigned this Aug 16, 2021
@Durman
Copy link
Collaborator Author

Durman commented Aug 17, 2021

I've tested the approach and workflow seems is much more comfortable than unsing a timer. There is though a problem of looping update events. The handlers can be triggered by Mesh viewer and even by changes of node colors it causes looping update events infinitely.
scene handler

@Durman Durman added this to the Sverchok v1.1 milestone Aug 17, 2021
@Durman
Copy link
Collaborator Author

Durman commented Aug 19, 2021

scene update

@Durman Durman mentioned this issue Aug 20, 2021
5 tasks
@zeffii
Copy link
Collaborator

zeffii commented Aug 20, 2021

i'll be interested to see how you solve the MeshViewer triggering the depsgraph_update_post handler. It's like the freeze/throttle thing again.

@Durman
Copy link
Collaborator Author

Durman commented Aug 28, 2021

Yes, the problem is similar. I encapsulated solution inside update system. I just add a flug to a tree which was evaluated that it was recently evaluated and next event looks to the flag. If the flag exists the event removes it and finishes execution. It seems works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Proposal 💡 Would be nice to have
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants