diff options
author | Nick Samarin <nicks1987@bigmir.net> | 2011-05-17 00:30:59 +0400 |
---|---|---|
committer | Nick Samarin <nicks1987@bigmir.net> | 2011-05-17 00:30:59 +0400 |
commit | a918040902bdeb7c9793168710871e4a3b7777a3 (patch) | |
tree | 7380f00bce5448d777d09f4be4d7127e8eecec49 /source/blender/makesrna/intern/rna_actuator.c | |
parent | daeca2f8262884c436c5678225704b594ce5347b (diff) | |
parent | 99ee18c684da65ba774175c0b57a086e8222464a (diff) |
synched with trunk at revision 36569
Diffstat (limited to 'source/blender/makesrna/intern/rna_actuator.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_actuator.c | 53 |
1 files changed, 31 insertions, 22 deletions
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c index 7e6c6d92cf1..be5f6c47251 100644 --- a/source/blender/makesrna/intern/rna_actuator.c +++ b/source/blender/makesrna/intern/rna_actuator.c @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -22,6 +22,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file blender/makesrna/intern/rna_actuator.c + * \ingroup RNA + */ + + #include <stdlib.h> #include "RNA_define.h" @@ -48,7 +53,7 @@ EnumPropertyItem actuator_type_items[] ={ {ACT_2DFILTER, "FILTER_2D", 0, "Filter 2D", ""}, {ACT_GAME, "GAME", 0, "Game", ""}, {ACT_MESSAGE, "MESSAGE", 0, "Message", ""}, - {ACT_OBJECT, "OBJECT", 0, "Motion", ""}, + {ACT_OBJECT, "MOTION", 0, "Motion", ""}, {ACT_PARENT, "PARENT", 0, "Parent", ""}, {ACT_PROPERTY, "PROPERTY", 0, "Property", ""}, {ACT_RANDOM, "RANDOM", 0, "Random", ""}, @@ -508,18 +513,18 @@ static void rna_SteeringActuator_navmesh_set(PointerRNA *ptr, PointerRNA value) /* note: the following set functions exists only to avoid id refcounting */ static void rna_Actuator_editobject_mesh_set(PointerRNA *ptr, PointerRNA value) { - bActuator *act = (bActuator *)ptr->data; - bEditObjectActuator *eoa = (bEditObjectActuator *) act->data; + bActuator *act = (bActuator *)ptr->data; + bEditObjectActuator *eoa = (bEditObjectActuator *) act->data; - eoa->me = value.data; + eoa->me = value.data; } static void rna_Actuator_action_action_set(PointerRNA *ptr, PointerRNA value) { - bActuator *act = (bActuator *)ptr->data; - bActionActuator *aa = (bActionActuator *) act->data; + bActuator *act = (bActuator *)ptr->data; + bActionActuator *aa = (bActionActuator *) act->data; - aa->act = value.data; + aa->act = value.data; } #else @@ -565,6 +570,7 @@ static void rna_def_action_actuator(BlenderRNA *brna) static EnumPropertyItem prop_type_items[] ={ {ACT_ACTION_PLAY, "PLAY", 0, "Play", ""}, + {ACT_ACTION_PINGPONG, "PINGPONG", 0, "Ping Pong", ""}, {ACT_ACTION_FLIPPER, "FLIPPER", 0, "Flipper", ""}, {ACT_ACTION_LOOP_STOP, "LOOPSTOP", 0, "Loop Stop", ""}, {ACT_ACTION_LOOP_END, "LOOPEND", 0, "Loop End", ""}, @@ -589,8 +595,8 @@ static void rna_def_action_actuator(BlenderRNA *brna) RNA_def_property_struct_type(prop, "Action"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Action", ""); - /* note: custom set function is ONLY to avoid rna setting a user for this. */ - RNA_def_property_pointer_funcs(prop, NULL, "rna_Actuator_action_action_set", NULL, NULL); + /* note: custom set function is ONLY to avoid rna setting a user for this. */ + RNA_def_property_pointer_funcs(prop, NULL, "rna_Actuator_action_action_set", NULL, NULL); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "use_continue_last_frame", PROP_BOOLEAN, PROP_NONE); @@ -1183,7 +1189,7 @@ static void rna_def_constraint_actuator(BlenderRNA *brna) prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE); RNA_def_property_float_funcs(prop, "rna_ConstraintActuator_distance_get", "rna_ConstraintActuator_distance_set", NULL); RNA_def_property_ui_range(prop, -2000.f, 2000.f, 1, 2); - RNA_def_property_ui_text(prop, "Distance", "Set the maximum length of ray"); + RNA_def_property_ui_text(prop, "Distance", "Keep this distance to target"); RNA_def_property_update(prop, NC_LOGIC, NULL); //XXX to use a pointer or add a material lookup @@ -1224,35 +1230,37 @@ static void rna_def_constraint_actuator(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Reference Direction", "Reference Direction"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "angle_min", PROP_FLOAT, PROP_ANGLE); + //XXX TODO - use radians internally then change to PROP_ANGLE + prop= RNA_def_property(srna, "angle_min", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "minloc[0]"); RNA_def_property_range(prop, 0.0, 180.0); - RNA_def_property_ui_text(prop, "Min Angle", "Minimum angle to maintain with target direction. No correction is done if angle with target direction is between min and max"); + RNA_def_property_ui_text(prop, "Min Angle", "Minimum angle (in degree) to maintain with target direction. No correction is done if angle with target direction is between min and max"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "angle_max", PROP_FLOAT, PROP_ANGLE); + //XXX TODO - use radians internally then change to PROP_ANGLE + prop= RNA_def_property(srna, "angle_max", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "maxloc[0]"); RNA_def_property_range(prop, 0.0, 180.0); - RNA_def_property_ui_text(prop, "Max Angle", "Maximum angle allowed with target direction. No correction is done if angle with target direction is between min and max"); + RNA_def_property_ui_text(prop, "Max Angle", "Maximum angle (in degree) allowed with target direction. No correction is done if angle with target direction is between min and max"); RNA_def_property_update(prop, NC_LOGIC, NULL); /* ACT_CONST_TYPE_FH */ prop= RNA_def_property(srna, "fh_height", PROP_FLOAT, PROP_NONE); RNA_def_property_float_funcs(prop, "rna_ConstraintActuator_fhheight_get", "rna_ConstraintActuator_fhheight_set", NULL); RNA_def_property_ui_range(prop, 0.01, 2000.0, 10, 2); - RNA_def_property_ui_text(prop, "Distance", "Height of the Fh area"); + RNA_def_property_ui_text(prop, "Distance", "Height of the force field area"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "spring", PROP_FLOAT, PROP_PERCENTAGE); + prop= RNA_def_property(srna, "fh_force", PROP_FLOAT, PROP_NONE); RNA_def_property_float_funcs(prop, "rna_ConstraintActuator_spring_get", "rna_ConstraintActuator_spring_set", NULL); RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 2); - RNA_def_property_ui_text(prop, "Fh", "Spring force within the Fh area"); + RNA_def_property_ui_text(prop, "Force", "Spring force within the force field area"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "fh_damping", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "maxrot[0]"); RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 2); - RNA_def_property_ui_text(prop, "Damping", "Damping factor of the Fh spring force"); + RNA_def_property_ui_text(prop, "Damping", "Damping factor of the force field spring"); RNA_def_property_update(prop, NC_LOGIC, NULL); /* booleans */ @@ -1470,7 +1478,7 @@ static void rna_def_random_actuator(BlenderRNA *brna) static EnumPropertyItem prop_distribution_items[] ={ {ACT_RANDOM_BOOL_CONST, "BOOL_CONSTANT", 0, "Bool Constant", ""}, {ACT_RANDOM_BOOL_UNIFORM, "BOOL_UNIFORM", 0, "Bool Uniform", ""}, - {ACT_RANDOM_BOOL_BERNOUILLI, "BOOL_BERNOUILLI", 0, "Bool Bernouilli", ""}, + {ACT_RANDOM_BOOL_BERNOUILLI, "BOOL_BERNOUILLI", 0, "Bool Bernoulli", ""}, {ACT_RANDOM_INT_CONST, "INT_CONSTANT", 0, "Int Constant", ""}, {ACT_RANDOM_INT_UNIFORM, "INT_UNIFORM", 0, "Int Uniform", ""}, {ACT_RANDOM_INT_POISSON, "INT_POISSON", 0, "Int Poisson", ""}, @@ -1794,6 +1802,7 @@ static void rna_def_shape_action_actuator(BlenderRNA *brna) static EnumPropertyItem prop_type_items[] ={ {ACT_ACTION_PLAY, "PLAY", 0, "Play", ""}, + {ACT_ACTION_PINGPONG, "PINGPONG", 0, "Ping Pong", ""}, {ACT_ACTION_FLIPPER, "FLIPPER", 0, "Flipper", ""}, {ACT_ACTION_LOOP_STOP, "LOOPSTOP", 0, "Loop Stop", ""}, {ACT_ACTION_LOOP_END, "LOOPEND", 0, "Loop End", ""}, @@ -1818,8 +1827,8 @@ static void rna_def_shape_action_actuator(BlenderRNA *brna) RNA_def_property_struct_type(prop, "Action"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Action", ""); - /* note: custom set function is ONLY to avoid rna setting a user for this. */ - RNA_def_property_pointer_funcs(prop, NULL, "rna_Actuator_action_action_set", NULL, NULL); + /* note: custom set function is ONLY to avoid rna setting a user for this. */ + RNA_def_property_pointer_funcs(prop, NULL, "rna_Actuator_action_action_set", NULL, NULL); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "use_continue_last_frame", PROP_BOOLEAN, PROP_NONE); |