diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2010-06-21 11:51:40 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2010-06-21 11:51:40 +0400 |
commit | 3f4121cea5d10b76fac30f4fc60390f0d5e8ad20 (patch) | |
tree | 31dd05d6e2cfcddfeafc21880a0df33be04db9f2 /source/blender/makesrna | |
parent | 78d3793d31b380fcddbdcb3cc1ee932d68f60937 (diff) |
Logic UI: Pin option for sensor and actuators (from 2.49)
- implemented the old functionality of pin a sensor or actuator when "show state" is on.
- fixed code for setting/resetting VISIBLE and LINKED flags for sensors and actuators
(so states buttons is working for actuators and sensors)
- move the flag setting code (^^^) to a pre-processing part of the logic ui code.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_actuator.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sensor.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 4 |
3 files changed, 14 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c index 2ca327f8907..2a29f3332b5 100644 --- a/source/blender/makesrna/intern/rna_actuator.c +++ b/source/blender/makesrna/intern/rna_actuator.c @@ -476,6 +476,12 @@ void rna_def_actuator(BlenderRNA *brna) RNA_def_property_enum_funcs(prop, NULL, "rna_Actuator_type_set", "rna_Actuator_type_itemf"); RNA_def_property_ui_text(prop, "Type", ""); + prop= RNA_def_property(srna, "pinned", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_PIN); + RNA_def_property_ui_text(prop, "Pinned", "Display when not linked to a visible states controller"); + RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1); + 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", ACT_SHOW); RNA_def_property_ui_text(prop, "Expanded", "Set actuator expanded in the user interface"); diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c index 31fa8f018dc..17137d0d259 100644 --- a/source/blender/makesrna/intern/rna_sensor.c +++ b/source/blender/makesrna/intern/rna_sensor.c @@ -260,6 +260,12 @@ static void rna_def_sensor(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Type", ""); RNA_def_property_update(prop, NC_LOGIC, NULL); + prop= RNA_def_property(srna, "pinned", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", SENS_PIN); + RNA_def_property_ui_text(prop, "Pinned", "Display when not linked to a visible states controller"); + RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1); + 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", SENS_SHOW); RNA_def_property_ui_text(prop, "Expanded", "Set sensor expanded in the user interface"); diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 3058fe62e0f..774ae94d5f3 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2202,7 +2202,7 @@ static void rna_def_space_logic(BlenderRNA *brna) 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_negative_sdna(prop, NULL, "scaflag", BUTS_SENS_STATE); + 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); @@ -2239,7 +2239,7 @@ static void rna_def_space_logic(BlenderRNA *brna) 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_negative_sdna(prop, NULL, "scaflag", BUTS_ACT_STATE); + 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); |