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:
Diffstat (limited to 'source/blender/makesdna/DNA_sensor_types.h')
-rw-r--r--source/blender/makesdna/DNA_sensor_types.h30
1 files changed, 22 insertions, 8 deletions
diff --git a/source/blender/makesdna/DNA_sensor_types.h b/source/blender/makesdna/DNA_sensor_types.h
index 41476c81c85..d7256b5b9e0 100644
--- a/source/blender/makesdna/DNA_sensor_types.h
+++ b/source/blender/makesdna/DNA_sensor_types.h
@@ -75,21 +75,21 @@ typedef struct bKeyboardSensor {
} bKeyboardSensor;
typedef struct bPropertySensor {
- int type;
- int pad;
+ int type;
+ int pad;
char name[32];
char value[32];
- char maxvalue[32];
+ char maxvalue[32];
} bPropertySensor;
typedef struct bActuatorSensor {
- int type;
- int pad;
+ int type;
+ int pad;
char name[32];
} bActuatorSensor;
typedef struct bDelaySensor {
- short delay;
+ short delay;
short duration;
short flag;
short pad;
@@ -101,7 +101,7 @@ typedef struct bCollisionSensor {
// struct Material *ma; // XXX remove materialName
short damptimer, damp;
short mode; /* flag to choose material or property */
- short pad2;
+ short pad2;
} bCollisionSensor;
typedef struct bRadarSensor {
@@ -260,11 +260,14 @@ typedef struct bJoystickSensor {
* ... The reason for this is that we need to be backward compatible,
* and have a proper default value for this thing.
* */
-/* #define SENS_COLLISION_PROPERTY 0 */
+#define SENS_COLLISION_PROPERTY 0
#define SENS_COLLISION_MATERIAL 1
#define SENS_COLLISION_PULSE 2
+
/* ray specific mode */
/* X-Ray means that the ray will traverse objects that don't have the property/material */
+#define SENS_RAY_PROPERTY 0
+#define SENS_RAY_MATERIAL 1
#define SENS_RAY_XRAY 2
/* Some stuff for the mouse sensor Type: */
@@ -277,6 +280,7 @@ typedef struct bJoystickSensor {
#define BL_SENS_MOUSE_MOUSEOVER 16
#define BL_SENS_MOUSE_MOUSEOVER_ANY 32
+/* Joystick sensor - sorted by axis types */
#define SENS_JOY_ANY_EVENT 1
#define SENS_JOY_BUTTON 0 /* axis type */
@@ -292,6 +296,16 @@ typedef struct bJoystickSensor {
#define SENS_JOY_HAT 2 /* axis type */
#define SENS_JOY_HAT_DIR 0
+#define SENS_JOY_HAT_UP 1
+#define SENS_JOY_HAT_RIGHT 2
+#define SENS_JOY_HAT_DOWN 4
+#define SENS_JOY_HAT_LEFT 8
+
+#define SENS_JOY_HAT_UP_RIGHT SENS_JOY_HAT_UP | SENS_JOY_HAT_RIGHT
+#define SENS_JOY_HAT_DOWN_RIGHT SENS_JOY_HAT_DOWN | SENS_JOY_HAT_RIGHT
+#define SENS_JOY_HAT_UP_LEFT SENS_JOY_HAT_UP | SENS_JOY_HAT_LEFT
+#define SENS_JOY_HAT_DOWN_LEFT SENS_JOY_HAT_DOWN | SENS_JOY_HAT_LEFT
+
#define SENS_JOY_AXIS_SINGLE 3 /* axis type */