diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_actuator.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_actuator.c | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c index b653289e44d..2c022e80ddd 100644 --- a/source/blender/makesrna/intern/rna_actuator.c +++ b/source/blender/makesrna/intern/rna_actuator.c @@ -27,22 +27,23 @@ #include <stdlib.h> -#include "RNA_define.h" -#include "RNA_access.h" -#include "RNA_enum_types.h" - -#include "rna_internal.h" #include "DNA_constraint_types.h" #include "DNA_object_types.h" #include "DNA_actuator_types.h" #include "DNA_scene_types.h" /* for MAXFRAME */ -#include "WM_types.h" - #include "BLI_utildefines.h" #include "BLF_translation.h" +#include "RNA_define.h" +#include "RNA_access.h" +#include "RNA_enum_types.h" + +#include "rna_internal.h" + +#include "WM_types.h" + /* Always keep in alphabetical order */ EnumPropertyItem actuator_type_items[] = { {ACT_ACTION, "ACTION", 0, "Action", ""}, @@ -389,6 +390,12 @@ static void rna_ObjectActuator_type_set(struct PointerRNA *ptr, int value) oa->forcerot[1] = 0.5f; oa->forcerot[2] = 0.0f; break; + + case ACT_OBJECT_CHARACTER: + memset(oa, 0, sizeof(bObjectActuator)); + oa->flag = ACT_DLOC_LOCAL | ACT_DROT_LOCAL; + oa->type = ACT_OBJECT_CHARACTER; + break; } } } @@ -701,6 +708,7 @@ static void rna_def_object_actuator(BlenderRNA *brna) static EnumPropertyItem prop_type_items[] = { {ACT_OBJECT_NORMAL, "OBJECT_NORMAL", 0, "Simple Motion", ""}, {ACT_OBJECT_SERVO, "OBJECT_SERVO", 0, "Servo Control", ""}, + {ACT_OBJECT_CHARACTER, "OBJECT_CHARACTER", 0, "Character Motion", ""}, {0, NULL, 0, NULL, NULL} }; @@ -867,6 +875,11 @@ static void rna_def_object_actuator(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Add", "Toggles between ADD and SET linV"); RNA_def_property_update(prop, NC_LOGIC, NULL); + prop = RNA_def_property(srna, "use_add_character_location", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_ADD_CHAR_LOC); + RNA_def_property_ui_text(prop, "Add", "Toggle between ADD and SET character location"); + RNA_def_property_update(prop, NC_LOGIC, NULL); + prop = RNA_def_property(srna, "use_servo_limit_x", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_SERVO_LIMIT_X); RNA_def_property_ui_text(prop, "X", "Set limit to force along the X axis"); @@ -881,6 +894,11 @@ static void rna_def_object_actuator(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_SERVO_LIMIT_Z); RNA_def_property_ui_text(prop, "Z", "Set limit to force along the Z axis"); RNA_def_property_update(prop, NC_LOGIC, NULL); + + prop = RNA_def_property(srna, "use_character_jump", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_CHAR_JUMP); + RNA_def_property_ui_text(prop, "Jump", "Make the character jump using the settings in the physics properties"); + RNA_def_property_update(prop, NC_LOGIC, NULL); } static void rna_def_camera_actuator(BlenderRNA *brna) |