[Bf-python] custom types properties on GameEngine...

Natanael Olaiz nolaiz at gmail.com
Wed Dec 24 14:22:47 CET 2008


Thanks!!!!

On Wed, Dec 24, 2008 at 1:54 PM, Campbell Barton <ideasman42 at gmail.com>wrote:

> On Wed, Dec 24, 2008 at 4:43 AM, Natanael Olaiz <nolaiz at gmail.com> wrote:
> > Hi all!, me again...
> >
> > I have another question about the GameEngine: when I start it and open
> the
> > serial port (serial.Serial()), I would like to keep the returned handler
> > class to use it later.... I though to use a property for that, but I can
> > store only Timer, Int, String, Float, Bool types. Any idea about it?
> Could I
> > define another type to use? Could I store a global variable in some other
> > way?
> >
> >
> > Thanks in advance, and merry christmas :)
> > Natanael.
> >
> > _______________________________________________
> > Bf-python mailing list
> > Bf-python at blender.org
> > http://lists.blender.org/mailman/listinfo/bf-python
>
> Custom vars arnt happening any time soon, but you can store variables
> it GameLogic
>
> # you can run this is your not able to run some initializing script,
> this will assign a var to GameLogic if its not there,
> if hasattr(GameLogic, 'serialVar'): serial = GameLogic.serialVar
> else: serial = GameLogic.serialVar = serial.Serial()
>
> --
> - Campbell
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://lists.blender.org/mailman/listinfo/bf-python
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20081224/01f29c86/attachment.html>


More information about the Bf-python mailing list