From e2a0b302ffc7e70fc99b58eafb247adc95863128 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Wed, 15 Sep 2010 04:42:01 +0000 Subject: Logic UI: reset the value of a key when clicking outside the input button Otherwise you had no way to set it to none. This doesn't really matter, but it's nice "userwise" to be able to clear the pressed key. --- 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 d20e5aebcfb..6dddb042533 100644 --- a/source/blender/makesrna/intern/rna_sensor.c +++ b/source/blender/makesrna/intern/rna_sensor.c @@ -156,6 +156,8 @@ static void rna_Sensor_keyboard_key_set(struct PointerRNA *ptr, int value) if (ISKEYBOARD(value)) ks->key = value; + else + ks->key = 0; } static void rna_Sensor_keyboard_modifier_set(struct PointerRNA *ptr, int value) @@ -165,6 +167,8 @@ static void rna_Sensor_keyboard_modifier_set(struct PointerRNA *ptr, int value) if (ISKEYBOARD(value)) ks->qual = value; + else + ks->qual = 0; } static void rna_Sensor_keyboard_modifier2_set(struct PointerRNA *ptr, int value) @@ -174,6 +178,8 @@ static void rna_Sensor_keyboard_modifier2_set(struct PointerRNA *ptr, int value) if (ISKEYBOARD(value)) ks->qual2 = value; + else + ks->qual2 = 0; } static void rna_Sensor_tap_set(struct PointerRNA *ptr, int value) -- cgit v1.2.3