[Bf-python] A question about the current and future capabilities Python scripting in Blender

Ron Wheeler rwheeler at artifact-software.com
Tue Dec 14 09:04:39 CET 2010


On 13/12/2010 10:37 PM, Campbell Barton wrote:
> Hi Karl, I think creating logic bricks in python would be acceptable
> by the BGE developers its been discussed but nobody ever wrote it.
> Though if we are able to get nodal logic to replace logic bricks it
> may be better to have python define new logic nodes instead.
>
> Since this isn't in blender yet. I found using states helps split up
> python controller logic unto manageable chunks.
>
> Ron, I don't understand your statement "I was never able to find
> documentation about how to build libraries of Python classes that
> could be included in Blender scripts."
> library is a generic term which can refer to lots of things in
> blender, can you be more specific as to what you tried?
>

I wanted to create a set of Python classes grouped into packages to make 
them easy to organize.
I could get them to compile and run outside Blender but could not seem 
to get the import and instance creation working.
Specifically I wanted to create visual objects using my classes and then 
manipulate the Blender environment to create movies of these objects 
interacting.

Never found any documentation that addressed this directly. Perhaps I 
just did not look using the right terminology.

I would like to eventually use Eclipse to build and test the components 
before running them in the Blender engine.

Ron

> On Mon, Dec 13, 2010 at 7:04 PM, Ron Wheeler
> <rwheeler at artifact-software.com>  wrote:
>> I am also interested in this approach.
>> I was trying build animation sequences in Python.
>> I was able to get an animation working but ran into problems when I tried to
>> use packages and libraries to organize my functions.
>>
>> I was never able to find documentation about how to build libraries of
>> Python classes that could be included in Blender scripts.
>>
>> Ron
>>
>> On 13/12/2010 11:29 AM, Karl wrote:
>>
>> Hello!
>> First and foremost, as I just joined this mailing list I have little
>> knowledge if my question has been already answered in some point of time or
>> not. Something in this vein was discussed here in
>> 2008: http://lists.blender.org/pipermail/bf-python/2008-January/005123.html
>> .
>> I am a graduate student in computer science, currently working on a project
>> that utilises Blender and Python in order to programmatically create what
>> are basically Blender games. For the last two months I have studied both the
>> Blender Python API and the Game Engine API, and found to my disappointment
>> that while it is possible to create objects from the bottom up, there is no
>> way to create new sensors, controllers or actuators. I realize that there is
>> a chance I might have missed some important documentation or tutorial, so if
>> this is the case, feel free to correct me.
>> Now to my question: are there any plans to create functions/modules in the
>> Blender Python API to allow the creation of logic bricks (i.e. sensors,
>> controllers, actuators)?
>>  From the discussion I referred to above, the an argument against this change
>> was that there was no use for this functionality. I would argue against
>> this, as with this capability it is possible to create fully working games
>> by writing a Python script to be interpreted by Blender. Furthermore, if
>> what I understand about the Blender Python API is correct, then it should
>> also easily be possible to create a scene using Blender and then
>> programmatically add the necessary logic bricks with a Python script. This
>> does away with the connect-the-dots approach that - while clever - makes it
>> difficult to do more complex programming.
>> Again, I am sorry if this topic has been covered somewhere: while the
>> internet is full of Blender tutorials, they have mostly to do with the
>> artistic aspect and it seems to be difficult to find information about
>> topics such as this.
>> All the best,
>> Karl Potisepp
>>
>> _______________________________________________
>> Bf-python mailing list
>> Bf-python at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-python
>>
>>
>> _______________________________________________
>> Bf-python mailing list
>> Bf-python at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-python
>>
>>
>
>




More information about the Bf-python mailing list