Blender V2.61 - r43446
|
#include <stddef.h>
#include "DNA_object_types.h"
#include "DNA_sensor_types.h"
#include "DNA_controller_types.h"
#include "DNA_actuator_types.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
#include "BKE_main.h"
#include "BKE_sca.h"
#include "BKE_material.h"
#include "ED_logic.h"
#include "ED_object.h"
#include "ED_screen.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "WM_api.h"
#include "WM_types.h"
#include "logic_intern.h"
#include "DNA_mesh_types.h"
#include "DNA_material_types.h"
#include "DNA_meshdata_types.h"
Go to the source code of this file.
Definition in file logic_ops.c.
static int actuator_add_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 491 of file logic_ops.c.
References Object::actuators, BLI_addtail(), BLI_strncpy(), BLI_strnlen(), edit_object_property_get(), make_unique_prop_names(), MAX_NAME, bActuator::name, NC_LOGIC, new_actuator(), NULL, OB_SHOWACT, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_Actuator, RNA_enum_get(), RNA_pointer_create(), RNA_property_enum_get(), RNA_property_enum_name(), RNA_string_get(), RNA_struct_find_property(), ARegion::type, and WM_event_add_notifier().
Referenced by LOGIC_OT_actuator_add().
static int actuator_move_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 649 of file logic_ops.c.
References edit_actuator_property_get(), logicbricks_move_property_get(), NC_LOGIC, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, sca_move_actuator(), and WM_event_add_notifier().
Referenced by actuator_move_invoke(), and LOGIC_OT_actuator_move().
static int actuator_move_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 665 of file logic_ops.c.
References actuator_move_exec(), edit_actuator_invoke_properties(), and OPERATOR_CANCELLED.
Referenced by LOGIC_OT_actuator_move().
static int actuator_remove_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 451 of file logic_ops.c.
References Object::actuators, BLI_remlink(), edit_actuator_property_get(), free_actuator(), NC_LOGIC, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, unlink_actuator(), and WM_event_add_notifier().
Referenced by actuator_remove_invoke(), and LOGIC_OT_actuator_remove().
static int actuator_remove_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 468 of file logic_ops.c.
References actuator_remove_exec(), edit_actuator_invoke_properties(), and OPERATOR_CANCELLED.
Referenced by LOGIC_OT_actuator_remove().
static int controller_add_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 377 of file logic_ops.c.
References BLI_addtail(), BLI_strncpy(), BLI_strnlen(), Object::controllers, edit_object_property_get(), make_unique_prop_names(), MAX_NAME, bController::name, NC_LOGIC, new_controller(), NULL, OB_MAX_STATES, OB_SHOWCONT, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_Controller, RNA_enum_get(), RNA_pointer_create(), RNA_property_enum_get(), RNA_property_enum_name(), RNA_string_get(), RNA_struct_find_property(), bController::state_mask, ARegion::type, and WM_event_add_notifier().
Referenced by LOGIC_OT_controller_add().
static int controller_move_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 604 of file logic_ops.c.
References edit_controller_property_get(), logicbricks_move_property_get(), NC_LOGIC, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, sca_move_controller(), and WM_event_add_notifier().
Referenced by controller_move_invoke(), and LOGIC_OT_controller_move().
static int controller_move_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 620 of file logic_ops.c.
References controller_move_exec(), edit_controller_invoke_properties(), and OPERATOR_CANCELLED.
Referenced by LOGIC_OT_controller_move().
static int controller_remove_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 337 of file logic_ops.c.
References BLI_remlink(), Object::controllers, edit_controller_property_get(), free_controller(), NC_LOGIC, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, unlink_controller(), and WM_event_add_notifier().
Referenced by controller_remove_invoke(), and LOGIC_OT_controller_remove().
static int controller_remove_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 354 of file logic_ops.c.
References controller_remove_exec(), edit_controller_invoke_properties(), and OPERATOR_CANCELLED.
Referenced by LOGIC_OT_controller_remove().
void ED_operatortypes_logic | ( | void | ) |
Definition at line 725 of file logic_ops.c.
References LOGIC_OT_actuator_add(), LOGIC_OT_actuator_move(), LOGIC_OT_actuator_remove(), LOGIC_OT_controller_add(), LOGIC_OT_controller_move(), LOGIC_OT_controller_remove(), LOGIC_OT_sensor_add(), LOGIC_OT_sensor_move(), LOGIC_OT_sensor_remove(), LOGIC_OT_texface_convert(), and WM_operatortype_append().
Referenced by ED_spacetypes_init().
static int edit_actuator_invoke_properties | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 190 of file logic_ops.c.
References CTX_data_pointer_get_type(), PointerRNA::data, Object::id, PointerRNA::id, bActuator::name, ID::name, wmOperator::ptr, RNA_Actuator, RNA_string_set(), and RNA_struct_property_is_set().
Referenced by actuator_move_invoke(), and actuator_remove_invoke().
static int edit_actuator_poll | ( | bContext * | C | ) | [static] |
Definition at line 81 of file logic_ops.c.
References CTX_data_pointer_get_type(), PointerRNA::data, PointerRNA::id, and RNA_Actuator.
Referenced by LOGIC_OT_actuator_move(), and LOGIC_OT_actuator_remove().
static void edit_actuator_properties | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 184 of file logic_ops.c.
References MAX_NAME, RNA_def_string(), and wmOperatorType::srna.
Referenced by LOGIC_OT_actuator_move(), and LOGIC_OT_actuator_remove().
static bActuator* edit_actuator_property_get | ( | bContext * | C, |
wmOperator * | op, | ||
Object ** | ob | ||
) | [static] |
Definition at line 209 of file logic_ops.c.
References actuator_name(), BLI_findstring(), edit_object_property_get(), MAX_NAME, NULL, wmOperator::ptr, and RNA_string_get().
Referenced by actuator_move_exec(), and actuator_remove_exec().
static int edit_controller_invoke_properties | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 151 of file logic_ops.c.
References CTX_data_pointer_get_type(), PointerRNA::data, Object::id, PointerRNA::id, bController::name, ID::name, wmOperator::ptr, RNA_Controller, RNA_string_set(), and RNA_struct_property_is_set().
Referenced by controller_move_invoke(), and controller_remove_invoke().
static int edit_controller_poll | ( | bContext * | C | ) | [static] |
Definition at line 73 of file logic_ops.c.
References CTX_data_pointer_get_type(), PointerRNA::data, PointerRNA::id, and RNA_Controller.
Referenced by LOGIC_OT_controller_move(), and LOGIC_OT_controller_remove().
static void edit_controller_properties | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 145 of file logic_ops.c.
References MAX_NAME, RNA_def_string(), and wmOperatorType::srna.
Referenced by LOGIC_OT_controller_move(), and LOGIC_OT_controller_remove().
static bController* edit_controller_property_get | ( | bContext * | C, |
wmOperator * | op, | ||
Object ** | ob | ||
) | [static] |
Definition at line 170 of file logic_ops.c.
References BLI_findstring(), controller_name(), edit_object_property_get(), MAX_NAME, NULL, wmOperator::ptr, and RNA_string_get().
Referenced by controller_move_exec(), and controller_remove_exec().
static Object* edit_object_property_get | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 114 of file logic_ops.c.
References BLI_findstring(), BLI_strnlen(), CTX_data_main(), ED_object_active_context(), MAX_NAME, wmOperator::ptr, and RNA_string_get().
Referenced by actuator_add_exec(), controller_add_exec(), edit_actuator_property_get(), edit_controller_property_get(), edit_sensor_property_get(), and sensor_add_exec().
static int edit_sensor_invoke_properties | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 95 of file logic_ops.c.
References CTX_data_pointer_get_type(), PointerRNA::data, Object::id, PointerRNA::id, bSensor::name, ID::name, wmOperator::ptr, RNA_Sensor, RNA_string_set(), and RNA_struct_property_is_set().
Referenced by sensor_move_invoke(), and sensor_remove_invoke().
static int edit_sensor_poll | ( | bContext * | C | ) | [static] |
Definition at line 65 of file logic_ops.c.
References CTX_data_pointer_get_type(), PointerRNA::data, PointerRNA::id, and RNA_Sensor.
Referenced by LOGIC_OT_sensor_move(), and LOGIC_OT_sensor_remove().
static void edit_sensor_properties | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 89 of file logic_ops.c.
References MAX_NAME, RNA_def_string(), and wmOperatorType::srna.
Referenced by LOGIC_OT_sensor_move(), and LOGIC_OT_sensor_remove().
static bSensor* edit_sensor_property_get | ( | bContext * | C, |
wmOperator * | op, | ||
Object ** | ob | ||
) | [static] |
Definition at line 131 of file logic_ops.c.
References BLI_findstring(), edit_object_property_get(), MAX_NAME, NULL, wmOperator::ptr, RNA_string_get(), and sensor_name().
Referenced by sensor_move_exec(), and sensor_remove_exec().
static void LOGIC_OT_actuator_add | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 528 of file logic_ops.c.
References actuator_add_exec(), CONT_LOGIC_AND, wmOperatorType::description, DummyRNA_NULL_items, ED_operator_object_active_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, MAX_NAME, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, wmOperatorType::prop, rna_Actuator_type_itemf(), RNA_def_enum(), RNA_def_enum_funcs(), RNA_def_string(), wmOperatorType::srna, and WM_menu_invoke().
Referenced by ED_operatortypes_logic().
static void LOGIC_OT_actuator_move | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 674 of file logic_ops.c.
References actuator_move_exec(), actuator_move_invoke(), wmOperatorType::description, edit_actuator_poll(), edit_actuator_properties(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_enum(), and wmOperatorType::srna.
Referenced by ED_operatortypes_logic().
static void LOGIC_OT_actuator_remove | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 476 of file logic_ops.c.
References actuator_remove_exec(), actuator_remove_invoke(), wmOperatorType::description, edit_actuator_poll(), edit_actuator_properties(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_logic().
static void LOGIC_OT_controller_add | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 428 of file logic_ops.c.
References CONT_LOGIC_AND, controller_add_exec(), controller_type_items, wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, MAX_NAME, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), RNA_def_string(), wmOperatorType::srna, and WM_menu_invoke().
Referenced by ED_operatortypes_logic().
static void LOGIC_OT_controller_move | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 629 of file logic_ops.c.
References controller_move_exec(), controller_move_invoke(), wmOperatorType::description, edit_controller_poll(), edit_controller_properties(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_enum(), and wmOperatorType::srna.
Referenced by ED_operatortypes_logic().
static void LOGIC_OT_controller_remove | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 362 of file logic_ops.c.
References controller_remove_exec(), controller_remove_invoke(), wmOperatorType::description, edit_controller_poll(), edit_controller_properties(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_logic().
static void LOGIC_OT_sensor_add | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 311 of file logic_ops.c.
References wmOperatorType::description, DummyRNA_NULL_items, ED_operator_object_active_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, MAX_NAME, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), RNA_def_enum_funcs(), RNA_def_string(), rna_Sensor_type_itemf(), SENS_ALWAYS, sensor_add_exec(), wmOperatorType::srna, and WM_menu_invoke().
Referenced by ED_operatortypes_logic().
static void LOGIC_OT_sensor_move | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 584 of file logic_ops.c.
References wmOperatorType::description, edit_sensor_poll(), edit_sensor_properties(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_enum(), sensor_move_exec(), sensor_move_invoke(), and wmOperatorType::srna.
Referenced by ED_operatortypes_logic().
static void LOGIC_OT_sensor_remove | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 259 of file logic_ops.c.
References wmOperatorType::description, edit_sensor_poll(), edit_sensor_properties(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, sensor_remove_exec(), and sensor_remove_invoke().
Referenced by ED_operatortypes_logic().
static void LOGIC_OT_texface_convert | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 708 of file logic_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, texface_convert_exec(), and texface_convert_invoke().
Referenced by ED_operatortypes_logic().
static int logicbricks_move_property_get | ( | wmOperator * | op | ) | [static] |
Definition at line 223 of file logic_ops.c.
References FALSE, wmOperator::ptr, RNA_enum_get(), TRUE, and ARegion::type.
Referenced by actuator_move_exec(), controller_move_exec(), and sensor_move_exec().
static int sensor_add_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 274 of file logic_ops.c.
References BLI_addtail(), BLI_strncpy(), BLI_strnlen(), edit_object_property_get(), make_unique_prop_names(), MAX_NAME, bSensor::name, NC_LOGIC, new_sensor(), NULL, OB_SHOWSENS, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), RNA_pointer_create(), RNA_property_enum_get(), RNA_property_enum_name(), RNA_Sensor, RNA_string_get(), RNA_struct_find_property(), Object::sensors, ARegion::type, and WM_event_add_notifier().
Referenced by LOGIC_OT_sensor_add().
static int sensor_move_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 559 of file logic_ops.c.
References edit_sensor_property_get(), logicbricks_move_property_get(), NC_LOGIC, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, sca_move_sensor(), and WM_event_add_notifier().
Referenced by LOGIC_OT_sensor_move(), and sensor_move_invoke().
static int sensor_move_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 575 of file logic_ops.c.
References edit_sensor_invoke_properties(), OPERATOR_CANCELLED, and sensor_move_exec().
Referenced by LOGIC_OT_sensor_move().
static int sensor_remove_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 235 of file logic_ops.c.
References BLI_remlink(), edit_sensor_property_get(), free_sensor(), NC_LOGIC, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, Object::sensors, and WM_event_add_notifier().
Referenced by LOGIC_OT_sensor_remove(), and sensor_remove_invoke().
static int sensor_remove_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 251 of file logic_ops.c.
References edit_sensor_invoke_properties(), OPERATOR_CANCELLED, and sensor_remove_exec().
Referenced by LOGIC_OT_sensor_remove().
static int texface_convert_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 695 of file logic_ops.c.
References CTX_data_main(), do_version_tface(), and OPERATOR_FINISHED.
Referenced by LOGIC_OT_texface_convert(), and texface_convert_invoke().
static int texface_convert_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 703 of file logic_ops.c.
References texface_convert_exec().
Referenced by LOGIC_OT_texface_convert().
EnumPropertyItem logicbricks_move_direction[] [static] |
Definition at line 553 of file logic_ops.c.