Blender Git Commit Log
Git Commits -> Revision 96a7e47
Revision 96a7e47 by Dalai Felinto (master) July 10, 2010, 21:15 (GMT) |
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 |
Commit Details:
Full Hash: 96a7e478b6ef0c9f4b15e27ab22db548bbab1fe5
SVN Revision: 30190
Parent Commit: e531f37
Lines Changed: +296, -32
3 Added Paths:
/source/blender/makesrna/intern/rna_actuator_api.c (+72, -0) (View)
/source/blender/makesrna/intern/rna_controller_api.c (+81, -0) (View)
/source/blender/makesrna/intern/rna_sensor_api.c (+72, -0) (View)
/source/blender/makesrna/intern/rna_controller_api.c (+81, -0) (View)
/source/blender/makesrna/intern/rna_sensor_api.c (+72, -0) (View)
7 Modified Paths:
/source/blender/blenkernel/BKE_sca.h (+3, -0) (Diff)
/source/blender/blenkernel/intern/sca.c (+56, -29) (Diff)
/source/blender/makesrna/intern/makesrna.c (+3, -3) (Diff)
/source/blender/makesrna/intern/rna_actuator.c (+2, -0) (Diff)
/source/blender/makesrna/intern/rna_controller.c (+2, -0) (Diff)
/source/blender/makesrna/intern/rna_internal.h (+3, -0) (Diff)
/source/blender/makesrna/intern/rna_sensor.c (+2, -0) (Diff)
/source/blender/blenkernel/intern/sca.c (+56, -29) (Diff)
/source/blender/makesrna/intern/makesrna.c (+3, -3) (Diff)
/source/blender/makesrna/intern/rna_actuator.c (+2, -0) (Diff)
/source/blender/makesrna/intern/rna_controller.c (+2, -0) (Diff)
/source/blender/makesrna/intern/rna_internal.h (+3, -0) (Diff)
/source/blender/makesrna/intern/rna_sensor.c (+2, -0) (Diff)