
/* Automatically generated struct definitions for the Data API.
 * Do not edit manually, changes will be overwritten.           */

#define RNA_RUNTIME

#include <float.h>
#include <stdio.h>
#include <limits.h>
#include <string.h>

#include <stddef.h>

#include "MEM_guardedalloc.h"

#include "DNA_ID.h"
#include "DNA_scene_types.h"
#include "BLI_blenlib.h"

#include "BLI_utildefines.h"

#include "BKE_context.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_report.h"
#include "RNA_define.h"
#include "RNA_types.h"
#include "rna_internal.h"

#include "rna_prototypes_gen.h"

#include "rna_sensor.c"
#include "rna_sensor_api.c"

/* Autogenerated Functions */


CollectionPropertyRNA rna_Sensor_rna_properties;
PointerPropertyRNA rna_Sensor_rna_type;
StringPropertyRNA rna_Sensor_name;
EnumPropertyRNA rna_Sensor_type;
BoolPropertyRNA rna_Sensor_pin;
BoolPropertyRNA rna_Sensor_active;
BoolPropertyRNA rna_Sensor_show_expanded;
BoolPropertyRNA rna_Sensor_invert;
BoolPropertyRNA rna_Sensor_use_level;
BoolPropertyRNA rna_Sensor_use_pulse_true_level;
BoolPropertyRNA rna_Sensor_use_pulse_false_level;
IntPropertyRNA rna_Sensor_tick_skip;
BoolPropertyRNA rna_Sensor_use_tap;
CollectionPropertyRNA rna_Sensor_controllers;

extern FunctionRNA rna_Sensor_link_func;
extern PointerPropertyRNA rna_Sensor_link_controller;

extern FunctionRNA rna_Sensor_unlink_func;
extern PointerPropertyRNA rna_Sensor_unlink_controller;



extern CollectionPropertyRNA rna_Sensor_rna_properties;
extern PointerPropertyRNA rna_Sensor_rna_type;
extern StringPropertyRNA rna_Sensor_name;
extern EnumPropertyRNA rna_Sensor_type;
extern BoolPropertyRNA rna_Sensor_pin;
extern BoolPropertyRNA rna_Sensor_active;
extern BoolPropertyRNA rna_Sensor_show_expanded;
extern BoolPropertyRNA rna_Sensor_invert;
extern BoolPropertyRNA rna_Sensor_use_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_true_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_false_level;
extern IntPropertyRNA rna_Sensor_tick_skip;
extern BoolPropertyRNA rna_Sensor_use_tap;
extern CollectionPropertyRNA rna_Sensor_controllers;

extern FunctionRNA rna_Sensor_link_func;
extern PointerPropertyRNA rna_Sensor_link_controller;

extern FunctionRNA rna_Sensor_unlink_func;
extern PointerPropertyRNA rna_Sensor_unlink_controller;



extern CollectionPropertyRNA rna_Sensor_rna_properties;
extern PointerPropertyRNA rna_Sensor_rna_type;
extern StringPropertyRNA rna_Sensor_name;
extern EnumPropertyRNA rna_Sensor_type;
extern BoolPropertyRNA rna_Sensor_pin;
extern BoolPropertyRNA rna_Sensor_active;
extern BoolPropertyRNA rna_Sensor_show_expanded;
extern BoolPropertyRNA rna_Sensor_invert;
extern BoolPropertyRNA rna_Sensor_use_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_true_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_false_level;
extern IntPropertyRNA rna_Sensor_tick_skip;
extern BoolPropertyRNA rna_Sensor_use_tap;
extern CollectionPropertyRNA rna_Sensor_controllers;

StringPropertyRNA rna_NearSensor_property;
FloatPropertyRNA rna_NearSensor_distance;
FloatPropertyRNA rna_NearSensor_reset_distance;

extern FunctionRNA rna_Sensor_link_func;
extern PointerPropertyRNA rna_Sensor_link_controller;

extern FunctionRNA rna_Sensor_unlink_func;
extern PointerPropertyRNA rna_Sensor_unlink_controller;



extern CollectionPropertyRNA rna_Sensor_rna_properties;
extern PointerPropertyRNA rna_Sensor_rna_type;
extern StringPropertyRNA rna_Sensor_name;
extern EnumPropertyRNA rna_Sensor_type;
extern BoolPropertyRNA rna_Sensor_pin;
extern BoolPropertyRNA rna_Sensor_active;
extern BoolPropertyRNA rna_Sensor_show_expanded;
extern BoolPropertyRNA rna_Sensor_invert;
extern BoolPropertyRNA rna_Sensor_use_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_true_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_false_level;
extern IntPropertyRNA rna_Sensor_tick_skip;
extern BoolPropertyRNA rna_Sensor_use_tap;
extern CollectionPropertyRNA rna_Sensor_controllers;

EnumPropertyRNA rna_MouseSensor_mouse_event;
BoolPropertyRNA rna_MouseSensor_use_pulse;
EnumPropertyRNA rna_MouseSensor_use_material;
StringPropertyRNA rna_MouseSensor_property;
StringPropertyRNA rna_MouseSensor_material;
BoolPropertyRNA rna_MouseSensor_use_x_ray;

extern FunctionRNA rna_Sensor_link_func;
extern PointerPropertyRNA rna_Sensor_link_controller;

extern FunctionRNA rna_Sensor_unlink_func;
extern PointerPropertyRNA rna_Sensor_unlink_controller;



extern CollectionPropertyRNA rna_Sensor_rna_properties;
extern PointerPropertyRNA rna_Sensor_rna_type;
extern StringPropertyRNA rna_Sensor_name;
extern EnumPropertyRNA rna_Sensor_type;
extern BoolPropertyRNA rna_Sensor_pin;
extern BoolPropertyRNA rna_Sensor_active;
extern BoolPropertyRNA rna_Sensor_show_expanded;
extern BoolPropertyRNA rna_Sensor_invert;
extern BoolPropertyRNA rna_Sensor_use_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_true_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_false_level;
extern IntPropertyRNA rna_Sensor_tick_skip;
extern BoolPropertyRNA rna_Sensor_use_tap;
extern CollectionPropertyRNA rna_Sensor_controllers;

EnumPropertyRNA rna_KeyboardSensor_key;
EnumPropertyRNA rna_KeyboardSensor_modifier_key_1;
EnumPropertyRNA rna_KeyboardSensor_modifier_key_2;
StringPropertyRNA rna_KeyboardSensor_target;
StringPropertyRNA rna_KeyboardSensor_log;
BoolPropertyRNA rna_KeyboardSensor_use_all_keys;

extern FunctionRNA rna_Sensor_link_func;
extern PointerPropertyRNA rna_Sensor_link_controller;

extern FunctionRNA rna_Sensor_unlink_func;
extern PointerPropertyRNA rna_Sensor_unlink_controller;



extern CollectionPropertyRNA rna_Sensor_rna_properties;
extern PointerPropertyRNA rna_Sensor_rna_type;
extern StringPropertyRNA rna_Sensor_name;
extern EnumPropertyRNA rna_Sensor_type;
extern BoolPropertyRNA rna_Sensor_pin;
extern BoolPropertyRNA rna_Sensor_active;
extern BoolPropertyRNA rna_Sensor_show_expanded;
extern BoolPropertyRNA rna_Sensor_invert;
extern BoolPropertyRNA rna_Sensor_use_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_true_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_false_level;
extern IntPropertyRNA rna_Sensor_tick_skip;
extern BoolPropertyRNA rna_Sensor_use_tap;
extern CollectionPropertyRNA rna_Sensor_controllers;

EnumPropertyRNA rna_PropertySensor_evaluation_type;
StringPropertyRNA rna_PropertySensor_property;
StringPropertyRNA rna_PropertySensor_value;
StringPropertyRNA rna_PropertySensor_value_min;
StringPropertyRNA rna_PropertySensor_value_max;

extern FunctionRNA rna_Sensor_link_func;
extern PointerPropertyRNA rna_Sensor_link_controller;

extern FunctionRNA rna_Sensor_unlink_func;
extern PointerPropertyRNA rna_Sensor_unlink_controller;



extern CollectionPropertyRNA rna_Sensor_rna_properties;
extern PointerPropertyRNA rna_Sensor_rna_type;
extern StringPropertyRNA rna_Sensor_name;
extern EnumPropertyRNA rna_Sensor_type;
extern BoolPropertyRNA rna_Sensor_pin;
extern BoolPropertyRNA rna_Sensor_active;
extern BoolPropertyRNA rna_Sensor_show_expanded;
extern BoolPropertyRNA rna_Sensor_invert;
extern BoolPropertyRNA rna_Sensor_use_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_true_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_false_level;
extern IntPropertyRNA rna_Sensor_tick_skip;
extern BoolPropertyRNA rna_Sensor_use_tap;
extern CollectionPropertyRNA rna_Sensor_controllers;

EnumPropertyRNA rna_ArmatureSensor_test_type;
StringPropertyRNA rna_ArmatureSensor_bone;
StringPropertyRNA rna_ArmatureSensor_constraint;
FloatPropertyRNA rna_ArmatureSensor_value;

extern FunctionRNA rna_Sensor_link_func;
extern PointerPropertyRNA rna_Sensor_link_controller;

extern FunctionRNA rna_Sensor_unlink_func;
extern PointerPropertyRNA rna_Sensor_unlink_controller;



extern CollectionPropertyRNA rna_Sensor_rna_properties;
extern PointerPropertyRNA rna_Sensor_rna_type;
extern StringPropertyRNA rna_Sensor_name;
extern EnumPropertyRNA rna_Sensor_type;
extern BoolPropertyRNA rna_Sensor_pin;
extern BoolPropertyRNA rna_Sensor_active;
extern BoolPropertyRNA rna_Sensor_show_expanded;
extern BoolPropertyRNA rna_Sensor_invert;
extern BoolPropertyRNA rna_Sensor_use_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_true_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_false_level;
extern IntPropertyRNA rna_Sensor_tick_skip;
extern BoolPropertyRNA rna_Sensor_use_tap;
extern CollectionPropertyRNA rna_Sensor_controllers;

StringPropertyRNA rna_ActuatorSensor_actuator;

extern FunctionRNA rna_Sensor_link_func;
extern PointerPropertyRNA rna_Sensor_link_controller;

extern FunctionRNA rna_Sensor_unlink_func;
extern PointerPropertyRNA rna_Sensor_unlink_controller;



extern CollectionPropertyRNA rna_Sensor_rna_properties;
extern PointerPropertyRNA rna_Sensor_rna_type;
extern StringPropertyRNA rna_Sensor_name;
extern EnumPropertyRNA rna_Sensor_type;
extern BoolPropertyRNA rna_Sensor_pin;
extern BoolPropertyRNA rna_Sensor_active;
extern BoolPropertyRNA rna_Sensor_show_expanded;
extern BoolPropertyRNA rna_Sensor_invert;
extern BoolPropertyRNA rna_Sensor_use_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_true_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_false_level;
extern IntPropertyRNA rna_Sensor_tick_skip;
extern BoolPropertyRNA rna_Sensor_use_tap;
extern CollectionPropertyRNA rna_Sensor_controllers;

IntPropertyRNA rna_DelaySensor_delay;
IntPropertyRNA rna_DelaySensor_duration;
BoolPropertyRNA rna_DelaySensor_use_repeat;

extern FunctionRNA rna_Sensor_link_func;
extern PointerPropertyRNA rna_Sensor_link_controller;

extern FunctionRNA rna_Sensor_unlink_func;
extern PointerPropertyRNA rna_Sensor_unlink_controller;



extern CollectionPropertyRNA rna_Sensor_rna_properties;
extern PointerPropertyRNA rna_Sensor_rna_type;
extern StringPropertyRNA rna_Sensor_name;
extern EnumPropertyRNA rna_Sensor_type;
extern BoolPropertyRNA rna_Sensor_pin;
extern BoolPropertyRNA rna_Sensor_active;
extern BoolPropertyRNA rna_Sensor_show_expanded;
extern BoolPropertyRNA rna_Sensor_invert;
extern BoolPropertyRNA rna_Sensor_use_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_true_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_false_level;
extern IntPropertyRNA rna_Sensor_tick_skip;
extern BoolPropertyRNA rna_Sensor_use_tap;
extern CollectionPropertyRNA rna_Sensor_controllers;

BoolPropertyRNA rna_CollisionSensor_use_pulse;
BoolPropertyRNA rna_CollisionSensor_use_material;
StringPropertyRNA rna_CollisionSensor_property;
StringPropertyRNA rna_CollisionSensor_material;

extern FunctionRNA rna_Sensor_link_func;
extern PointerPropertyRNA rna_Sensor_link_controller;

extern FunctionRNA rna_Sensor_unlink_func;
extern PointerPropertyRNA rna_Sensor_unlink_controller;



extern CollectionPropertyRNA rna_Sensor_rna_properties;
extern PointerPropertyRNA rna_Sensor_rna_type;
extern StringPropertyRNA rna_Sensor_name;
extern EnumPropertyRNA rna_Sensor_type;
extern BoolPropertyRNA rna_Sensor_pin;
extern BoolPropertyRNA rna_Sensor_active;
extern BoolPropertyRNA rna_Sensor_show_expanded;
extern BoolPropertyRNA rna_Sensor_invert;
extern BoolPropertyRNA rna_Sensor_use_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_true_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_false_level;
extern IntPropertyRNA rna_Sensor_tick_skip;
extern BoolPropertyRNA rna_Sensor_use_tap;
extern CollectionPropertyRNA rna_Sensor_controllers;

StringPropertyRNA rna_RadarSensor_property;
EnumPropertyRNA rna_RadarSensor_axis;
FloatPropertyRNA rna_RadarSensor_angle;
FloatPropertyRNA rna_RadarSensor_distance;

extern FunctionRNA rna_Sensor_link_func;
extern PointerPropertyRNA rna_Sensor_link_controller;

extern FunctionRNA rna_Sensor_unlink_func;
extern PointerPropertyRNA rna_Sensor_unlink_controller;



extern CollectionPropertyRNA rna_Sensor_rna_properties;
extern PointerPropertyRNA rna_Sensor_rna_type;
extern StringPropertyRNA rna_Sensor_name;
extern EnumPropertyRNA rna_Sensor_type;
extern BoolPropertyRNA rna_Sensor_pin;
extern BoolPropertyRNA rna_Sensor_active;
extern BoolPropertyRNA rna_Sensor_show_expanded;
extern BoolPropertyRNA rna_Sensor_invert;
extern BoolPropertyRNA rna_Sensor_use_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_true_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_false_level;
extern IntPropertyRNA rna_Sensor_tick_skip;
extern BoolPropertyRNA rna_Sensor_use_tap;
extern CollectionPropertyRNA rna_Sensor_controllers;

IntPropertyRNA rna_RandomSensor_seed;

extern FunctionRNA rna_Sensor_link_func;
extern PointerPropertyRNA rna_Sensor_link_controller;

extern FunctionRNA rna_Sensor_unlink_func;
extern PointerPropertyRNA rna_Sensor_unlink_controller;



extern CollectionPropertyRNA rna_Sensor_rna_properties;
extern PointerPropertyRNA rna_Sensor_rna_type;
extern StringPropertyRNA rna_Sensor_name;
extern EnumPropertyRNA rna_Sensor_type;
extern BoolPropertyRNA rna_Sensor_pin;
extern BoolPropertyRNA rna_Sensor_active;
extern BoolPropertyRNA rna_Sensor_show_expanded;
extern BoolPropertyRNA rna_Sensor_invert;
extern BoolPropertyRNA rna_Sensor_use_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_true_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_false_level;
extern IntPropertyRNA rna_Sensor_tick_skip;
extern BoolPropertyRNA rna_Sensor_use_tap;
extern CollectionPropertyRNA rna_Sensor_controllers;

EnumPropertyRNA rna_RaySensor_ray_type;
StringPropertyRNA rna_RaySensor_property;
StringPropertyRNA rna_RaySensor_material;
BoolPropertyRNA rna_RaySensor_use_x_ray;
FloatPropertyRNA rna_RaySensor_range;
EnumPropertyRNA rna_RaySensor_axis;

extern FunctionRNA rna_Sensor_link_func;
extern PointerPropertyRNA rna_Sensor_link_controller;

extern FunctionRNA rna_Sensor_unlink_func;
extern PointerPropertyRNA rna_Sensor_unlink_controller;



extern CollectionPropertyRNA rna_Sensor_rna_properties;
extern PointerPropertyRNA rna_Sensor_rna_type;
extern StringPropertyRNA rna_Sensor_name;
extern EnumPropertyRNA rna_Sensor_type;
extern BoolPropertyRNA rna_Sensor_pin;
extern BoolPropertyRNA rna_Sensor_active;
extern BoolPropertyRNA rna_Sensor_show_expanded;
extern BoolPropertyRNA rna_Sensor_invert;
extern BoolPropertyRNA rna_Sensor_use_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_true_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_false_level;
extern IntPropertyRNA rna_Sensor_tick_skip;
extern BoolPropertyRNA rna_Sensor_use_tap;
extern CollectionPropertyRNA rna_Sensor_controllers;

StringPropertyRNA rna_MessageSensor_subject;

extern FunctionRNA rna_Sensor_link_func;
extern PointerPropertyRNA rna_Sensor_link_controller;

extern FunctionRNA rna_Sensor_unlink_func;
extern PointerPropertyRNA rna_Sensor_unlink_controller;



extern CollectionPropertyRNA rna_Sensor_rna_properties;
extern PointerPropertyRNA rna_Sensor_rna_type;
extern StringPropertyRNA rna_Sensor_name;
extern EnumPropertyRNA rna_Sensor_type;
extern BoolPropertyRNA rna_Sensor_pin;
extern BoolPropertyRNA rna_Sensor_active;
extern BoolPropertyRNA rna_Sensor_show_expanded;
extern BoolPropertyRNA rna_Sensor_invert;
extern BoolPropertyRNA rna_Sensor_use_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_true_level;
extern BoolPropertyRNA rna_Sensor_use_pulse_false_level;
extern IntPropertyRNA rna_Sensor_tick_skip;
extern BoolPropertyRNA rna_Sensor_use_tap;
extern CollectionPropertyRNA rna_Sensor_controllers;

IntPropertyRNA rna_JoystickSensor_joystick_index;
EnumPropertyRNA rna_JoystickSensor_event_type;
BoolPropertyRNA rna_JoystickSensor_use_all_events;
IntPropertyRNA rna_JoystickSensor_button_number;
IntPropertyRNA rna_JoystickSensor_axis_number;
IntPropertyRNA rna_JoystickSensor_axis_threshold;
EnumPropertyRNA rna_JoystickSensor_axis_direction;
IntPropertyRNA rna_JoystickSensor_single_axis_number;
IntPropertyRNA rna_JoystickSensor_hat_number;
EnumPropertyRNA rna_JoystickSensor_hat_direction;

extern FunctionRNA rna_Sensor_link_func;
extern PointerPropertyRNA rna_Sensor_link_controller;

extern FunctionRNA rna_Sensor_unlink_func;
extern PointerPropertyRNA rna_Sensor_unlink_controller;


static PointerRNA Sensor_rna_properties_get(CollectionPropertyIterator *iter)
{
	return rna_builtin_properties_get(iter);
}

void Sensor_rna_properties_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{

	memset(iter, 0, sizeof(*iter));
	iter->parent = *ptr;
	iter->prop = (PropertyRNA *)&rna_Sensor_rna_properties;

	rna_builtin_properties_begin(iter, ptr);

	if (iter->valid)
		iter->ptr = Sensor_rna_properties_get(iter);
}

void Sensor_rna_properties_next(CollectionPropertyIterator *iter)
{
	rna_builtin_properties_next(iter);

	if (iter->valid)
		iter->ptr = Sensor_rna_properties_get(iter);
}

void Sensor_rna_properties_end(CollectionPropertyIterator *iter)
{
	rna_iterator_listbase_end(iter);
}

int Sensor_rna_properties_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_ptr)
{
	return rna_builtin_properties_lookup_string(ptr, key, r_ptr);
}

PointerRNA Sensor_rna_type_get(PointerRNA *ptr)
{
	return rna_builtin_type_get(ptr);
}

void Sensor_name_get(PointerRNA *ptr, char *value)
{
	bSensor *data = (bSensor *)(ptr->data);
	BLI_strncpy_utf8(value, data->name, 64);
}

int Sensor_name_length(PointerRNA *ptr)
{
	bSensor *data = (bSensor *)(ptr->data);
	return strlen(data->name);
}

void Sensor_name_set(PointerRNA *ptr, const char *value)
{
	rna_Sensor_name_set(ptr, value);
}

int Sensor_type_get(PointerRNA *ptr)
{
	bSensor *data = (bSensor *)(ptr->data);
	return (int)(data->type);
}

void Sensor_type_set(PointerRNA *ptr, int value)
{
	rna_Sensor_type_set(ptr, value);
}

int Sensor_pin_get(PointerRNA *ptr)
{
	bSensor *data = (bSensor *)(ptr->data);
	return (((data->flag) & 32) != 0);
}

void Sensor_pin_set(PointerRNA *ptr, int value)
{
	bSensor *data = (bSensor *)(ptr->data);
	if (value) data->flag |= 32;
	else data->flag &= ~32;
}

int Sensor_active_get(PointerRNA *ptr)
{
	bSensor *data = (bSensor *)(ptr->data);
	return !(((data->flag) & 64) != 0);
}

void Sensor_active_set(PointerRNA *ptr, int value)
{
	bSensor *data = (bSensor *)(ptr->data);
	if (!value) data->flag |= 64;
	else data->flag &= ~64;
}

int Sensor_show_expanded_get(PointerRNA *ptr)
{
	bSensor *data = (bSensor *)(ptr->data);
	return (((data->flag) & 1) != 0);
}

void Sensor_show_expanded_set(PointerRNA *ptr, int value)
{
	bSensor *data = (bSensor *)(ptr->data);
	if (value) data->flag |= 1;
	else data->flag &= ~1;
}

int Sensor_invert_get(PointerRNA *ptr)
{
	bSensor *data = (bSensor *)(ptr->data);
	return (int)(data->invert);
}

void Sensor_invert_set(PointerRNA *ptr, int value)
{
	bSensor *data = (bSensor *)(ptr->data);
	data->invert = value;
}

int Sensor_use_level_get(PointerRNA *ptr)
{
	bSensor *data = (bSensor *)(ptr->data);
	return (((data->level) & 1) != 0);
}

void Sensor_use_level_set(PointerRNA *ptr, int value)
{
	rna_Sensor_level_set(ptr, value);
}

int Sensor_use_pulse_true_level_get(PointerRNA *ptr)
{
	bSensor *data = (bSensor *)(ptr->data);
	return (((data->pulse) & 1) != 0);
}

void Sensor_use_pulse_true_level_set(PointerRNA *ptr, int value)
{
	bSensor *data = (bSensor *)(ptr->data);
	if (value) data->pulse |= 1;
	else data->pulse &= ~1;
}

int Sensor_use_pulse_false_level_get(PointerRNA *ptr)
{
	bSensor *data = (bSensor *)(ptr->data);
	return (((data->pulse) & 4) != 0);
}

void Sensor_use_pulse_false_level_set(PointerRNA *ptr, int value)
{
	bSensor *data = (bSensor *)(ptr->data);
	if (value) data->pulse |= 4;
	else data->pulse &= ~4;
}

int Sensor_tick_skip_get(PointerRNA *ptr)
{
	bSensor *data = (bSensor *)(ptr->data);
	return (int)(data->freq);
}

void Sensor_tick_skip_set(PointerRNA *ptr, int value)
{
	bSensor *data = (bSensor *)(ptr->data);
	data->freq = CLAMPIS(value, 0, 10000);
}

int Sensor_use_tap_get(PointerRNA *ptr)
{
	bSensor *data = (bSensor *)(ptr->data);
	return (((data->tap) & 1) != 0);
}

void Sensor_use_tap_set(PointerRNA *ptr, int value)
{
	rna_Sensor_tap_set(ptr, value);
}

int Sensor_controllers_length(PointerRNA *ptr)
{
	return rna_Sensor_controllers_length(ptr);
}

static PointerRNA Sensor_controllers_get(CollectionPropertyIterator *iter)
{
	return rna_pointer_inherit_refine(&iter->parent, &RNA_Controller, rna_iterator_array_dereference_get(iter));
}

void Sensor_controllers_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{

	memset(iter, 0, sizeof(*iter));
	iter->parent = *ptr;
	iter->prop = (PropertyRNA *)&rna_Sensor_controllers;

	rna_Sensor_controllers_begin(iter, ptr);

	if (iter->valid)
		iter->ptr = Sensor_controllers_get(iter);
}

void Sensor_controllers_next(CollectionPropertyIterator *iter)
{
	rna_iterator_array_next(iter);

	if (iter->valid)
		iter->ptr = Sensor_controllers_get(iter);
}

void Sensor_controllers_end(CollectionPropertyIterator *iter)
{
	rna_iterator_array_end(iter);
}

int Sensor_controllers_lookup_int(PointerRNA *ptr, int index, PointerRNA *r_ptr)
{
	int found = 0;
	CollectionPropertyIterator iter;

	Sensor_controllers_begin(&iter, ptr);

	if (iter.valid) {
		ArrayIterator *internal = &iter.internal.array;
		if (index < 0 || index >= internal->length) {
#ifdef __GNUC__
			printf("Array iterator out of range: %s (index %d)\n", __func__, index);
#else
			printf("Array iterator out of range: (index %d)\n", index);
#endif
		}
		else if (internal->skip) {
			while (index-- > 0 && iter.valid) {
				rna_iterator_array_next(&iter);
			}
			found = (index == -1 && iter.valid);
		}
		else {
			internal->ptr += internal->itemsize * index;
			found = 1;
		}
		if (found) *r_ptr = Sensor_controllers_get(&iter);
	}

	Sensor_controllers_end(&iter);

	return found;
}

int Sensor_controllers_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_ptr)
{
	extern int Controller_name_length(PointerRNA *);
	extern void Controller_name_get(PointerRNA *, char *);

	bool found = false;
	CollectionPropertyIterator iter;
	char namebuf[1024];
	char *name;

	Sensor_controllers_begin(&iter, ptr);

	while (iter.valid) {
		if (iter.ptr.data) {
			int namelen = Controller_name_length(&iter.ptr);
			if (namelen < 1024) {
				Controller_name_get(&iter.ptr, namebuf);
				if (strcmp(namebuf, key) == 0) {
					found = true;
					*r_ptr = iter.ptr;
					break;
				}
			}
			else {
				name = MEM_mallocN(namelen+1, "name string");
				Controller_name_get(&iter.ptr, name);
				if (strcmp(name, key) == 0) {
					MEM_freeN(name);

					found = true;
					*r_ptr = iter.ptr;
					break;
				}
				else {
					MEM_freeN(name);
				}
			}
		}
		Sensor_controllers_next(&iter);
	}
	Sensor_controllers_end(&iter);

	return found;
}

void NearSensor_property_get(PointerRNA *ptr, char *value)
{
	bNearSensor *data = (bNearSensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(value, data->name, 64);
}

int NearSensor_property_length(PointerRNA *ptr)
{
	bNearSensor *data = (bNearSensor *)(((bSensor *)ptr->data)->data);
	return strlen(data->name);
}

void NearSensor_property_set(PointerRNA *ptr, const char *value)
{
	bNearSensor *data = (bNearSensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(data->name, value, 64);
}

float NearSensor_distance_get(PointerRNA *ptr)
{
	bNearSensor *data = (bNearSensor *)(((bSensor *)ptr->data)->data);
	return (float)(data->dist);
}

void NearSensor_distance_set(PointerRNA *ptr, float value)
{
	bNearSensor *data = (bNearSensor *)(((bSensor *)ptr->data)->data);
	data->dist = CLAMPIS(value, 0.0f, 10000.0f);
}

float NearSensor_reset_distance_get(PointerRNA *ptr)
{
	bNearSensor *data = (bNearSensor *)(((bSensor *)ptr->data)->data);
	return (float)(data->resetdist);
}

void NearSensor_reset_distance_set(PointerRNA *ptr, float value)
{
	bNearSensor *data = (bNearSensor *)(((bSensor *)ptr->data)->data);
	data->resetdist = CLAMPIS(value, 0.0f, 10000.0f);
}

int MouseSensor_mouse_event_get(PointerRNA *ptr)
{
	bMouseSensor *data = (bMouseSensor *)(((bSensor *)ptr->data)->data);
	return (int)(data->type);
}

void MouseSensor_mouse_event_set(PointerRNA *ptr, int value)
{
	bMouseSensor *data = (bMouseSensor *)(((bSensor *)ptr->data)->data);
	data->type = value;
}

int MouseSensor_use_pulse_get(PointerRNA *ptr)
{
	bMouseSensor *data = (bMouseSensor *)(((bSensor *)ptr->data)->data);
	return (((data->flag) & 1) != 0);
}

void MouseSensor_use_pulse_set(PointerRNA *ptr, int value)
{
	bMouseSensor *data = (bMouseSensor *)(((bSensor *)ptr->data)->data);
	if (value) data->flag |= 1;
	else data->flag &= ~1;
}

int MouseSensor_use_material_get(PointerRNA *ptr)
{
	bMouseSensor *data = (bMouseSensor *)(((bSensor *)ptr->data)->data);
	return ((data->mode) & 1);
}

void MouseSensor_use_material_set(PointerRNA *ptr, int value)
{
	bMouseSensor *data = (bMouseSensor *)(((bSensor *)ptr->data)->data);
	data->mode &= ~1;
	data->mode |= value;
}

void MouseSensor_property_get(PointerRNA *ptr, char *value)
{
	bMouseSensor *data = (bMouseSensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(value, data->propname, 64);
}

int MouseSensor_property_length(PointerRNA *ptr)
{
	bMouseSensor *data = (bMouseSensor *)(((bSensor *)ptr->data)->data);
	return strlen(data->propname);
}

void MouseSensor_property_set(PointerRNA *ptr, const char *value)
{
	bMouseSensor *data = (bMouseSensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(data->propname, value, 64);
}

void MouseSensor_material_get(PointerRNA *ptr, char *value)
{
	bMouseSensor *data = (bMouseSensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(value, data->matname, 64);
}

int MouseSensor_material_length(PointerRNA *ptr)
{
	bMouseSensor *data = (bMouseSensor *)(((bSensor *)ptr->data)->data);
	return strlen(data->matname);
}

void MouseSensor_material_set(PointerRNA *ptr, const char *value)
{
	bMouseSensor *data = (bMouseSensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(data->matname, value, 64);
}

int MouseSensor_use_x_ray_get(PointerRNA *ptr)
{
	bMouseSensor *data = (bMouseSensor *)(((bSensor *)ptr->data)->data);
	return (((data->flag) & 2) != 0);
}

void MouseSensor_use_x_ray_set(PointerRNA *ptr, int value)
{
	bMouseSensor *data = (bMouseSensor *)(((bSensor *)ptr->data)->data);
	if (value) data->flag |= 2;
	else data->flag &= ~2;
}

int KeyboardSensor_key_get(PointerRNA *ptr)
{
	bKeyboardSensor *data = (bKeyboardSensor *)(((bSensor *)ptr->data)->data);
	return (int)(data->key);
}

void KeyboardSensor_key_set(PointerRNA *ptr, int value)
{
	rna_Sensor_keyboard_key_set(ptr, value);
}

int KeyboardSensor_modifier_key_1_get(PointerRNA *ptr)
{
	bKeyboardSensor *data = (bKeyboardSensor *)(((bSensor *)ptr->data)->data);
	return (int)(data->qual);
}

void KeyboardSensor_modifier_key_1_set(PointerRNA *ptr, int value)
{
	rna_Sensor_keyboard_modifier_set(ptr, value);
}

int KeyboardSensor_modifier_key_2_get(PointerRNA *ptr)
{
	bKeyboardSensor *data = (bKeyboardSensor *)(((bSensor *)ptr->data)->data);
	return (int)(data->qual2);
}

void KeyboardSensor_modifier_key_2_set(PointerRNA *ptr, int value)
{
	rna_Sensor_keyboard_modifier2_set(ptr, value);
}

void KeyboardSensor_target_get(PointerRNA *ptr, char *value)
{
	bKeyboardSensor *data = (bKeyboardSensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(value, data->targetName, 64);
}

int KeyboardSensor_target_length(PointerRNA *ptr)
{
	bKeyboardSensor *data = (bKeyboardSensor *)(((bSensor *)ptr->data)->data);
	return strlen(data->targetName);
}

void KeyboardSensor_target_set(PointerRNA *ptr, const char *value)
{
	bKeyboardSensor *data = (bKeyboardSensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(data->targetName, value, 64);
}

void KeyboardSensor_log_get(PointerRNA *ptr, char *value)
{
	bKeyboardSensor *data = (bKeyboardSensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(value, data->toggleName, 64);
}

int KeyboardSensor_log_length(PointerRNA *ptr)
{
	bKeyboardSensor *data = (bKeyboardSensor *)(((bSensor *)ptr->data)->data);
	return strlen(data->toggleName);
}

void KeyboardSensor_log_set(PointerRNA *ptr, const char *value)
{
	bKeyboardSensor *data = (bKeyboardSensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(data->toggleName, value, 64);
}

int KeyboardSensor_use_all_keys_get(PointerRNA *ptr)
{
	bKeyboardSensor *data = (bKeyboardSensor *)(((bSensor *)ptr->data)->data);
	return (((data->type) & 1) != 0);
}

void KeyboardSensor_use_all_keys_set(PointerRNA *ptr, int value)
{
	bKeyboardSensor *data = (bKeyboardSensor *)(((bSensor *)ptr->data)->data);
	if (value) data->type |= 1;
	else data->type &= ~1;
}

int PropertySensor_evaluation_type_get(PointerRNA *ptr)
{
	bPropertySensor *data = (bPropertySensor *)(((bSensor *)ptr->data)->data);
	return (int)(data->type);
}

void PropertySensor_evaluation_type_set(PointerRNA *ptr, int value)
{
	bPropertySensor *data = (bPropertySensor *)(((bSensor *)ptr->data)->data);
	data->type = value;
}

void PropertySensor_property_get(PointerRNA *ptr, char *value)
{
	bPropertySensor *data = (bPropertySensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(value, data->name, 64);
}

int PropertySensor_property_length(PointerRNA *ptr)
{
	bPropertySensor *data = (bPropertySensor *)(((bSensor *)ptr->data)->data);
	return strlen(data->name);
}

void PropertySensor_property_set(PointerRNA *ptr, const char *value)
{
	bPropertySensor *data = (bPropertySensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(data->name, value, 64);
}

void PropertySensor_value_get(PointerRNA *ptr, char *value)
{
	bPropertySensor *data = (bPropertySensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(value, data->value, 64);
}

int PropertySensor_value_length(PointerRNA *ptr)
{
	bPropertySensor *data = (bPropertySensor *)(((bSensor *)ptr->data)->data);
	return strlen(data->value);
}

void PropertySensor_value_set(PointerRNA *ptr, const char *value)
{
	bPropertySensor *data = (bPropertySensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(data->value, value, 64);
}

void PropertySensor_value_min_get(PointerRNA *ptr, char *value)
{
	bPropertySensor *data = (bPropertySensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(value, data->value, 64);
}

int PropertySensor_value_min_length(PointerRNA *ptr)
{
	bPropertySensor *data = (bPropertySensor *)(((bSensor *)ptr->data)->data);
	return strlen(data->value);
}

void PropertySensor_value_min_set(PointerRNA *ptr, const char *value)
{
	bPropertySensor *data = (bPropertySensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(data->value, value, 64);
}

void PropertySensor_value_max_get(PointerRNA *ptr, char *value)
{
	bPropertySensor *data = (bPropertySensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(value, data->maxvalue, 64);
}

int PropertySensor_value_max_length(PointerRNA *ptr)
{
	bPropertySensor *data = (bPropertySensor *)(((bSensor *)ptr->data)->data);
	return strlen(data->maxvalue);
}

void PropertySensor_value_max_set(PointerRNA *ptr, const char *value)
{
	bPropertySensor *data = (bPropertySensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(data->maxvalue, value, 64);
}

int ArmatureSensor_test_type_get(PointerRNA *ptr)
{
	bArmatureSensor *data = (bArmatureSensor *)(((bSensor *)ptr->data)->data);
	return (int)(data->type);
}

void ArmatureSensor_test_type_set(PointerRNA *ptr, int value)
{
	bArmatureSensor *data = (bArmatureSensor *)(((bSensor *)ptr->data)->data);
	data->type = value;
}

void ArmatureSensor_bone_get(PointerRNA *ptr, char *value)
{
	bArmatureSensor *data = (bArmatureSensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(value, data->posechannel, 64);
}

int ArmatureSensor_bone_length(PointerRNA *ptr)
{
	bArmatureSensor *data = (bArmatureSensor *)(((bSensor *)ptr->data)->data);
	return strlen(data->posechannel);
}

void ArmatureSensor_bone_set(PointerRNA *ptr, const char *value)
{
	bArmatureSensor *data = (bArmatureSensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(data->posechannel, value, 64);
}

void ArmatureSensor_constraint_get(PointerRNA *ptr, char *value)
{
	bArmatureSensor *data = (bArmatureSensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(value, data->constraint, 64);
}

int ArmatureSensor_constraint_length(PointerRNA *ptr)
{
	bArmatureSensor *data = (bArmatureSensor *)(((bSensor *)ptr->data)->data);
	return strlen(data->constraint);
}

void ArmatureSensor_constraint_set(PointerRNA *ptr, const char *value)
{
	bArmatureSensor *data = (bArmatureSensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(data->constraint, value, 64);
}

float ArmatureSensor_value_get(PointerRNA *ptr)
{
	bArmatureSensor *data = (bArmatureSensor *)(((bSensor *)ptr->data)->data);
	return (float)(data->value);
}

void ArmatureSensor_value_set(PointerRNA *ptr, float value)
{
	bArmatureSensor *data = (bArmatureSensor *)(((bSensor *)ptr->data)->data);
	data->value = value;
}

void ActuatorSensor_actuator_get(PointerRNA *ptr, char *value)
{
	bActuatorSensor *data = (bActuatorSensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(value, data->name, 64);
}

int ActuatorSensor_actuator_length(PointerRNA *ptr)
{
	bActuatorSensor *data = (bActuatorSensor *)(((bSensor *)ptr->data)->data);
	return strlen(data->name);
}

void ActuatorSensor_actuator_set(PointerRNA *ptr, const char *value)
{
	bActuatorSensor *data = (bActuatorSensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(data->name, value, 64);
}

int DelaySensor_delay_get(PointerRNA *ptr)
{
	bDelaySensor *data = (bDelaySensor *)(((bSensor *)ptr->data)->data);
	return (int)(data->delay);
}

void DelaySensor_delay_set(PointerRNA *ptr, int value)
{
	bDelaySensor *data = (bDelaySensor *)(((bSensor *)ptr->data)->data);
	data->delay = CLAMPIS(value, 0, 5000);
}

int DelaySensor_duration_get(PointerRNA *ptr)
{
	bDelaySensor *data = (bDelaySensor *)(((bSensor *)ptr->data)->data);
	return (int)(data->duration);
}

void DelaySensor_duration_set(PointerRNA *ptr, int value)
{
	bDelaySensor *data = (bDelaySensor *)(((bSensor *)ptr->data)->data);
	data->duration = CLAMPIS(value, 0, 5000);
}

int DelaySensor_use_repeat_get(PointerRNA *ptr)
{
	bDelaySensor *data = (bDelaySensor *)(((bSensor *)ptr->data)->data);
	return (((data->flag) & 1) != 0);
}

void DelaySensor_use_repeat_set(PointerRNA *ptr, int value)
{
	bDelaySensor *data = (bDelaySensor *)(((bSensor *)ptr->data)->data);
	if (value) data->flag |= 1;
	else data->flag &= ~1;
}

int CollisionSensor_use_pulse_get(PointerRNA *ptr)
{
	bCollisionSensor *data = (bCollisionSensor *)(((bSensor *)ptr->data)->data);
	return (((data->mode) & 2) != 0);
}

void CollisionSensor_use_pulse_set(PointerRNA *ptr, int value)
{
	bCollisionSensor *data = (bCollisionSensor *)(((bSensor *)ptr->data)->data);
	if (value) data->mode |= 2;
	else data->mode &= ~2;
}

int CollisionSensor_use_material_get(PointerRNA *ptr)
{
	bCollisionSensor *data = (bCollisionSensor *)(((bSensor *)ptr->data)->data);
	return (((data->mode) & 1) != 0);
}

void CollisionSensor_use_material_set(PointerRNA *ptr, int value)
{
	bCollisionSensor *data = (bCollisionSensor *)(((bSensor *)ptr->data)->data);
	if (value) data->mode |= 1;
	else data->mode &= ~1;
}

void CollisionSensor_property_get(PointerRNA *ptr, char *value)
{
	bCollisionSensor *data = (bCollisionSensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(value, data->name, 64);
}

int CollisionSensor_property_length(PointerRNA *ptr)
{
	bCollisionSensor *data = (bCollisionSensor *)(((bSensor *)ptr->data)->data);
	return strlen(data->name);
}

void CollisionSensor_property_set(PointerRNA *ptr, const char *value)
{
	bCollisionSensor *data = (bCollisionSensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(data->name, value, 64);
}

void CollisionSensor_material_get(PointerRNA *ptr, char *value)
{
	bCollisionSensor *data = (bCollisionSensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(value, data->materialName, 64);
}

int CollisionSensor_material_length(PointerRNA *ptr)
{
	bCollisionSensor *data = (bCollisionSensor *)(((bSensor *)ptr->data)->data);
	return strlen(data->materialName);
}

void CollisionSensor_material_set(PointerRNA *ptr, const char *value)
{
	bCollisionSensor *data = (bCollisionSensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(data->materialName, value, 64);
}

void RadarSensor_property_get(PointerRNA *ptr, char *value)
{
	bRadarSensor *data = (bRadarSensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(value, data->name, 64);
}

int RadarSensor_property_length(PointerRNA *ptr)
{
	bRadarSensor *data = (bRadarSensor *)(((bSensor *)ptr->data)->data);
	return strlen(data->name);
}

void RadarSensor_property_set(PointerRNA *ptr, const char *value)
{
	bRadarSensor *data = (bRadarSensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(data->name, value, 64);
}

int RadarSensor_axis_get(PointerRNA *ptr)
{
	bRadarSensor *data = (bRadarSensor *)(((bSensor *)ptr->data)->data);
	return (int)(data->axis);
}

void RadarSensor_axis_set(PointerRNA *ptr, int value)
{
	bRadarSensor *data = (bRadarSensor *)(((bSensor *)ptr->data)->data);
	data->axis = value;
}

float RadarSensor_angle_get(PointerRNA *ptr)
{
	bRadarSensor *data = (bRadarSensor *)(((bSensor *)ptr->data)->data);
	return (float)(data->angle);
}

void RadarSensor_angle_set(PointerRNA *ptr, float value)
{
	bRadarSensor *data = (bRadarSensor *)(((bSensor *)ptr->data)->data);
	data->angle = CLAMPIS(value, 0.0f, 3.1398472786f);
}

float RadarSensor_distance_get(PointerRNA *ptr)
{
	bRadarSensor *data = (bRadarSensor *)(((bSensor *)ptr->data)->data);
	return (float)(data->range);
}

void RadarSensor_distance_set(PointerRNA *ptr, float value)
{
	bRadarSensor *data = (bRadarSensor *)(((bSensor *)ptr->data)->data);
	data->range = CLAMPIS(value, 0.0f, 10000.0f);
}

int RandomSensor_seed_get(PointerRNA *ptr)
{
	bRandomSensor *data = (bRandomSensor *)(((bSensor *)ptr->data)->data);
	return (int)(data->seed);
}

void RandomSensor_seed_set(PointerRNA *ptr, int value)
{
	bRandomSensor *data = (bRandomSensor *)(((bSensor *)ptr->data)->data);
	data->seed = CLAMPIS(value, 0, 1000);
}

int RaySensor_ray_type_get(PointerRNA *ptr)
{
	bRaySensor *data = (bRaySensor *)(((bSensor *)ptr->data)->data);
	return ((data->mode) & 1);
}

void RaySensor_ray_type_set(PointerRNA *ptr, int value)
{
	bRaySensor *data = (bRaySensor *)(((bSensor *)ptr->data)->data);
	data->mode &= ~1;
	data->mode |= value;
}

void RaySensor_property_get(PointerRNA *ptr, char *value)
{
	bRaySensor *data = (bRaySensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(value, data->propname, 64);
}

int RaySensor_property_length(PointerRNA *ptr)
{
	bRaySensor *data = (bRaySensor *)(((bSensor *)ptr->data)->data);
	return strlen(data->propname);
}

void RaySensor_property_set(PointerRNA *ptr, const char *value)
{
	bRaySensor *data = (bRaySensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(data->propname, value, 64);
}

void RaySensor_material_get(PointerRNA *ptr, char *value)
{
	bRaySensor *data = (bRaySensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(value, data->matname, 64);
}

int RaySensor_material_length(PointerRNA *ptr)
{
	bRaySensor *data = (bRaySensor *)(((bSensor *)ptr->data)->data);
	return strlen(data->matname);
}

void RaySensor_material_set(PointerRNA *ptr, const char *value)
{
	bRaySensor *data = (bRaySensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(data->matname, value, 64);
}

int RaySensor_use_x_ray_get(PointerRNA *ptr)
{
	bRaySensor *data = (bRaySensor *)(((bSensor *)ptr->data)->data);
	return (((data->mode) & 2) != 0);
}

void RaySensor_use_x_ray_set(PointerRNA *ptr, int value)
{
	bRaySensor *data = (bRaySensor *)(((bSensor *)ptr->data)->data);
	if (value) data->mode |= 2;
	else data->mode &= ~2;
}

float RaySensor_range_get(PointerRNA *ptr)
{
	bRaySensor *data = (bRaySensor *)(((bSensor *)ptr->data)->data);
	return (float)(data->range);
}

void RaySensor_range_set(PointerRNA *ptr, float value)
{
	bRaySensor *data = (bRaySensor *)(((bSensor *)ptr->data)->data);
	data->range = CLAMPIS(value, 0.0099999998f, 10000.0f);
}

int RaySensor_axis_get(PointerRNA *ptr)
{
	bRaySensor *data = (bRaySensor *)(((bSensor *)ptr->data)->data);
	return (int)(data->axisflag);
}

void RaySensor_axis_set(PointerRNA *ptr, int value)
{
	bRaySensor *data = (bRaySensor *)(((bSensor *)ptr->data)->data);
	data->axisflag = value;
}

void MessageSensor_subject_get(PointerRNA *ptr, char *value)
{
	bMessageSensor *data = (bMessageSensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(value, data->subject, 64);
}

int MessageSensor_subject_length(PointerRNA *ptr)
{
	bMessageSensor *data = (bMessageSensor *)(((bSensor *)ptr->data)->data);
	return strlen(data->subject);
}

void MessageSensor_subject_set(PointerRNA *ptr, const char *value)
{
	bMessageSensor *data = (bMessageSensor *)(((bSensor *)ptr->data)->data);
	BLI_strncpy_utf8(data->subject, value, 64);
}

int JoystickSensor_joystick_index_get(PointerRNA *ptr)
{
	bJoystickSensor *data = (bJoystickSensor *)(((bSensor *)ptr->data)->data);
	return (int)(data->joyindex);
}

void JoystickSensor_joystick_index_set(PointerRNA *ptr, int value)
{
	bJoystickSensor *data = (bJoystickSensor *)(((bSensor *)ptr->data)->data);
	data->joyindex = CLAMPIS(value, 0, 7);
}

int JoystickSensor_event_type_get(PointerRNA *ptr)
{
	bJoystickSensor *data = (bJoystickSensor *)(((bSensor *)ptr->data)->data);
	return (int)(data->type);
}

void JoystickSensor_event_type_set(PointerRNA *ptr, int value)
{
	bJoystickSensor *data = (bJoystickSensor *)(((bSensor *)ptr->data)->data);
	data->type = value;
}

int JoystickSensor_use_all_events_get(PointerRNA *ptr)
{
	bJoystickSensor *data = (bJoystickSensor *)(((bSensor *)ptr->data)->data);
	return (((data->flag) & 1) != 0);
}

void JoystickSensor_use_all_events_set(PointerRNA *ptr, int value)
{
	bJoystickSensor *data = (bJoystickSensor *)(((bSensor *)ptr->data)->data);
	if (value) data->flag |= 1;
	else data->flag &= ~1;
}

int JoystickSensor_button_number_get(PointerRNA *ptr)
{
	bJoystickSensor *data = (bJoystickSensor *)(((bSensor *)ptr->data)->data);
	return (int)(data->button);
}

void JoystickSensor_button_number_set(PointerRNA *ptr, int value)
{
	bJoystickSensor *data = (bJoystickSensor *)(((bSensor *)ptr->data)->data);
	data->button = CLAMPIS(value, 0, 18);
}

int JoystickSensor_axis_number_get(PointerRNA *ptr)
{
	bJoystickSensor *data = (bJoystickSensor *)(((bSensor *)ptr->data)->data);
	return (int)(data->axis);
}

void JoystickSensor_axis_number_set(PointerRNA *ptr, int value)
{
	bJoystickSensor *data = (bJoystickSensor *)(((bSensor *)ptr->data)->data);
	data->axis = CLAMPIS(value, 1, 8);
}

int JoystickSensor_axis_threshold_get(PointerRNA *ptr)
{
	bJoystickSensor *data = (bJoystickSensor *)(((bSensor *)ptr->data)->data);
	return (int)(data->precision);
}

void JoystickSensor_axis_threshold_set(PointerRNA *ptr, int value)
{
	bJoystickSensor *data = (bJoystickSensor *)(((bSensor *)ptr->data)->data);
	data->precision = CLAMPIS(value, 0, 32768);
}

int JoystickSensor_axis_direction_get(PointerRNA *ptr)
{
	bJoystickSensor *data = (bJoystickSensor *)(((bSensor *)ptr->data)->data);
	return (int)(data->axisf);
}

void JoystickSensor_axis_direction_set(PointerRNA *ptr, int value)
{
	bJoystickSensor *data = (bJoystickSensor *)(((bSensor *)ptr->data)->data);
	data->axisf = value;
}

int JoystickSensor_single_axis_number_get(PointerRNA *ptr)
{
	bJoystickSensor *data = (bJoystickSensor *)(((bSensor *)ptr->data)->data);
	return (int)(data->axis_single);
}

void JoystickSensor_single_axis_number_set(PointerRNA *ptr, int value)
{
	bJoystickSensor *data = (bJoystickSensor *)(((bSensor *)ptr->data)->data);
	data->axis_single = CLAMPIS(value, 1, 16);
}

int JoystickSensor_hat_number_get(PointerRNA *ptr)
{
	bJoystickSensor *data = (bJoystickSensor *)(((bSensor *)ptr->data)->data);
	return (int)(data->hat);
}

void JoystickSensor_hat_number_set(PointerRNA *ptr, int value)
{
	bJoystickSensor *data = (bJoystickSensor *)(((bSensor *)ptr->data)->data);
	data->hat = CLAMPIS(value, 1, 2);
}

int JoystickSensor_hat_direction_get(PointerRNA *ptr)
{
	bJoystickSensor *data = (bJoystickSensor *)(((bSensor *)ptr->data)->data);
	return (int)(data->hatf);
}

void JoystickSensor_hat_direction_set(PointerRNA *ptr, int value)
{
	bJoystickSensor *data = (bJoystickSensor *)(((bSensor *)ptr->data)->data);
	data->hatf = value;
}

void Sensor_link(struct bSensor *_self, struct bController *controller)
{
	rna_Sensor_link(_self, controller);
}

void Sensor_link_call(bContext *C, ReportList *reports, PointerRNA *_ptr, ParameterList *_parms)
{
	struct bSensor *_self;
	struct bController *controller;
	char *_data;
	
	_self = (struct bSensor *)_ptr->data;
	_data = (char *)_parms->data;
	controller = *((struct bController **)_data);
	
	rna_Sensor_link(_self, controller);
}

void Sensor_unlink(struct bSensor *_self, struct bController *controller)
{
	rna_Sensor_unlink(_self, controller);
}

void Sensor_unlink_call(bContext *C, ReportList *reports, PointerRNA *_ptr, ParameterList *_parms)
{
	struct bSensor *_self;
	struct bController *controller;
	char *_data;
	
	_self = (struct bSensor *)_ptr->data;
	_data = (char *)_parms->data;
	controller = *((struct bController **)_data);
	
	rna_Sensor_unlink(_self, controller);
}

/* Repeated prototypes to detect errors */

void rna_Sensor_link(struct bSensor *_self, struct bController *controller);
void rna_Sensor_unlink(struct bSensor *_self, struct bController *controller);















/* Sensor */
CollectionPropertyRNA rna_Sensor_rna_properties = {
	{(PropertyRNA *)&rna_Sensor_rna_type, NULL,
	-1, "rna_properties", 0, 0, 1, "Properties",
	"RNA property collection",
	0, "*",
	PROP_COLLECTION, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	Sensor_rna_properties_begin, Sensor_rna_properties_next, Sensor_rna_properties_end, Sensor_rna_properties_get, NULL, NULL, Sensor_rna_properties_lookup_string, NULL, &RNA_Property
};

PointerPropertyRNA rna_Sensor_rna_type = {
	{(PropertyRNA *)&rna_Sensor_name, (PropertyRNA *)&rna_Sensor_rna_properties,
	-1, "rna_type", 8912896, 0, 0, "RNA",
	"RNA type definition",
	0, "*",
	PROP_POINTER, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	Sensor_rna_type_get, NULL, NULL, NULL,&RNA_Struct
};

StringPropertyRNA rna_Sensor_name = {
	{(PropertyRNA *)&rna_Sensor_type, (PropertyRNA *)&rna_Sensor_rna_type,
	-1, "name", 262145, 0, 0, "Name",
	"Sensor name",
	0, "*",
	PROP_STRING, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {64, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	Sensor_name_get, Sensor_name_length, Sensor_name_set, NULL, NULL, NULL, 64, ""
};

static EnumPropertyItem rna_Sensor_type_items[15] = {
	{12, "ACTUATOR", 0, "Actuator", ""},
	{0, "ALWAYS", 0, "Always", ""},
	{14, "ARMATURE", 0, "Armature", ""},
	{6, "COLLISION", 0, "Collision", ""},
	{13, "DELAY", 0, "Delay", ""},
	{11, "JOYSTICK", 0, "Joystick", ""},
	{3, "KEYBOARD", 0, "Keyboard", ""},
	{10, "MESSAGE", 0, "Message", ""},
	{5, "MOUSE", 0, "Mouse", ""},
	{2, "NEAR", 0, "Near", ""},
	{4, "PROPERTY", 0, "Property", ""},
	{7, "RADAR", 0, "Radar", ""},
	{8, "RANDOM", 0, "Random", ""},
	{9, "RAY", 0, "Ray", ""},
	{0, NULL, 0, NULL, NULL}
};

EnumPropertyRNA rna_Sensor_type = {
	{(PropertyRNA *)&rna_Sensor_pin, (PropertyRNA *)&rna_Sensor_name,
	-1, "type", 1, 0, 0, "Type",
	"",
	0, "*",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	Sensor_type_get, Sensor_type_set, rna_Sensor_type_itemf, NULL, NULL, NULL, rna_Sensor_type_items, 14, 0
};

BoolPropertyRNA rna_Sensor_pin = {
	{(PropertyRNA *)&rna_Sensor_active, (PropertyRNA *)&rna_Sensor_type,
	-1, "pin", 4099, 0, 0, "Pinned",
	"Display when not linked to a visible states controller",
	42, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	Sensor_pin_get, Sensor_pin_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

BoolPropertyRNA rna_Sensor_active = {
	{(PropertyRNA *)&rna_Sensor_show_expanded, (PropertyRNA *)&rna_Sensor_pin,
	-1, "active", 3, 0, 0, "Active",
	"Set active state of the sensor",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	Sensor_active_get, Sensor_active_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

BoolPropertyRNA rna_Sensor_show_expanded = {
	{(PropertyRNA *)&rna_Sensor_invert, (PropertyRNA *)&rna_Sensor_active,
	-1, "show_expanded", 4099, 0, 0, "Expanded",
	"Set sensor expanded in the user interface",
	4, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	Sensor_show_expanded_get, Sensor_show_expanded_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

BoolPropertyRNA rna_Sensor_invert = {
	{(PropertyRNA *)&rna_Sensor_use_level, (PropertyRNA *)&rna_Sensor_show_expanded,
	-1, "invert", 3, 0, 4, "Invert Output",
	"Invert the level(output) of this sensor",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	offsetof(bSensor, invert), 1, NULL},
	Sensor_invert_get, Sensor_invert_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

BoolPropertyRNA rna_Sensor_use_level = {
	{(PropertyRNA *)&rna_Sensor_use_pulse_true_level, (PropertyRNA *)&rna_Sensor_invert,
	-1, "use_level", 3, 0, 0, "Level",
	"Level detector, trigger controllers of new states (only applicable upon logic state transition)",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	Sensor_use_level_get, Sensor_use_level_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

BoolPropertyRNA rna_Sensor_use_pulse_true_level = {
	{(PropertyRNA *)&rna_Sensor_use_pulse_false_level, (PropertyRNA *)&rna_Sensor_use_level,
	-1, "use_pulse_true_level", 3, 0, 0, "Pulse True Level",
	"Activate TRUE level triggering (pulse mode)",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	Sensor_use_pulse_true_level_get, Sensor_use_pulse_true_level_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

BoolPropertyRNA rna_Sensor_use_pulse_false_level = {
	{(PropertyRNA *)&rna_Sensor_tick_skip, (PropertyRNA *)&rna_Sensor_use_pulse_true_level,
	-1, "use_pulse_false_level", 3, 0, 0, "Pulse False Level",
	"Activate FALSE level triggering (pulse mode)",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	Sensor_use_pulse_false_level_get, Sensor_use_pulse_false_level_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

IntPropertyRNA rna_Sensor_tick_skip = {
	{(PropertyRNA *)&rna_Sensor_use_tap, (PropertyRNA *)&rna_Sensor_use_pulse_false_level,
	-1, "tick_skip", 3, 0, 4, "Skip",
	"Number of logic ticks skipped between 2 active pulses (0 = pulse every logic tick, 1 = skip 1 logic tick between pulses, etc.)",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	offsetof(bSensor, freq), 1, NULL},
	Sensor_tick_skip_get, Sensor_tick_skip_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	0, 10000, 0, 10000, 1, 0, NULL
};

BoolPropertyRNA rna_Sensor_use_tap = {
	{(PropertyRNA *)&rna_Sensor_controllers, (PropertyRNA *)&rna_Sensor_tick_skip,
	-1, "use_tap", 3, 0, 0, "Tap",
	"Trigger controllers only for an instant, even while the sensor remains true",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	Sensor_use_tap_get, Sensor_use_tap_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

CollectionPropertyRNA rna_Sensor_controllers = {
	{NULL, (PropertyRNA *)&rna_Sensor_use_tap,
	-1, "controllers", 0, 0, 0, "Controllers",
	"The list containing the controllers connected to the sensor",
	0, "*",
	PROP_COLLECTION, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	Sensor_controllers_begin, Sensor_controllers_next, Sensor_controllers_end, Sensor_controllers_get, Sensor_controllers_length, Sensor_controllers_lookup_int, Sensor_controllers_lookup_string, NULL, &RNA_Controller
};

PointerPropertyRNA rna_Sensor_link_controller = {
	{NULL, NULL,
	-1, "controller", 8388608, 1, 0, "",
	"Controller to link to",
	0, "*",
	PROP_POINTER, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, NULL, NULL,&RNA_Controller
};

FunctionRNA rna_Sensor_link_func = {
	{(FunctionRNA *)&rna_Sensor_unlink_func, NULL,
	NULL,
	{(PropertyRNA *)&rna_Sensor_link_controller, (PropertyRNA *)&rna_Sensor_link_controller}},
	"link", 0, "Link the sensor to a controller",
	Sensor_link_call,
	NULL
};

PointerPropertyRNA rna_Sensor_unlink_controller = {
	{NULL, NULL,
	-1, "controller", 8388608, 1, 0, "",
	"Controller to unlink from",
	0, "*",
	PROP_POINTER, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, NULL, NULL,&RNA_Controller
};

FunctionRNA rna_Sensor_unlink_func = {
	{NULL, (FunctionRNA *)&rna_Sensor_link_func,
	NULL,
	{(PropertyRNA *)&rna_Sensor_unlink_controller, (PropertyRNA *)&rna_Sensor_unlink_controller}},
	"unlink", 0, "Unlink the sensor from a controller",
	Sensor_unlink_call,
	NULL
};

StructRNA RNA_Sensor = {
	{(ContainerRNA *)&RNA_AlwaysSensor, (ContainerRNA *)&RNA_GPencilSculptBrush,
	NULL,
	{(PropertyRNA *)&rna_Sensor_rna_properties, (PropertyRNA *)&rna_Sensor_controllers}},
	"Sensor", NULL, NULL, 4, "Sensor",
	"Game engine logic brick to detect events",
	"*", 17,
	(PropertyRNA *)&rna_Sensor_name, (PropertyRNA *)&rna_Sensor_rna_properties,
	NULL,
	NULL,
	rna_Sensor_refine,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	{(FunctionRNA *)&rna_Sensor_link_func, (FunctionRNA *)&rna_Sensor_unlink_func}
};

/* Always Sensor */
StructRNA RNA_AlwaysSensor = {
	{(ContainerRNA *)&RNA_NearSensor, (ContainerRNA *)&RNA_Sensor,
	NULL,
	{NULL, NULL}},
	"AlwaysSensor", NULL, NULL, 4, "Always Sensor",
	"Sensor to generate continuous pulses",
	"*", 17,
	(PropertyRNA *)&rna_Sensor_name, (PropertyRNA *)&rna_Sensor_rna_properties,
	&RNA_Sensor,
	NULL,
	rna_Sensor_refine,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	{NULL, NULL}
};

/* Near Sensor */
StringPropertyRNA rna_NearSensor_property = {
	{(PropertyRNA *)&rna_NearSensor_distance, NULL,
	-1, "property", 262145, 0, 0, "Property",
	"Only look for objects with this property (blank = all objects)",
	0, "*",
	PROP_STRING, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {64, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	NearSensor_property_get, NearSensor_property_length, NearSensor_property_set, NULL, NULL, NULL, 64, ""
};

FloatPropertyRNA rna_NearSensor_distance = {
	{(PropertyRNA *)&rna_NearSensor_reset_distance, (PropertyRNA *)&rna_NearSensor_property,
	-1, "distance", 3, 0, 4, "Distance",
	"Trigger distance",
	0, "*",
	PROP_FLOAT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	offsetof(bNearSensor, dist), 4, NULL},
	NearSensor_distance_get, NearSensor_distance_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.0f, 10000.0f, 0.0f, 10000.0f, 10.0f, 3, 0.0f, NULL
};

FloatPropertyRNA rna_NearSensor_reset_distance = {
	{NULL, (PropertyRNA *)&rna_NearSensor_distance,
	-1, "reset_distance", 3, 0, 4, "Reset Distance",
	"The distance where the sensor forgets the actor",
	0, "*",
	PROP_FLOAT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	offsetof(bNearSensor, resetdist), 4, NULL},
	NearSensor_reset_distance_get, NearSensor_reset_distance_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.0f, 10000.0f, 0.0f, 10000.0f, 10.0f, 3, 0.0f, NULL
};

StructRNA RNA_NearSensor = {
	{(ContainerRNA *)&RNA_MouseSensor, (ContainerRNA *)&RNA_AlwaysSensor,
	NULL,
	{(PropertyRNA *)&rna_NearSensor_property, (PropertyRNA *)&rna_NearSensor_reset_distance}},
	"NearSensor", NULL, NULL, 4, "Near Sensor",
	"Sensor to detect nearby objects",
	"*", 17,
	(PropertyRNA *)&rna_Sensor_name, (PropertyRNA *)&rna_Sensor_rna_properties,
	&RNA_Sensor,
	NULL,
	rna_Sensor_refine,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	{NULL, NULL}
};

/* Mouse Sensor */
static EnumPropertyItem rna_MouseSensor_mouse_event_items[9] = {
	{1, "LEFTCLICK", 0, "Left Button", ""},
	{2, "MIDDLECLICK", 0, "Middle Button", ""},
	{4, "RIGHTCLICK", 0, "Right Button", ""},
	{5, "WHEELUP", 0, "Wheel Up", ""},
	{6, "WHEELDOWN", 0, "Wheel Down", ""},
	{8, "MOVEMENT", 0, "Movement", ""},
	{16, "MOUSEOVER", 0, "Mouse Over", ""},
	{32, "MOUSEOVERANY", 0, "Mouse Over Any", ""},
	{0, NULL, 0, NULL, NULL}
};

EnumPropertyRNA rna_MouseSensor_mouse_event = {
	{(PropertyRNA *)&rna_MouseSensor_use_pulse, NULL,
	-1, "mouse_event", 3, 0, 0, "Mouse Event",
	"Type of event this mouse sensor should trigger on",
	0, "*",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	MouseSensor_mouse_event_get, MouseSensor_mouse_event_set, NULL, NULL, NULL, NULL, rna_MouseSensor_mouse_event_items, 8, 1
};

BoolPropertyRNA rna_MouseSensor_use_pulse = {
	{(PropertyRNA *)&rna_MouseSensor_use_material, (PropertyRNA *)&rna_MouseSensor_mouse_event,
	-1, "use_pulse", 3, 0, 0, "Pulse",
	"Moving the mouse over a different object generates a pulse",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	MouseSensor_use_pulse_get, MouseSensor_use_pulse_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

static EnumPropertyItem rna_MouseSensor_use_material_items[3] = {
	{0, "PROPERTY", 120, "Property", "Use a property for ray intersections"},
	{1, "MATERIAL", 165, "Material", "Use a material for ray intersections"},
	{0, NULL, 0, NULL, NULL}
};

EnumPropertyRNA rna_MouseSensor_use_material = {
	{(PropertyRNA *)&rna_MouseSensor_property, (PropertyRNA *)&rna_MouseSensor_use_pulse,
	-1, "use_material", 3, 0, 0, "M/P",
	"Toggle collision on material or property",
	0, "*",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	MouseSensor_use_material_get, MouseSensor_use_material_set, NULL, NULL, NULL, NULL, rna_MouseSensor_use_material_items, 2, 0
};

StringPropertyRNA rna_MouseSensor_property = {
	{(PropertyRNA *)&rna_MouseSensor_material, (PropertyRNA *)&rna_MouseSensor_use_material,
	-1, "property", 262145, 0, 0, "Property",
	"Only look for objects with this property (blank = all objects)",
	0, "*",
	PROP_STRING, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {64, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	MouseSensor_property_get, MouseSensor_property_length, MouseSensor_property_set, NULL, NULL, NULL, 64, ""
};

StringPropertyRNA rna_MouseSensor_material = {
	{(PropertyRNA *)&rna_MouseSensor_use_x_ray, (PropertyRNA *)&rna_MouseSensor_property,
	-1, "material", 262145, 0, 0, "Material",
	"Only look for objects with this material (blank = all objects)",
	0, "*",
	PROP_STRING, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {64, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	MouseSensor_material_get, MouseSensor_material_length, MouseSensor_material_set, NULL, NULL, NULL, 64, ""
};

BoolPropertyRNA rna_MouseSensor_use_x_ray = {
	{NULL, (PropertyRNA *)&rna_MouseSensor_material,
	-1, "use_x_ray", 3, 0, 0, "X-Ray",
	"Toggle X-Ray option (see through objects that don\'t have the property)",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	MouseSensor_use_x_ray_get, MouseSensor_use_x_ray_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

StructRNA RNA_MouseSensor = {
	{(ContainerRNA *)&RNA_KeyboardSensor, (ContainerRNA *)&RNA_NearSensor,
	NULL,
	{(PropertyRNA *)&rna_MouseSensor_mouse_event, (PropertyRNA *)&rna_MouseSensor_use_x_ray}},
	"MouseSensor", NULL, NULL, 4, "Mouse Sensor",
	"Sensor to detect mouse events",
	"*", 17,
	(PropertyRNA *)&rna_Sensor_name, (PropertyRNA *)&rna_Sensor_rna_properties,
	&RNA_Sensor,
	NULL,
	rna_Sensor_refine,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	{NULL, NULL}
};

/* Keyboard Sensor */
static EnumPropertyItem rna_KeyboardSensor_key_items[200] = {
	{0, "NONE", 0, "", ""},
	{1, "LEFTMOUSE", 0, "Left Mouse", "LMB"},
	{2, "MIDDLEMOUSE", 0, "Middle Mouse", "MMB"},
	{3, "RIGHTMOUSE", 0, "Right Mouse", "RMB"},
	{7, "BUTTON4MOUSE", 0, "Button4 Mouse", "MB4"},
	{8, "BUTTON5MOUSE", 0, "Button5 Mouse", "MB5"},
	{18, "BUTTON6MOUSE", 0, "Button6 Mouse", "MB6"},
	{19, "BUTTON7MOUSE", 0, "Button7 Mouse", "MB7"},
	{5, "ACTIONMOUSE", 0, "Action Mouse", "MBA"},
	{6, "SELECTMOUSE", 0, "Select Mouse", "MBS"},
	{0, "", 0, NULL, NULL},
	{26, "PEN", 0, "Pen", ""},
	{27, "ERASER", 0, "Eraser", ""},
	{0, "", 0, NULL, NULL},
	{4, "MOUSEMOVE", 0, "Mouse Move", "MsMov"},
	{17, "INBETWEEN_MOUSEMOVE", 0, "In-between Move", "MsSubMov"},
	{14, "TRACKPADPAN", 0, "Mouse/Trackpad Pan", "MsPan"},
	{15, "TRACKPADZOOM", 0, "Mouse/Trackpad Zoom", "MsZoom"},
	{16, "MOUSEROTATE", 0, "Mouse/Trackpad Rotate", "MsRot"},
	{0, "", 0, NULL, NULL},
	{10, "WHEELUPMOUSE", 0, "Wheel Up", "WhUp"},
	{11, "WHEELDOWNMOUSE", 0, "Wheel Down", "WhDown"},
	{12, "WHEELINMOUSE", 0, "Wheel In", "WhIn"},
	{13, "WHEELOUTMOUSE", 0, "Wheel Out", "WhOut"},
	{0, "", 0, NULL, NULL},
	{20482, "EVT_TWEAK_L", 0, "Tweak Left", "TwkL"},
	{20483, "EVT_TWEAK_M", 0, "Tweak Middle", "TwkM"},
	{20484, "EVT_TWEAK_R", 0, "Tweak Right", "TwkR"},
	{20485, "EVT_TWEAK_A", 0, "Tweak Action", "TwkA"},
	{20486, "EVT_TWEAK_S", 0, "Tweak Select", "TwkS"},
	{0, "", 0, NULL, NULL},
	{97, "A", 0, "A", ""},
	{98, "B", 0, "B", ""},
	{99, "C", 0, "C", ""},
	{100, "D", 0, "D", ""},
	{101, "E", 0, "E", ""},
	{102, "F", 0, "F", ""},
	{103, "G", 0, "G", ""},
	{104, "H", 0, "H", ""},
	{105, "I", 0, "I", ""},
	{106, "J", 0, "J", ""},
	{107, "K", 0, "K", ""},
	{108, "L", 0, "L", ""},
	{109, "M", 0, "M", ""},
	{110, "N", 0, "N", ""},
	{111, "O", 0, "O", ""},
	{112, "P", 0, "P", ""},
	{113, "Q", 0, "Q", ""},
	{114, "R", 0, "R", ""},
	{115, "S", 0, "S", ""},
	{116, "T", 0, "T", ""},
	{117, "U", 0, "U", ""},
	{118, "V", 0, "V", ""},
	{119, "W", 0, "W", ""},
	{120, "X", 0, "X", ""},
	{121, "Y", 0, "Y", ""},
	{122, "Z", 0, "Z", ""},
	{0, "", 0, NULL, NULL},
	{48, "ZERO", 0, "0", ""},
	{49, "ONE", 0, "1", ""},
	{50, "TWO", 0, "2", ""},
	{51, "THREE", 0, "3", ""},
	{52, "FOUR", 0, "4", ""},
	{53, "FIVE", 0, "5", ""},
	{54, "SIX", 0, "6", ""},
	{55, "SEVEN", 0, "7", ""},
	{56, "EIGHT", 0, "8", ""},
	{57, "NINE", 0, "9", ""},
	{0, "", 0, NULL, NULL},
	{212, "LEFT_CTRL", 0, "Left Ctrl", "CtrlL"},
	{213, "LEFT_ALT", 0, "Left Alt", "AltL"},
	{217, "LEFT_SHIFT", 0, "Left Shift", "ShiftL"},
	{214, "RIGHT_ALT", 0, "Right Alt", "AltR"},
	{215, "RIGHT_CTRL", 0, "Right Ctrl", "CtrlR"},
	{216, "RIGHT_SHIFT", 0, "Right Shift", "ShiftR"},
	{0, "", 0, NULL, NULL},
	{172, "OSKEY", 0, "OS Key", "Cmd"},
	{173, "GRLESS", 0, "Grless", ""},
	{218, "ESC", 0, "Esc", ""},
	{219, "TAB", 0, "Tab", ""},
	{220, "RET", 0, "Return", "Enter"},
	{221, "SPACE", 0, "Spacebar", "Space"},
	{222, "LINE_FEED", 0, "Line Feed", ""},
	{223, "BACK_SPACE", 0, "Back Space", "BkSpace"},
	{224, "DEL", 0, "Delete", "Del"},
	{225, "SEMI_COLON", 0, ";", ""},
	{226, "PERIOD", 0, ".", ""},
	{227, "COMMA", 0, ",", ""},
	{228, "QUOTE", 0, "\"", ""},
	{229, "ACCENT_GRAVE", 0, "`", ""},
	{230, "MINUS", 0, "-", ""},
	{231, "PLUS", 0, "+", ""},
	{232, "SLASH", 0, "/", ""},
	{233, "BACK_SLASH", 0, "\\", ""},
	{234, "EQUAL", 0, "=", ""},
	{235, "LEFT_BRACKET", 0, "[", ""},
	{236, "RIGHT_BRACKET", 0, "]", ""},
	{137, "LEFT_ARROW", 0, "Left Arrow", "←"},
	{138, "DOWN_ARROW", 0, "Down Arrow", "↓"},
	{139, "RIGHT_ARROW", 0, "Right Arrow", "→"},
	{140, "UP_ARROW", 0, "Up Arrow", "↑"},
	{152, "NUMPAD_2", 0, "Numpad 2", "Pad2"},
	{154, "NUMPAD_4", 0, "Numpad 4", "Pad4"},
	{156, "NUMPAD_6", 0, "Numpad 6", "Pad6"},
	{158, "NUMPAD_8", 0, "Numpad 8", "Pad8"},
	{151, "NUMPAD_1", 0, "Numpad 1", "Pad1"},
	{153, "NUMPAD_3", 0, "Numpad 3", "Pad3"},
	{155, "NUMPAD_5", 0, "Numpad 5", "Pad5"},
	{157, "NUMPAD_7", 0, "Numpad 7", "Pad7"},
	{159, "NUMPAD_9", 0, "Numpad 9", "Pad9"},
	{199, "NUMPAD_PERIOD", 0, "Numpad .", "Pad."},
	{161, "NUMPAD_SLASH", 0, "Numpad /", "Pad/"},
	{160, "NUMPAD_ASTERIX", 0, "Numpad *", "Pad*"},
	{150, "NUMPAD_0", 0, "Numpad 0", "Pad0"},
	{162, "NUMPAD_MINUS", 0, "Numpad -", "Pad-"},
	{163, "NUMPAD_ENTER", 0, "Numpad Enter", "PadEnter"},
	{164, "NUMPAD_PLUS", 0, "Numpad +", "Pad+"},
	{300, "F1", 0, "F1", ""},
	{301, "F2", 0, "F2", ""},
	{302, "F3", 0, "F3", ""},
	{303, "F4", 0, "F4", ""},
	{304, "F5", 0, "F5", ""},
	{305, "F6", 0, "F6", ""},
	{306, "F7", 0, "F7", ""},
	{307, "F8", 0, "F8", ""},
	{308, "F9", 0, "F9", ""},
	{309, "F10", 0, "F10", ""},
	{310, "F11", 0, "F11", ""},
	{311, "F12", 0, "F12", ""},
	{312, "F13", 0, "F13", ""},
	{313, "F14", 0, "F14", ""},
	{314, "F15", 0, "F15", ""},
	{315, "F16", 0, "F16", ""},
	{316, "F17", 0, "F17", ""},
	{317, "F18", 0, "F18", ""},
	{318, "F19", 0, "F19", ""},
	{165, "PAUSE", 0, "Pause", ""},
	{166, "INSERT", 0, "Insert", "Ins"},
	{167, "HOME", 0, "Home", ""},
	{168, "PAGE_UP", 0, "Page Up", "PgUp"},
	{169, "PAGE_DOWN", 0, "Page Down", "PgDown"},
	{170, "END", 0, "End", ""},
	{0, "", 0, NULL, NULL},
	{174, "MEDIA_PLAY", 0, "Media Play/Pause", ">/||"},
	{175, "MEDIA_STOP", 0, "Media Stop", "Stop"},
	{176, "MEDIA_FIRST", 0, "Media First", "|<<"},
	{177, "MEDIA_LAST", 0, "Media Last", ">>|"},
	{0, "", 0, NULL, NULL},
	{-2, "TEXTINPUT", 0, "Text Input", "TxtIn"},
	{0, "", 0, NULL, NULL},
	{260, "WINDOW_DEACTIVATE", 0, "Window Deactivate", ""},
	{272, "TIMER", 0, "Timer", "Tmr"},
	{273, "TIMER0", 0, "Timer 0", "Tmr0"},
	{274, "TIMER1", 0, "Timer 1", "Tmr1"},
	{275, "TIMER2", 0, "Timer 2", "Tmr2"},
	{276, "TIMER_JOBS", 0, "Timer Jobs", "TmrJob"},
	{277, "TIMER_AUTOSAVE", 0, "Timer Autosave", "TmrSave"},
	{278, "TIMER_REPORT", 0, "Timer Report", "TmrReport"},
	{279, "TIMERREGION", 0, "Timer Region", "TmrReg"},
	{0, "", 0, NULL, NULL},
	{400, "NDOF_MOTION", 0, "NDOF Motion", "NdofMov"},
	{401, "NDOF_BUTTON_MENU", 0, "NDOF Menu", "NdofMenu"},
	{402, "NDOF_BUTTON_FIT", 0, "NDOF Fit", "NdofFit"},
	{403, "NDOF_BUTTON_TOP", 0, "NDOF Top", "Ndof↑"},
	{404, "NDOF_BUTTON_BOTTOM", 0, "NDOF Bottom", "Ndof↓"},
	{405, "NDOF_BUTTON_LEFT", 0, "NDOF Left", "Ndof←"},
	{406, "NDOF_BUTTON_RIGHT", 0, "NDOF Right", "Ndof→"},
	{407, "NDOF_BUTTON_FRONT", 0, "NDOF Front", "NdofFront"},
	{408, "NDOF_BUTTON_BACK", 0, "NDOF Back", "NdofBack"},
	{409, "NDOF_BUTTON_ISO1", 0, "NDOF Isometric 1", "NdofIso1"},
	{410, "NDOF_BUTTON_ISO2", 0, "NDOF Isometric 2", "NdofIso2"},
	{411, "NDOF_BUTTON_ROLL_CW", 0, "NDOF Roll CW", "NdofRCW"},
	{412, "NDOF_BUTTON_ROLL_CCW", 0, "NDOF Roll CCW", "NdofRCCW"},
	{413, "NDOF_BUTTON_SPIN_CW", 0, "NDOF Spin CW", "NdofSCW"},
	{414, "NDOF_BUTTON_SPIN_CCW", 0, "NDOF Spin CCW", "NdofSCCW"},
	{415, "NDOF_BUTTON_TILT_CW", 0, "NDOF Tilt CW", "NdofTCW"},
	{416, "NDOF_BUTTON_TILT_CCW", 0, "NDOF Tilt CCW", "NdofTCCW"},
	{417, "NDOF_BUTTON_ROTATE", 0, "NDOF Rotate", "NdofRot"},
	{418, "NDOF_BUTTON_PANZOOM", 0, "NDOF Pan/Zoom", "NdofPanZoom"},
	{419, "NDOF_BUTTON_DOMINANT", 0, "NDOF Dominant", "NdofDom"},
	{420, "NDOF_BUTTON_PLUS", 0, "NDOF Plus", "Ndof+"},
	{421, "NDOF_BUTTON_MINUS", 0, "NDOF Minus", "Ndof-"},
	{422, "NDOF_BUTTON_ESC", 0, "NDOF Esc", "NdofEsc"},
	{423, "NDOF_BUTTON_ALT", 0, "NDOF Alt", "NdofAlt"},
	{424, "NDOF_BUTTON_SHIFT", 0, "NDOF Shift", "NdofShift"},
	{425, "NDOF_BUTTON_CTRL", 0, "NDOF Ctrl", "NdofCtrl"},
	{426, "NDOF_BUTTON_1", 0, "NDOF Button 1", "NdofB1"},
	{427, "NDOF_BUTTON_2", 0, "NDOF Button 2", "NdofB2"},
	{428, "NDOF_BUTTON_3", 0, "NDOF Button 3", "NdofB3"},
	{429, "NDOF_BUTTON_4", 0, "NDOF Button 4", "NdofB4"},
	{430, "NDOF_BUTTON_5", 0, "NDOF Button 5", "NdofB5"},
	{431, "NDOF_BUTTON_6", 0, "NDOF Button 6", "NdofB6"},
	{432, "NDOF_BUTTON_7", 0, "NDOF Button 7", "NdofB7"},
	{433, "NDOF_BUTTON_8", 0, "NDOF Button 8", "NdofB8"},
	{434, "NDOF_BUTTON_9", 0, "NDOF Button 9", "NdofB9"},
	{435, "NDOF_BUTTON_10", 0, "NDOF Button 10", "NdofB10"},
	{436, "NDOF_BUTTON_A", 0, "NDOF Button A", "NdofBA"},
	{437, "NDOF_BUTTON_B", 0, "NDOF Button B", "NdofBB"},
	{438, "NDOF_BUTTON_C", 0, "NDOF Button C", "NdofBC"},
	{0, NULL, 0, NULL, NULL}
};

EnumPropertyRNA rna_KeyboardSensor_key = {
	{(PropertyRNA *)&rna_KeyboardSensor_modifier_key_1, NULL,
	-1, "key", 3, 0, 0, "Key",
	"",
	0, "WindowManager",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	KeyboardSensor_key_get, KeyboardSensor_key_set, NULL, NULL, NULL, NULL, rna_KeyboardSensor_key_items, 199, 0
};

static EnumPropertyItem rna_KeyboardSensor_modifier_key_1_items[200] = {
	{0, "NONE", 0, "", ""},
	{1, "LEFTMOUSE", 0, "Left Mouse", "LMB"},
	{2, "MIDDLEMOUSE", 0, "Middle Mouse", "MMB"},
	{3, "RIGHTMOUSE", 0, "Right Mouse", "RMB"},
	{7, "BUTTON4MOUSE", 0, "Button4 Mouse", "MB4"},
	{8, "BUTTON5MOUSE", 0, "Button5 Mouse", "MB5"},
	{18, "BUTTON6MOUSE", 0, "Button6 Mouse", "MB6"},
	{19, "BUTTON7MOUSE", 0, "Button7 Mouse", "MB7"},
	{5, "ACTIONMOUSE", 0, "Action Mouse", "MBA"},
	{6, "SELECTMOUSE", 0, "Select Mouse", "MBS"},
	{0, "", 0, NULL, NULL},
	{26, "PEN", 0, "Pen", ""},
	{27, "ERASER", 0, "Eraser", ""},
	{0, "", 0, NULL, NULL},
	{4, "MOUSEMOVE", 0, "Mouse Move", "MsMov"},
	{17, "INBETWEEN_MOUSEMOVE", 0, "In-between Move", "MsSubMov"},
	{14, "TRACKPADPAN", 0, "Mouse/Trackpad Pan", "MsPan"},
	{15, "TRACKPADZOOM", 0, "Mouse/Trackpad Zoom", "MsZoom"},
	{16, "MOUSEROTATE", 0, "Mouse/Trackpad Rotate", "MsRot"},
	{0, "", 0, NULL, NULL},
	{10, "WHEELUPMOUSE", 0, "Wheel Up", "WhUp"},
	{11, "WHEELDOWNMOUSE", 0, "Wheel Down", "WhDown"},
	{12, "WHEELINMOUSE", 0, "Wheel In", "WhIn"},
	{13, "WHEELOUTMOUSE", 0, "Wheel Out", "WhOut"},
	{0, "", 0, NULL, NULL},
	{20482, "EVT_TWEAK_L", 0, "Tweak Left", "TwkL"},
	{20483, "EVT_TWEAK_M", 0, "Tweak Middle", "TwkM"},
	{20484, "EVT_TWEAK_R", 0, "Tweak Right", "TwkR"},
	{20485, "EVT_TWEAK_A", 0, "Tweak Action", "TwkA"},
	{20486, "EVT_TWEAK_S", 0, "Tweak Select", "TwkS"},
	{0, "", 0, NULL, NULL},
	{97, "A", 0, "A", ""},
	{98, "B", 0, "B", ""},
	{99, "C", 0, "C", ""},
	{100, "D", 0, "D", ""},
	{101, "E", 0, "E", ""},
	{102, "F", 0, "F", ""},
	{103, "G", 0, "G", ""},
	{104, "H", 0, "H", ""},
	{105, "I", 0, "I", ""},
	{106, "J", 0, "J", ""},
	{107, "K", 0, "K", ""},
	{108, "L", 0, "L", ""},
	{109, "M", 0, "M", ""},
	{110, "N", 0, "N", ""},
	{111, "O", 0, "O", ""},
	{112, "P", 0, "P", ""},
	{113, "Q", 0, "Q", ""},
	{114, "R", 0, "R", ""},
	{115, "S", 0, "S", ""},
	{116, "T", 0, "T", ""},
	{117, "U", 0, "U", ""},
	{118, "V", 0, "V", ""},
	{119, "W", 0, "W", ""},
	{120, "X", 0, "X", ""},
	{121, "Y", 0, "Y", ""},
	{122, "Z", 0, "Z", ""},
	{0, "", 0, NULL, NULL},
	{48, "ZERO", 0, "0", ""},
	{49, "ONE", 0, "1", ""},
	{50, "TWO", 0, "2", ""},
	{51, "THREE", 0, "3", ""},
	{52, "FOUR", 0, "4", ""},
	{53, "FIVE", 0, "5", ""},
	{54, "SIX", 0, "6", ""},
	{55, "SEVEN", 0, "7", ""},
	{56, "EIGHT", 0, "8", ""},
	{57, "NINE", 0, "9", ""},
	{0, "", 0, NULL, NULL},
	{212, "LEFT_CTRL", 0, "Left Ctrl", "CtrlL"},
	{213, "LEFT_ALT", 0, "Left Alt", "AltL"},
	{217, "LEFT_SHIFT", 0, "Left Shift", "ShiftL"},
	{214, "RIGHT_ALT", 0, "Right Alt", "AltR"},
	{215, "RIGHT_CTRL", 0, "Right Ctrl", "CtrlR"},
	{216, "RIGHT_SHIFT", 0, "Right Shift", "ShiftR"},
	{0, "", 0, NULL, NULL},
	{172, "OSKEY", 0, "OS Key", "Cmd"},
	{173, "GRLESS", 0, "Grless", ""},
	{218, "ESC", 0, "Esc", ""},
	{219, "TAB", 0, "Tab", ""},
	{220, "RET", 0, "Return", "Enter"},
	{221, "SPACE", 0, "Spacebar", "Space"},
	{222, "LINE_FEED", 0, "Line Feed", ""},
	{223, "BACK_SPACE", 0, "Back Space", "BkSpace"},
	{224, "DEL", 0, "Delete", "Del"},
	{225, "SEMI_COLON", 0, ";", ""},
	{226, "PERIOD", 0, ".", ""},
	{227, "COMMA", 0, ",", ""},
	{228, "QUOTE", 0, "\"", ""},
	{229, "ACCENT_GRAVE", 0, "`", ""},
	{230, "MINUS", 0, "-", ""},
	{231, "PLUS", 0, "+", ""},
	{232, "SLASH", 0, "/", ""},
	{233, "BACK_SLASH", 0, "\\", ""},
	{234, "EQUAL", 0, "=", ""},
	{235, "LEFT_BRACKET", 0, "[", ""},
	{236, "RIGHT_BRACKET", 0, "]", ""},
	{137, "LEFT_ARROW", 0, "Left Arrow", "←"},
	{138, "DOWN_ARROW", 0, "Down Arrow", "↓"},
	{139, "RIGHT_ARROW", 0, "Right Arrow", "→"},
	{140, "UP_ARROW", 0, "Up Arrow", "↑"},
	{152, "NUMPAD_2", 0, "Numpad 2", "Pad2"},
	{154, "NUMPAD_4", 0, "Numpad 4", "Pad4"},
	{156, "NUMPAD_6", 0, "Numpad 6", "Pad6"},
	{158, "NUMPAD_8", 0, "Numpad 8", "Pad8"},
	{151, "NUMPAD_1", 0, "Numpad 1", "Pad1"},
	{153, "NUMPAD_3", 0, "Numpad 3", "Pad3"},
	{155, "NUMPAD_5", 0, "Numpad 5", "Pad5"},
	{157, "NUMPAD_7", 0, "Numpad 7", "Pad7"},
	{159, "NUMPAD_9", 0, "Numpad 9", "Pad9"},
	{199, "NUMPAD_PERIOD", 0, "Numpad .", "Pad."},
	{161, "NUMPAD_SLASH", 0, "Numpad /", "Pad/"},
	{160, "NUMPAD_ASTERIX", 0, "Numpad *", "Pad*"},
	{150, "NUMPAD_0", 0, "Numpad 0", "Pad0"},
	{162, "NUMPAD_MINUS", 0, "Numpad -", "Pad-"},
	{163, "NUMPAD_ENTER", 0, "Numpad Enter", "PadEnter"},
	{164, "NUMPAD_PLUS", 0, "Numpad +", "Pad+"},
	{300, "F1", 0, "F1", ""},
	{301, "F2", 0, "F2", ""},
	{302, "F3", 0, "F3", ""},
	{303, "F4", 0, "F4", ""},
	{304, "F5", 0, "F5", ""},
	{305, "F6", 0, "F6", ""},
	{306, "F7", 0, "F7", ""},
	{307, "F8", 0, "F8", ""},
	{308, "F9", 0, "F9", ""},
	{309, "F10", 0, "F10", ""},
	{310, "F11", 0, "F11", ""},
	{311, "F12", 0, "F12", ""},
	{312, "F13", 0, "F13", ""},
	{313, "F14", 0, "F14", ""},
	{314, "F15", 0, "F15", ""},
	{315, "F16", 0, "F16", ""},
	{316, "F17", 0, "F17", ""},
	{317, "F18", 0, "F18", ""},
	{318, "F19", 0, "F19", ""},
	{165, "PAUSE", 0, "Pause", ""},
	{166, "INSERT", 0, "Insert", "Ins"},
	{167, "HOME", 0, "Home", ""},
	{168, "PAGE_UP", 0, "Page Up", "PgUp"},
	{169, "PAGE_DOWN", 0, "Page Down", "PgDown"},
	{170, "END", 0, "End", ""},
	{0, "", 0, NULL, NULL},
	{174, "MEDIA_PLAY", 0, "Media Play/Pause", ">/||"},
	{175, "MEDIA_STOP", 0, "Media Stop", "Stop"},
	{176, "MEDIA_FIRST", 0, "Media First", "|<<"},
	{177, "MEDIA_LAST", 0, "Media Last", ">>|"},
	{0, "", 0, NULL, NULL},
	{-2, "TEXTINPUT", 0, "Text Input", "TxtIn"},
	{0, "", 0, NULL, NULL},
	{260, "WINDOW_DEACTIVATE", 0, "Window Deactivate", ""},
	{272, "TIMER", 0, "Timer", "Tmr"},
	{273, "TIMER0", 0, "Timer 0", "Tmr0"},
	{274, "TIMER1", 0, "Timer 1", "Tmr1"},
	{275, "TIMER2", 0, "Timer 2", "Tmr2"},
	{276, "TIMER_JOBS", 0, "Timer Jobs", "TmrJob"},
	{277, "TIMER_AUTOSAVE", 0, "Timer Autosave", "TmrSave"},
	{278, "TIMER_REPORT", 0, "Timer Report", "TmrReport"},
	{279, "TIMERREGION", 0, "Timer Region", "TmrReg"},
	{0, "", 0, NULL, NULL},
	{400, "NDOF_MOTION", 0, "NDOF Motion", "NdofMov"},
	{401, "NDOF_BUTTON_MENU", 0, "NDOF Menu", "NdofMenu"},
	{402, "NDOF_BUTTON_FIT", 0, "NDOF Fit", "NdofFit"},
	{403, "NDOF_BUTTON_TOP", 0, "NDOF Top", "Ndof↑"},
	{404, "NDOF_BUTTON_BOTTOM", 0, "NDOF Bottom", "Ndof↓"},
	{405, "NDOF_BUTTON_LEFT", 0, "NDOF Left", "Ndof←"},
	{406, "NDOF_BUTTON_RIGHT", 0, "NDOF Right", "Ndof→"},
	{407, "NDOF_BUTTON_FRONT", 0, "NDOF Front", "NdofFront"},
	{408, "NDOF_BUTTON_BACK", 0, "NDOF Back", "NdofBack"},
	{409, "NDOF_BUTTON_ISO1", 0, "NDOF Isometric 1", "NdofIso1"},
	{410, "NDOF_BUTTON_ISO2", 0, "NDOF Isometric 2", "NdofIso2"},
	{411, "NDOF_BUTTON_ROLL_CW", 0, "NDOF Roll CW", "NdofRCW"},
	{412, "NDOF_BUTTON_ROLL_CCW", 0, "NDOF Roll CCW", "NdofRCCW"},
	{413, "NDOF_BUTTON_SPIN_CW", 0, "NDOF Spin CW", "NdofSCW"},
	{414, "NDOF_BUTTON_SPIN_CCW", 0, "NDOF Spin CCW", "NdofSCCW"},
	{415, "NDOF_BUTTON_TILT_CW", 0, "NDOF Tilt CW", "NdofTCW"},
	{416, "NDOF_BUTTON_TILT_CCW", 0, "NDOF Tilt CCW", "NdofTCCW"},
	{417, "NDOF_BUTTON_ROTATE", 0, "NDOF Rotate", "NdofRot"},
	{418, "NDOF_BUTTON_PANZOOM", 0, "NDOF Pan/Zoom", "NdofPanZoom"},
	{419, "NDOF_BUTTON_DOMINANT", 0, "NDOF Dominant", "NdofDom"},
	{420, "NDOF_BUTTON_PLUS", 0, "NDOF Plus", "Ndof+"},
	{421, "NDOF_BUTTON_MINUS", 0, "NDOF Minus", "Ndof-"},
	{422, "NDOF_BUTTON_ESC", 0, "NDOF Esc", "NdofEsc"},
	{423, "NDOF_BUTTON_ALT", 0, "NDOF Alt", "NdofAlt"},
	{424, "NDOF_BUTTON_SHIFT", 0, "NDOF Shift", "NdofShift"},
	{425, "NDOF_BUTTON_CTRL", 0, "NDOF Ctrl", "NdofCtrl"},
	{426, "NDOF_BUTTON_1", 0, "NDOF Button 1", "NdofB1"},
	{427, "NDOF_BUTTON_2", 0, "NDOF Button 2", "NdofB2"},
	{428, "NDOF_BUTTON_3", 0, "NDOF Button 3", "NdofB3"},
	{429, "NDOF_BUTTON_4", 0, "NDOF Button 4", "NdofB4"},
	{430, "NDOF_BUTTON_5", 0, "NDOF Button 5", "NdofB5"},
	{431, "NDOF_BUTTON_6", 0, "NDOF Button 6", "NdofB6"},
	{432, "NDOF_BUTTON_7", 0, "NDOF Button 7", "NdofB7"},
	{433, "NDOF_BUTTON_8", 0, "NDOF Button 8", "NdofB8"},
	{434, "NDOF_BUTTON_9", 0, "NDOF Button 9", "NdofB9"},
	{435, "NDOF_BUTTON_10", 0, "NDOF Button 10", "NdofB10"},
	{436, "NDOF_BUTTON_A", 0, "NDOF Button A", "NdofBA"},
	{437, "NDOF_BUTTON_B", 0, "NDOF Button B", "NdofBB"},
	{438, "NDOF_BUTTON_C", 0, "NDOF Button C", "NdofBC"},
	{0, NULL, 0, NULL, NULL}
};

EnumPropertyRNA rna_KeyboardSensor_modifier_key_1 = {
	{(PropertyRNA *)&rna_KeyboardSensor_modifier_key_2, (PropertyRNA *)&rna_KeyboardSensor_key,
	-1, "modifier_key_1", 3, 0, 0, "Modifier Key",
	"Modifier key code",
	0, "UI_Events_KeyMaps",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	KeyboardSensor_modifier_key_1_get, KeyboardSensor_modifier_key_1_set, NULL, NULL, NULL, NULL, rna_KeyboardSensor_modifier_key_1_items, 199, 0
};

static EnumPropertyItem rna_KeyboardSensor_modifier_key_2_items[200] = {
	{0, "NONE", 0, "", ""},
	{1, "LEFTMOUSE", 0, "Left Mouse", "LMB"},
	{2, "MIDDLEMOUSE", 0, "Middle Mouse", "MMB"},
	{3, "RIGHTMOUSE", 0, "Right Mouse", "RMB"},
	{7, "BUTTON4MOUSE", 0, "Button4 Mouse", "MB4"},
	{8, "BUTTON5MOUSE", 0, "Button5 Mouse", "MB5"},
	{18, "BUTTON6MOUSE", 0, "Button6 Mouse", "MB6"},
	{19, "BUTTON7MOUSE", 0, "Button7 Mouse", "MB7"},
	{5, "ACTIONMOUSE", 0, "Action Mouse", "MBA"},
	{6, "SELECTMOUSE", 0, "Select Mouse", "MBS"},
	{0, "", 0, NULL, NULL},
	{26, "PEN", 0, "Pen", ""},
	{27, "ERASER", 0, "Eraser", ""},
	{0, "", 0, NULL, NULL},
	{4, "MOUSEMOVE", 0, "Mouse Move", "MsMov"},
	{17, "INBETWEEN_MOUSEMOVE", 0, "In-between Move", "MsSubMov"},
	{14, "TRACKPADPAN", 0, "Mouse/Trackpad Pan", "MsPan"},
	{15, "TRACKPADZOOM", 0, "Mouse/Trackpad Zoom", "MsZoom"},
	{16, "MOUSEROTATE", 0, "Mouse/Trackpad Rotate", "MsRot"},
	{0, "", 0, NULL, NULL},
	{10, "WHEELUPMOUSE", 0, "Wheel Up", "WhUp"},
	{11, "WHEELDOWNMOUSE", 0, "Wheel Down", "WhDown"},
	{12, "WHEELINMOUSE", 0, "Wheel In", "WhIn"},
	{13, "WHEELOUTMOUSE", 0, "Wheel Out", "WhOut"},
	{0, "", 0, NULL, NULL},
	{20482, "EVT_TWEAK_L", 0, "Tweak Left", "TwkL"},
	{20483, "EVT_TWEAK_M", 0, "Tweak Middle", "TwkM"},
	{20484, "EVT_TWEAK_R", 0, "Tweak Right", "TwkR"},
	{20485, "EVT_TWEAK_A", 0, "Tweak Action", "TwkA"},
	{20486, "EVT_TWEAK_S", 0, "Tweak Select", "TwkS"},
	{0, "", 0, NULL, NULL},
	{97, "A", 0, "A", ""},
	{98, "B", 0, "B", ""},
	{99, "C", 0, "C", ""},
	{100, "D", 0, "D", ""},
	{101, "E", 0, "E", ""},
	{102, "F", 0, "F", ""},
	{103, "G", 0, "G", ""},
	{104, "H", 0, "H", ""},
	{105, "I", 0, "I", ""},
	{106, "J", 0, "J", ""},
	{107, "K", 0, "K", ""},
	{108, "L", 0, "L", ""},
	{109, "M", 0, "M", ""},
	{110, "N", 0, "N", ""},
	{111, "O", 0, "O", ""},
	{112, "P", 0, "P", ""},
	{113, "Q", 0, "Q", ""},
	{114, "R", 0, "R", ""},
	{115, "S", 0, "S", ""},
	{116, "T", 0, "T", ""},
	{117, "U", 0, "U", ""},
	{118, "V", 0, "V", ""},
	{119, "W", 0, "W", ""},
	{120, "X", 0, "X", ""},
	{121, "Y", 0, "Y", ""},
	{122, "Z", 0, "Z", ""},
	{0, "", 0, NULL, NULL},
	{48, "ZERO", 0, "0", ""},
	{49, "ONE", 0, "1", ""},
	{50, "TWO", 0, "2", ""},
	{51, "THREE", 0, "3", ""},
	{52, "FOUR", 0, "4", ""},
	{53, "FIVE", 0, "5", ""},
	{54, "SIX", 0, "6", ""},
	{55, "SEVEN", 0, "7", ""},
	{56, "EIGHT", 0, "8", ""},
	{57, "NINE", 0, "9", ""},
	{0, "", 0, NULL, NULL},
	{212, "LEFT_CTRL", 0, "Left Ctrl", "CtrlL"},
	{213, "LEFT_ALT", 0, "Left Alt", "AltL"},
	{217, "LEFT_SHIFT", 0, "Left Shift", "ShiftL"},
	{214, "RIGHT_ALT", 0, "Right Alt", "AltR"},
	{215, "RIGHT_CTRL", 0, "Right Ctrl", "CtrlR"},
	{216, "RIGHT_SHIFT", 0, "Right Shift", "ShiftR"},
	{0, "", 0, NULL, NULL},
	{172, "OSKEY", 0, "OS Key", "Cmd"},
	{173, "GRLESS", 0, "Grless", ""},
	{218, "ESC", 0, "Esc", ""},
	{219, "TAB", 0, "Tab", ""},
	{220, "RET", 0, "Return", "Enter"},
	{221, "SPACE", 0, "Spacebar", "Space"},
	{222, "LINE_FEED", 0, "Line Feed", ""},
	{223, "BACK_SPACE", 0, "Back Space", "BkSpace"},
	{224, "DEL", 0, "Delete", "Del"},
	{225, "SEMI_COLON", 0, ";", ""},
	{226, "PERIOD", 0, ".", ""},
	{227, "COMMA", 0, ",", ""},
	{228, "QUOTE", 0, "\"", ""},
	{229, "ACCENT_GRAVE", 0, "`", ""},
	{230, "MINUS", 0, "-", ""},
	{231, "PLUS", 0, "+", ""},
	{232, "SLASH", 0, "/", ""},
	{233, "BACK_SLASH", 0, "\\", ""},
	{234, "EQUAL", 0, "=", ""},
	{235, "LEFT_BRACKET", 0, "[", ""},
	{236, "RIGHT_BRACKET", 0, "]", ""},
	{137, "LEFT_ARROW", 0, "Left Arrow", "←"},
	{138, "DOWN_ARROW", 0, "Down Arrow", "↓"},
	{139, "RIGHT_ARROW", 0, "Right Arrow", "→"},
	{140, "UP_ARROW", 0, "Up Arrow", "↑"},
	{152, "NUMPAD_2", 0, "Numpad 2", "Pad2"},
	{154, "NUMPAD_4", 0, "Numpad 4", "Pad4"},
	{156, "NUMPAD_6", 0, "Numpad 6", "Pad6"},
	{158, "NUMPAD_8", 0, "Numpad 8", "Pad8"},
	{151, "NUMPAD_1", 0, "Numpad 1", "Pad1"},
	{153, "NUMPAD_3", 0, "Numpad 3", "Pad3"},
	{155, "NUMPAD_5", 0, "Numpad 5", "Pad5"},
	{157, "NUMPAD_7", 0, "Numpad 7", "Pad7"},
	{159, "NUMPAD_9", 0, "Numpad 9", "Pad9"},
	{199, "NUMPAD_PERIOD", 0, "Numpad .", "Pad."},
	{161, "NUMPAD_SLASH", 0, "Numpad /", "Pad/"},
	{160, "NUMPAD_ASTERIX", 0, "Numpad *", "Pad*"},
	{150, "NUMPAD_0", 0, "Numpad 0", "Pad0"},
	{162, "NUMPAD_MINUS", 0, "Numpad -", "Pad-"},
	{163, "NUMPAD_ENTER", 0, "Numpad Enter", "PadEnter"},
	{164, "NUMPAD_PLUS", 0, "Numpad +", "Pad+"},
	{300, "F1", 0, "F1", ""},
	{301, "F2", 0, "F2", ""},
	{302, "F3", 0, "F3", ""},
	{303, "F4", 0, "F4", ""},
	{304, "F5", 0, "F5", ""},
	{305, "F6", 0, "F6", ""},
	{306, "F7", 0, "F7", ""},
	{307, "F8", 0, "F8", ""},
	{308, "F9", 0, "F9", ""},
	{309, "F10", 0, "F10", ""},
	{310, "F11", 0, "F11", ""},
	{311, "F12", 0, "F12", ""},
	{312, "F13", 0, "F13", ""},
	{313, "F14", 0, "F14", ""},
	{314, "F15", 0, "F15", ""},
	{315, "F16", 0, "F16", ""},
	{316, "F17", 0, "F17", ""},
	{317, "F18", 0, "F18", ""},
	{318, "F19", 0, "F19", ""},
	{165, "PAUSE", 0, "Pause", ""},
	{166, "INSERT", 0, "Insert", "Ins"},
	{167, "HOME", 0, "Home", ""},
	{168, "PAGE_UP", 0, "Page Up", "PgUp"},
	{169, "PAGE_DOWN", 0, "Page Down", "PgDown"},
	{170, "END", 0, "End", ""},
	{0, "", 0, NULL, NULL},
	{174, "MEDIA_PLAY", 0, "Media Play/Pause", ">/||"},
	{175, "MEDIA_STOP", 0, "Media Stop", "Stop"},
	{176, "MEDIA_FIRST", 0, "Media First", "|<<"},
	{177, "MEDIA_LAST", 0, "Media Last", ">>|"},
	{0, "", 0, NULL, NULL},
	{-2, "TEXTINPUT", 0, "Text Input", "TxtIn"},
	{0, "", 0, NULL, NULL},
	{260, "WINDOW_DEACTIVATE", 0, "Window Deactivate", ""},
	{272, "TIMER", 0, "Timer", "Tmr"},
	{273, "TIMER0", 0, "Timer 0", "Tmr0"},
	{274, "TIMER1", 0, "Timer 1", "Tmr1"},
	{275, "TIMER2", 0, "Timer 2", "Tmr2"},
	{276, "TIMER_JOBS", 0, "Timer Jobs", "TmrJob"},
	{277, "TIMER_AUTOSAVE", 0, "Timer Autosave", "TmrSave"},
	{278, "TIMER_REPORT", 0, "Timer Report", "TmrReport"},
	{279, "TIMERREGION", 0, "Timer Region", "TmrReg"},
	{0, "", 0, NULL, NULL},
	{400, "NDOF_MOTION", 0, "NDOF Motion", "NdofMov"},
	{401, "NDOF_BUTTON_MENU", 0, "NDOF Menu", "NdofMenu"},
	{402, "NDOF_BUTTON_FIT", 0, "NDOF Fit", "NdofFit"},
	{403, "NDOF_BUTTON_TOP", 0, "NDOF Top", "Ndof↑"},
	{404, "NDOF_BUTTON_BOTTOM", 0, "NDOF Bottom", "Ndof↓"},
	{405, "NDOF_BUTTON_LEFT", 0, "NDOF Left", "Ndof←"},
	{406, "NDOF_BUTTON_RIGHT", 0, "NDOF Right", "Ndof→"},
	{407, "NDOF_BUTTON_FRONT", 0, "NDOF Front", "NdofFront"},
	{408, "NDOF_BUTTON_BACK", 0, "NDOF Back", "NdofBack"},
	{409, "NDOF_BUTTON_ISO1", 0, "NDOF Isometric 1", "NdofIso1"},
	{410, "NDOF_BUTTON_ISO2", 0, "NDOF Isometric 2", "NdofIso2"},
	{411, "NDOF_BUTTON_ROLL_CW", 0, "NDOF Roll CW", "NdofRCW"},
	{412, "NDOF_BUTTON_ROLL_CCW", 0, "NDOF Roll CCW", "NdofRCCW"},
	{413, "NDOF_BUTTON_SPIN_CW", 0, "NDOF Spin CW", "NdofSCW"},
	{414, "NDOF_BUTTON_SPIN_CCW", 0, "NDOF Spin CCW", "NdofSCCW"},
	{415, "NDOF_BUTTON_TILT_CW", 0, "NDOF Tilt CW", "NdofTCW"},
	{416, "NDOF_BUTTON_TILT_CCW", 0, "NDOF Tilt CCW", "NdofTCCW"},
	{417, "NDOF_BUTTON_ROTATE", 0, "NDOF Rotate", "NdofRot"},
	{418, "NDOF_BUTTON_PANZOOM", 0, "NDOF Pan/Zoom", "NdofPanZoom"},
	{419, "NDOF_BUTTON_DOMINANT", 0, "NDOF Dominant", "NdofDom"},
	{420, "NDOF_BUTTON_PLUS", 0, "NDOF Plus", "Ndof+"},
	{421, "NDOF_BUTTON_MINUS", 0, "NDOF Minus", "Ndof-"},
	{422, "NDOF_BUTTON_ESC", 0, "NDOF Esc", "NdofEsc"},
	{423, "NDOF_BUTTON_ALT", 0, "NDOF Alt", "NdofAlt"},
	{424, "NDOF_BUTTON_SHIFT", 0, "NDOF Shift", "NdofShift"},
	{425, "NDOF_BUTTON_CTRL", 0, "NDOF Ctrl", "NdofCtrl"},
	{426, "NDOF_BUTTON_1", 0, "NDOF Button 1", "NdofB1"},
	{427, "NDOF_BUTTON_2", 0, "NDOF Button 2", "NdofB2"},
	{428, "NDOF_BUTTON_3", 0, "NDOF Button 3", "NdofB3"},
	{429, "NDOF_BUTTON_4", 0, "NDOF Button 4", "NdofB4"},
	{430, "NDOF_BUTTON_5", 0, "NDOF Button 5", "NdofB5"},
	{431, "NDOF_BUTTON_6", 0, "NDOF Button 6", "NdofB6"},
	{432, "NDOF_BUTTON_7", 0, "NDOF Button 7", "NdofB7"},
	{433, "NDOF_BUTTON_8", 0, "NDOF Button 8", "NdofB8"},
	{434, "NDOF_BUTTON_9", 0, "NDOF Button 9", "NdofB9"},
	{435, "NDOF_BUTTON_10", 0, "NDOF Button 10", "NdofB10"},
	{436, "NDOF_BUTTON_A", 0, "NDOF Button A", "NdofBA"},
	{437, "NDOF_BUTTON_B", 0, "NDOF Button B", "NdofBB"},
	{438, "NDOF_BUTTON_C", 0, "NDOF Button C", "NdofBC"},
	{0, NULL, 0, NULL, NULL}
};

EnumPropertyRNA rna_KeyboardSensor_modifier_key_2 = {
	{(PropertyRNA *)&rna_KeyboardSensor_target, (PropertyRNA *)&rna_KeyboardSensor_modifier_key_1,
	-1, "modifier_key_2", 3, 0, 0, "Second Modifier Key",
	"Modifier key code",
	0, "UI_Events_KeyMaps",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	KeyboardSensor_modifier_key_2_get, KeyboardSensor_modifier_key_2_set, NULL, NULL, NULL, NULL, rna_KeyboardSensor_modifier_key_2_items, 199, 0
};

StringPropertyRNA rna_KeyboardSensor_target = {
	{(PropertyRNA *)&rna_KeyboardSensor_log, (PropertyRNA *)&rna_KeyboardSensor_modifier_key_2,
	-1, "target", 262145, 0, 0, "Target",
	"Property that receives the keystrokes in case a string is logged",
	0, "*",
	PROP_STRING, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {64, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	KeyboardSensor_target_get, KeyboardSensor_target_length, KeyboardSensor_target_set, NULL, NULL, NULL, 64, ""
};

StringPropertyRNA rna_KeyboardSensor_log = {
	{(PropertyRNA *)&rna_KeyboardSensor_use_all_keys, (PropertyRNA *)&rna_KeyboardSensor_target,
	-1, "log", 262145, 0, 0, "Log Toggle",
	"Property that indicates whether to log keystrokes as a string",
	0, "*",
	PROP_STRING, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {64, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	KeyboardSensor_log_get, KeyboardSensor_log_length, KeyboardSensor_log_set, NULL, NULL, NULL, 64, ""
};

BoolPropertyRNA rna_KeyboardSensor_use_all_keys = {
	{NULL, (PropertyRNA *)&rna_KeyboardSensor_log,
	-1, "use_all_keys", 3, 0, 0, "All Keys",
	"Trigger this sensor on any keystroke",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	KeyboardSensor_use_all_keys_get, KeyboardSensor_use_all_keys_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

StructRNA RNA_KeyboardSensor = {
	{(ContainerRNA *)&RNA_PropertySensor, (ContainerRNA *)&RNA_MouseSensor,
	NULL,
	{(PropertyRNA *)&rna_KeyboardSensor_key, (PropertyRNA *)&rna_KeyboardSensor_use_all_keys}},
	"KeyboardSensor", NULL, NULL, 4, "Keyboard Sensor",
	"Sensor to detect keyboard events",
	"*", 17,
	(PropertyRNA *)&rna_Sensor_name, (PropertyRNA *)&rna_Sensor_rna_properties,
	&RNA_Sensor,
	NULL,
	rna_Sensor_refine,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	{NULL, NULL}
};

/* Property Sensor */
static EnumPropertyItem rna_PropertySensor_evaluation_type_items[7] = {
	{0, "PROPEQUAL", 0, "Equal", ""},
	{1, "PROPNEQUAL", 0, "Not Equal", ""},
	{2, "PROPINTERVAL", 0, "Interval", ""},
	{3, "PROPCHANGED", 0, "Changed", ""},
	{5, "PROPLESSTHAN", 0, "Less Than", ""},
	{6, "PROPGREATERTHAN", 0, "Greater Than", ""},
	{0, NULL, 0, NULL, NULL}
};

EnumPropertyRNA rna_PropertySensor_evaluation_type = {
	{(PropertyRNA *)&rna_PropertySensor_property, NULL,
	-1, "evaluation_type", 3, 0, 0, "Evaluation Type",
	"Type of property evaluation",
	0, "*",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	PropertySensor_evaluation_type_get, PropertySensor_evaluation_type_set, NULL, NULL, NULL, NULL, rna_PropertySensor_evaluation_type_items, 6, 0
};

StringPropertyRNA rna_PropertySensor_property = {
	{(PropertyRNA *)&rna_PropertySensor_value, (PropertyRNA *)&rna_PropertySensor_evaluation_type,
	-1, "property", 262145, 0, 0, "Property",
	"",
	0, "*",
	PROP_STRING, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {64, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	PropertySensor_property_get, PropertySensor_property_length, PropertySensor_property_set, NULL, NULL, NULL, 64, ""
};

StringPropertyRNA rna_PropertySensor_value = {
	{(PropertyRNA *)&rna_PropertySensor_value_min, (PropertyRNA *)&rna_PropertySensor_property,
	-1, "value", 262145, 0, 0, "Value",
	"Check for this value in types in Equal, Not Equal, Less Than and Greater Than types",
	0, "*",
	PROP_STRING, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {64, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	PropertySensor_value_get, PropertySensor_value_length, PropertySensor_value_set, NULL, NULL, NULL, 64, ""
};

StringPropertyRNA rna_PropertySensor_value_min = {
	{(PropertyRNA *)&rna_PropertySensor_value_max, (PropertyRNA *)&rna_PropertySensor_value,
	-1, "value_min", 262145, 0, 0, "Minimum Value",
	"Minimum value in Interval type",
	0, "*",
	PROP_STRING, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {64, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	PropertySensor_value_min_get, PropertySensor_value_min_length, PropertySensor_value_min_set, NULL, NULL, NULL, 64, ""
};

StringPropertyRNA rna_PropertySensor_value_max = {
	{NULL, (PropertyRNA *)&rna_PropertySensor_value_min,
	-1, "value_max", 262145, 0, 0, "Maximum Value",
	"Maximum value in Interval type",
	0, "*",
	PROP_STRING, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {64, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	PropertySensor_value_max_get, PropertySensor_value_max_length, PropertySensor_value_max_set, NULL, NULL, NULL, 64, ""
};

StructRNA RNA_PropertySensor = {
	{(ContainerRNA *)&RNA_ArmatureSensor, (ContainerRNA *)&RNA_KeyboardSensor,
	NULL,
	{(PropertyRNA *)&rna_PropertySensor_evaluation_type, (PropertyRNA *)&rna_PropertySensor_value_max}},
	"PropertySensor", NULL, NULL, 4, "Property Sensor",
	"Sensor to detect values and changes in values of properties",
	"*", 17,
	(PropertyRNA *)&rna_Sensor_name, (PropertyRNA *)&rna_Sensor_rna_properties,
	&RNA_Sensor,
	NULL,
	rna_Sensor_refine,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	{NULL, NULL}
};

/* Armature Sensor */
static EnumPropertyItem rna_ArmatureSensor_test_type_items[6] = {
	{0, "STATECHG", 0, "State Changed", ""},
	{1, "LINERRORBELOW", 0, "Lin error below", ""},
	{2, "LINERRORABOVE", 0, "Lin error above", ""},
	{3, "ROTERRORBELOW", 0, "Rot error below", ""},
	{4, "ROTERRORABOVE", 0, "Rot error above", ""},
	{0, NULL, 0, NULL, NULL}
};

EnumPropertyRNA rna_ArmatureSensor_test_type = {
	{(PropertyRNA *)&rna_ArmatureSensor_bone, NULL,
	-1, "test_type", 3, 0, 0, "Test",
	"Type of value and test",
	0, "*",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	ArmatureSensor_test_type_get, ArmatureSensor_test_type_set, NULL, NULL, NULL, NULL, rna_ArmatureSensor_test_type_items, 5, 0
};

StringPropertyRNA rna_ArmatureSensor_bone = {
	{(PropertyRNA *)&rna_ArmatureSensor_constraint, (PropertyRNA *)&rna_ArmatureSensor_test_type,
	-1, "bone", 262145, 0, 0, "Bone Name",
	"Identify the bone to check value from",
	0, "*",
	PROP_STRING, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {64, 0, 0}, 0,
	rna_Sensor_Armature_update, 318767104, NULL, NULL,
	0, -1, NULL},
	ArmatureSensor_bone_get, ArmatureSensor_bone_length, ArmatureSensor_bone_set, NULL, NULL, NULL, 64, ""
};

StringPropertyRNA rna_ArmatureSensor_constraint = {
	{(PropertyRNA *)&rna_ArmatureSensor_value, (PropertyRNA *)&rna_ArmatureSensor_bone,
	-1, "constraint", 262145, 0, 0, "Constraint Name",
	"Identify the bone constraint to check value from",
	0, "*",
	PROP_STRING, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {64, 0, 0}, 0,
	rna_Sensor_Armature_update, 318767104, NULL, NULL,
	0, -1, NULL},
	ArmatureSensor_constraint_get, ArmatureSensor_constraint_length, ArmatureSensor_constraint_set, NULL, NULL, NULL, 64, ""
};

FloatPropertyRNA rna_ArmatureSensor_value = {
	{NULL, (PropertyRNA *)&rna_ArmatureSensor_constraint,
	-1, "value", 3, 0, 4, "Compare Value",
	"Value to be used in comparison",
	0, "*",
	PROP_FLOAT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	offsetof(bArmatureSensor, value), 4, NULL},
	ArmatureSensor_value_get, ArmatureSensor_value_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -10000.0f, 10000.0f, -FLT_MAX, FLT_MAX, 10.0f, 3, 0.0f, NULL
};

StructRNA RNA_ArmatureSensor = {
	{(ContainerRNA *)&RNA_ActuatorSensor, (ContainerRNA *)&RNA_PropertySensor,
	NULL,
	{(PropertyRNA *)&rna_ArmatureSensor_test_type, (PropertyRNA *)&rna_ArmatureSensor_value}},
	"ArmatureSensor", NULL, NULL, 4, "Armature Sensor",
	"Sensor to detect values and changes in values of IK solver",
	"*", 17,
	(PropertyRNA *)&rna_Sensor_name, (PropertyRNA *)&rna_Sensor_rna_properties,
	&RNA_Sensor,
	NULL,
	rna_Sensor_refine,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	{NULL, NULL}
};

/* Actuator Sensor */
StringPropertyRNA rna_ActuatorSensor_actuator = {
	{NULL, NULL,
	-1, "actuator", 262145, 0, 0, "Actuator",
	"Actuator name, actuator active state modifications will be detected",
	0, "*",
	PROP_STRING, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {64, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	ActuatorSensor_actuator_get, ActuatorSensor_actuator_length, ActuatorSensor_actuator_set, NULL, NULL, NULL, 64, ""
};

StructRNA RNA_ActuatorSensor = {
	{(ContainerRNA *)&RNA_DelaySensor, (ContainerRNA *)&RNA_ArmatureSensor,
	NULL,
	{(PropertyRNA *)&rna_ActuatorSensor_actuator, (PropertyRNA *)&rna_ActuatorSensor_actuator}},
	"ActuatorSensor", NULL, NULL, 4, "Actuator Sensor",
	"Sensor to detect state modifications of actuators",
	"*", 17,
	(PropertyRNA *)&rna_Sensor_name, (PropertyRNA *)&rna_Sensor_rna_properties,
	&RNA_Sensor,
	NULL,
	rna_Sensor_refine,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	{NULL, NULL}
};

/* Delay Sensor */
IntPropertyRNA rna_DelaySensor_delay = {
	{(PropertyRNA *)&rna_DelaySensor_duration, NULL,
	-1, "delay", 3, 0, 4, "Delay",
	"Delay in number of logic tics before the positive trigger (default 60 per second)",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	offsetof(bDelaySensor, delay), 1, NULL},
	DelaySensor_delay_get, DelaySensor_delay_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	0, 5000, 0, 5000, 1, 0, NULL
};

IntPropertyRNA rna_DelaySensor_duration = {
	{(PropertyRNA *)&rna_DelaySensor_use_repeat, (PropertyRNA *)&rna_DelaySensor_delay,
	-1, "duration", 3, 0, 4, "Duration",
	"If >0, delay in number of logic tics before the negative trigger following the positive trigger",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	offsetof(bDelaySensor, duration), 1, NULL},
	DelaySensor_duration_get, DelaySensor_duration_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	0, 5000, 0, 5000, 1, 0, NULL
};

BoolPropertyRNA rna_DelaySensor_use_repeat = {
	{NULL, (PropertyRNA *)&rna_DelaySensor_duration,
	-1, "use_repeat", 3, 0, 0, "Repeat",
	"Toggle repeat option (if selected, the sensor restarts after Delay+Duration logic tics)",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	DelaySensor_use_repeat_get, DelaySensor_use_repeat_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

StructRNA RNA_DelaySensor = {
	{(ContainerRNA *)&RNA_CollisionSensor, (ContainerRNA *)&RNA_ActuatorSensor,
	NULL,
	{(PropertyRNA *)&rna_DelaySensor_delay, (PropertyRNA *)&rna_DelaySensor_use_repeat}},
	"DelaySensor", NULL, NULL, 4, "Delay Sensor",
	"Sensor to send delayed events",
	"*", 17,
	(PropertyRNA *)&rna_Sensor_name, (PropertyRNA *)&rna_Sensor_rna_properties,
	&RNA_Sensor,
	NULL,
	rna_Sensor_refine,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	{NULL, NULL}
};

/* Collision Sensor */
BoolPropertyRNA rna_CollisionSensor_use_pulse = {
	{(PropertyRNA *)&rna_CollisionSensor_use_material, NULL,
	-1, "use_pulse", 3, 0, 0, "Pulse",
	"Change to the set of colliding objects generates pulse",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	CollisionSensor_use_pulse_get, CollisionSensor_use_pulse_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

BoolPropertyRNA rna_CollisionSensor_use_material = {
	{(PropertyRNA *)&rna_CollisionSensor_property, (PropertyRNA *)&rna_CollisionSensor_use_pulse,
	-1, "use_material", 3, 0, 0, "M/P",
	"Toggle collision on material or property",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	CollisionSensor_use_material_get, CollisionSensor_use_material_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

StringPropertyRNA rna_CollisionSensor_property = {
	{(PropertyRNA *)&rna_CollisionSensor_material, (PropertyRNA *)&rna_CollisionSensor_use_material,
	-1, "property", 262145, 0, 0, "Property",
	"Only look for objects with this property (blank = all objects)",
	0, "*",
	PROP_STRING, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {64, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	CollisionSensor_property_get, CollisionSensor_property_length, CollisionSensor_property_set, NULL, NULL, NULL, 64, ""
};

StringPropertyRNA rna_CollisionSensor_material = {
	{NULL, (PropertyRNA *)&rna_CollisionSensor_property,
	-1, "material", 262145, 0, 0, "Material",
	"Only look for objects with this material (blank = all objects)",
	0, "*",
	PROP_STRING, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {64, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	CollisionSensor_material_get, CollisionSensor_material_length, CollisionSensor_material_set, NULL, NULL, NULL, 64, ""
};

StructRNA RNA_CollisionSensor = {
	{(ContainerRNA *)&RNA_RadarSensor, (ContainerRNA *)&RNA_DelaySensor,
	NULL,
	{(PropertyRNA *)&rna_CollisionSensor_use_pulse, (PropertyRNA *)&rna_CollisionSensor_material}},
	"CollisionSensor", NULL, NULL, 4, "Collision Sensor",
	"Sensor to detect objects colliding with the current object, with more settings than the Touch sensor",
	"*", 17,
	(PropertyRNA *)&rna_Sensor_name, (PropertyRNA *)&rna_Sensor_rna_properties,
	&RNA_Sensor,
	NULL,
	rna_Sensor_refine,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	{NULL, NULL}
};

/* Radar Sensor */
StringPropertyRNA rna_RadarSensor_property = {
	{(PropertyRNA *)&rna_RadarSensor_axis, NULL,
	-1, "property", 262145, 0, 0, "Property",
	"Only look for objects with this property (blank = all objects)",
	0, "*",
	PROP_STRING, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {64, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	RadarSensor_property_get, RadarSensor_property_length, RadarSensor_property_set, NULL, NULL, NULL, 64, ""
};

static EnumPropertyItem rna_RadarSensor_axis_items[7] = {
	{0, "XAXIS", 0, "+X axis", ""},
	{1, "YAXIS", 0, "+Y axis", ""},
	{2, "ZAXIS", 0, "+Z axis", ""},
	{3, "NEGXAXIS", 0, "-X axis", ""},
	{4, "NEGYAXIS", 0, "-Y axis", ""},
	{5, "NEGZAXIS", 0, "-Z axis", ""},
	{0, NULL, 0, NULL, NULL}
};

EnumPropertyRNA rna_RadarSensor_axis = {
	{(PropertyRNA *)&rna_RadarSensor_angle, (PropertyRNA *)&rna_RadarSensor_property,
	-1, "axis", 3, 0, 0, "Axis",
	"Along which axis the radar cone is cast",
	0, "*",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	RadarSensor_axis_get, RadarSensor_axis_set, NULL, NULL, NULL, NULL, rna_RadarSensor_axis_items, 6, 0
};

FloatPropertyRNA rna_RadarSensor_angle = {
	{(PropertyRNA *)&rna_RadarSensor_distance, (PropertyRNA *)&rna_RadarSensor_axis,
	-1, "angle", 3, 0, 4, "Angle",
	"Opening angle of the radar cone",
	0, "*",
	PROP_FLOAT, PROP_ANGLE | PROP_UNIT_ROTATION, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	offsetof(bRadarSensor, angle), 4, NULL},
	RadarSensor_angle_get, RadarSensor_angle_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.0f, 3.1398472786f, 0.0f, 3.1398472786f, 10.0f, 3, 0.0f, NULL
};

FloatPropertyRNA rna_RadarSensor_distance = {
	{NULL, (PropertyRNA *)&rna_RadarSensor_angle,
	-1, "distance", 3, 0, 4, "Distance",
	"Depth of the radar cone",
	0, "*",
	PROP_FLOAT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	offsetof(bRadarSensor, range), 4, NULL},
	RadarSensor_distance_get, RadarSensor_distance_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.0f, 10000.0f, 0.0f, 10000.0f, 10.0f, 3, 0.0f, NULL
};

StructRNA RNA_RadarSensor = {
	{(ContainerRNA *)&RNA_RandomSensor, (ContainerRNA *)&RNA_CollisionSensor,
	NULL,
	{(PropertyRNA *)&rna_RadarSensor_property, (PropertyRNA *)&rna_RadarSensor_distance}},
	"RadarSensor", NULL, NULL, 4, "Radar Sensor",
	"Sensor to detect objects in a cone shaped radar emanating from the current object",
	"*", 17,
	(PropertyRNA *)&rna_Sensor_name, (PropertyRNA *)&rna_Sensor_rna_properties,
	&RNA_Sensor,
	NULL,
	rna_Sensor_refine,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	{NULL, NULL}
};

/* Random Sensor */
IntPropertyRNA rna_RandomSensor_seed = {
	{NULL, NULL,
	-1, "seed", 3, 0, 4, "Seed",
	"Initial seed of the generator (choose 0 for not random)",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	offsetof(bRandomSensor, seed), 0, NULL},
	RandomSensor_seed_get, RandomSensor_seed_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	0, 1000, 0, 1000, 1, 0, NULL
};

StructRNA RNA_RandomSensor = {
	{(ContainerRNA *)&RNA_RaySensor, (ContainerRNA *)&RNA_RadarSensor,
	NULL,
	{(PropertyRNA *)&rna_RandomSensor_seed, (PropertyRNA *)&rna_RandomSensor_seed}},
	"RandomSensor", NULL, NULL, 4, "Random Sensor",
	"Sensor to send random events",
	"*", 17,
	(PropertyRNA *)&rna_Sensor_name, (PropertyRNA *)&rna_Sensor_rna_properties,
	&RNA_Sensor,
	NULL,
	rna_Sensor_refine,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	{NULL, NULL}
};

/* Ray Sensor */
static EnumPropertyItem rna_RaySensor_ray_type_items[3] = {
	{0, "PROPERTY", 120, "Property", "Use a property for ray intersections"},
	{1, "MATERIAL", 165, "Material", "Use a material for ray intersections"},
	{0, NULL, 0, NULL, NULL}
};

EnumPropertyRNA rna_RaySensor_ray_type = {
	{(PropertyRNA *)&rna_RaySensor_property, NULL,
	-1, "ray_type", 3, 0, 0, "Ray Type",
	"Toggle collision on material or property",
	0, "*",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	RaySensor_ray_type_get, RaySensor_ray_type_set, NULL, NULL, NULL, NULL, rna_RaySensor_ray_type_items, 2, 0
};

StringPropertyRNA rna_RaySensor_property = {
	{(PropertyRNA *)&rna_RaySensor_material, (PropertyRNA *)&rna_RaySensor_ray_type,
	-1, "property", 262145, 0, 0, "Property",
	"Only look for objects with this property (blank = all objects)",
	0, "*",
	PROP_STRING, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {64, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	RaySensor_property_get, RaySensor_property_length, RaySensor_property_set, NULL, NULL, NULL, 64, ""
};

StringPropertyRNA rna_RaySensor_material = {
	{(PropertyRNA *)&rna_RaySensor_use_x_ray, (PropertyRNA *)&rna_RaySensor_property,
	-1, "material", 262145, 0, 0, "Material",
	"Only look for objects with this material (blank = all objects)",
	0, "*",
	PROP_STRING, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {64, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	RaySensor_material_get, RaySensor_material_length, RaySensor_material_set, NULL, NULL, NULL, 64, ""
};

BoolPropertyRNA rna_RaySensor_use_x_ray = {
	{(PropertyRNA *)&rna_RaySensor_range, (PropertyRNA *)&rna_RaySensor_material,
	-1, "use_x_ray", 3, 0, 0, "X-Ray Mode",
	"Toggle X-Ray option (see through objects that don\'t have the property)",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	RaySensor_use_x_ray_get, RaySensor_use_x_ray_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

FloatPropertyRNA rna_RaySensor_range = {
	{(PropertyRNA *)&rna_RaySensor_axis, (PropertyRNA *)&rna_RaySensor_use_x_ray,
	-1, "range", 3, 0, 4, "Range",
	"Sense objects no farther than this distance",
	0, "*",
	PROP_FLOAT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	offsetof(bRaySensor, range), 4, NULL},
	RaySensor_range_get, RaySensor_range_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.0099999998f, 10000.0f, 0.0099999998f, 10000.0f, 10.0f, 3, 0.0f, NULL
};

static EnumPropertyItem rna_RaySensor_axis_items[7] = {
	{1, "XAXIS", 0, "+X axis", ""},
	{0, "YAXIS", 0, "+Y axis", ""},
	{2, "ZAXIS", 0, "+Z axis", ""},
	{3, "NEGXAXIS", 0, "-X axis", ""},
	{4, "NEGYAXIS", 0, "-Y axis", ""},
	{5, "NEGZAXIS", 0, "-Z axis", ""},
	{0, NULL, 0, NULL, NULL}
};

EnumPropertyRNA rna_RaySensor_axis = {
	{NULL, (PropertyRNA *)&rna_RaySensor_range,
	-1, "axis", 3, 0, 0, "Axis",
	"Along which axis the ray is cast",
	0, "*",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	RaySensor_axis_get, RaySensor_axis_set, NULL, NULL, NULL, NULL, rna_RaySensor_axis_items, 6, 0
};

StructRNA RNA_RaySensor = {
	{(ContainerRNA *)&RNA_MessageSensor, (ContainerRNA *)&RNA_RandomSensor,
	NULL,
	{(PropertyRNA *)&rna_RaySensor_ray_type, (PropertyRNA *)&rna_RaySensor_axis}},
	"RaySensor", NULL, NULL, 4, "Ray Sensor",
	"Sensor to detect intersections with a ray emanating from the current object",
	"*", 17,
	(PropertyRNA *)&rna_Sensor_name, (PropertyRNA *)&rna_Sensor_rna_properties,
	&RNA_Sensor,
	NULL,
	rna_Sensor_refine,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	{NULL, NULL}
};

/* Message Sensor */
StringPropertyRNA rna_MessageSensor_subject = {
	{NULL, NULL,
	-1, "subject", 262145, 0, 0, "Subject",
	"Optional subject filter: only accept messages with this subject, or empty to accept all",
	0, "*",
	PROP_STRING, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {64, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	MessageSensor_subject_get, MessageSensor_subject_length, MessageSensor_subject_set, NULL, NULL, NULL, 64, ""
};

StructRNA RNA_MessageSensor = {
	{(ContainerRNA *)&RNA_JoystickSensor, (ContainerRNA *)&RNA_RaySensor,
	NULL,
	{(PropertyRNA *)&rna_MessageSensor_subject, (PropertyRNA *)&rna_MessageSensor_subject}},
	"MessageSensor", NULL, NULL, 4, "Message Sensor",
	"Sensor to detect incoming messages",
	"*", 17,
	(PropertyRNA *)&rna_Sensor_name, (PropertyRNA *)&rna_Sensor_rna_properties,
	&RNA_Sensor,
	NULL,
	rna_Sensor_refine,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	{NULL, NULL}
};

/* Joystick Sensor */
IntPropertyRNA rna_JoystickSensor_joystick_index = {
	{(PropertyRNA *)&rna_JoystickSensor_event_type, NULL,
	-1, "joystick_index", 3, 0, 4, "Index",
	"Which joystick to use",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	offsetof(bJoystickSensor, joyindex), 2, NULL},
	JoystickSensor_joystick_index_get, JoystickSensor_joystick_index_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	0, 7, 0, 7, 1, 0, NULL
};

static EnumPropertyItem rna_JoystickSensor_event_type_items[5] = {
	{0, "BUTTON", 0, "Button", ""},
	{1, "AXIS", 0, "Axis", ""},
	{2, "HAT", 0, "Hat", ""},
	{3, "AXIS_SINGLE", 0, "Single Axis", ""},
	{0, NULL, 0, NULL, NULL}
};

EnumPropertyRNA rna_JoystickSensor_event_type = {
	{(PropertyRNA *)&rna_JoystickSensor_use_all_events, (PropertyRNA *)&rna_JoystickSensor_joystick_index,
	-1, "event_type", 3, 0, 0, "Event Type",
	"The type of event this joystick sensor is triggered on",
	0, "UI_Events_KeyMaps",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	JoystickSensor_event_type_get, JoystickSensor_event_type_set, NULL, NULL, NULL, NULL, rna_JoystickSensor_event_type_items, 4, 0
};

BoolPropertyRNA rna_JoystickSensor_use_all_events = {
	{(PropertyRNA *)&rna_JoystickSensor_button_number, (PropertyRNA *)&rna_JoystickSensor_event_type,
	-1, "use_all_events", 3, 0, 0, "All Events",
	"Triggered by all events on this joystick\'s current type (axis/button/hat)",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	JoystickSensor_use_all_events_get, JoystickSensor_use_all_events_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

IntPropertyRNA rna_JoystickSensor_button_number = {
	{(PropertyRNA *)&rna_JoystickSensor_axis_number, (PropertyRNA *)&rna_JoystickSensor_use_all_events,
	-1, "button_number", 3, 0, 4, "Button Number",
	"Which button to use",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	offsetof(bJoystickSensor, button), 0, NULL},
	JoystickSensor_button_number_get, JoystickSensor_button_number_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	0, 18, 0, 18, 1, 0, NULL
};

IntPropertyRNA rna_JoystickSensor_axis_number = {
	{(PropertyRNA *)&rna_JoystickSensor_axis_threshold, (PropertyRNA *)&rna_JoystickSensor_button_number,
	-1, "axis_number", 3, 0, 4, "Axis Number",
	"Which axis pair to use, 1 is usually the main direction input",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	offsetof(bJoystickSensor, axis), 1, NULL},
	JoystickSensor_axis_number_get, JoystickSensor_axis_number_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	1, 8, 1, 8, 1, 0, NULL
};

IntPropertyRNA rna_JoystickSensor_axis_threshold = {
	{(PropertyRNA *)&rna_JoystickSensor_axis_direction, (PropertyRNA *)&rna_JoystickSensor_axis_number,
	-1, "axis_threshold", 3, 0, 4, "Axis Threshold",
	"Precision of the axis",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	offsetof(bJoystickSensor, precision), 0, NULL},
	JoystickSensor_axis_threshold_get, JoystickSensor_axis_threshold_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	0, 32768, 0, 32768, 1, 0, NULL
};

static EnumPropertyItem rna_JoystickSensor_axis_direction_items[5] = {
	{0, "RIGHTAXIS", 0, "Right Axis", ""},
	{1, "UPAXIS", 0, "Up Axis", ""},
	{2, "LEFTAXIS", 0, "Left Axis", ""},
	{3, "DOWNAXIS", 0, "Down Axis", ""},
	{0, NULL, 0, NULL, NULL}
};

EnumPropertyRNA rna_JoystickSensor_axis_direction = {
	{(PropertyRNA *)&rna_JoystickSensor_single_axis_number, (PropertyRNA *)&rna_JoystickSensor_axis_threshold,
	-1, "axis_direction", 3, 0, 0, "Axis Direction",
	"The direction of the axis",
	0, "*",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	JoystickSensor_axis_direction_get, JoystickSensor_axis_direction_set, NULL, NULL, NULL, NULL, rna_JoystickSensor_axis_direction_items, 4, 0
};

IntPropertyRNA rna_JoystickSensor_single_axis_number = {
	{(PropertyRNA *)&rna_JoystickSensor_hat_number, (PropertyRNA *)&rna_JoystickSensor_axis_direction,
	-1, "single_axis_number", 3, 0, 4, "Axis Number",
	"Single axis (vertical/horizontal/other) to detect",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	offsetof(bJoystickSensor, axis_single), 1, NULL},
	JoystickSensor_single_axis_number_get, JoystickSensor_single_axis_number_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	1, 16, 1, 16, 1, 0, NULL
};

IntPropertyRNA rna_JoystickSensor_hat_number = {
	{(PropertyRNA *)&rna_JoystickSensor_hat_direction, (PropertyRNA *)&rna_JoystickSensor_single_axis_number,
	-1, "hat_number", 3, 0, 4, "Hat Number",
	"Which hat to use",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	offsetof(bJoystickSensor, hat), 0, NULL},
	JoystickSensor_hat_number_get, JoystickSensor_hat_number_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	1, 2, 1, 2, 1, 0, NULL
};

static EnumPropertyItem rna_JoystickSensor_hat_direction_items[9] = {
	{1, "UP", 0, "Up", ""},
	{4, "DOWN", 0, "Down", ""},
	{8, "LEFT", 0, "Left", ""},
	{2, "RIGHT", 0, "Right", ""},
	{3, "UPRIGHT", 0, "Up/Right", ""},
	{12, "DOWNLEFT", 0, "Down/Left", ""},
	{9, "UPLEFT", 0, "Up/Left", ""},
	{6, "DOWNRIGHT", 0, "Down/Right", ""},
	{0, NULL, 0, NULL, NULL}
};

EnumPropertyRNA rna_JoystickSensor_hat_direction = {
	{NULL, (PropertyRNA *)&rna_JoystickSensor_hat_number,
	-1, "hat_direction", 3, 0, 0, "Hat Direction",
	"Hat direction",
	0, "*",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 318767104, NULL, NULL,
	0, -1, NULL},
	JoystickSensor_hat_direction_get, JoystickSensor_hat_direction_set, NULL, NULL, NULL, NULL, rna_JoystickSensor_hat_direction_items, 8, 1
};

StructRNA RNA_JoystickSensor = {
	{(ContainerRNA *)&RNA_SequenceColorBalanceData, (ContainerRNA *)&RNA_MessageSensor,
	NULL,
	{(PropertyRNA *)&rna_JoystickSensor_joystick_index, (PropertyRNA *)&rna_JoystickSensor_hat_direction}},
	"JoystickSensor", NULL, NULL, 4, "Joystick Sensor",
	"Sensor to detect joystick events",
	"*", 17,
	(PropertyRNA *)&rna_Sensor_name, (PropertyRNA *)&rna_Sensor_rna_properties,
	&RNA_Sensor,
	NULL,
	rna_Sensor_refine,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	{NULL, NULL}
};

