lots of operator descriptions were incorrectly copy/pasted.

update some descriptions, others were removed and operators tagged as internal.

add a script to detect duplicate operator descriptions.
This commit is contained in:
2013-09-30 05:50:41 +00:00
parent 85cb0bc19d
commit b21b24573d
22 changed files with 51 additions and 44 deletions

View File

@@ -182,6 +182,7 @@ help:
@echo " * check_spelling_c_qtc - same as check_spelling_c but outputs QtCreator tasks format" @echo " * check_spelling_c_qtc - same as check_spelling_c but outputs QtCreator tasks format"
@echo " * check_spelling_osl - check for spelling errors (OSL only)" @echo " * check_spelling_osl - check for spelling errors (OSL only)"
@echo " * check_spelling_py - check for spelling errors (Python only)" @echo " * check_spelling_py - check for spelling errors (Python only)"
@echo " * check_descriptions - check for duplicate/invalid descriptions"
@echo "" @echo ""
@echo "Utilities (not associated with building blender)" @echo "Utilities (not associated with building blender)"
@echo " * icons - updates PNG icons from SVG files." @echo " * icons - updates PNG icons from SVG files."
@@ -313,6 +314,9 @@ check_spelling_c_qtc:
check_spelling_osl: check_spelling_osl:
cd $(BUILD_DIR) ; PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/spell_check_source.py $(BLENDER_DIR)/intern/cycles/kernel/shaders cd $(BUILD_DIR) ; PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/spell_check_source.py $(BLENDER_DIR)/intern/cycles/kernel/shaders
check_descriptions:
$(BUILD_DIR)/bin/blender --background -noaudio --factory-startup --python $(BLENDER_DIR)/source/tools/check_descriptions.py
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Utilities # Utilities
# #

View File

@@ -648,7 +648,8 @@ def BuildRNAInfo():
for prop in func.return_values: for prop in func.return_values:
prop.build() prop.build()
if 1: # there are too many invalid defaults, unless we intend to fix, leave this off
if 0:
for rna_info in InfoStructRNA.global_lookup.values(): for rna_info in InfoStructRNA.global_lookup.values():
for prop in rna_info.properties: for prop in rna_info.properties:
# ERROR CHECK # ERROR CHECK

View File

@@ -556,8 +556,6 @@ def lightmap_uvpack(meshes,
print("finished all %.2f " % (time.time() - t)) print("finished all %.2f " % (time.time() - t))
# Window.RedrawAll()
def unwrap(operator, context, **kwargs): def unwrap(operator, context, **kwargs):
@@ -590,7 +588,7 @@ from bpy.props import BoolProperty, FloatProperty, IntProperty
class LightMapPack(Operator): class LightMapPack(Operator):
"""Follow UVs from active quads along continuous face loops""" """Pack each faces UV's into the UV bounds"""
bl_idname = "uv.lightmap_pack" bl_idname = "uv.lightmap_pack"
bl_label = "Lightmap Pack" bl_label = "Lightmap Pack"

View File

@@ -498,7 +498,7 @@ class WM_OT_context_menu_enum(Operator):
class WM_OT_context_set_id(Operator): class WM_OT_context_set_id(Operator):
"""Toggle a context value""" """Set a context value to an ID data-block"""
bl_idname = "wm.context_set_id" bl_idname = "wm.context_set_id"
bl_label = "Set Library ID" bl_label = "Set Library ID"
bl_options = {'UNDO', 'INTERNAL'} bl_options = {'UNDO', 'INTERNAL'}
@@ -903,8 +903,9 @@ class WM_OT_doc_view(Operator):
return {'FINISHED'} return {'FINISHED'}
'''
class WM_OT_doc_edit(Operator): class WM_OT_doc_edit(Operator):
"""Load online reference docs""" """Edit online reference docs"""
bl_idname = "wm.doc_edit" bl_idname = "wm.doc_edit"
bl_label = "Edit Documentation" bl_label = "Edit Documentation"
@@ -972,6 +973,7 @@ class WM_OT_doc_edit(Operator):
def invoke(self, context, event): def invoke(self, context, event):
wm = context.window_manager wm = context.window_manager
return wm.invoke_props_dialog(self, width=600) return wm.invoke_props_dialog(self, width=600)
'''
rna_path = StringProperty( rna_path = StringProperty(
@@ -1893,7 +1895,7 @@ class WM_OT_addon_install(Operator):
class WM_OT_addon_remove(Operator): class WM_OT_addon_remove(Operator):
"Disable an addon" "Delete the addon from the filesystem"
bl_idname = "wm.addon_remove" bl_idname = "wm.addon_remove"
bl_label = "Remove Addon" bl_label = "Remove Addon"

View File

@@ -44,10 +44,7 @@
#define EDGE_MARK 1 #define EDGE_MARK 1
#define EDGE_VIS 2 #define EDGE_VIS 2
#define FACE_NEW 1
#define ELE_NEW 1 #define ELE_NEW 1
#define ELE_ORIG 4
void bmo_edgenet_fill_exec(BMesh *bm, BMOperator *op) void bmo_edgenet_fill_exec(BMesh *bm, BMOperator *op)
{ {

View File

@@ -981,7 +981,7 @@ void FONT_OT_move_select(wmOperatorType *ot)
{ {
/* identifiers */ /* identifiers */
ot->name = "Move Select"; ot->name = "Move Select";
ot->description = "Make selection from current cursor position to new cursor position type"; ot->description = "Move the cursor while selecting";
ot->idname = "FONT_OT_move_select"; ot->idname = "FONT_OT_move_select";
/* api callbacks */ /* api callbacks */

View File

@@ -1374,14 +1374,16 @@ static void VIEW2D_OT_smoothview(wmOperatorType *ot)
{ {
/* identifiers */ /* identifiers */
ot->name = "Smooth View 2D"; ot->name = "Smooth View 2D";
ot->description = "Zoom in the view to the nearest item contained in the border"; ot->description = "";
ot->idname = "VIEW2D_OT_smoothview"; ot->idname = "VIEW2D_OT_smoothview";
/* api callbacks */ /* api callbacks */
ot->invoke = view2d_smoothview_invoke; ot->invoke = view2d_smoothview_invoke;
ot->poll = view2d_poll; ot->poll = view2d_poll;
/* flags */
ot->flag = OPTYPE_INTERNAL;
/* rna */ /* rna */
WM_operator_properties_gesture_border(ot, FALSE); WM_operator_properties_gesture_border(ot, FALSE);
} }

View File

@@ -300,7 +300,7 @@ void MESH_OT_bisect(struct wmOperatorType *ot)
/* identifiers */ /* identifiers */
ot->name = "Bisect"; ot->name = "Bisect";
ot->description = "Enforce symmetry (both form and topological) across an axis"; ot->description = "Cuts geometry along a plane";
ot->idname = "MESH_OT_bisect"; ot->idname = "MESH_OT_bisect";
/* api callbacks */ /* api callbacks */

View File

@@ -3342,7 +3342,7 @@ void MESH_OT_dissolve_verts(wmOperatorType *ot)
{ {
/* identifiers */ /* identifiers */
ot->name = "Dissolve Vertices"; ot->name = "Dissolve Vertices";
ot->description = "Dissolve geometry"; ot->description = "Dissolve verts, merge edges and faces";
ot->idname = "MESH_OT_dissolve_verts"; ot->idname = "MESH_OT_dissolve_verts";
/* api callbacks */ /* api callbacks */
@@ -3379,7 +3379,7 @@ void MESH_OT_dissolve_edges(wmOperatorType *ot)
{ {
/* identifiers */ /* identifiers */
ot->name = "Dissolve Edges"; ot->name = "Dissolve Edges";
ot->description = "Dissolve geometry"; ot->description = "Dissolve edges, merging faces";
ot->idname = "MESH_OT_dissolve_edges"; ot->idname = "MESH_OT_dissolve_edges";
/* api callbacks */ /* api callbacks */
@@ -3418,7 +3418,7 @@ void MESH_OT_dissolve_faces(wmOperatorType *ot)
{ {
/* identifiers */ /* identifiers */
ot->name = "Dissolve Faces"; ot->name = "Dissolve Faces";
ot->description = "Dissolve geometry"; ot->description = "Dissolve faces";
ot->idname = "MESH_OT_dissolve_faces"; ot->idname = "MESH_OT_dissolve_faces";
/* api callbacks */ /* api callbacks */
@@ -4519,7 +4519,7 @@ void MESH_OT_wireframe(wmOperatorType *ot)
/* identifiers */ /* identifiers */
ot->name = "Wire Frame"; ot->name = "Wire Frame";
ot->idname = "MESH_OT_wireframe"; ot->idname = "MESH_OT_wireframe";
ot->description = "Inset new faces into selected faces"; ot->description = "Create a solid wire-frame from faces";
/* api callbacks */ /* api callbacks */
ot->exec = edbm_wireframe_exec; ot->exec = edbm_wireframe_exec;

View File

@@ -289,7 +289,7 @@ void GROUP_OT_objects_remove_all(wmOperatorType *ot)
{ {
/* identifiers */ /* identifiers */
ot->name = "Remove From All Groups"; ot->name = "Remove From All Groups";
ot->description = "Remove selected objects from all groups or a selected group"; ot->description = "Remove selected objects from all groups";
ot->idname = "GROUP_OT_objects_remove_all"; ot->idname = "GROUP_OT_objects_remove_all";
/* api callbacks */ /* api callbacks */
@@ -335,7 +335,7 @@ void GROUP_OT_objects_remove(wmOperatorType *ot)
/* identifiers */ /* identifiers */
ot->name = "Remove From Group"; ot->name = "Remove From Group";
ot->description = "Remove selected objects from all groups or a selected group"; ot->description = "Remove selected objects from a group";
ot->idname = "GROUP_OT_objects_remove"; ot->idname = "GROUP_OT_objects_remove";
/* api callbacks */ /* api callbacks */

View File

@@ -569,7 +569,7 @@ void OBJECT_OT_hook_add_selob(wmOperatorType *ot)
{ {
/* identifiers */ /* identifiers */
ot->name = "Hook to Selected Object"; ot->name = "Hook to Selected Object";
ot->description = "Hook selected vertices to the first selected Object"; ot->description = "Hook selected vertices to the first selected object";
ot->idname = "OBJECT_OT_hook_add_selob"; ot->idname = "OBJECT_OT_hook_add_selob";
/* api callbacks */ /* api callbacks */
@@ -603,7 +603,7 @@ void OBJECT_OT_hook_add_newob(wmOperatorType *ot)
{ {
/* identifiers */ /* identifiers */
ot->name = "Hook to New Object"; ot->name = "Hook to New Object";
ot->description = "Hook selected vertices to the first selected Object"; ot->description = "Hook selected vertices to a newly created object";
ot->idname = "OBJECT_OT_hook_add_newob"; ot->idname = "OBJECT_OT_hook_add_newob";
/* api callbacks */ /* api callbacks */

View File

@@ -441,7 +441,7 @@ static int paint_select_linked_pick_invoke(bContext *C, wmOperator *op, const wm
void PAINT_OT_face_select_linked_pick(wmOperatorType *ot) void PAINT_OT_face_select_linked_pick(wmOperatorType *ot)
{ {
ot->name = "Select Linked Pick"; ot->name = "Select Linked Pick";
ot->description = "Select linked faces"; ot->description = "Select linked faces under the cursor";
ot->idname = "PAINT_OT_face_select_linked_pick"; ot->idname = "PAINT_OT_face_select_linked_pick";
ot->invoke = paint_select_linked_pick_invoke; ot->invoke = paint_select_linked_pick_invoke;

View File

@@ -3480,7 +3480,7 @@ void PAINT_OT_weight_gradient(wmOperatorType *ot)
/* identifiers */ /* identifiers */
ot->name = "Weight Gradient"; ot->name = "Weight Gradient";
ot->idname = "PAINT_OT_weight_gradient"; ot->idname = "PAINT_OT_weight_gradient";
ot->description = "Sample a line and show it in Scope panels"; ot->description = "Draw a line to apply a weight gradient to selected vertices";
/* api callbacks */ /* api callbacks */
ot->invoke = paint_weight_gradient_invoke; ot->invoke = paint_weight_gradient_invoke;

View File

@@ -373,7 +373,7 @@ void NODE_OT_backimage_fit(wmOperatorType *ot)
/* identifiers */ /* identifiers */
ot->name = "Background Image Fit"; ot->name = "Background Image Fit";
ot->idname = "NODE_OT_backimage_fit"; ot->idname = "NODE_OT_backimage_fit";
ot->description = "Zoom in/out the background image"; ot->description = "Fit the background image to the view";
/* api callbacks */ /* api callbacks */
ot->exec = backimage_fit_exec; ot->exec = backimage_fit_exec;

View File

@@ -2960,7 +2960,7 @@ void SEQUENCER_OT_view_ghost_border(wmOperatorType *ot)
/* identifiers */ /* identifiers */
ot->name = "Border Offset View"; ot->name = "Border Offset View";
ot->idname = "SEQUENCER_OT_view_ghost_border"; ot->idname = "SEQUENCER_OT_view_ghost_border";
ot->description = "Enable border select mode"; ot->description = "Set the boundaries of the border used for offset-view";
/* api callbacks */ /* api callbacks */
ot->invoke = WM_border_select_invoke; ot->invoke = WM_border_select_invoke;

View File

@@ -99,7 +99,7 @@ void SEQUENCER_OT_strip_modifier_add(wmOperatorType *ot)
/* identifiers */ /* identifiers */
ot->name = "Add Strip Modifier"; ot->name = "Add Strip Modifier";
ot->idname = "SEQUENCER_OT_strip_modifier_add"; ot->idname = "SEQUENCER_OT_strip_modifier_add";
ot->description = "Add a modifier to strip"; ot->description = "Add a modifier to the strip";
/* api callbacks */ /* api callbacks */
ot->exec = strip_modifier_add_exec; ot->exec = strip_modifier_add_exec;
@@ -142,7 +142,7 @@ void SEQUENCER_OT_strip_modifier_remove(wmOperatorType *ot)
/* identifiers */ /* identifiers */
ot->name = "Remove Strip Modifier"; ot->name = "Remove Strip Modifier";
ot->idname = "SEQUENCER_OT_strip_modifier_remove"; ot->idname = "SEQUENCER_OT_strip_modifier_remove";
ot->description = "Add a modifier to strip"; ot->description = "Remove a modifier from the strip";
/* api callbacks */ /* api callbacks */
ot->exec = strip_modifier_remove_exec; ot->exec = strip_modifier_remove_exec;

View File

@@ -892,7 +892,7 @@ void SEQUENCER_OT_select_border(wmOperatorType *ot)
/* identifiers */ /* identifiers */
ot->name = "Border Select"; ot->name = "Border Select";
ot->idname = "SEQUENCER_OT_select_border"; ot->idname = "SEQUENCER_OT_select_border";
ot->description = "Enable border select mode"; ot->description = "Select strips using border selection";
/* api callbacks */ /* api callbacks */
ot->invoke = WM_border_select_invoke; ot->invoke = WM_border_select_invoke;

View File

@@ -1943,7 +1943,7 @@ void TEXT_OT_move_select(wmOperatorType *ot)
/* identifiers */ /* identifiers */
ot->name = "Move Select"; ot->name = "Move Select";
ot->idname = "TEXT_OT_move_select"; ot->idname = "TEXT_OT_move_select";
ot->description = "Make selection from current cursor position to new cursor position type"; ot->description = "Move the cursor while selecting";
/* api callbacks */ /* api callbacks */
ot->exec = text_move_select_exec; ot->exec = text_move_select_exec;
@@ -2291,7 +2291,7 @@ void TEXT_OT_scroll(wmOperatorType *ot)
* scroll_bar. Both do basically the same thing (aside * scroll_bar. Both do basically the same thing (aside
* from keymaps).*/ * from keymaps).*/
ot->idname = "TEXT_OT_scroll"; ot->idname = "TEXT_OT_scroll";
ot->description = "Scroll text screen"; ot->description = "";
/* api callbacks */ /* api callbacks */
ot->exec = text_scroll_exec; ot->exec = text_scroll_exec;
@@ -2301,7 +2301,7 @@ void TEXT_OT_scroll(wmOperatorType *ot)
ot->poll = text_scroll_poll; ot->poll = text_scroll_poll;
/* flags */ /* flags */
ot->flag = OPTYPE_BLOCKING | OPTYPE_GRAB_POINTER; ot->flag = OPTYPE_BLOCKING | OPTYPE_GRAB_POINTER | OPTYPE_INTERNAL;
/* properties */ /* properties */
RNA_def_int(ot->srna, "lines", 1, INT_MIN, INT_MAX, "Lines", "Number of lines to scroll", -100, 100); RNA_def_int(ot->srna, "lines", 1, INT_MIN, INT_MAX, "Lines", "Number of lines to scroll", -100, 100);
@@ -2385,7 +2385,7 @@ void TEXT_OT_scroll_bar(wmOperatorType *ot)
* scroll. Both do basically the same thing (aside * scroll. Both do basically the same thing (aside
* from keymaps).*/ * from keymaps).*/
ot->idname = "TEXT_OT_scroll_bar"; ot->idname = "TEXT_OT_scroll_bar";
ot->description = "Scroll text screen"; ot->description = "";
/* api callbacks */ /* api callbacks */
ot->invoke = text_scroll_bar_invoke; ot->invoke = text_scroll_bar_invoke;
@@ -2394,7 +2394,7 @@ void TEXT_OT_scroll_bar(wmOperatorType *ot)
ot->poll = text_region_scroll_poll; ot->poll = text_region_scroll_poll;
/* flags */ /* flags */
ot->flag = OPTYPE_BLOCKING; ot->flag = OPTYPE_BLOCKING | OPTYPE_INTERNAL;
/* properties */ /* properties */
RNA_def_int(ot->srna, "lines", 1, INT_MIN, INT_MAX, "Lines", "Number of lines to scroll", -100, 100); RNA_def_int(ot->srna, "lines", 1, INT_MIN, INT_MAX, "Lines", "Number of lines to scroll", -100, 100);

View File

@@ -1257,7 +1257,7 @@ void VIEW3D_OT_ndof_orbit(struct wmOperatorType *ot)
{ {
/* identifiers */ /* identifiers */
ot->name = "NDOF Orbit View"; ot->name = "NDOF Orbit View";
ot->description = "Explore every angle of an object using the 3D mouse"; ot->description = "Orbit the view using the 3D mouse";
ot->idname = "VIEW3D_OT_ndof_orbit"; ot->idname = "VIEW3D_OT_ndof_orbit";
/* api callbacks */ /* api callbacks */
@@ -1355,7 +1355,7 @@ void VIEW3D_OT_ndof_orbit_zoom(struct wmOperatorType *ot)
{ {
/* identifiers */ /* identifiers */
ot->name = "NDOF Orbit View with Zoom"; ot->name = "NDOF Orbit View with Zoom";
ot->description = "Explore every angle of an object using the 3D mouse"; ot->description = "Orbit and zoom the view using the 3D mouse";
ot->idname = "VIEW3D_OT_ndof_orbit_zoom"; ot->idname = "VIEW3D_OT_ndof_orbit_zoom";
/* api callbacks */ /* api callbacks */
@@ -1452,7 +1452,7 @@ void VIEW3D_OT_ndof_pan(struct wmOperatorType *ot)
{ {
/* identifiers */ /* identifiers */
ot->name = "NDOF Pan View"; ot->name = "NDOF Pan View";
ot->description = "Position your viewpoint with the 3D mouse"; ot->description = "Pan the view with the 3D mouse";
ot->idname = "VIEW3D_OT_ndof_pan"; ot->idname = "VIEW3D_OT_ndof_pan";
/* api callbacks */ /* api callbacks */
@@ -1543,7 +1543,7 @@ void VIEW3D_OT_ndof_all(struct wmOperatorType *ot)
{ {
/* identifiers */ /* identifiers */
ot->name = "NDOF Move View"; ot->name = "NDOF Move View";
ot->description = "Position your viewpoint with the 3D mouse"; ot->description = "Pan and rotate the view with the 3D mouse";
ot->idname = "VIEW3D_OT_ndof_all"; ot->idname = "VIEW3D_OT_ndof_all";
/* api callbacks */ /* api callbacks */

View File

@@ -378,12 +378,15 @@ void VIEW3D_OT_smoothview(wmOperatorType *ot)
/* identifiers */ /* identifiers */
ot->name = "Smooth View"; ot->name = "Smooth View";
ot->description = "";
ot->idname = "VIEW3D_OT_smoothview"; ot->idname = "VIEW3D_OT_smoothview";
ot->description = "The time to animate the change of view (in milliseconds)";
/* api callbacks */ /* api callbacks */
ot->invoke = view3d_smoothview_invoke; ot->invoke = view3d_smoothview_invoke;
/* flags */
ot->flag = OPTYPE_INTERNAL;
ot->poll = ED_operator_view3d_active; ot->poll = ED_operator_view3d_active;
} }

View File

@@ -354,15 +354,15 @@ static void rna_def_gpencil_strokes_api(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_srna(cprop, "GPencilStrokes"); RNA_def_property_srna(cprop, "GPencilStrokes");
srna = RNA_def_struct(brna, "GPencilStrokes", NULL); srna = RNA_def_struct(brna, "GPencilStrokes", NULL);
RNA_def_struct_sdna(srna, "bGPDframe"); RNA_def_struct_sdna(srna, "bGPDframe");
RNA_def_struct_ui_text(srna, "Grease Pencil Frames", "Collection of grease pencil frames"); RNA_def_struct_ui_text(srna, "Grease Pencil Frames", "Collection of grease pencil stroke");
func = RNA_def_function(srna, "new", "rna_GPencil_stroke_new"); func = RNA_def_function(srna, "new", "rna_GPencil_stroke_new");
RNA_def_function_ui_description(func, "Add a new grease pencil frame"); RNA_def_function_ui_description(func, "Add a new grease pencil stroke");
parm = RNA_def_pointer(func, "stroke", "GPencilStroke", "", "The newly created stroke"); parm = RNA_def_pointer(func, "stroke", "GPencilStroke", "", "The newly created stroke");
RNA_def_function_return(func, parm); RNA_def_function_return(func, parm);
func = RNA_def_function(srna, "remove", "rna_GPencil_stroke_remove"); func = RNA_def_function(srna, "remove", "rna_GPencil_stroke_remove");
RNA_def_function_ui_description(func, "Remove a grease pencil frame"); RNA_def_function_ui_description(func, "Remove a grease pencil stroke");
RNA_def_function_flag(func, FUNC_USE_REPORTS); RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm = RNA_def_pointer(func, "stroke", "GPencilStroke", "Stroke", "The stroke to remove"); parm = RNA_def_pointer(func, "stroke", "GPencilStroke", "Stroke", "The stroke to remove");
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR); RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR);

View File

@@ -2072,8 +2072,8 @@ static void rna_def_statvis(BlenderRNA *brna)
{SCE_STATVIS_OVERHANG, "OVERHANG", 0, "Overhang", ""}, {SCE_STATVIS_OVERHANG, "OVERHANG", 0, "Overhang", ""},
{SCE_STATVIS_THICKNESS, "THICKNESS", 0, "Thickness", ""}, {SCE_STATVIS_THICKNESS, "THICKNESS", 0, "Thickness", ""},
{SCE_STATVIS_INTERSECT, "INTERSECT", 0, "Intersect", ""}, {SCE_STATVIS_INTERSECT, "INTERSECT", 0, "Intersect", ""},
{SCE_STATVIS_DISTORT, "DISTORT", 0, "Distort", ""}, {SCE_STATVIS_DISTORT, "DISTORT", 0, "Distortion", ""},
{SCE_STATVIS_SHARP, "SHARP", 0, "Sharp", ""}, {SCE_STATVIS_SHARP, "SHARP", 0, "Sharp", ""},
{0, NULL, 0, NULL, NULL}}; {0, NULL, 0, NULL, NULL}};
srna = RNA_def_struct(brna, "MeshStatVis", NULL); srna = RNA_def_struct(brna, "MeshStatVis", NULL);