WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-18-2005, 03:07 PM
vadrian vadrian is offline
Member
 
Join Date: Sep 2004
Posts: 32
passing data to viz.director

is there a way to pass information to vis.director(func)? I have an array of people i want to blink, and this is my setup, but i don't see it working:

Code:
class Person(viz.VizAvatar, viz.EventClass):
...
    def _blink(self):
        self._head.morph(0,1.0,0.1)
        viz.waittime(BLINK_DURATION)
        self._head.morph(0,0.0,0.1)
        viz.starttimer(TIMER_BLINK, random.uniform(BLINK_DELAY_MIN, BLINK_DELAY_MAX))

    def _ontimer(self, num):
        if num == TIMER_BLINK:
            viz.director(self._blink)
i don't think "self" is getting passed into blink(). is there a better way to make an avatar blink on its own (I dont want to have N timers or N blink funtions)

EDIT: my reason for the director function is because i need the waittime. otherwise the blink happens too fast and looks unnatural.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:33 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC