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-04 04:06:13 +0400
committerDalai Felinto <dfelinto@gmail.com>2010-05-04 04:06:13 +0400
commit44c0f38e6ceb6d7b2a07aa23b2c0811a609d17d5 (patch)
tree586192ad47d9191ef26aabbf9d7af2c4232af193 /source/blender/makesrna
parente09c47a0daeee84f6c17498620c3b8e9dca8ba9b (diff)
BGE Logics UI: commit to receive some feedback from Matt
To test use debug mode > 0 (Ctrl+Alt+D) * primarly the goal is to put all the bricks there, and then to worry about the proper layout * sensor header added (need to be more compressed). Also checkbox will not work that well here in my opinion. we need to see what can be used instead (icons?) * sensors, and actuators in alphabetical order * a lot of sensors using the rna (//XXXSENSOR in the ones not using it) * the logic_window.c code for controller and actuator is there only to display the draw functions for controller and actuators. But the code it's a really bad copy of the sensor code, so it will be fixed later (Matt? :) * I would love if the non-expanded mode were more compact, more like in 2.49 (the name non-editable). but this is the kind of think we can worry in the end. Also instead of "move up/move down" it would be nice to drag/drop the sensors/controllers/actuators * to do: rna_actuators: to rename type to mode for the enum
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/RNA_enum_types.h4
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c67
-rw-r--r--source/blender/makesrna/intern/rna_controller.c52
-rw-r--r--source/blender/makesrna/intern/rna_sensor.c53
-rw-r--r--source/blender/makesrna/intern/rna_space.c42
5 files changed, 161 insertions, 57 deletions
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h
index 13a743201a8..c8d9febb96f 100644
--- a/source/blender/makesrna/RNA_enum_types.h
+++ b/source/blender/makesrna/RNA_enum_types.h
@@ -77,6 +77,10 @@ extern EnumPropertyItem object_type_curve_items[];
extern EnumPropertyItem sensor_type_items[];
+extern EnumPropertyItem controller_type_items[];
+
+extern EnumPropertyItem actuator_type_items[];
+
extern EnumPropertyItem space_type_items[];
extern EnumPropertyItem keymap_propvalue_items[];
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index 88bd88ec746..db6cc5c717c 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -33,8 +33,31 @@
#include "WM_types.h"
+EnumPropertyItem actuator_type_items[] ={
+ {ACT_ACTION, "ACTION", 0, "Action", ""},
+ {ACT_ARMATURE, "ARMATURE", 0, "Armature", ""},
+ {ACT_CAMERA, "CAMERA", 0, "Camera", ""},
+ {ACT_CONSTRAINT, "CONSTRAINT", 0, "Constraint", ""},
+ {ACT_EDIT_OBJECT, "EDIT_OBJECT", 0, "Edit Object", ""},
+ {ACT_2DFILTER, "FILTER_2D", 0, "2D Filter", ""},
+ {ACT_GAME, "GAME", 0, "Game", ""},
+ {ACT_IPO, "IPO", 0, "IPO", ""},
+ {ACT_MESSAGE, "MESSAGE", 0, "Message", ""},
+ {ACT_OBJECT, "OBJECT", 0, "Motion", ""},
+ {ACT_PARENT, "PARENT", 0, "Parent", ""},
+ {ACT_PROPERTY, "PROPERTY", 0, "Property", ""},
+ {ACT_RANDOM, "RANDOM", 0, "Random", ""},
+ {ACT_SCENE, "SCENE", 0, "Scene", ""},
+ {ACT_SHAPEACTION, "SHAPE_ACTION", 0, "Shape Action", ""},
+ {ACT_SOUND, "SOUND", 0, "Sound", ""},
+ {ACT_STATE, "STATE", 0, "State", ""},
+ {ACT_VISIBILITY, "VISIBILITY", 0, "Visibility", ""},
+ {0, NULL, 0, NULL, NULL}};
+
#ifdef RNA_RUNTIME
+#include "BKE_sca.h"
+
static StructRNA* rna_Actuator_refine(struct PointerRNA *ptr)
{
bActuator *actuator= (bActuator*)ptr->data;
@@ -79,6 +102,13 @@ static StructRNA* rna_Actuator_refine(struct PointerRNA *ptr)
}
}
+static void rna_Actuator_type_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+ bActuator *act= (bActuator *)ptr->data;
+
+ init_actuator(act);
+}
+
#else
void rna_def_actuator(BlenderRNA *brna)
@@ -86,27 +116,6 @@ void rna_def_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem actuator_type_items[] ={
- {ACT_OBJECT, "OBJECT", 0, "Motion", ""},
- {ACT_IPO, "IPO", 0, "IPO", ""},
- {ACT_CAMERA, "CAMERA", 0, "Camera", ""},
- {ACT_SOUND, "SOUND", 0, "Sound", ""},
- {ACT_PROPERTY, "PROPERTY", 0, "Property", ""},
- {ACT_CONSTRAINT, "CONSTRAINT", 0, "Constraint", ""},
- {ACT_EDIT_OBJECT, "EDIT_OBJECT", 0, "Edit Object", ""},
- {ACT_SCENE, "SCENE", 0, "Scene", ""},
- {ACT_RANDOM, "RANDOM", 0, "Random", ""},
- {ACT_MESSAGE, "MESSAGE", 0, "Message", ""},
- {ACT_ACTION, "ACTION", 0, "Action", ""},
- {ACT_GAME, "GAME", 0, "Game", ""},
- {ACT_VISIBILITY, "VISIBILITY", 0, "Visibility", ""},
- {ACT_2DFILTER, "FILTER_2D", 0, "2D Filter", ""},
- {ACT_PARENT, "PARENT", 0, "Parent", ""},
- {ACT_SHAPEACTION, "SHAPE_ACTION", 0, "Shape Action", ""},
- {ACT_STATE, "STATE", 0, "State", ""},
- {ACT_ARMATURE, "ARMATURE", 0, "Armature", ""},
- {0, NULL, 0, NULL, NULL}};
-
srna= RNA_def_struct(brna, "Actuator", NULL);
RNA_def_struct_ui_text(srna, "Actuator", "Actuator to apply actions in the game engine");
RNA_def_struct_sdna(srna, "bActuator");
@@ -115,12 +124,18 @@ void rna_def_actuator(BlenderRNA *brna)
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "");
- /* type is not editable, would need to do proper data free/alloc */
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, actuator_type_items);
RNA_def_property_ui_text(prop, "Type", "");
+ RNA_def_property_update(prop, 0, "rna_Actuator_type_update");
+
+ prop= RNA_def_property(srna, "expanded", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_SHOW);
+ RNA_def_property_ui_text(prop, "Expanded", "Set actuator expanded in the user interface");
+ RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
+
}
static void rna_def_object_actuator(BlenderRNA *brna)
@@ -688,7 +703,8 @@ static void rna_def_scene_actuator(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Scene Actuator", "Actuator to ..");
RNA_def_struct_sdna_from(srna, "bSceneActuator", "data");
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Scene", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
@@ -1021,7 +1037,8 @@ static void rna_def_parent_actuator(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Parent Actuator", "");
RNA_def_struct_sdna_from(srna, "bParentActuator", "data");
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Scene", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
diff --git a/source/blender/makesrna/intern/rna_controller.c b/source/blender/makesrna/intern/rna_controller.c
index 67c7bd0f2d8..fe68fbc6b7c 100644
--- a/source/blender/makesrna/intern/rna_controller.c
+++ b/source/blender/makesrna/intern/rna_controller.c
@@ -30,8 +30,21 @@
#include "DNA_controller_types.h"
+EnumPropertyItem controller_type_items[] ={
+ {CONT_LOGIC_AND, "LOGIC_AND", 0, "And", "Logic And"},
+ {CONT_LOGIC_OR, "LOGIC_OR", 0, "Or", "Logic Or"},
+ {CONT_LOGIC_NAND, "LOGIC_NAND", 0, "Nand", "Logic Nand"},
+ {CONT_LOGIC_NOR, "LOGIC_NOR", 0, "Nor", "Logic Nor"},
+ {CONT_LOGIC_XOR, "LOGIC_XOR", 0, "Xor", "Logic Xor"},
+ {CONT_LOGIC_XNOR, "LOGIC_XNOR", 0, "Xnor", "Logic Xnor"},
+ {CONT_EXPRESSION, "EXPRESSION", 0, "Expression", ""},
+ {CONT_PYTHON, "PYTHON", 0, "Python Script", ""},
+ {0, NULL, 0, NULL, NULL}};
+
#ifdef RNA_RUNTIME
+#include "BKE_sca.h"
+
static struct StructRNA* rna_Controller_refine(struct PointerRNA *ptr)
{
bController *controller= (bController*)ptr->data;
@@ -58,21 +71,23 @@ static struct StructRNA* rna_Controller_refine(struct PointerRNA *ptr)
}
}
+static void rna_Controller_type_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+ bController *cont= (bController *)ptr->data;
+
+ init_controller(cont);
+}
+
#else
void RNA_def_controller(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem controller_type_items[] ={
- {CONT_LOGIC_AND, "LOGIC_AND", 0, "Logic And", ""},
- {CONT_LOGIC_OR, "LOGIC_OR", 0, "Logic Or", ""},
- {CONT_LOGIC_NAND, "LOGIC_NAND", 0, "Logic Nand", ""},
- {CONT_LOGIC_NOR, "LOGIC_NOR", 0, "Logic Nor", ""},
- {CONT_LOGIC_XOR, "LOGIC_XOR", 0, "Logic Xor", ""},
- {CONT_LOGIC_XNOR, "LOGIC_XNOR", 0, "Logic Xnor", ""},
- {CONT_EXPRESSION, "EXPRESSION", 0, "Expression", ""},
- {CONT_PYTHON, "PYTHON", 0, "Python Script", ""},
+
+ static EnumPropertyItem python_controller_modes[] ={
+ {CONT_PY_SCRIPT, "SCRIPT", 0, "Script", ""},
+ {CONT_PY_MODULE, "MODULE", 0, "Module", ""},
{0, NULL, 0, NULL, NULL}};
/* Controller */
@@ -85,12 +100,23 @@ void RNA_def_controller(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_struct_name_property(srna, prop);
- /* type is not editable, would need to do proper data free/alloc */
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, controller_type_items);
RNA_def_property_ui_text(prop, "Type", "");
+ RNA_def_property_update(prop, 0, "rna_Controller_type_update");
+
+ 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);
+
+ 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);
+
/* Expression Controller */
srna= RNA_def_struct(brna, "ExpressionController", "Controller");
RNA_def_struct_sdna_from(srna, "bExpressionCont", "data");
@@ -106,6 +132,10 @@ void RNA_def_controller(BlenderRNA *brna)
RNA_def_struct_sdna_from(srna, "bPythonCont", "data");
RNA_def_struct_ui_text(srna, "Python Controller", "Controller executing a python script");
+ 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)");
+
prop= RNA_def_property(srna, "text", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Text");
RNA_def_property_flag(prop, PROP_EDITABLE);
diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c
index 3159591625a..b4147fba2a6 100644
--- a/source/blender/makesrna/intern/rna_sensor.c
+++ b/source/blender/makesrna/intern/rna_sensor.c
@@ -31,21 +31,21 @@
#include "DNA_sensor_types.h"
EnumPropertyItem sensor_type_items[] ={
+ {SENS_ACTUATOR, "ACTUATOR", 0, "Actuator", ""},
{SENS_ALWAYS, "ALWAYS", 0, "Always", ""},
- {SENS_TOUCH, "TOUCH", 0, "Touch", ""},
- {SENS_NEAR, "NEAR", 0, "Near", ""},
+ {SENS_ARMATURE, "ARMATURE", 0, "Armature", ""},
+ {SENS_COLLISION, "COLLISION", 0, "Collision", ""},
+ {SENS_DELAY, "DELAY", 0, "Delay", ""},
+ {SENS_JOYSTICK, "JOYSTICK", 0, "Joystick", ""},
{SENS_KEYBOARD, "KEYBOARD", 0, "Keyboard", ""},
- {SENS_PROPERTY, "PROPERTY", 0, "Property", ""},
+ {SENS_MESSAGE, "MESSAGE", 0, "Message", ""},
{SENS_MOUSE, "MOUSE", 0, "Mouse", ""},
- {SENS_COLLISION, "COLLISION", 0, "Collision", ""},
+ {SENS_NEAR, "NEAR", 0, "Near", ""},
+ {SENS_PROPERTY, "PROPERTY", 0, "Property", ""},
{SENS_RADAR, "RADAR", 0, "Radar", ""},
{SENS_RANDOM, "RANDOM", 0, "Random", ""},
{SENS_RAY, "RAY", 0, "Ray", ""},
- {SENS_MESSAGE, "MESSAGE", 0, "Message", ""},
- {SENS_JOYSTICK, "JOYSTICK", 0, "joystick", ""},
- {SENS_ACTUATOR, "ACTUATOR", 0, "Actuator", ""},
- {SENS_DELAY, "DELAY", 0, "Delay", ""},
- {SENS_ARMATURE, "ARMATURE", 0, "Armature", ""},
+ {SENS_TOUCH, "TOUCH", 0, "Touch", ""},
{0, NULL, 0, NULL, NULL}};
#ifdef RNA_RUNTIME
@@ -140,10 +140,14 @@ static void rna_def_sensor(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "pulse", SENS_NEG_PULSE_MODE);
RNA_def_property_ui_text(prop, "Pulse False Level", "Activate FALSE level triggering (pulse mode)");
- prop= RNA_def_property(srna, "frequence", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "frequency", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "freq");
RNA_def_property_ui_text(prop, "Frequency", "Delay between repeated pulses(in logic tics, 0=no delay)");
RNA_def_property_range(prop, 0, 10000);
+
+ prop= RNA_def_property(srna, "tap", PROP_BOOLEAN, PROP_NONE);\
+ RNA_def_property_boolean_sdna(prop, NULL, "tap", 1);
+ RNA_def_property_ui_text(prop, "Tap", "Trigger controllers only for an instant, even while the sensor remains true");
}
static void rna_def_always_sensor(BlenderRNA *brna)
@@ -228,7 +232,7 @@ static void rna_def_keyboard_sensor(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Keyboard Sensor", "Sensor to detect keyboard events");
RNA_def_struct_sdna_from(srna, "bKeyboardSensor", "data");
- prop= RNA_def_property(srna, "key", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "key", PROP_INT, PROP_NONE);//XXX need to use another input template
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* need better range or enum check */
RNA_def_property_ui_text(prop, "Key", "Input key code");
RNA_def_property_range(prop, 0, 255);
@@ -251,7 +255,7 @@ static void rna_def_keyboard_sensor(BlenderRNA *brna)
prop= RNA_def_property(srna, "log", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "toggleName");
- RNA_def_property_ui_text(prop, "Log", "Property that receive the keystrokes in case a string is logged");
+ RNA_def_property_ui_text(prop, "Log Toggle", "Property that receive the keystrokes in case a string is logged");
prop= RNA_def_property(srna, "all_keys", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "type", 1);
@@ -312,7 +316,7 @@ static void rna_def_armature_sensor(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Armature Sensor", "Sensor to detect values and changes in values of IK solver");
RNA_def_struct_sdna_from(srna, "bArmatureSensor", "data");
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop= RNA_def_property(srna, "armature_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Test Type", "Type of value and test");
@@ -372,18 +376,33 @@ static void rna_def_collision_sensor(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem prop_type_items[] ={
- {0, "PROPERTY", 0, "Property", ""},
- {1, "MATERIAL", 0, "Material", ""},
+// {SENS_COLLISION_PULSE, "PULSE", 0, "Property", ""},
+ {SENS_COLLISION_PROPERTY, "PROPERTY", 0, "Property", ""},
+ {SENS_COLLISION_MATERIAL, "MATERIAL", 0, "Material", ""},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "CollisionSensor", "Sensor");
RNA_def_struct_ui_text(srna, "Collision Sensor", "Sensor to detect objects colliding with the current object, with more settings than the Touch sensor");
RNA_def_struct_sdna_from(srna, "bCollisionSensor", "data");
+ prop= RNA_def_property(srna, "collision_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "mode");
+ RNA_def_property_enum_items(prop, prop_type_items);
+ RNA_def_property_ui_text(prop, "Collision Type", "Toggle collision on material or property");
+
+ /*
+ //XXX bad, ugly. pulse in 2.49 is part of the same "enum" of collision type
+ //to investigate: is pulse exclusive? or it works with mat/prop?
+ prop= RNA_def_property(srna, "pulse", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "mode");
+ RNA_def_property_ui_text(prop, "Property Name", "changes to the set of colliding objects generates pulse");
+ */
+
prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Property Name", "Only look for Objects with this property");
+ //XXX to make a setFunction to create a lookup with all materials in Blend File (not only this object mat.)
prop= RNA_def_property(srna, "material", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "materialName");
RNA_def_property_ui_text(prop, "Material Name", "Only look for Objects with this material");
@@ -395,10 +414,6 @@ static void rna_def_collision_sensor(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "ma");
RNA_def_property_ui_text(prop, "Material", "Only look for Objects with this material");
*/
- prop= RNA_def_property(srna, "collision_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "mode");
- RNA_def_property_enum_items(prop, prop_type_items);
- RNA_def_property_ui_text(prop, "Collision Type", "Toggle collision on material or property");
}
static void rna_def_radar_sensor(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index fe6298b3006..9eae622a2c9 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2111,7 +2111,8 @@ static void rna_def_space_logic(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SpaceLogicEditor", "Space");
RNA_def_struct_sdna(srna, "SpaceLogic");
RNA_def_struct_ui_text(srna, "Space Logic Editor", "Logic editor space data");
-
+
+ /* sensors */
prop= RNA_def_property(srna, "sensors_show_selected_objects", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_SENS_SEL);
RNA_def_property_ui_text(prop, "Show Selected Object", "Show sensors of all selected objects");
@@ -2126,12 +2127,49 @@ static void rna_def_space_logic(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_SENS_LINK);
RNA_def_property_ui_text(prop, "Show Linked to Controller", "Show linked objects to the controller");
RNA_def_property_update(prop, NC_LOGIC, NULL);
-
+
prop= RNA_def_property(srna, "sensors_show_active_states", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_SENS_STATE);
RNA_def_property_ui_text(prop, "Show Active States", "Show only sensors connected to active states");
RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ /* controllers */
+ prop= RNA_def_property(srna, "controllers_show_selected_objects", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_CONT_SEL);
+ RNA_def_property_ui_text(prop, "Show Selected Object", "Show controllers of all selected objects");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "controllers_show_active_objects", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_CONT_ACT);
+ RNA_def_property_ui_text(prop, "Show Active Object", "Show controllers of active object");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "controllers_show_linked_controller", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_CONT_LINK);
+ RNA_def_property_ui_text(prop, "Show Linked to Controller", "Show linked objects to sensor/actuator");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ /* actuators */
+ prop= RNA_def_property(srna, "actuators_show_selected_objects", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_ACT_SEL);
+ RNA_def_property_ui_text(prop, "Show Selected Object", "Show actuators of all selected objects");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "actuators_show_active_objects", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_ACT_ACT);
+ RNA_def_property_ui_text(prop, "Show Active Object", "Show actuators of active object");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+ prop= RNA_def_property(srna, "actuators_show_linked_controller", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_ACT_LINK);
+ RNA_def_property_ui_text(prop, "Show Linked to Actuator", "Show linked objects to the actuator");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "actuators_show_active_states", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_ACT_STATE);
+ RNA_def_property_ui_text(prop, "Show Active States", "Show only actuators connected to active states");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
}
void RNA_def_space(BlenderRNA *brna)