[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17998] branches/blender2.5/blender/source /blender: 2.5

Brecht Van Lommel brecht at blender.org
Mon Dec 22 12:27:49 CET 2008


Hi,

I think ghost is actually the right place to have timers if we want
to play nice with other processes. If we solve it in the window
manager we will probably end up with a solution like sleeping 10ms or
so. But that means Blender will wake up every 10ms as well even when
it is not being used. Which is not really a big problem, unless every 
other application would do it too. Doing it in ghost means you can ask 
the system to wake up after it receives and event or a certain time 
has passed, in a single function which is system specific.

Brecht.

Ton Roosendaal wrote:
> Hi,
> 
> Yep, ghost has very bad timer code... it just only handles 1 timer step  
> per 'do events', and when it falls behind it doesn't skip, and will  
> loop badly. The ghost timer code is also different per platform :(
> 
> I'll ditch ghost timers, will make own reliable system in blender event  
> system. :)
> 
> -Ton-
> 
> ------------------------------------------------------------------------
> Ton Roosendaal  Blender Foundation   ton at blender.org    www.blender.org
> Blender Institute BV  Entrepotdok 57A  1018AD Amsterdam The Netherlands
> 
> On 22 Dec, 2008, at 0:08, Joshua Leung wrote:
> 
>> Hi,
>>
>> Here on Windows, the while loop is quite dangerous (there are reasons  
>> why I almost always avoid them like the plague!), as if the mouse  
>> moves out of the window and moves back in, all events are swallowed  
>> and Blender freezes. Perhaps this will need a more elegant solution...
>>
>> Regards,
>> Joshua
>>


More information about the Bf-committers mailing list