diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_actuator.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_actuator.c | 212 |
1 files changed, 107 insertions, 105 deletions
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c index f07cc6fd419..a4becb87e28 100644 --- a/source/blender/makesrna/intern/rna_actuator.c +++ b/source/blender/makesrna/intern/rna_actuator.c @@ -70,7 +70,7 @@ static StructRNA* rna_Actuator_refine(struct PointerRNA *ptr) case ACT_OBJECT: return &RNA_ObjectActuator; case ACT_IPO: - return &RNA_FcurveActuator; + return &RNA_FCurveActuator; case ACT_CAMERA: return &RNA_CameraActuator; case ACT_SOUND: @@ -285,7 +285,7 @@ static void rna_ConstraintActuator_spring_set(struct PointerRNA *ptr, float valu } /* ConstraintActuator uses the same property for Material and Property. - Therefore we need to clear the property when "detect_material" mode changes */ + 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) { bActuator *act = (bActuator*)ptr->data; @@ -476,13 +476,13 @@ void rna_def_actuator(BlenderRNA *brna) RNA_def_property_enum_funcs(prop, NULL, "rna_Actuator_type_set", "rna_Actuator_type_itemf"); RNA_def_property_ui_text(prop, "Type", ""); - prop= RNA_def_property(srna, "pinned", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "pin", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_PIN); RNA_def_property_ui_text(prop, "Pinned", "Display when not linked to a visible states controller"); RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "expanded", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_SHOW); RNA_def_property_ui_text(prop, "Expanded", "Set actuator expanded in the user interface"); RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1); @@ -510,7 +510,7 @@ static void rna_def_action_actuator(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Action Actuator", "Actuator to control the object movement"); RNA_def_struct_sdna_from(srna, "bActionActuator", "data"); - prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); + 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"); @@ -522,10 +522,10 @@ static void rna_def_action_actuator(BlenderRNA *brna) 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); + 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, "continue_last_frame", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_continue_last_frame", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "end_reset", 1); RNA_def_property_ui_text(prop, "Continue", "Restore last frame when switching on/off, otherwise play from the start each time"); RNA_def_property_update(prop, NC_LOGIC, NULL); @@ -547,7 +547,8 @@ static void rna_def_action_actuator(BlenderRNA *brna) RNA_def_property_ui_text(prop, "End frame", ""); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "blendin", PROP_INT, PROP_NONE); + prop= RNA_def_property(srna, "frame_blend_in", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "blendin"); RNA_def_property_range(prop, 0, 32767); RNA_def_property_ui_text(prop, "Blendin", "Number of frames of motion blending"); RNA_def_property_update(prop, NC_LOGIC, NULL); @@ -606,150 +607,150 @@ static void rna_def_object_actuator(BlenderRNA *brna) prop= RNA_def_property(srna, "proportional_coefficient", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "forcerot[0]"); - RNA_def_property_ui_range(prop, 0.0, 200.0, 1.0, 0.1); + RNA_def_property_ui_range(prop, 0.0, 200.0, 10, 2); RNA_def_property_ui_text(prop, "Proportional Coefficient", "Typical value is 60x integral coefficient"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "integral_coefficient", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "forcerot[1]"); - RNA_def_property_ui_range(prop, 0.0, 3.0, 0.1, 0.01); + RNA_def_property_ui_range(prop, 0.0, 3.0, 10, 2); RNA_def_property_float_funcs(prop, NULL, "rna_ObjectActuator_integralcoefficient_set", NULL); RNA_def_property_ui_text(prop, "Integral Coefficient", "Low value (0.01) for slow response, high value (0.5) for fast response"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "derivate_coefficient", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "forcerot[2]"); - RNA_def_property_ui_range(prop, -100.0, 100.0, 1.0, 0.1); + RNA_def_property_ui_range(prop, -100.0, 100.0, 10, 2); RNA_def_property_ui_text(prop, "Derivate Coefficient", "Not required, high values can cause instability"); RNA_def_property_update(prop, NC_LOGIC, NULL); /* Servo Limit */ prop= RNA_def_property(srna, "force_max_x", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "dloc[0]"); - RNA_def_property_ui_range(prop, -100.0, 100.0, 1.0, 0.1); + RNA_def_property_ui_range(prop, -100.0, 100.0, 1, 2); RNA_def_property_ui_text(prop, "Max", "Set the upper limit for force"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "force_min_x", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "drot[0]"); - RNA_def_property_ui_range(prop, -100.0, 100.0, 1.0, 0.1); + RNA_def_property_ui_range(prop, -100.0, 100.0, 1, 2); RNA_def_property_ui_text(prop, "Min", "Set the lower limit for force"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "force_max_y", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, NULL, "dloc[0]"); - RNA_def_property_ui_range(prop, -100.0, 100.0, 1.0, 0.1); + RNA_def_property_float_sdna(prop, NULL, "dloc[1]"); + RNA_def_property_ui_range(prop, -100.0, 100.0, 1, 2); RNA_def_property_ui_text(prop, "Max", "Set the upper limit for force"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "force_min_y", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "drot[1]"); - RNA_def_property_ui_range(prop, -100.0, 100.0, 1.0, 0.1); + RNA_def_property_ui_range(prop, -100.0, 100.0, 1, 2); RNA_def_property_ui_text(prop, "Min", "Set the lower limit for force"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "force_max_z", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "dloc[2]"); - RNA_def_property_ui_range(prop, -100.0, 100.0, 1.0, 0.1); + RNA_def_property_ui_range(prop, -100.0, 100.0, 1, 2); RNA_def_property_ui_text(prop, "Max", "Set the upper limit for force"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "force_min_z", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "drot[2]"); - RNA_def_property_ui_range(prop, -100.0, 100.0, 1.0, 0.1); + RNA_def_property_ui_range(prop, -100.0, 100.0, 1, 2); RNA_def_property_ui_text(prop, "Min", "Set the lower limit for force"); RNA_def_property_update(prop, NC_LOGIC, NULL); /* floats 3 Arrays*/ - prop= RNA_def_property(srna, "loc", PROP_FLOAT, PROP_TRANSLATION); + prop= RNA_def_property(srna, "offset_location", PROP_FLOAT, PROP_XYZ); RNA_def_property_float_sdna(prop, NULL, "dloc"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_range(prop, -10000.0, 10000.0, 0.1, 0.001); + RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2); RNA_def_property_ui_text(prop, "Loc", "Sets the location"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "rot", PROP_FLOAT, PROP_TRANSLATION); + prop= RNA_def_property(srna, "offset_rotation", PROP_FLOAT, PROP_XYZ); RNA_def_property_float_sdna(prop, NULL, "drot"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_range(prop, -10000.0, 10000.0, 0.1, 0.001); + RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2); RNA_def_property_ui_text(prop, "Rot", "Sets the rotation"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "force", PROP_FLOAT, PROP_TRANSLATION); + prop= RNA_def_property(srna, "force", PROP_FLOAT, PROP_XYZ); RNA_def_property_float_sdna(prop, NULL, "forceloc"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_range(prop, -10000.0, 10000.0, 0.1, 0.001); + RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2); RNA_def_property_ui_text(prop, "Force", "Sets the force"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "torque", PROP_FLOAT, PROP_TRANSLATION); + prop= RNA_def_property(srna, "torque", PROP_FLOAT, PROP_XYZ); RNA_def_property_float_sdna(prop, NULL, "forcerot"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_range(prop, -10000.0, 10000.0, 0.1, 0.001); + RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2); RNA_def_property_ui_text(prop, "Torque", "Sets the torque"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "linear_velocity", PROP_FLOAT, PROP_TRANSLATION); + prop= RNA_def_property(srna, "linear_velocity", PROP_FLOAT, PROP_XYZ); RNA_def_property_float_sdna(prop, NULL, "linearvelocity"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_range(prop, -10000.0, 10000.0, 0.1, 0.001); + RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2); RNA_def_property_ui_text(prop, "Linear Velocity", "Sets the linear velocity (in Servo mode it sets the target relative linear velocity, it will be achieved by automatic application of force. Null velocity is a valid target)"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_TRANSLATION); + prop= RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_XYZ); RNA_def_property_float_sdna(prop, NULL, "angularvelocity"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_range(prop, -10000.0, 10000.0, 0.1, 0.001); + RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2); RNA_def_property_ui_text(prop, "Angular Velocity", "Sets the angular velocity"); RNA_def_property_update(prop, NC_LOGIC, NULL); /* booleans */ - prop= RNA_def_property(srna, "local_location", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_local_location", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_DLOC_LOCAL); RNA_def_property_ui_text(prop, "L", "Location is defined in local coordinates"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "local_rotation", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_local_rotation", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_DROT_LOCAL); RNA_def_property_ui_text(prop, "L", "Rotation is defined in local coordinates"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "local_force", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_local_force", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_FORCE_LOCAL); RNA_def_property_ui_text(prop, "L", "Force is defined in local coordinates"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "local_torque", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_local_torque", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_TORQUE_LOCAL); RNA_def_property_ui_text(prop, "L", "Torque is defined in local coordinates"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "local_linear_velocity", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_local_linear_velocity", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_LIN_VEL_LOCAL); RNA_def_property_ui_text(prop, "L", "Velocity is defined in local coordinates"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "local_angular_velocity", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_local_angular_velocity", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_ANG_VEL_LOCAL); RNA_def_property_ui_text(prop, "L", "Angular velocity is defined in local coordinates"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "add_linear_velocity", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_add_linear_velocity", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_ADD_LIN_VEL); 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, "servo_limit_x", PROP_BOOLEAN, PROP_NONE); + 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"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "servo_limit_y", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_servo_limit_y", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_SERVO_LIMIT_Y); RNA_def_property_ui_text(prop, "Y", "Set limit to force along the Y axis"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "servo_limit_z", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_servo_limit_z", PROP_BOOLEAN, PROP_NONE); 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); @@ -770,7 +771,7 @@ static void rna_def_fcurve_actuator(BlenderRNA *brna) {ACT_IPO_FROM_PROP, "PROP", 0, "Property", ""}, {0, NULL, 0, NULL, NULL}}; - srna= RNA_def_struct(brna, "FcurveActuator", "Actuator"); + srna= RNA_def_struct(brna, "FCurveActuator", "Actuator"); RNA_def_struct_ui_text(srna, "F-Curve Actuator", "Actuator to animate the object"); RNA_def_struct_sdna_from(srna, "bIpoActuator", "data"); @@ -802,24 +803,24 @@ static void rna_def_fcurve_actuator(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Frame Property", "Assign the action's current frame number to this property"); /* booleans */ - prop= RNA_def_property(srna, "add", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_additive", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOADD); RNA_def_property_boolean_funcs(prop, NULL, "rna_FcurveActuator_add_set"); RNA_def_property_ui_text(prop, "Add", "F-Curve is added to the current loc/rot/scale in global or local coordinate according to Local flag"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "force", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_force", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOFORCE); RNA_def_property_boolean_funcs(prop, NULL, "rna_FcurveActuator_force_set"); RNA_def_property_ui_text(prop, "Force", "Apply F-Curve as a global or local force depending on the local option (dynamic objects only)"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "local", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_local", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOLOCAL); RNA_def_property_ui_text(prop, "L", "Let the F-Curve act in local coordinates, used in Force and Add mode"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "child", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "apply_to_children", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOCHILD); RNA_def_property_ui_text(prop, "Child", "Update F-Curve on all children Objects as well"); RNA_def_property_update(prop, NC_LOGIC, NULL); @@ -848,17 +849,17 @@ static void rna_def_camera_actuator(BlenderRNA *brna) /* floats */ prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE); - RNA_def_property_ui_range(prop, 0.0, 20.0, 0.1, 0.1); + RNA_def_property_ui_range(prop, 0.0, 20.0, 1, 2); RNA_def_property_ui_text(prop, "Height", ""); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "min", PROP_FLOAT, PROP_NONE); - RNA_def_property_ui_range(prop, 0.0, 20.0, 0.1, 0.1); + RNA_def_property_ui_range(prop, 0.0, 20.0, 1, 2); RNA_def_property_ui_text(prop, "Min", ""); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "max", PROP_FLOAT, PROP_NONE); - RNA_def_property_ui_range(prop, 0.0, 20.0, 0.1, 0.1); + RNA_def_property_ui_range(prop, 0.0, 20.0, 1, 2); RNA_def_property_ui_text(prop, "Max", ""); RNA_def_property_update(prop, NC_LOGIC, NULL); @@ -902,67 +903,67 @@ static void rna_def_sound_actuator(BlenderRNA *brna) RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE); - RNA_def_property_ui_range(prop, 0.0, 1.0, 0.1, 0.01); + RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 2); RNA_def_property_range(prop, 0.0, 2.0); RNA_def_property_ui_text(prop, "Volume", "Sets the initial volume of the sound"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "pitch", PROP_FLOAT, PROP_NONE); - RNA_def_property_ui_range(prop, -12.0, 12.0, 1.0, 0.1); + RNA_def_property_ui_range(prop, -12.0, 12.0, 1, 2); RNA_def_property_ui_text(prop, "Pitch", "Sets the pitch of the sound"); RNA_def_property_update(prop, NC_LOGIC, NULL); /* floats - 3D Parameters */ - prop= RNA_def_property(srna, "minimum_gain_3d", PROP_FLOAT, PROP_NONE); + prop= RNA_def_property(srna, "gain_3d_min", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sound3D.min_gain"); - RNA_def_property_ui_range(prop, 0.0, 1.0, 0.1, 0.01); + RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 2); RNA_def_property_ui_text(prop, "Minimum Gain", "The minimum gain of the sound, no matter how far it is away"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "maximum_gain_3d", PROP_FLOAT, PROP_NONE); + prop= RNA_def_property(srna, "gain_3d_max", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sound3D.max_gain"); - RNA_def_property_ui_range(prop, 0.0, 1.0, 0.1, 0.01); + RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 2); RNA_def_property_ui_text(prop, "Maximum Gain", "The maximum gain of the sound, no matter how near it is"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "reference_distance_3d", PROP_FLOAT, PROP_NONE); + prop= RNA_def_property(srna, "distance_3d_reference", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sound3D.reference_distance"); - RNA_def_property_ui_range(prop, 0.0, FLT_MAX, 1.0, 0.01); + RNA_def_property_ui_range(prop, 0.0, FLT_MAX, 1, 2); RNA_def_property_ui_text(prop, "Reference Distance", "The distance where the sound has a gain of 1.0"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "max_distance_3d", PROP_FLOAT, PROP_NONE); + prop= RNA_def_property(srna, "distance_3d_max", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sound3D.max_distance"); - RNA_def_property_ui_range(prop, 0.0, FLT_MAX, 1.0, 0.01); + RNA_def_property_ui_range(prop, 0.0, FLT_MAX, 1, 2); RNA_def_property_ui_text(prop, "Maximum Distance", "The maximum distance at which you can hear the sound"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "rolloff_factor_3d", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sound3D.rolloff_factor"); - RNA_def_property_ui_range(prop, 0.0, 5.0, 1.0, 0.01); + RNA_def_property_ui_range(prop, 0.0, 5.0, 1, 2); RNA_def_property_ui_text(prop, "Rolloff", "The influence factor on volume depending on distance"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "cone_outer_gain_3d", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sound3D.cone_outer_gain"); - RNA_def_property_ui_range(prop, 0.0, 1.0, 0.1, 0.01); + RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 2); RNA_def_property_ui_text(prop, "Cone Outer Gain", "The gain outside the outer cone. The gain in the outer cone will be interpolated between this value and the normal gain in the inner cone"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "cone_outer_angle_3d", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sound3D.cone_outer_angle"); - RNA_def_property_ui_range(prop, 0.0, 360.0, 1.0, 0.01); + RNA_def_property_ui_range(prop, 0.0, 360.0, 1, 2); RNA_def_property_ui_text(prop, "Cone Outer Angle", "The angle of the outer cone"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "cone_inner_angle_3d", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sound3D.cone_inner_angle"); - RNA_def_property_ui_range(prop, 0.0, 360.0, 1.0, 0.01); + RNA_def_property_ui_range(prop, 0.0, 360.0, 1, 2); RNA_def_property_ui_text(prop, "Cone Inner Angle", "The angle of the inner cone"); RNA_def_property_update(prop, NC_LOGIC, NULL); /* booleans */ - prop= RNA_def_property(srna, "enable_sound_3d", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_sound_3d", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_SND_3D_SOUND); RNA_def_property_ui_text(prop, "3D Sound", "Enable/Disable 3D Sound"); RNA_def_property_update(prop, NC_LOGIC, NULL); @@ -1132,78 +1133,78 @@ static void rna_def_constraint_actuator(BlenderRNA *brna) RNA_def_property_update(prop, NC_LOGIC, NULL); /* ACT_CONST_TYPE_ORI */ - prop= RNA_def_property(srna, "max_rotation", PROP_FLOAT, PROP_TRANSLATION); + 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); - RNA_def_property_ui_range(prop, -2000.0, 2000.0, 0.1, 0.001); + RNA_def_property_ui_range(prop, -2000.0, 2000.0, 10, 2); RNA_def_property_ui_text(prop, "Reference Direction", "Reference Direction"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "min_angle", PROP_FLOAT, PROP_NONE); + prop= RNA_def_property(srna, "angle_min", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "minloc[0]"); - RNA_def_property_ui_range(prop, 0.0, 180.0, 0.1, 0.01); + 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_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "max_angle", PROP_FLOAT, PROP_NONE); + prop= RNA_def_property(srna, "angle_max", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "maxloc[0]"); - RNA_def_property_ui_range(prop, 0.0, 180.0, 0.1, 0.01); + 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_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, 0.1, 0.01); + 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_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "spring", 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, 0.1, 0.01); + 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_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, 1, 1); + 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_update(prop, NC_LOGIC, NULL); /* booleans */ - prop= RNA_def_property(srna, "force_distance", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_force_distance", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_CONST_DISTANCE); RNA_def_property_ui_text(prop, "Force Distance", "Force distance of object to point of impact of ray"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "local", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_local", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_CONST_LOCAL); RNA_def_property_ui_text(prop, "L", "Set ray along object's axis or global axis"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "normal", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_normal", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_CONST_NORMAL); RNA_def_property_ui_text(prop, "N", "Set object axis along (local axis) or parallel (global axis) to the normal at hit position"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "persistent", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_persistent", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_CONST_PERMANENT); RNA_def_property_ui_text(prop, "PER", "Persistent actuator: stays active even if ray does not reach target"); RNA_def_property_update(prop, NC_LOGIC, NULL); //XXX to use an enum instead of a flag if possible - prop= RNA_def_property(srna, "detect_material", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_material_detect", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_CONST_MATERIAL); RNA_def_property_ui_text(prop, "M/P", "Detect material instead of property"); RNA_def_property_boolean_funcs(prop, NULL, "rna_Actuator_constraint_detect_material_set"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "fh_paralel_axis", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_fh_paralel_axis", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_CONST_DOROTFH); RNA_def_property_ui_text(prop, "Rot Fh", "Keep object axis parallel to normal"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "fh_normal", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_fh_normal", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_CONST_NORMAL); RNA_def_property_ui_text(prop, "N", "Add a horizontal spring force on slopes"); RNA_def_property_update(prop, NC_LOGIC, NULL); @@ -1266,7 +1267,7 @@ static void rna_def_edit_object_actuator(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Mesh", "Replace the existing, when left blank 'Phys' will remake the existing physics mesh"); /* note: custom set function is ONLY to avoid rna setting a user for this. */ - RNA_def_property_pointer_funcs(prop, NULL, "rna_Actuator_editobject_mesh_set", NULL); + RNA_def_property_pointer_funcs(prop, NULL, "rna_Actuator_editobject_mesh_set", NULL, NULL); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "time", PROP_INT, PROP_NONE); @@ -1275,47 +1276,47 @@ static void rna_def_edit_object_actuator(BlenderRNA *brna) RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE); - RNA_def_property_ui_range(prop, 0, 10000, 1, 0.01); + RNA_def_property_ui_range(prop, 0, 10000, 1, 2); RNA_def_property_ui_text(prop, "Mass", "The mass of the object"); RNA_def_property_update(prop, NC_LOGIC, NULL); /* floats 3 Arrays*/ - prop= RNA_def_property(srna, "linear_velocity", PROP_FLOAT, PROP_TRANSLATION); + prop= RNA_def_property(srna, "linear_velocity", PROP_FLOAT, PROP_XYZ); RNA_def_property_float_sdna(prop, NULL, "linVelocity"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_range(prop, -100.0, 100.0, 0.1, 0.01); + RNA_def_property_ui_range(prop, -100.0, 100.0, 10, 2); RNA_def_property_ui_text(prop, "Linear Velocity", "Velocity upon creation"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_TRANSLATION); + prop= RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_XYZ); RNA_def_property_float_sdna(prop, NULL, "angVelocity"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_range(prop, -10000.0, 10000.0, 1.0, 0.01); + RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2); RNA_def_property_ui_text(prop, "Angular Velocity", "Angular velocity upon creation"); RNA_def_property_update(prop, NC_LOGIC, NULL); /* booleans */ - prop= RNA_def_property(srna, "local_linear_velocity", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_local_linear_velocity", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "localflag", ACT_EDOB_LOCAL_LINV); RNA_def_property_ui_text(prop, "L", "Apply the transformation locally"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "local_angular_velocity", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_local_angular_velocity", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "localflag", ACT_EDOB_LOCAL_ANGV); RNA_def_property_ui_text(prop, "L", "Apply the rotation locally"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "replace_display_mesh", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_replace_display_mesh", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_EDOB_REPLACE_MESH_NOGFX); RNA_def_property_ui_text(prop, "Gfx", "Replace the display mesh"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "replace_physics_mesh", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_replace_physics_mesh", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_EDOB_REPLACE_MESH_PHYS); RNA_def_property_ui_text(prop, "Phys", "Replace the physics mesh (triangle bounds only - compound shapes not supported)"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "enable_3d_tracking", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_3d_tracking", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_TRACK_3D); RNA_def_property_ui_text(prop, "3D", "Enable 3D tracking"); RNA_def_property_update(prop, NC_LOGIC, NULL); @@ -1419,7 +1420,7 @@ static void rna_def_random_actuator(BlenderRNA *brna) /* int_arg_1, int_arg_2, float_arg_1, float_arg_2 */ /* ACT_RANDOM_BOOL_CONST */ - prop= RNA_def_property(srna, "always_true", PROP_BOOLEAN, PROP_NONE); + 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_update(prop, NC_LOGIC, NULL); @@ -1557,8 +1558,8 @@ static void rna_def_game_actuator(BlenderRNA *brna) {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_SAVECFG, "SAVECFG", 0, "Save GameLogic.globalDict", ""}, - {ACT_GAME_LOADCFG, "LOADCFG", 0, "Load GameLogic.globalDict", ""}, + {ACT_GAME_SAVECFG, "SAVECFG", 0, "Save bge.logic.globalDict", ""}, + {ACT_GAME_LOADCFG, "LOADCFG", 0, "Load bge.logic.globalDict", ""}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "GameActuator", "Actuator"); @@ -1587,17 +1588,17 @@ static void rna_def_visibility_actuator(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Visibility Actuator", "Actuator to set visibility and occlusion of the object"); RNA_def_struct_sdna_from(srna, "bVisibilityActuator", "data"); - prop= RNA_def_property(srna, "visible", PROP_BOOLEAN, PROP_NONE); + 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_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "occlusion", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_occlusion", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_VISIBILITY_OCCLUSION); RNA_def_property_ui_text(prop, "Occlusion", "Set the object to occlude objects behind it. Initialized from the object type in physics button"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "children", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "apply_to_children", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_VISIBILITY_RECURSIVE); RNA_def_property_ui_text(prop, "Children", "Set all the children of this object to the same visibility/occlusion recursively"); RNA_def_property_update(prop, NC_LOGIC, NULL); @@ -1650,14 +1651,14 @@ static void rna_def_twodfilter_actuator(BlenderRNA *brna) RNA_def_property_range(prop, 0, 99); //MAX_RENDER_PASS-1 RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "motion_blur_value", PROP_FLOAT, PROP_NONE); + prop= RNA_def_property(srna, "motion_blur_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "float_arg"); - RNA_def_property_ui_text(prop, "Value", "Set motion blur value"); + RNA_def_property_ui_text(prop, "Value", "Set motion blur factor"); RNA_def_property_range(prop, 0.0, 1.0); RNA_def_property_update(prop, NC_LOGIC, NULL); /* booleans */ - prop= RNA_def_property(srna, "enable_motion_blur", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_motion_blur", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", 1); RNA_def_property_ui_text(prop, "Enable", "Enable/Disable Motion Blur"); RNA_def_property_update(prop, NC_LOGIC, NULL); @@ -1691,12 +1692,12 @@ static void rna_def_parent_actuator(BlenderRNA *brna) RNA_def_property_update(prop, NC_LOGIC, NULL); /* booleans */ - prop= RNA_def_property(srna, "compound", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_compound", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_PARENT_COMPOUND); RNA_def_property_ui_text(prop, "Compound", "Add this object shape to the parent shape (only if the parent shape is already compound)"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "ghost", PROP_BOOLEAN, PROP_NONE); + 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_update(prop, NC_LOGIC, NULL); @@ -1734,10 +1735,10 @@ static void rna_def_shape_action_actuator(BlenderRNA *brna) 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); + 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, "continue_last_frame", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_continue_last_frame", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "end_reset", 1); RNA_def_property_ui_text(prop, "Continue", "Restore last frame when switching on/off, otherwise play from the start each time"); RNA_def_property_update(prop, NC_LOGIC, NULL); @@ -1759,7 +1760,8 @@ static void rna_def_shape_action_actuator(BlenderRNA *brna) RNA_def_property_ui_text(prop, "End frame", ""); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "blendin", PROP_INT, PROP_NONE); + prop= RNA_def_property(srna, "frame_blend_in", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "blendin"); RNA_def_property_range(prop, 0, 32767); RNA_def_property_ui_text(prop, "Blendin", "Number of frames of motion blending"); RNA_def_property_update(prop, NC_LOGIC, NULL); @@ -1805,7 +1807,7 @@ static void rna_def_state_actuator(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Operation", "Select the bit operation on object state mask"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "state", PROP_BOOLEAN, PROP_LAYER_MEMBER); + prop= RNA_def_property(srna, "states", PROP_BOOLEAN, PROP_LAYER_MEMBER); RNA_def_property_boolean_sdna(prop, NULL, "mask", 1); RNA_def_property_array(prop, OB_MAX_STATES); RNA_def_property_ui_text(prop, "State", ""); |