From 443d913f72c15c9933e6da79c2e9f629d3e3a006 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Fri, 5 Feb 2010 23:50:33 +0000 Subject: BGE: rna update for Logic Bricks Sensor and Controllers: small fixes and suggestion (comments) for future improvement - mainly to replace text properties to material, text or object datablocks. Actuators done: * IPO * CAMERA Actuators to be done: All the others (their structure is in the file) Adding NC_LOGIC ** If someone want to help on that: Files used for actuator RNA: - logic_window.c - DNA_actuator_types.h *** my first big RNA operation. critics/suggestions are welcome **** padded some DNA variables that were not been used. --- source/blender/makesrna/intern/rna_controller.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'source/blender/makesrna/intern/rna_controller.c') diff --git a/source/blender/makesrna/intern/rna_controller.c b/source/blender/makesrna/intern/rna_controller.c index 4d5ef7aa123..f5e7086e793 100644 --- a/source/blender/makesrna/intern/rna_controller.c +++ b/source/blender/makesrna/intern/rna_controller.c @@ -108,10 +108,18 @@ void RNA_def_controller(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Python Controller", "Controller executing a python script."); prop= RNA_def_property(srna, "text", PROP_POINTER, PROP_NONE); - RNA_def_property_struct_type(prop, "ID"); + RNA_def_property_struct_type(prop, "Text"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Text", "Text datablock with the python script."); + prop= RNA_def_property(srna, "module", PROP_STRING, PROP_NONE); + RNA_def_property_ui_text(prop, "Module", "Module name and function to run e.g. \"someModule.main\". Internal texts and external python files can be used"); + RNA_def_struct_name_property(srna, prop); + + prop= RNA_def_property(srna, "debug", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", CONT_PY_DEBUG); + RNA_def_property_ui_text(prop, "D", "Continuously reload the module from disk for editing external modules without restarting."); + /* Other Controllers */ srna= RNA_def_struct(brna, "AndController", "Controller"); RNA_def_struct_ui_text(srna, "And Controller", "Controller passing on events based on a logical AND operation."); -- cgit v1.2.3