diff options
author | Nick Samarin <nicks1987@bigmir.net> | 2011-02-16 20:07:18 +0300 |
---|---|---|
committer | Nick Samarin <nicks1987@bigmir.net> | 2011-02-16 20:07:18 +0300 |
commit | c5f6a01dd5998976addd2085470bb73a150579e5 (patch) | |
tree | 42b3345fb3ea2e7607a6d1eec379b8ce23b5ffbc /source/blender/makesrna/intern/rna_actuator.c | |
parent | 4cf62f1e7e2bb28b47f79e4bd7c1482ab742ebbd (diff) | |
parent | 9e9e028f059f29d493dc020dda965a9bea8ffd6b (diff) |
synched with trunk at revision 34793
Diffstat (limited to 'source/blender/makesrna/intern/rna_actuator.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_actuator.c | 196 |
1 files changed, 132 insertions, 64 deletions
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c index 663b52055da..7e6c6d92cf1 100644 --- a/source/blender/makesrna/intern/rna_actuator.c +++ b/source/blender/makesrna/intern/rna_actuator.c @@ -25,6 +25,7 @@ #include <stdlib.h> #include "RNA_define.h" +#include "RNA_access.h" #include "rna_internal.h" #include "DNA_constraint_types.h" @@ -34,6 +35,8 @@ #include "WM_types.h" +#include "BLI_utildefines.h" + /* Always keep in alphabetical order */ EnumPropertyItem actuator_type_items[] ={ {ACT_ACTION, "ACTION", 0, "Action", ""}, @@ -41,7 +44,7 @@ EnumPropertyItem actuator_type_items[] ={ {ACT_CAMERA, "CAMERA", 0, "Camera", ""}, {ACT_CONSTRAINT, "CONSTRAINT", 0, "Constraint", ""}, {ACT_EDIT_OBJECT, "EDIT_OBJECT", 0, "Edit Object", ""}, - {ACT_IPO, "F-Curve", 0, "F-Curve", ""}, + {ACT_IPO, "FCURVE", 0, "F-Curve", ""}, {ACT_2DFILTER, "FILTER_2D", 0, "Filter 2D", ""}, {ACT_GAME, "GAME", 0, "Game", ""}, {ACT_MESSAGE, "MESSAGE", 0, "Message", ""}, @@ -119,6 +122,29 @@ static void rna_Actuator_type_set(struct PointerRNA *ptr, int value) } } +static void rna_ConstraintActuator_type_set(struct PointerRNA *ptr, int value) +{ + bActuator *act= (bActuator *)ptr->data; + bConstraintActuator *ca= act->data; + if (value != ca->type) + { + ca->type = value; + switch (ca->type) { + case ACT_CONST_TYPE_ORI: + /* negative axis not supported in the orientation mode */ + if (ELEM3(ca->mode, ACT_CONST_DIRNX,ACT_CONST_DIRNY, ACT_CONST_DIRNZ)) + ca->mode = ACT_CONST_NONE; + break; + + case ACT_CONST_TYPE_LOC: + case ACT_CONST_TYPE_DIST: + case ACT_CONST_TYPE_FH: + default: + break; + } + } +} + static float rna_ConstraintActuator_limitmin_get(struct PointerRNA *ptr) { bActuator *act = (bActuator*)ptr->data; @@ -286,7 +312,6 @@ static void rna_ConstraintActuator_spring_set(struct PointerRNA *ptr, float valu *fp = value; } - /* ConstraintActuator uses the same property for Material and Property. Therefore we need to clear the property when "use_material_detect" mode changes */ static void rna_Actuator_constraint_detect_material_set(struct PointerRNA *ptr, int value) @@ -326,6 +351,33 @@ static void rna_FcurveActuator_force_set(struct PointerRNA *ptr, int value) ia->flag &= ~ACT_IPOFORCE; } + +static void rna_ObjectActuator_type_set(struct PointerRNA *ptr, int value) +{ + bActuator *act= (bActuator *)ptr->data; + bObjectActuator *oa = act->data; + if (value != oa->type) + { + oa->type = value; + switch (oa->type) { + case ACT_OBJECT_NORMAL: + memset(oa, 0, sizeof(bObjectActuator)); + oa->flag = ACT_FORCE_LOCAL|ACT_TORQUE_LOCAL|ACT_DLOC_LOCAL|ACT_DROT_LOCAL; + oa->type = ACT_OBJECT_NORMAL; + break; + + case ACT_OBJECT_SERVO: + memset(oa, 0, sizeof(bObjectActuator)); + oa->flag = ACT_LIN_VEL_LOCAL; + oa->type = ACT_OBJECT_SERVO; + oa->forcerot[0] = 30.0f; + oa->forcerot[1] = 0.5f; + oa->forcerot[2] = 0.0f; + break; + } + } +} + static void rna_ObjectActuator_integralcoefficient_set(struct PointerRNA *ptr, float value) { bActuator *act = (bActuator*)ptr->data; @@ -363,7 +415,7 @@ EnumPropertyItem *rna_Actuator_type_itemf(bContext *C, PointerRNA *ptr, int *fre Object *ob= NULL; int totitem= 0; - if (ptr->type == &RNA_Actuator) { + if (ptr->type==&RNA_Actuator || RNA_struct_is_a(ptr->type, &RNA_Actuator)){ ob = (Object *)ptr->id.data; } else { /* can't use ob from ptr->id.data because that enum is also used by operators */ @@ -529,7 +581,7 @@ static void rna_def_action_actuator(BlenderRNA *brna) prop= RNA_def_property(srna, "play_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type"); RNA_def_property_enum_items(prop, prop_type_items); - RNA_def_property_ui_text(prop, "Action type", "Action playback type"); + RNA_def_property_ui_text(prop, "Action Type", "Action playback type"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE); @@ -551,16 +603,16 @@ static void rna_def_action_actuator(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Property", "Use this property to define the Action position"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "frame_start", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "sta"); - RNA_def_property_range(prop, 0, MAXFRAME); - RNA_def_property_ui_text(prop, "Start frame", ""); + prop= RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "sta"); + RNA_def_property_ui_range(prop, 0.0, MAXFRAME, 100, 2); + RNA_def_property_ui_text(prop, "Start Frame", ""); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "frame_end", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "end"); - RNA_def_property_range(prop, 0, MAXFRAME); - RNA_def_property_ui_text(prop, "End frame", ""); + prop= RNA_def_property(srna, "frame_end", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "end"); + RNA_def_property_ui_range(prop, 0.0, MAXFRAME, 100, 2); + RNA_def_property_ui_text(prop, "End Frame", ""); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "frame_blend_in", PROP_INT, PROP_NONE); @@ -606,6 +658,7 @@ static void rna_def_object_actuator(BlenderRNA *brna) prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type"); RNA_def_property_enum_items(prop, prop_type_items); + RNA_def_property_enum_funcs(prop, NULL, "rna_ObjectActuator_type_set", NULL); RNA_def_property_ui_text(prop, "Motion Type", "Specify the motion system"); RNA_def_property_update(prop, NC_LOGIC, NULL); @@ -685,7 +738,7 @@ static void rna_def_object_actuator(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Loc", "Sets the location"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "offset_rotation", PROP_FLOAT, PROP_XYZ); + prop= RNA_def_property(srna, "offset_rotation", PROP_FLOAT, PROP_EULER); RNA_def_property_float_sdna(prop, NULL, "drot"); RNA_def_property_array(prop, 3); RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2); @@ -797,15 +850,15 @@ static void rna_def_fcurve_actuator(BlenderRNA *brna) RNA_def_property_ui_text(prop, "F-Curve Type", "Specify the way you want to play the animation"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "frame_start", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "sta"); - RNA_def_property_ui_range(prop, 1, MAXFRAME, 1, 1); + prop= RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "sta"); + RNA_def_property_ui_range(prop, 1.0, MAXFRAME, 100, 2); RNA_def_property_ui_text(prop, "Start Frame", ""); RNA_def_property_update(prop, NC_SCENE, NULL); - prop= RNA_def_property(srna, "frame_end", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "end"); - RNA_def_property_ui_range(prop, 1, MAXFRAME, 1, 1); + prop= RNA_def_property(srna, "frame_end", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "end"); + RNA_def_property_ui_range(prop, 1.0, MAXFRAME, 100, 2); RNA_def_property_ui_text(prop, "End Frame", ""); RNA_def_property_update(prop, NC_LOGIC, NULL); @@ -1014,7 +1067,7 @@ static void rna_def_property_actuator(BlenderRNA *brna) RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "value", PROP_STRING, PROP_NONE); - RNA_def_property_ui_text(prop, "Value", "The value to use, use \"\" around strings"); + RNA_def_property_ui_text(prop, "Value", "The name of the property or the value to use (use \"\" around strings)"); RNA_def_property_update(prop, NC_LOGIC, NULL); /* Copy Mode */ @@ -1064,6 +1117,14 @@ static void rna_def_constraint_actuator(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; + static EnumPropertyItem prop_direction_pos_items[] ={ + {ACT_CONST_NONE, "NONE", 0, "None", ""}, + {ACT_CONST_DIRPX, "DIRPX", 0, "X axis", ""}, + {ACT_CONST_DIRPY, "DIRPY", 0, "Y axis", ""}, + {ACT_CONST_DIRPZ, "DIRPZ", 0, "Z axis", ""}, + {0, NULL, 0, NULL, NULL} + }; + srna= RNA_def_struct(brna, "ConstraintActuator", "Actuator"); RNA_def_struct_ui_text(srna, "Constraint Actuator", "Actuator to handle Constraints"); RNA_def_struct_sdna_from(srna, "bConstraintActuator", "data"); @@ -1071,6 +1132,7 @@ static void rna_def_constraint_actuator(BlenderRNA *brna) prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type"); RNA_def_property_enum_items(prop, prop_type_items); + RNA_def_property_enum_funcs(prop, NULL, "rna_ConstraintActuator_type_set", NULL); RNA_def_property_ui_text(prop, "Constraints Mode", "The type of the constraint"); RNA_def_property_update(prop, NC_LOGIC, NULL); @@ -1105,7 +1167,7 @@ static void rna_def_constraint_actuator(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Max", ""); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "damping", PROP_INT, PROP_PERCENTAGE); + prop= RNA_def_property(srna, "damping", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "damp"); RNA_def_property_ui_range(prop, 0, 100, 1, 1); RNA_def_property_ui_text(prop, "Damping", "Damping factor: time constant (in frame) of low pass filter"); @@ -1142,13 +1204,19 @@ static void rna_def_constraint_actuator(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Time", "Maximum activation time in frame, 0 for unlimited"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "damping_rotation", PROP_INT, PROP_PERCENTAGE); + prop= RNA_def_property(srna, "damping_rotation", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "rotdamp"); RNA_def_property_ui_range(prop, 0, 100, 1, 1); - RNA_def_property_ui_text(prop, "rotDamp", "Use a different damping for orientation"); + RNA_def_property_ui_text(prop, "RotDamp", "Use a different damping for orientation"); RNA_def_property_update(prop, NC_LOGIC, NULL); /* ACT_CONST_TYPE_ORI */ + prop= RNA_def_property(srna, "direction_axis_pos", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "mode"); + RNA_def_property_enum_items(prop, prop_direction_pos_items); + RNA_def_property_ui_text(prop, "Direction", "Select the axis to be aligned along the reference direction"); + RNA_def_property_update(prop, NC_LOGIC, NULL); + prop= RNA_def_property(srna, "rotation_max", PROP_FLOAT, PROP_XYZ); RNA_def_property_float_sdna(prop, NULL, "maxrot"); RNA_def_property_array(prop, 3); @@ -1156,16 +1224,16 @@ 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_NONE); + prop= RNA_def_property(srna, "angle_min", PROP_FLOAT, PROP_ANGLE); RNA_def_property_float_sdna(prop, NULL, "minloc[0]"); - RNA_def_property_ui_range(prop, 0.0, 180.0, 10, 2); - 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_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_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "angle_max", PROP_FLOAT, PROP_NONE); + prop= RNA_def_property(srna, "angle_max", PROP_FLOAT, PROP_ANGLE); RNA_def_property_float_sdna(prop, NULL, "maxloc[0]"); - RNA_def_property_ui_range(prop, 0.0, 180.0, 10, 2); - 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_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_update(prop, NC_LOGIC, NULL); /* ACT_CONST_TYPE_FH */ @@ -1175,7 +1243,7 @@ static void rna_def_constraint_actuator(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Distance", "Height of the Fh area"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "spring", PROP_FLOAT, PROP_NONE); + prop= RNA_def_property(srna, "spring", PROP_FLOAT, PROP_PERCENTAGE); 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"); @@ -1347,8 +1415,8 @@ static void rna_def_scene_actuator(BlenderRNA *brna) {ACT_SCENE_RESTART, "RESTART", 0, "Restart", ""}, {ACT_SCENE_SET, "SET", 0, "Set Scene", ""}, {ACT_SCENE_CAMERA, "CAMERA", 0, "Set Camera", ""}, - {ACT_SCENE_ADD_FRONT, "ADDFRONT", 0, "Add OverlayScene", ""}, - {ACT_SCENE_ADD_BACK, "ADDBACK", 0, "Add BackgroundScene", ""}, + {ACT_SCENE_ADD_FRONT, "ADDFRONT", 0, "Add Overlay Scene", ""}, + {ACT_SCENE_ADD_BACK, "ADDBACK", 0, "Add Background Scene", ""}, {ACT_SCENE_REMOVE, "REMOVE", 0, "Remove Scene", ""}, {ACT_SCENE_SUSPEND, "SUSPEND", 0, "Suspend Scene", ""}, {ACT_SCENE_RESUME, "RESUME", 0, "Resume Scene", ""}, @@ -1400,16 +1468,16 @@ static void rna_def_random_actuator(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem prop_distribution_items[] ={ - {ACT_RANDOM_BOOL_CONST, "RESTART", 0, "Bool Constant", ""}, - {ACT_RANDOM_BOOL_UNIFORM, "SET", 0, "Bool Uniform", ""}, - {ACT_RANDOM_BOOL_BERNOUILLI, "CAMERA", 0, "Bool Bernoulli", ""}, - {ACT_RANDOM_INT_CONST, "ADDFRONT", 0, "Int Constant", ""}, - {ACT_RANDOM_INT_UNIFORM, "ADDBACK", 0, "Int Uniform", ""}, - {ACT_RANDOM_INT_POISSON, "REMOVE", 0, "Int Poisson", ""}, - {ACT_RANDOM_FLOAT_CONST, "SUSPEND", 0, "Float Constant", ""}, - {ACT_RANDOM_FLOAT_UNIFORM, "RESUME", 0, "Float Uniform", ""}, - {ACT_RANDOM_FLOAT_NORMAL, "RESUME", 0, "Float Normal", ""}, - {ACT_RANDOM_FLOAT_NEGATIVE_EXPONENTIAL, "RESUME", 0, "Float Neg. Exp.", ""}, + {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_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", ""}, + {ACT_RANDOM_FLOAT_CONST, "FLOAT_CONSTANT", 0, "Float Constant", ""}, + {ACT_RANDOM_FLOAT_UNIFORM, "FLOAT_UNIFORM", 0, "Float Uniform", ""}, + {ACT_RANDOM_FLOAT_NORMAL, "FLOAT_NORMAL", 0, "Float Normal", ""}, + {ACT_RANDOM_FLOAT_NEGATIVE_EXPONENTIAL, "FLOAT_NEGATIVE_EXPONENTIAL", 0, "Float Neg. Exp.", ""}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "RandomActuator", "Actuator"); @@ -1438,7 +1506,7 @@ static void rna_def_random_actuator(BlenderRNA *brna) /* ACT_RANDOM_BOOL_CONST */ prop= RNA_def_property(srna, "use_always_true", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "int_arg_1", 1); - RNA_def_property_ui_text(prop, "Always true", "Always false or always true"); + RNA_def_property_ui_text(prop, "Always True", "Always false or always true"); RNA_def_property_update(prop, NC_LOGIC, NULL); /* ACT_RANDOM_BOOL_UNIFORM */ @@ -1515,7 +1583,7 @@ static void rna_def_random_actuator(BlenderRNA *brna) prop= RNA_def_property(srna, "half_life_time", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "float_arg_1"); RNA_def_property_range(prop, -1000.0, 1000.0); - RNA_def_property_ui_text(prop, "Half-life time", "Negative exponential dropoff"); + RNA_def_property_ui_text(prop, "Half-Life Time", "Negative exponential dropoff"); RNA_def_property_update(prop, NC_LOGIC, NULL); } @@ -1556,7 +1624,7 @@ static void rna_def_message_actuator(BlenderRNA *brna) /* ACT_MESG_PROP */ prop= RNA_def_property(srna, "body_property", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "body"); - RNA_def_property_ui_text(prop, "Propname", "The message body will be set by the Property Value"); + RNA_def_property_ui_text(prop, "Prop Name", "The message body will be set by the Property Value"); RNA_def_property_update(prop, NC_LOGIC, NULL); } @@ -1566,14 +1634,14 @@ static void rna_def_game_actuator(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem prop_type_items[] ={ -// {ACT_GAME_LOAD, "LOAD", 0, "Load game", ""}, -// {ACT_GAME_START, "START", 0, "Start loaded game", ""}, +// {ACT_GAME_LOAD, "LOAD", 0, "Load Game", ""}, +// {ACT_GAME_START, "START", 0, "Start Loaded Game", ""}, // keeping the load/start hacky for compatibility with 2.49 // ideally we could use ACT_GAME_START again and do a do_version() - {ACT_GAME_LOAD, "START", 0, "Start new game", ""}, - {ACT_GAME_RESTART, "RESTART", 0, "Restart this game", ""}, - {ACT_GAME_QUIT, "QUIT", 0, "Quit this game", ""}, + {ACT_GAME_LOAD, "START", 0, "Start Game From File", ""}, + {ACT_GAME_RESTART, "RESTART", 0, "Restart Game", ""}, + {ACT_GAME_QUIT, "QUIT", 0, "Quit Game", ""}, {ACT_GAME_SAVECFG, "SAVECFG", 0, "Save bge.logic.globalDict", ""}, {ACT_GAME_LOADCFG, "LOADCFG", 0, "Load bge.logic.globalDict", ""}, {0, NULL, 0, NULL, NULL}}; @@ -1606,7 +1674,7 @@ static void rna_def_visibility_actuator(BlenderRNA *brna) prop= RNA_def_property(srna, "use_visible", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ACT_VISIBILITY_INVISIBLE); - RNA_def_property_ui_text(prop, "Visible", "Set the objects visible. Initialized from the objects render restriction toggle (access in the outliner)"); + RNA_def_property_ui_text(prop, "Visible", "Set the objects visible. Initialized from the object render restriction toggle in physics button"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "use_occlusion", PROP_BOOLEAN, PROP_NONE); @@ -1645,13 +1713,13 @@ static void rna_def_twodfilter_actuator(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "Filter2DActuator", "Actuator"); - RNA_def_struct_ui_text(srna, "2D Filter Actuator", "Actuator to .."); + RNA_def_struct_ui_text(srna, "Filter 2D Actuator", "Actuator to apply screen graphic effects"); RNA_def_struct_sdna_from(srna, "bTwoDFilterActuator", "data"); prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type"); RNA_def_property_enum_items(prop, prop_type_items); - RNA_def_property_ui_text(prop, "2D Filter Type", ""); + RNA_def_property_ui_text(prop, "Filter 2D Type", ""); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "glsl_shader", PROP_POINTER, PROP_NONE); @@ -1715,7 +1783,7 @@ static void rna_def_parent_actuator(BlenderRNA *brna) prop= RNA_def_property(srna, "use_ghost", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_PARENT_GHOST); - RNA_def_property_ui_text(prop, "Ghost", "Make this object ghost while parented (only if not compound)"); + RNA_def_property_ui_text(prop, "Ghost", "Make this object ghost while parented"); RNA_def_property_update(prop, NC_LOGIC, NULL); } @@ -1742,7 +1810,7 @@ static void rna_def_shape_action_actuator(BlenderRNA *brna) prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type"); RNA_def_property_enum_items(prop, prop_type_items); - RNA_def_property_ui_text(prop, "Action type", "Action playback type"); + RNA_def_property_ui_text(prop, "Action Type", "Action playback type"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE); @@ -1764,16 +1832,16 @@ static void rna_def_shape_action_actuator(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Property", "Use this property to define the Action position"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "frame_start", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "sta"); - RNA_def_property_range(prop, 0, MAXFRAME); - RNA_def_property_ui_text(prop, "Start frame", ""); + prop= RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "sta"); + RNA_def_property_ui_range(prop, 0.0, MAXFRAME, 100, 2); + RNA_def_property_ui_text(prop, "Start Frame", ""); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "frame_end", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "end"); - RNA_def_property_range(prop, 0, MAXFRAME); - RNA_def_property_ui_text(prop, "End frame", ""); + prop= RNA_def_property(srna, "frame_end", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "end"); + RNA_def_property_ui_range(prop, 0.0, MAXFRAME, 100, 2); + RNA_def_property_ui_text(prop, "End Frame", ""); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "frame_blend_in", PROP_INT, PROP_NONE); @@ -1873,7 +1941,7 @@ static void rna_def_armature_actuator(BlenderRNA *brna) RNA_def_property_pointer_sdna(prop, NULL, "subtarget"); RNA_def_property_struct_type(prop, "Object"); RNA_def_property_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Secondary Target", "Set weight of this constraint"); + RNA_def_property_ui_text(prop, "Secondary Target", "Set this object as the secondary target of the constraint (only IK polar target at the moment)"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE); |