scheduled animation paths: jumps
3 Attachment(s)
Hi
Three animation paths should be scheduled one after another. The path speed should be 100 steps/sec Code:
pathFW.speed(100) # default: 1/sec? Code:
yield viztask.waitTime(len(BW_Pos)/100) Code:
def onkeydown(key): |
viztask.schedule only once?
I think I have a similar problem. Maybe I just don't understand viztask very well, but it seems that you are unable to schedule a function more than once. Can I have someone with authority agree or disagree with this? Here is some code demonstrating what I am talking about.
Code:
def print_this(): In my application I am assembling/disassembling a model (also with animation paths). When I typed vizact.onkeydown( viz.KEY_DOWN, disassemble_all ), my program would only call the function the first time I pressed the key. I want the parts to disassemble one at a time rather than all at once. - bloswald :) |
Oops. I meant to say: vizact.onkeydown( viz.KEY_DOWN, viztask.schedule, disassemble_all() )
- bloswald :) |
Solved
Since my last post, I have learned that tasks require a different way of thinking.
The following code worked for my purposes, and viztask.schedule is only called once. Code:
def print_this(): - bloswald :) |
Better solution
Here is an even better solution.
Code:
import viztask - bloswald :) |
All times are GMT -7. The time now is 10:24 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC