diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/object/object_vgroup.c | 8 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_actuator.c | 10 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_define.c | 19 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 14 |
4 files changed, 35 insertions, 16 deletions
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index 797cf428969..85b62c97438 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -2355,7 +2355,7 @@ void OBJECT_OT_vertex_group_fix(wmOperatorType *ot) /* identifiers */ ot->name= "Fix Vertex Group Deform"; ot->idname= "OBJECT_OT_vertex_group_fix"; - ot->description= "Modify the position of selected vertices by changing only their respective groups' weights (this tool may be slow for many vertices)."; + ot->description= "Modify the position of selected vertices by changing only their respective groups' weights (this tool may be slow for many vertices)"; /* api callbacks */ ot->poll= vertex_group_poll; @@ -2363,9 +2363,9 @@ void OBJECT_OT_vertex_group_fix(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_float(ot->srna, "dist", 0.0f, -FLT_MAX, FLT_MAX, "Distance", "The distance to move to.", -10.0f, 10.0f); - RNA_def_float(ot->srna, "strength", 1.f, -2.0f, FLT_MAX, "Strength", "The distance moved can be changed by this multiplier.", -2.0f, 2.0f); - RNA_def_float(ot->srna, "accuracy", 1.0f, 0.05f, FLT_MAX, "Change Sensitivity", "Changes the amount weights are altered with each iteration: lower values are slower.", 0.05f, 1.f); + RNA_def_float(ot->srna, "dist", 0.0f, -FLT_MAX, FLT_MAX, "Distance", "The distance to move to", -10.0f, 10.0f); + RNA_def_float(ot->srna, "strength", 1.f, -2.0f, FLT_MAX, "Strength", "The distance moved can be changed by this multiplier", -2.0f, 2.0f); + RNA_def_float(ot->srna, "accuracy", 1.0f, 0.05f, FLT_MAX, "Change Sensitivity", "Changes the amount weights are altered with each iteration: lower values are slower", 0.05f, 1.f); } diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c index 43cf1fae931..d828139a6d5 100644 --- a/source/blender/makesrna/intern/rna_actuator.c +++ b/source/blender/makesrna/intern/rna_actuator.c @@ -861,7 +861,7 @@ static void rna_def_camera_actuator(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "CameraActuator", "Actuator"); - RNA_def_struct_ui_text(srna, "Camera Actuator", "Actuator to..."); + RNA_def_struct_ui_text(srna, "Camera Actuator", ""); RNA_def_struct_sdna_from(srna, "bCameraActuator", "data"); prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE); @@ -1387,7 +1387,7 @@ static void rna_def_scene_actuator(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "SceneActuator", "Actuator"); - RNA_def_struct_ui_text(srna, "Scene Actuator", "Actuator to..."); + RNA_def_struct_ui_text(srna, "Scene Actuator", ""); RNA_def_struct_sdna_from(srna, "bSceneActuator", "data"); prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); @@ -1445,7 +1445,7 @@ static void rna_def_random_actuator(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "RandomActuator", "Actuator"); - RNA_def_struct_ui_text(srna, "Random Actuator", "Actuator to..."); + RNA_def_struct_ui_text(srna, "Random Actuator", ""); RNA_def_struct_sdna_from(srna, "bRandomActuator", "data"); prop= RNA_def_property(srna, "seed", PROP_INT, PROP_NONE); @@ -1562,7 +1562,7 @@ static void rna_def_message_actuator(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "MessageActuator", "Actuator"); - RNA_def_struct_ui_text(srna, "Message Actuator", "Actuator to..."); + RNA_def_struct_ui_text(srna, "Message Actuator", ""); RNA_def_struct_sdna_from(srna, "bMessageActuator", "data"); prop= RNA_def_property(srna, "to_property", PROP_STRING, PROP_NONE); @@ -1877,7 +1877,7 @@ static void rna_def_armature_actuator(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "ArmatureActuator", "Actuator"); - RNA_def_struct_ui_text(srna, "Armature Actuator", "Actuator to..."); + RNA_def_struct_ui_text(srna, "Armature Actuator", ""); RNA_def_struct_sdna_from(srna, "bArmatureActuator", "data"); prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index 8af65b97ffc..63b3aed4a3b 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -58,6 +58,21 @@ BlenderDefRNA DefRNA = {NULL, {NULL, NULL}, {NULL, NULL}, NULL, 0, 0, 0, 1}; #define MAX2(x,y) ((x)>(y)? (x): (y)) #endif +/* pedantic check for '.', do this since its a hassle for translators */ +#ifndef NDEBUG +# define DESCR_CHECK(description, id1, id2) \ + if(description && (description)[0]) { \ + int i = strlen(description); \ + if((description)[i - 1] == '.') { \ + fprintf(stderr, "%s: '%s' '%s' description ends with a '.' !\n", \ + __func__, id1 ? id1 : "", id2 ? id2 : ""); \ + } \ + } \ + +#else +# define DESCR_CHECK(description, id1, id2) +#endif + void rna_addtail(ListBase *listbase, void *vlink) { Link *link= vlink; @@ -847,6 +862,8 @@ void RNA_def_struct_identifier(StructRNA *srna, const char *identifier) void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description) { + DESCR_CHECK(description, srna->identifier, NULL); + srna->name= name; srna->description= description; } @@ -1109,6 +1126,8 @@ void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int le void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description) { + DESCR_CHECK(description, prop->identifier, NULL); + prop->name= name; prop->description= description; } diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 320dc2ecdda..68cd95c1b99 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1962,7 +1962,7 @@ static void WM_OT_save_as_mainfile(wmOperatorType *ot) WM_operator_properties_filesel(ot, FOLDERFILE|BLENDERFILE, FILE_BLENDER, FILE_SAVE, WM_FILESEL_FILEPATH); RNA_def_boolean(ot->srna, "compress", 0, "Compress", "Write compressed .blend file"); RNA_def_boolean(ot->srna, "relative_remap", 1, "Remap Relative", "Remap relative paths when saving in a different directory"); - RNA_def_boolean(ot->srna, "copy", 0, "Save Copy", "Save a copy of the actual working state but does not make saved file active."); + RNA_def_boolean(ot->srna, "copy", 0, "Save Copy", "Save a copy of the actual working state but does not make saved file active"); } /* *************** save file directly ******** */ @@ -3279,12 +3279,12 @@ static void WM_OT_radial_control(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; /* all paths relative to the context */ - RNA_def_string(ot->srna, "data_path", "", 0, "Data Path", "Path of property to be set by the radial control."); - RNA_def_string(ot->srna, "rotation_path", "", 0, "Rotation Path", "Path of property used to rotate the texture display."); - RNA_def_string(ot->srna, "color_path", "", 0, "Color Path", "Path of property used to set the color of the control."); - RNA_def_string(ot->srna, "fill_color_path", "", 0, "Fill Color Path", "Path of property used to set the fill color of the control."); - RNA_def_string(ot->srna, "zoom_path", "", 0, "Zoom Path", "Path of property used to set the zoom level for the control."); - RNA_def_string(ot->srna, "image_id", "", 0, "Image ID", "Path of ID that is used to generate an image for the control."); + RNA_def_string(ot->srna, "data_path", "", 0, "Data Path", "Path of property to be set by the radial control"); + RNA_def_string(ot->srna, "rotation_path", "", 0, "Rotation Path", "Path of property used to rotate the texture display"); + RNA_def_string(ot->srna, "color_path", "", 0, "Color Path", "Path of property used to set the color of the control"); + RNA_def_string(ot->srna, "fill_color_path", "", 0, "Fill Color Path", "Path of property used to set the fill color of the control"); + RNA_def_string(ot->srna, "zoom_path", "", 0, "Zoom Path", "Path of property used to set the zoom level for the control"); + RNA_def_string(ot->srna, "image_id", "", 0, "Image ID", "Path of ID that is used to generate an image for the control"); } /* ************************** timer for testing ***************** */ |