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-01-18 00:46:34 +0300
committerDalai Felinto <dfelinto@gmail.com>2010-01-18 00:46:34 +0300
commit9356b1b7ee99d86853589a51dfe89c490b7d2a57 (patch)
treeb99ab650199fde1d26879421747462e8882d9409 /source/blender
parent7d2b40c862de0bca8a12984f79771b0d68db392e (diff)
BGE: Mouse Sensor type defaults to 1 (MOUSELEFT ) + remove camera attribute from Camera objects.
(if you want to mark your camera objects create a property manually ;) That way object.getPropertyNames() works consistently across all object types.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/sca.c2
-rw-r--r--source/blender/editors/space_logic/logic_window.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/sca.c b/source/blender/blenkernel/intern/sca.c
index 5cd554725ff..1bef60f984c 100644
--- a/source/blender/blenkernel/intern/sca.c
+++ b/source/blender/blenkernel/intern/sca.c
@@ -139,7 +139,7 @@ void init_sensor(bSensor *sens)
break;
case SENS_MOUSE:
ms=sens->data= MEM_callocN(sizeof(bMouseSensor), "mousesens");
- //XXX ms->type= LEFTMOUSE;
+ ms->type= 1; // LEFTMOUSE workaround because Mouse Sensor types enum starts in 1
break;
case SENS_COLLISION:
sens->data= MEM_callocN(sizeof(bCollisionSensor), "colsens");
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c
index 3e4c76f993f..d9bfa43bd41 100644
--- a/source/blender/editors/space_logic/logic_window.c
+++ b/source/blender/editors/space_logic/logic_window.c
@@ -1436,6 +1436,8 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
/* Line 2: type selection. The number are a bit mangled to get
* proper compatibility with older .blend files. */
+ /* Any sensor type default is 0 but the ms enum starts in 1.
+ * Therefore the mosue sensor is initialized to 1 in sca.c */
str= "Type %t|Left button %x1|Middle button %x2|"
"Right button %x4|Wheel Up %x5|Wheel Down %x6|Movement %x8|Mouse over %x16|Mouse over any%x32";
uiDefButS(block, MENU, B_REDR, str, xco+10, yco-44, (width*0.8f)-20, 19,