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-05-08 23:52:13 +0400
committerDalai Felinto <dfelinto@gmail.com>2010-05-08 23:52:13 +0400
commit2909a4988b2895d067a3626b47a68aaa9b61c737 (patch)
treeff3f90b9d8e08258eddb11a454bcb266ba787fae /source/blender/makesrna/intern/rna_controller.c
parent79d5d623e05e43e0102fe734312d0cfce815f6ad (diff)
Logic UI: add notifiers for sensors and controllers (so the ui updates if you change the value through script) + some layout adjusments.
Diffstat (limited to 'source/blender/makesrna/intern/rna_controller.c')
-rw-r--r--source/blender/makesrna/intern/rna_controller.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_controller.c b/source/blender/makesrna/intern/rna_controller.c
index 3d44730cf76..dd174c668f2 100644
--- a/source/blender/makesrna/intern/rna_controller.c
+++ b/source/blender/makesrna/intern/rna_controller.c
@@ -24,6 +24,7 @@
#include <stdlib.h>
+#include "WM_types.h"
#include "RNA_define.h"
#include "rna_internal.h"
@@ -102,22 +103,26 @@ void RNA_def_controller(BlenderRNA *brna)
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_struct_name_property(srna, prop);
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_funcs(prop, NULL, "rna_Controller_type_set", NULL);
RNA_def_property_enum_items(prop, controller_type_items);
RNA_def_property_ui_text(prop, "Type", "");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
prop= RNA_def_property(srna, "expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONT_SHOW);
RNA_def_property_ui_text(prop, "Expanded", "Set controller expanded in the user interface");
RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
prop= RNA_def_property(srna, "priority", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONT_PRIO);
RNA_def_property_ui_text(prop, "Priority", "Mark controller for execution before all non-marked controllers (good for startup scripts)");
RNA_def_property_ui_icon(prop, ICON_BOOKMARKS, 1);
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
/* Expression Controller */
srna= RNA_def_struct(brna, "ExpressionController", "Controller");
@@ -128,6 +133,7 @@ void RNA_def_controller(BlenderRNA *brna)
RNA_def_property_string_sdna(prop, NULL, "str");
RNA_def_property_string_maxlength(prop, 127);
RNA_def_property_ui_text(prop, "Expression", "");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
/* Python Controller */
srna= RNA_def_struct(brna, "PythonController", "Controller" );
@@ -137,19 +143,23 @@ void RNA_def_controller(BlenderRNA *brna)
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, python_controller_modes);
RNA_def_property_ui_text(prop, "Execution Method", "Python script type (textblock or module - faster)");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
prop= RNA_def_property(srna, "text", PROP_POINTER, PROP_NONE);
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");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
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);
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
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");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
/* Other Controllers */
srna= RNA_def_struct(brna, "AndController", "Controller");