From 3f4121cea5d10b76fac30f4fc60390f0d5e8ad20 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Mon, 21 Jun 2010 07:51:40 +0000 Subject: 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. --- source/blender/makesrna/intern/rna_sensor.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/makesrna/intern/rna_sensor.c') 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"); -- cgit v1.2.3