Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2010-07-11 01:15:10 +0400
committerDalai Felinto <dfelinto@gmail.com>2010-07-11 01:15:10 +0400
commit96a7e478b6ef0c9f4b15e27ab22db548bbab1fe5 (patch)
treec1c326457af385fbe455e310f16d77c7daaf8238 /source/blender/makesrna/intern/rna_internal.h
parente531f3736df13d9143f4b4c7589d65b12df1ff1b (diff)
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
Diffstat (limited to 'source/blender/makesrna/intern/rna_internal.h')
-rw-r--r--source/blender/makesrna/intern/rna_internal.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index 950811ef295..806a22dd3b8 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -237,6 +237,9 @@ void RNA_api_sequence_strip(StructRNA *srna);
void RNA_api_text(struct StructRNA *srna);
void RNA_api_ui_layout(struct StructRNA *srna);
void RNA_api_wm(struct StructRNA *srna);
+void RNA_api_sensor(struct StructRNA *srna);
+void RNA_api_controller(struct StructRNA *srna);
+void RNA_api_actuator(struct StructRNA *srna);
/* main collection functions */
void RNA_def_main_cameras(BlenderRNA *brna, PropertyRNA *cprop);