This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source
Dalai Felinto 96a7e478b6 Logic Editor Python API: link/unlink logics through python
After initial talk with Matt (awhile ago) we realzed that rna_api would fit well for this instead of an operator.

The next step would be to move the current UI code to use the rna funcs instead.
Note: it takes the s/c/a as argument, not its name. (e.g. cont.link(actuator=act) )

Sample code to link all the logic bricks between each other:
ob = bpy.context.object
for cont in ob.game.controllers:
    for sens in ob.game.sensors:
        cont.link(sensor=sens)
    for act in ob.game.actuators:
        cont.link(actuator=act)

For a script to create bricks, link bricks, unlink bricks and remove them:
http://www.pasteall.org/14266
2010-07-10 21:15:10 +00:00
..
2010-01-03 20:35:13 +00:00
2010-07-09 23:14:07 +00:00
2010-02-12 13:34:04 +00:00
2010-02-12 13:34:04 +00:00
2010-02-12 13:34:04 +00:00