check that descriptions dont end with a '.', for non release builds.
this is annoying for translators so rather then correct along the way which gives merge conflicts for branches - print a complaint message.
This commit is contained in:
@@ -25,7 +25,7 @@ from bpy.props import EnumProperty
|
||||
|
||||
|
||||
class MeshSelectInteriorFaces(Operator):
|
||||
'''Select faces where all edges have more then 2 face users.'''
|
||||
'''Select faces where all edges have more then 2 face users'''
|
||||
|
||||
bl_idname = "mesh.faces_select_interior"
|
||||
bl_label = "Select Interior Faces"
|
||||
|
@@ -25,7 +25,7 @@ from bpy.props import IntProperty
|
||||
|
||||
|
||||
class SequencerCrossfadeSounds(Operator):
|
||||
'''Do crossfading volume animation of two selected sound strips.'''
|
||||
'''Do crossfading volume animation of two selected sound strips'''
|
||||
|
||||
bl_idname = "sequencer.crossfade_sounds"
|
||||
bl_label = "Crossfade sounds"
|
||||
@@ -76,7 +76,7 @@ class SequencerCrossfadeSounds(Operator):
|
||||
|
||||
|
||||
class SequencerCutMulticam(Operator):
|
||||
'''Cut multicam strip and select camera.'''
|
||||
'''Cut multicam strip and select camera'''
|
||||
|
||||
bl_idname = "sequencer.cut_multicam"
|
||||
bl_label = "Cut multicam"
|
||||
|
@@ -1105,7 +1105,8 @@ from bpy.props import FloatProperty
|
||||
|
||||
|
||||
class SmartProject(Operator):
|
||||
'''This script projection unwraps the selected faces of a mesh. it operates on all selected mesh objects, and can be used unwrap selected faces, or all faces.'''
|
||||
'''This script projection unwraps the selected faces of a mesh. ''' \
|
||||
'''it operates on all selected mesh objects, and can be used unwrap selected faces, or all faces'''
|
||||
bl_idname = "uv.smart_project"
|
||||
bl_label = "Smart UV Project"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
@@ -172,7 +172,7 @@ class BRUSH_OT_active_index_set(Operator):
|
||||
|
||||
|
||||
class WM_OT_context_set_boolean(Operator):
|
||||
'''Set a context value.'''
|
||||
'''Set a context value'''
|
||||
bl_idname = "wm.context_set_boolean"
|
||||
bl_label = "Context Set Boolean"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
@@ -188,7 +188,7 @@ class WM_OT_context_set_boolean(Operator):
|
||||
|
||||
|
||||
class WM_OT_context_set_int(Operator): # same as enum
|
||||
'''Set a context value.'''
|
||||
'''Set a context value'''
|
||||
bl_idname = "wm.context_set_int"
|
||||
bl_label = "Context Set"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
@@ -205,7 +205,7 @@ class WM_OT_context_set_int(Operator): # same as enum
|
||||
|
||||
|
||||
class WM_OT_context_scale_int(Operator):
|
||||
'''Scale an int context value.'''
|
||||
'''Scale an int context value'''
|
||||
bl_idname = "wm.context_scale_int"
|
||||
bl_label = "Context Set"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
@@ -248,7 +248,7 @@ class WM_OT_context_scale_int(Operator):
|
||||
|
||||
|
||||
class WM_OT_context_set_float(Operator): # same as enum
|
||||
'''Set a context value.'''
|
||||
'''Set a context value'''
|
||||
bl_idname = "wm.context_set_float"
|
||||
bl_label = "Context Set Float"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
@@ -265,7 +265,7 @@ class WM_OT_context_set_float(Operator): # same as enum
|
||||
|
||||
|
||||
class WM_OT_context_set_string(Operator): # same as enum
|
||||
'''Set a context value.'''
|
||||
'''Set a context value'''
|
||||
bl_idname = "wm.context_set_string"
|
||||
bl_label = "Context Set String"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
@@ -281,7 +281,7 @@ class WM_OT_context_set_string(Operator): # same as enum
|
||||
|
||||
|
||||
class WM_OT_context_set_enum(Operator):
|
||||
'''Set a context value.'''
|
||||
'''Set a context value'''
|
||||
bl_idname = "wm.context_set_enum"
|
||||
bl_label = "Context Set Enum"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
@@ -297,7 +297,7 @@ class WM_OT_context_set_enum(Operator):
|
||||
|
||||
|
||||
class WM_OT_context_set_value(Operator):
|
||||
'''Set a context value.'''
|
||||
'''Set a context value'''
|
||||
bl_idname = "wm.context_set_value"
|
||||
bl_label = "Context Set Value"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
@@ -318,7 +318,7 @@ class WM_OT_context_set_value(Operator):
|
||||
|
||||
|
||||
class WM_OT_context_toggle(Operator):
|
||||
'''Toggle a context value.'''
|
||||
'''Toggle a context value'''
|
||||
bl_idname = "wm.context_toggle"
|
||||
bl_label = "Context Toggle"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
@@ -337,7 +337,7 @@ class WM_OT_context_toggle(Operator):
|
||||
|
||||
|
||||
class WM_OT_context_toggle_enum(Operator):
|
||||
'''Toggle a context value.'''
|
||||
'''Toggle a context value'''
|
||||
bl_idname = "wm.context_toggle_enum"
|
||||
bl_label = "Context Toggle Values"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
@@ -371,7 +371,7 @@ class WM_OT_context_toggle_enum(Operator):
|
||||
|
||||
class WM_OT_context_cycle_int(Operator):
|
||||
'''Set a context value. Useful for cycling active material, '''
|
||||
'''vertex keys, groups' etc.'''
|
||||
'''vertex keys, groups' etc'''
|
||||
bl_idname = "wm.context_cycle_int"
|
||||
bl_label = "Context Int Cycle"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
@@ -405,7 +405,7 @@ class WM_OT_context_cycle_int(Operator):
|
||||
|
||||
|
||||
class WM_OT_context_cycle_enum(Operator):
|
||||
'''Toggle a context value.'''
|
||||
'''Toggle a context value'''
|
||||
bl_idname = "wm.context_cycle_enum"
|
||||
bl_label = "Context Enum Cycle"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
@@ -458,7 +458,7 @@ class WM_OT_context_cycle_enum(Operator):
|
||||
|
||||
class WM_OT_context_cycle_array(Operator):
|
||||
'''Set a context array value.
|
||||
Useful for cycling the active mesh edit mode.'''
|
||||
Useful for cycling the active mesh edit mode'''
|
||||
bl_idname = "wm.context_cycle_array"
|
||||
bl_label = "Context Array Cycle"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
@@ -518,7 +518,7 @@ class WM_OT_context_menu_enum(Operator):
|
||||
|
||||
|
||||
class WM_OT_context_set_id(Operator):
|
||||
'''Toggle a context value.'''
|
||||
'''Toggle a context value'''
|
||||
bl_idname = "wm.context_set_id"
|
||||
bl_label = "Set Library ID"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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 ***************** */
|
||||
|
Reference in New Issue
Block a user