diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-20 05:14:33 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-20 05:14:33 +0400 |
commit | 3c8d86e117b54914524cbc49a8678ecaad8671cf (patch) | |
tree | 8101c8b12f888ded58d7e489e7855e754f0cf065 /source/blender/makesrna | |
parent | 331dd678c75ba1ef4e714c989c8f1bfae35508c2 (diff) | |
parent | acf30220c9d63e0f060ee69115fe82016de025d4 (diff) |
svn merge ^/trunk/blender -r41961:41998
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_actuator.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_camera.c | 27 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_constraint.c | 66 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_controller.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 26 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_tracking.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 63 |
8 files changed, 96 insertions, 98 deletions
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c index b941e9ebed7..392aa6a7f5a 100644 --- a/source/blender/makesrna/intern/rna_actuator.c +++ b/source/blender/makesrna/intern/rna_actuator.c @@ -626,7 +626,7 @@ static void rna_def_action_actuator(BlenderRNA *brna) prop= RNA_def_property(srna, "priority", PROP_INT, PROP_NONE); RNA_def_property_range(prop, 0, 100); - RNA_def_property_ui_text(prop, "Priority", "Execution priority - lower numbers will override actions with higher numbers. With 2 or more actions at once, the overriding channels must be lower in the stack"); + RNA_def_property_ui_text(prop, "Priority", "Execution priority - lower numbers will override actions with higher numbers (with 2 or more actions at once, the overriding channels must be lower in the stack)"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "layer", PROP_INT, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c index 1e7a969caaa..6f6a4baec92 100644 --- a/source/blender/makesrna/intern/rna_camera.c +++ b/source/blender/makesrna/intern/rna_camera.c @@ -39,34 +39,21 @@ #ifdef RNA_RUNTIME +#include "BKE_camera.h" #include "BKE_object.h" #include "BKE_depsgraph.h" -/* only for rad/deg conversion! can remove later */ -static float get_camera_sensor(Camera *cam) -{ - if(cam->sensor_fit==CAMERA_SENSOR_FIT_AUTO) { - return cam->sensor_x; - } - else if(cam->sensor_fit==CAMERA_SENSOR_FIT_HOR) { - return cam->sensor_x; - } - else { - return cam->sensor_y; - } -} - static float rna_Camera_angle_get(PointerRNA *ptr) { Camera *cam= ptr->id.data; - float sensor= get_camera_sensor(cam); + float sensor= camera_sensor_size(cam->sensor_fit, cam->sensor_x, cam->sensor_y); return focallength_to_fov(cam->lens, sensor); } static void rna_Camera_angle_set(PointerRNA *ptr, float value) { Camera *cam= ptr->id.data; - float sensor= get_camera_sensor(cam); + float sensor= camera_sensor_size(cam->sensor_fit, cam->sensor_x, cam->sensor_y); cam->lens= fov_to_focallength(value, sensor); } @@ -126,9 +113,9 @@ void RNA_def_camera(BlenderRNA *brna) {CAM_ANGLETOGGLE, "DEGREES", 0, "Degrees", ""}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem sensor_fit_items[] = { - {CAMERA_SENSOR_FIT_AUTO, "AUTO", 0, "Auto", "Calculate field of view using sensor size, with direction depending on image resolution"}, - {CAMERA_SENSOR_FIT_HOR, "HORIZONTAL", 0, "Horizontal", "Calculate field of view using sensor width"}, - {CAMERA_SENSOR_FIT_VERT, "VERTICAL", 0, "Vertical", "Calculate field of view using sensor height"}, + {CAMERA_SENSOR_FIT_AUTO, "AUTO", 0, "Auto", "Fit to the sensor width or height depending on image resolution"}, + {CAMERA_SENSOR_FIT_HOR, "HORIZONTAL", 0, "Horizontal", "Fit to the sensor width"}, + {CAMERA_SENSOR_FIT_VERT, "VERTICAL", 0, "Vertical", "Fit to the sensor height"}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "Camera", "ID"); @@ -151,7 +138,7 @@ void RNA_def_camera(BlenderRNA *brna) prop= RNA_def_property(srna, "sensor_fit", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "sensor_fit"); RNA_def_property_enum_items(prop, sensor_fit_items); - RNA_def_property_ui_text(prop, "Sensor Fit", "Mode of calculating field of view from sensor dimensions and focal length"); + RNA_def_property_ui_text(prop, "Sensor Fit", "Method to fit image and field of view angle inside the sensor"); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Camera_update"); /* Number values */ diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index 0cd36eb3755..4ab14550fd1 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -367,7 +367,7 @@ static void rna_def_constraint_childof(BlenderRNA *brna) PropertyRNA *prop; srna= RNA_def_struct(brna, "ChildOfConstraint", "Constraint"); - RNA_def_struct_ui_text(srna, "Child Of Constraint", "Creates constraint-based parent-child relationship"); + RNA_def_struct_ui_text(srna, "Child Of Constraint", "Create constraint-based parent-child relationship"); RNA_def_struct_sdna_from(srna, "bChildOfConstraint", "data"); prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); @@ -440,7 +440,7 @@ static void rna_def_constraint_python(BlenderRNA *brna) PropertyRNA *prop; srna= RNA_def_struct(brna, "PythonConstraint", "Constraint"); - RNA_def_struct_ui_text(srna, "Python Constraint", "Uses Python script for constraint evaluation"); + RNA_def_struct_ui_text(srna, "Python Constraint", "Use Python script for constraint evaluation"); RNA_def_struct_sdna_from(srna, "bPythonConstraint", "data"); prop= RNA_def_property(srna, "targets", PROP_COLLECTION, PROP_NONE); @@ -641,7 +641,7 @@ static void rna_def_constraint_track_to(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "TrackToConstraint", "Constraint"); - RNA_def_struct_ui_text(srna, "Track To Constraint", "Aims the constrained object toward the target"); + RNA_def_struct_ui_text(srna, "Track To Constraint", "Aim the constrained object toward the target"); prop= RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, "bConstraint", "headtail"); @@ -685,7 +685,7 @@ static void rna_def_constraint_locate_like(BlenderRNA *brna) PropertyRNA *prop; srna= RNA_def_struct(brna, "CopyLocationConstraint", "Constraint"); - RNA_def_struct_ui_text(srna, "Copy Location Constraint", "Copies the location of the target"); + RNA_def_struct_ui_text(srna, "Copy Location Constraint", "Copy the location of the target"); prop= RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, "bConstraint", "headtail"); @@ -748,7 +748,7 @@ static void rna_def_constraint_rotate_like(BlenderRNA *brna) PropertyRNA *prop; srna= RNA_def_struct(brna, "CopyRotationConstraint", "Constraint"); - RNA_def_struct_ui_text(srna, "Copy Rotation Constraint", "Copies the rotation of the target"); + RNA_def_struct_ui_text(srna, "Copy Rotation Constraint", "Copy the rotation of the target"); RNA_def_struct_sdna_from(srna, "bRotateLikeConstraint", "data"); prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); @@ -804,7 +804,7 @@ static void rna_def_constraint_size_like(BlenderRNA *brna) PropertyRNA *prop; srna= RNA_def_struct(brna, "CopyScaleConstraint", "Constraint"); - RNA_def_struct_ui_text(srna, "Copy Scale Constraint", "Copies the scale of the target"); + RNA_def_struct_ui_text(srna, "Copy Scale Constraint", "Copy the scale of the target"); RNA_def_struct_sdna_from(srna, "bSizeLikeConstraint", "data"); prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); @@ -852,7 +852,7 @@ static void rna_def_constraint_same_volume(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "MaintainVolumeConstraint", "Constraint"); - RNA_def_struct_ui_text(srna, "Maintain Volume Constraint", "Maintains a constant volume along a single scaling axis"); + RNA_def_struct_ui_text(srna, "Maintain Volume Constraint", "Maintain a constant volume along a single scaling axis"); RNA_def_struct_sdna_from(srna, "bSameVolumeConstraint", "data"); prop= RNA_def_property(srna, "free_axis", PROP_ENUM, PROP_NONE); @@ -874,7 +874,7 @@ static void rna_def_constraint_transform_like(BlenderRNA *brna) PropertyRNA *prop; srna= RNA_def_struct(brna, "CopyTransformsConstraint", "Constraint"); - RNA_def_struct_ui_text(srna, "Copy Transforms Constraint", "Copies all the transforms of the target"); + RNA_def_struct_ui_text(srna, "Copy Transforms Constraint", "Copy all the transforms of the target"); prop= RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, "bConstraint", "headtail"); @@ -910,7 +910,7 @@ static void rna_def_constraint_minmax(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "FloorConstraint", "Constraint"); - RNA_def_struct_ui_text(srna, "Floor Constraint", "Uses the target object for location limitation"); + RNA_def_struct_ui_text(srna, "Floor Constraint", "Use the target object for location limitation"); RNA_def_struct_sdna_from(srna, "bMinMaxConstraint","data"); prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); @@ -1038,7 +1038,7 @@ static void rna_def_constraint_locked_track(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "LockedTrackConstraint", "Constraint"); - RNA_def_struct_ui_text(srna, "Locked Track Constraint", "Points toward the target along the track axis, while locking the other axis"); + RNA_def_struct_ui_text(srna, "Locked Track Constraint", "Point toward the target along the track axis, while locking the other axis"); prop= RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, "bConstraint", "headtail"); @@ -1092,7 +1092,7 @@ static void rna_def_constraint_follow_path(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "FollowPathConstraint", "Constraint"); - RNA_def_struct_ui_text(srna, "Follow Path Constraint", "Locks motion to the target path"); + RNA_def_struct_ui_text(srna, "Follow Path Constraint", "Lock motion to the target path"); RNA_def_struct_sdna_from(srna, "bFollowPathConstraint", "data"); prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); @@ -1137,7 +1137,7 @@ static void rna_def_constraint_follow_path(BlenderRNA *brna) prop= RNA_def_property(srna, "use_curve_radius", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "followflag", FOLLOWPATH_RADIUS); - RNA_def_property_ui_text(prop, "Curve Radius", "Objects scale by the curve radius"); + RNA_def_property_ui_text(prop, "Curve Radius", "Object is scaled by the curve radius"); RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update"); } @@ -1159,7 +1159,7 @@ static void rna_def_constraint_stretch_to(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "StretchToConstraint", "Constraint"); - RNA_def_struct_ui_text(srna, "Stretch To Constraint", "Stretches to meet the target object"); + RNA_def_struct_ui_text(srna, "Stretch To Constraint", "Stretch to meet the target object"); prop= RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, "bConstraint", "headtail"); @@ -1209,9 +1209,9 @@ static void rna_def_constraint_rigid_body_joint(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem pivot_items[] = { - {CONSTRAINT_RB_BALL, "BALL", 0, "Ball", "Allows rotations around all axes"}, - {CONSTRAINT_RB_HINGE, "HINGE", 0, "Hinge", "Works in one plane, allows rotations around one axis only"}, - {CONSTRAINT_RB_CONETWIST, "CONE_TWIST", 0, "Cone Twist", "Allows rotations around all axes with limits for the cone and twist axes"}, + {CONSTRAINT_RB_BALL, "BALL", 0, "Ball", "Allow rotations around all axes"}, + {CONSTRAINT_RB_HINGE, "HINGE", 0, "Hinge", "Work in one plane, allow rotations around one axis only"}, + {CONSTRAINT_RB_CONETWIST, "CONE_TWIST", 0, "Cone Twist", "Allow rotations around all axes with limits for the cone and twist axes"}, {CONSTRAINT_RB_GENERIC6DOF, "GENERIC_6_DOF", 0, "Generic 6 DoF", "No constraints by default, limits can be set individually"}, {0, NULL, 0, NULL, NULL}}; @@ -1343,7 +1343,7 @@ static void rna_def_constraint_rigid_body_joint(BlenderRNA *brna) /* Limit Booleans */ prop= RNA_def_property(srna, "use_limit_x", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", 1); - RNA_def_property_ui_text(prop, "Limit X", "Use minimum/maximum x limit"); + RNA_def_property_ui_text(prop, "Limit X", "Use minimum/maximum X limit"); RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update"); prop= RNA_def_property(srna, "use_limit_y", PROP_BOOLEAN, PROP_NONE); @@ -1358,17 +1358,17 @@ static void rna_def_constraint_rigid_body_joint(BlenderRNA *brna) prop= RNA_def_property(srna, "use_angular_limit_x", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", 8); - RNA_def_property_ui_text(prop, "Angular X Limit", "Use minimum/maximum x angular limit"); + RNA_def_property_ui_text(prop, "Angular X Limit", "Use minimum/maximum X angular limit"); RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update"); prop= RNA_def_property(srna, "use_angular_limit_y", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", 16); - RNA_def_property_ui_text(prop, "Angular Y Limit", "Use minimum/maximum y angular limit"); + RNA_def_property_ui_text(prop, "Angular Y Limit", "Use minimum/maximum Y angular limit"); RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update"); prop= RNA_def_property(srna, "use_angular_limit_z", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", 32); - RNA_def_property_ui_text(prop, "Angular Z Limit", "Use minimum/maximum z angular limit"); + RNA_def_property_ui_text(prop, "Angular Z Limit", "Use minimum/maximum Z angular limit"); RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update"); } @@ -1403,7 +1403,7 @@ static void rna_def_constraint_clamp_to(BlenderRNA *brna) prop= RNA_def_property(srna, "use_cyclic", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag2", CLAMPTO_CYCLIC); - RNA_def_property_ui_text(prop, "Cyclic", "Treat curve as cyclic curve (no clamping to curve bounding box"); + RNA_def_property_ui_text(prop, "Cyclic", "Treat curve as cyclic curve (no clamping to curve bounding box)"); RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update"); } @@ -1553,7 +1553,7 @@ static void rna_def_constraint_location_limit(BlenderRNA *brna) PropertyRNA *prop; srna= RNA_def_struct(brna, "LimitLocationConstraint", "Constraint"); - RNA_def_struct_ui_text(srna, "Limit Location Constraint", "Limits the location of the constrained object"); + RNA_def_struct_ui_text(srna, "Limit Location Constraint", "Limit the location of the constrained object"); RNA_def_struct_sdna_from(srna, "bLocLimitConstraint", "data"); prop= RNA_def_property(srna, "use_min_x", PROP_BOOLEAN, PROP_NONE); @@ -1634,7 +1634,7 @@ static void rna_def_constraint_rotation_limit(BlenderRNA *brna) PropertyRNA *prop; srna= RNA_def_struct(brna, "LimitRotationConstraint", "Constraint"); - RNA_def_struct_ui_text(srna, "Limit Rotation Constraint", "Limits the rotation of the constrained object"); + RNA_def_struct_ui_text(srna, "Limit Rotation Constraint", "Limit the rotation of the constrained object"); RNA_def_struct_sdna_from(srna, "bRotLimitConstraint", "data"); prop= RNA_def_property(srna, "use_limit_x", PROP_BOOLEAN, PROP_NONE); @@ -1700,7 +1700,7 @@ static void rna_def_constraint_size_limit(BlenderRNA *brna) PropertyRNA *prop; srna= RNA_def_struct(brna, "LimitScaleConstraint", "Constraint"); - RNA_def_struct_ui_text(srna, "Limit Size Constraint", "Limits the scaling of the constrained object"); + RNA_def_struct_ui_text(srna, "Limit Size Constraint", "Limit the scaling of the constrained object"); RNA_def_struct_sdna_from(srna, "bSizeLimitConstraint", "data"); prop= RNA_def_property(srna, "use_min_x", PROP_BOOLEAN, PROP_NONE); @@ -1781,7 +1781,7 @@ static void rna_def_constraint_distance_limit(BlenderRNA *brna) PropertyRNA *prop; srna= RNA_def_struct(brna, "LimitDistanceConstraint", "Constraint"); - RNA_def_struct_ui_text(srna, "Limit Distance Constraint", "Limits the distance from target object"); + RNA_def_struct_ui_text(srna, "Limit Distance Constraint", "Limit the distance from target object"); prop= RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, "bConstraint", "headtail"); @@ -1825,13 +1825,13 @@ static void rna_def_constraint_shrinkwrap(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem type_items[] = { - {MOD_SHRINKWRAP_NEAREST_SURFACE, "NEAREST_SURFACE", 0, "Nearest Surface Point", "Shrinks the location to the nearest target surface"}, - {MOD_SHRINKWRAP_PROJECT, "PROJECT", 0, "Project", "Shrinks the location to the nearest target surface along a given axis"}, - {MOD_SHRINKWRAP_NEAREST_VERTEX, "NEAREST_VERTEX", 0, "Nearest Vertex", "Shrinks the location to the nearest target vertex"}, + {MOD_SHRINKWRAP_NEAREST_SURFACE, "NEAREST_SURFACE", 0, "Nearest Surface Point", "Shrink the location to the nearest target surface"}, + {MOD_SHRINKWRAP_PROJECT, "PROJECT", 0, "Project", "Shrink the location to the nearest target surface along a given axis"}, + {MOD_SHRINKWRAP_NEAREST_VERTEX, "NEAREST_VERTEX", 0, "Nearest Vertex", "Shrink the location to the nearest target vertex"}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "ShrinkwrapConstraint", "Constraint"); - RNA_def_struct_ui_text(srna, "Shrinkwrap Constraint", "Creates constraint-based shrinkwrap relationship"); + RNA_def_struct_ui_text(srna, "Shrinkwrap Constraint", "Create constraint-based shrinkwrap relationship"); RNA_def_struct_sdna_from(srna, "bShrinkwrapConstraint", "data"); prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); @@ -1844,7 +1844,7 @@ static void rna_def_constraint_shrinkwrap(BlenderRNA *brna) prop= RNA_def_property(srna, "shrinkwrap_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "shrinkType"); RNA_def_property_enum_items(prop, type_items); - RNA_def_property_ui_text(prop, "Shrinkwrap Type", "Selects type of shrinkwrap algorithm for target position"); + RNA_def_property_ui_text(prop, "Shrinkwrap Type", "Select type of shrinkwrap algorithm for target position"); RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update"); prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE); @@ -1884,7 +1884,7 @@ static void rna_def_constraint_damped_track(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "DampedTrackConstraint", "Constraint"); - RNA_def_struct_ui_text(srna, "Damped Track Constraint", "Points toward target by taking the shortest rotation path"); + RNA_def_struct_ui_text(srna, "Damped Track Constraint", "Point toward target by taking the shortest rotation path"); prop= RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, "bConstraint", "headtail"); @@ -2039,7 +2039,7 @@ static void rna_def_constraint_follow_track(BlenderRNA *brna) PropertyRNA *prop; srna= RNA_def_struct(brna, "FollowTrackConstraint", "Constraint"); - RNA_def_struct_ui_text(srna, "Follow Track Constraint", "Locks motion to the target motion track"); + RNA_def_struct_ui_text(srna, "Follow Track Constraint", "Lock motion to the target motion track"); RNA_def_struct_sdna_from(srna, "bFollowTrackConstraint", "data"); /* movie clip */ @@ -2074,7 +2074,7 @@ static void rna_def_constraint_camera_solver(BlenderRNA *brna) PropertyRNA *prop; srna= RNA_def_struct(brna, "CameraSolverConstraint", "Constraint"); - RNA_def_struct_ui_text(srna, "Follow Track Constraint", "Locks motion to the reconstructed camera movenment"); + RNA_def_struct_ui_text(srna, "Follow Track Constraint", "Lock motion to the reconstructed camera movement"); RNA_def_struct_sdna_from(srna, "bCameraSolverConstraint", "data"); /* movie clip */ diff --git a/source/blender/makesrna/intern/rna_controller.c b/source/blender/makesrna/intern/rna_controller.c index 89239c10ffd..5278c1e3532 100644 --- a/source/blender/makesrna/intern/rna_controller.c +++ b/source/blender/makesrna/intern/rna_controller.c @@ -258,7 +258,7 @@ void RNA_def_controller(BlenderRNA *brna) RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "module", PROP_STRING, PROP_NONE); - RNA_def_property_ui_text(prop, "Module", "Module name and function to run e.g. \"someModule.main\". Internal texts and external python files can be used"); + RNA_def_property_ui_text(prop, "Module", "Module name and function to run, e.g. \"someModule.main\" (internal texts and external python files can be used)"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop= RNA_def_property(srna, "use_debug", PROP_BOOLEAN, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index afe11656aee..ee3193b5429 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -1125,8 +1125,8 @@ static void rna_def_transform_orientation(BlenderRNA *brna) RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); - RNA_def_property_string_sdna(prop, NULL, "name"); RNA_def_struct_name_property(srna, prop); + RNA_def_property_ui_text(prop, "Name", "Name of the custom transform orientation"); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); } diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 8fb232332d5..a33622cf8a1 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -891,15 +891,26 @@ static void rna_BackgroundImage_opacity_set(PointerRNA *ptr, float value) bgpic->blend = 1.0f - value; } -static BGpic *rna_BackgroundImage_add(View3D *v3d) +static BGpic *rna_BackgroundImage_new(View3D *v3d) { - BGpic *bgpic= ED_view3D_background_image_add(v3d);; + BGpic *bgpic= ED_view3D_background_image_new(v3d); - WM_main_add_notifier(NC_SPACE|ND_SPACE_VIEW3D, NULL); + WM_main_add_notifier(NC_SPACE|ND_SPACE_VIEW3D, v3d); return bgpic; } +static void rna_BackgroundImage_remove(View3D *v3d, ReportList *reports, BGpic *bgpic) +{ + if (BLI_findindex(&v3d->bgpicbase, bgpic) == -1) { + BKE_report(reports, RPT_ERROR, "BackgroundImage can't be removed"); + } + else { + ED_view3D_background_image_remove(v3d, bgpic); + WM_main_add_notifier(NC_SPACE|ND_SPACE_VIEW3D, v3d); + } +} + /* Space Node Editor */ static int rna_SpaceNodeEditor_node_tree_poll(PointerRNA *ptr, PointerRNA value) @@ -1307,11 +1318,16 @@ static void rna_def_backgroundImages(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_struct_sdna(srna, "View3D"); RNA_def_struct_ui_text(srna, "Background Images", "Collection of background images"); - func= RNA_def_function(srna, "add", "rna_BackgroundImage_add"); + func= RNA_def_function(srna, "new", "rna_BackgroundImage_new"); RNA_def_function_ui_description(func, "Add new background image"); - parm= RNA_def_pointer(func, "image", "BackgroundImage", "", "Image displayed as viewport background"); RNA_def_function_return(func, parm); + + func= RNA_def_function(srna, "remove", "rna_BackgroundImage_remove"); + RNA_def_function_ui_description(func, "Remove background image"); + RNA_def_function_flag(func, FUNC_USE_REPORTS); + parm= RNA_def_pointer(func, "image", "BackgroundImage", "", "Image displayed as viewport background"); + RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL); } static void rna_def_space_view3d(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c index 73b2914fba1..269860e1d7e 100644 --- a/source/blender/makesrna/intern/rna_tracking.c +++ b/source/blender/makesrna/intern/rna_tracking.c @@ -451,9 +451,9 @@ static void rna_def_trackingMarker(BlenderRNA *brna) RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, NULL); /* enable */ - prop= RNA_def_property(srna, "enable", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", MARKER_DISABLED); - RNA_def_property_ui_text(prop, "Enable", "Is marker enabled for current frame"); + prop= RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", MARKER_DISABLED); + RNA_def_property_ui_text(prop, "Mode", "Is marker muted for current frame"); RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, NULL); } diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 329a8b70d85..34ee95c2962 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -506,6 +506,25 @@ static void rna_def_userdef_theme_ui_wcol_state(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_userdef_update"); } +static void rna_def_userdef_theme_ui_panel(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna= RNA_def_struct(brna, "ThemePanelColors", NULL); + RNA_def_struct_sdna(srna, "uiPanelColors"); + RNA_def_struct_clear_flag(srna, STRUCT_UNDO); + RNA_def_struct_ui_text(srna, "Theme Panel Color", "Theme settings for panel colors"); + + prop= RNA_def_property(srna, "header", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_ui_text(prop, "Header", ""); + RNA_def_property_update(prop, 0, "rna_userdef_update"); + + prop= RNA_def_property(srna, "show_header", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_ui_text(prop, "Show Header", ""); + RNA_def_property_update(prop, 0, "rna_userdef_update"); +} + static void rna_def_userdef_theme_ui(BlenderRNA *brna) { StructRNA *srna; @@ -513,6 +532,7 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna) rna_def_userdef_theme_ui_wcol(brna); rna_def_userdef_theme_ui_wcol_state(brna); + rna_def_userdef_theme_ui_panel(brna); srna= RNA_def_struct(brna, "ThemeUserInterface", NULL); RNA_def_struct_sdna(srna, "ThemeUI"); @@ -521,127 +541,102 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna) prop= RNA_def_property(srna, "wcol_regular", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); - RNA_def_property_pointer_sdna(prop, NULL, "wcol_regular"); - RNA_def_property_struct_type(prop, "ThemeWidgetColors"); RNA_def_property_ui_text(prop, "Regular Widget Colors", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "wcol_tool", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); - RNA_def_property_pointer_sdna(prop, NULL, "wcol_tool"); - RNA_def_property_struct_type(prop, "ThemeWidgetColors"); RNA_def_property_ui_text(prop, "Tool Widget Colors", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "wcol_radio", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); - RNA_def_property_pointer_sdna(prop, NULL, "wcol_radio"); - RNA_def_property_struct_type(prop, "ThemeWidgetColors"); RNA_def_property_ui_text(prop, "Radio Widget Colors", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "wcol_text", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); - RNA_def_property_pointer_sdna(prop, NULL, "wcol_text"); - RNA_def_property_struct_type(prop, "ThemeWidgetColors"); RNA_def_property_ui_text(prop, "Text Widget Colors", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "wcol_option", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); - RNA_def_property_pointer_sdna(prop, NULL, "wcol_option"); - RNA_def_property_struct_type(prop, "ThemeWidgetColors"); RNA_def_property_ui_text(prop, "Option Widget Colors", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "wcol_toggle", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); - RNA_def_property_pointer_sdna(prop, NULL, "wcol_toggle"); - RNA_def_property_struct_type(prop, "ThemeWidgetColors"); RNA_def_property_ui_text(prop, "Toggle Widget Colors", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "wcol_num", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); - RNA_def_property_pointer_sdna(prop, NULL, "wcol_num"); - RNA_def_property_struct_type(prop, "ThemeWidgetColors"); RNA_def_property_ui_text(prop, "Number Widget Colors", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "wcol_numslider", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); - RNA_def_property_pointer_sdna(prop, NULL, "wcol_numslider"); - RNA_def_property_struct_type(prop, "ThemeWidgetColors"); RNA_def_property_ui_text(prop, "Slider Widget Colors", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "wcol_box", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); - RNA_def_property_pointer_sdna(prop, NULL, "wcol_box"); - RNA_def_property_struct_type(prop, "ThemeWidgetColors"); RNA_def_property_ui_text(prop, "Box Backdrop Colors", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "wcol_menu", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); - RNA_def_property_pointer_sdna(prop, NULL, "wcol_menu"); - RNA_def_property_struct_type(prop, "ThemeWidgetColors"); RNA_def_property_ui_text(prop, "Menu Widget Colors", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "wcol_pulldown", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); - RNA_def_property_pointer_sdna(prop, NULL, "wcol_pulldown"); - RNA_def_property_struct_type(prop, "ThemeWidgetColors"); RNA_def_property_ui_text(prop, "Pulldown Widget Colors", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "wcol_menu_back", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); - RNA_def_property_pointer_sdna(prop, NULL, "wcol_menu_back"); - RNA_def_property_struct_type(prop, "ThemeWidgetColors"); RNA_def_property_ui_text(prop, "Menu Backdrop Colors", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "wcol_menu_item", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); - RNA_def_property_pointer_sdna(prop, NULL, "wcol_menu_item"); - RNA_def_property_struct_type(prop, "ThemeWidgetColors"); RNA_def_property_ui_text(prop, "Menu Item Colors", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "wcol_scroll", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); - RNA_def_property_pointer_sdna(prop, NULL, "wcol_scroll"); - RNA_def_property_struct_type(prop, "ThemeWidgetColors"); RNA_def_property_ui_text(prop, "Scroll Widget Colors", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "wcol_progress", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); - RNA_def_property_pointer_sdna(prop, NULL, "wcol_progress"); - RNA_def_property_struct_type(prop, "ThemeWidgetColors"); RNA_def_property_ui_text(prop, "Progress Bar Widget Colors", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "wcol_list_item", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); - RNA_def_property_pointer_sdna(prop, NULL, "wcol_list_item"); - RNA_def_property_struct_type(prop, "ThemeWidgetColors"); RNA_def_property_ui_text(prop, "List Item Colors", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "wcol_state", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); - RNA_def_property_pointer_sdna(prop, NULL, "wcol_state"); - RNA_def_property_struct_type(prop, "ThemeWidgetStateColors"); RNA_def_property_ui_text(prop, "State Colors", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); + + prop= RNA_def_property(srna, "panel", PROP_POINTER, PROP_NONE); + RNA_def_property_flag(prop, PROP_NEVER_NULL); + RNA_def_property_ui_text(prop, "Panel Colors", ""); + RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "icon_file", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_sdna(prop, NULL, "iconfile"); RNA_def_property_ui_text(prop, "Icon File", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); + + prop= RNA_def_property(srna, "icon_alpha", PROP_FLOAT, PROP_FACTOR); + RNA_def_property_ui_text(prop, "Icon Alpha", "Transparency of icons in the interface, to reduce contrast"); + RNA_def_property_update(prop, 0, "rna_userdef_update"); } static void rna_def_userdef_theme_spaces_main(StructRNA *srna, int spacetype) |