[Bf-committers] Video texture for the BGE

Benoit Bolsee benoit.bolsee at online.be
Sun Nov 2 15:48:46 CET 2008


After a closer look at numpy and the way it was used in the
VideoTexture, I decided to remove the dependency: numpy has a so called
array interface that allows any object to be treated as an array
provided that some attributes are set. This means that a numpy-capable
object can be constructed without numpy.

Currently, the texture is returned as an unstructured string that is
direct image of the texture in memory. Adding an option to return a
numpy array object is easy but needs more thought: the fact that the
texture format depends on the endian type of the processor complicates
things. It would be good to get the opinion of some python gurus.

Anyway, this is only an issue if the user wants to manipulate the
texture in his script. For a simple video texture, there is no need of


Date: Sat, 1 Nov 2008 20:32:40 +0100
From: Jean-Luc Peuri?re <jlp at nerim.net>
Subject: Re: [Bf-committers] Video texture for the BGE
To: bf-blender developers <bf-committers at blender.org>
Message-ID: <ED7EF283-CD06-424C-90CE-934287EF421D at nerim.net>
Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed

Le 31 oct. 08 ? 09:56, Benoit Bolsee a ?crit :

> Hi all,
> As some of you might know already I've been working on integrating
> Ash's
> video texture plugin in the BGE. I'm now about to release the code to
> trunk and I wanted to inform the devs of the options I've taken  
> before I
> break every compilation systems down ;-)
> Sorry if this Email is a bit long, but there is a lot to say.


> The plugin depends on the Python library numpy 
> (http://numpy.scipy.org/). Numpy is a pure python library, it's C side

> is a bunch of headers that I've added in 
> lib/windows/python/include/python2.5/numpy. The same should be done on

> all other python versions and all other OS.

As the Os X maintainer, I strongly disagree on that new dependancy  
for several reasons:

- last version of  numpy is not compatible with py2.3. I still feel  
very important to keep py2.3
compatibility because this allow us to keep blender a no-install app  
that can be ran from
an USB key even if you have no install rights on the computer. 10.4
users are still at least 50% (probably 75%) of the installed  
base and very few of them
will have py2.5.

- bundling py2.5 full framework into blender is possible, but the  
increase  of the download
size is unnacceptable (I estimate > 10Mb). static build of python  
would be smaller, but we loose
easy access to site packages

- acces to the site package, where the pythons files of numpy must  
go, require admin rights too,
of messing with the python paths. Both things are equally not  

this should be discussed further at next meeting
Jean-Luc Peuri?re
jlp at nerim.net

More information about the Bf-committers mailing list