*******
results of a review of my previous commits by brecht
This commit is contained in:
Michael Fox
2009-03-24 12:16:58 +00:00
parent a85ee03a13
commit 6da5e62ee8
5 changed files with 71 additions and 74 deletions

View File

@@ -242,7 +242,7 @@ void GROUP_OT_group_create(wmOperatorType *ot)
/* identifiers */
ot->name= "Create New Group";
ot->description = "Add an object group to the scene.";
ot->description = "Create an object group.";
ot->idname= "GROUP_OT_group_create";
/* api callbacks */

View File

@@ -319,7 +319,7 @@ void OBJECT_OT_object_add(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Add Object";
ot->description = "Add an Object to the scene.";
ot->description = "Add an object to the scene.";
ot->idname= "OBJECT_OT_object_add";
/* api callbacks */
@@ -406,7 +406,7 @@ void OBJECT_OT_mesh_add(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Add Mesh";
ot->description = "Add a Mesh object to the scene.";
ot->description = "Add a mesh object to the scene.";
ot->idname= "OBJECT_OT_mesh_add";
/* api callbacks */
@@ -478,7 +478,7 @@ void OBJECT_OT_curve_add(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Add Curve";
ot->description = "Add a Curve object to the scene.";
ot->description = "Add a curve object to the scene.";
ot->idname= "OBJECT_OT_curve_add";
/* api callbacks */
@@ -536,7 +536,7 @@ void OBJECT_OT_surface_add(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Add Surface";
ot->description = "Add a Surface object to the scene.";
ot->description = "Add a surface object to the scene.";
ot->idname= "OBJECT_OT_surface_add";
/* api callbacks */
@@ -573,7 +573,7 @@ void OBJECT_OT_text_add(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Add Text";
ot->description = "Add a Text object to the scene";
ot->description = "Add a text object to the scene";
ot->idname= "OBJECT_OT_text_add";
/* api callbacks */
@@ -618,7 +618,7 @@ void OBJECT_OT_armature_add(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Add Armature";
ot->description = "Add an Armature object to the scene.";
ot->description = "Add an armature object to the scene.";
ot->idname= "OBJECT_OT_armature_add";
/* api callbacks */
@@ -656,7 +656,7 @@ void OBJECT_OT_primitive_add(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Add Primitive";
ot->description = "Add a Primitive object.";
ot->description = "Add a primitive object.";
ot->idname= "OBJECT_OT_primitive_add";
/* api callbacks */
@@ -1458,7 +1458,7 @@ void OBJECT_OT_track_clear(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Clear track";
ot->description = "Clear tracking from object.";
ot->description = "Clear tracking constraint or flag from object.";
ot->idname= "OBJECT_OT_track_clear";
/* api callbacks */
@@ -1477,7 +1477,7 @@ void OBJECT_OT_track_clear(wmOperatorType *ot)
/* ***************************** */
/* ****** Select by Type ****** */
static int object_selection_by_type_exec(bContext *C, wmOperator *op)
static int object_select_by_type_exec(bContext *C, wmOperator *op)
{
short obtype;
@@ -1495,16 +1495,16 @@ static int object_selection_by_type_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
void OBJECT_OT_selection_by_type(wmOperatorType *ot)
void OBJECT_OT_select_by_type(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Select By Type";
ot->description = "Select all visible objects that are of a type.";
ot->idname= "OBJECT_OT_selection_by_type";
ot->idname= "OBJECT_OT_select_by_type";
/* api callbacks */
ot->invoke= WM_menu_invoke;
ot->exec= object_selection_by_type_exec;
ot->exec= object_select_by_type_exec;
ot->poll= ED_operator_scene_editable;
/* flags */
@@ -1525,7 +1525,7 @@ static EnumPropertyItem prop_select_linked_types[] = {
{0, NULL, NULL, NULL}
};
static int object_selection_linked_exec(bContext *C, wmOperator *op)
static int object_select_linked_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
Object *ob;
@@ -1648,16 +1648,16 @@ static int object_selection_linked_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
void OBJECT_OT_selection_linked(wmOperatorType *ot)
void OBJECT_OT_select_linked(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Select Linked";
ot->description = "Select all visible objects that are linked.";
ot->idname= "OBJECT_OT_selection_linked";
ot->idname= "OBJECT_OT_select_linked";
/* api callbacks */
ot->invoke= WM_menu_invoke;
ot->exec= object_selection_linked_exec;
ot->exec= object_select_linked_exec;
ot->poll= ED_operator_scene_editable;
/* flags */
@@ -1668,7 +1668,7 @@ void OBJECT_OT_selection_linked(wmOperatorType *ot)
}
/* ****** selection by layer *******/
static int object_selection_by_layer_exec(bContext *C, wmOperator *op)
static int object_select_by_layer_exec(bContext *C, wmOperator *op)
{
unsigned int layernum;
@@ -1686,16 +1686,16 @@ static int object_selection_by_layer_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
void OBJECT_OT_selection_by_layer(wmOperatorType *ot)
void OBJECT_OT_select_by_layer(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Selection by layer";
ot->name= "select by layer";
ot->description = "Select all visible objects on a layer.";
ot->idname= "OBJECT_OT_selection_by_layer";
ot->idname= "OBJECT_OT_select_by_layer";
/* api callbacks */
/*ot->invoke = XXX - need a int grid popup*/
ot->exec= object_selection_by_layer_exec;
ot->exec= object_select_by_layer_exec;
ot->poll= ED_operator_scene_editable;
/* flags */
@@ -1705,7 +1705,7 @@ void OBJECT_OT_selection_by_layer(wmOperatorType *ot)
}
/* ****** invert selection *******/
static int object_selection_invert_exec(bContext *C, wmOperator *op)
static int object_select_invert_exec(bContext *C, wmOperator *op)
{
CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
if (base->flag & SELECT)
@@ -1721,16 +1721,16 @@ static int object_selection_invert_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
void OBJECT_OT_selection_invert(wmOperatorType *ot)
void OBJECT_OT_select_invert(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Invert selection";
ot->description = "Invert th selection of all visible objects.";
ot->idname= "OBJECT_OT_selection_invert";
ot->description = "Invert th select of all visible objects.";
ot->idname= "OBJECT_OT_select_invert";
/* api callbacks */
ot->exec= object_selection_invert_exec;
ot->exec= object_select_invert_exec;
ot->poll= ED_operator_scene_editable;
/* flags */
@@ -1739,7 +1739,7 @@ void OBJECT_OT_selection_invert(wmOperatorType *ot)
}
/* ****** (de)select All *******/
static int object_selection_de_select_all_exec(bContext *C, wmOperator *op)
static int object_select_de_select_all_exec(bContext *C, wmOperator *op)
{
int a=0, ok=0;
@@ -1767,16 +1767,16 @@ static int object_selection_de_select_all_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
void OBJECT_OT_selection_de_select_all(wmOperatorType *ot)
void OBJECT_OT_select_de_select_all(wmOperatorType *ot)
{
/* identifiers */
ot->name= "deselect all";
ot->description = "(de)select all visible objects in scene.";
ot->idname= "OBJECT_OT_selection_de_select_all";
ot->idname= "OBJECT_OT_select_de_select_all";
/* api callbacks */
ot->exec= object_selection_de_select_all_exec;
ot->exec= object_select_de_select_all_exec;
ot->poll= ED_operator_scene_editable;
/* flags */
@@ -1785,7 +1785,7 @@ void OBJECT_OT_selection_de_select_all(wmOperatorType *ot)
}
/* ****** random selection *******/
static int object_selection_random_exec(bContext *C, wmOperator *op)
static int object_select_random_exec(bContext *C, wmOperator *op)
{
float percent;
@@ -1803,16 +1803,16 @@ static int object_selection_random_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
void OBJECT_OT_selection_random(wmOperatorType *ot)
void OBJECT_OT_select_random(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Random selection";
ot->description = "Set selection on random visible objects.";
ot->idname= "OBJECT_OT_selection_random";
ot->name= "Random select";
ot->description = "Set select on random visible objects.";
ot->idname= "OBJECT_OT_select_random";
/* api callbacks */
/*ot->invoke= object_select_random_invoke XXX - need a number popup ;*/
ot->exec = object_selection_random_exec;
ot->exec = object_select_random_exec;
ot->poll= ED_operator_scene_editable;
/* flags */
@@ -2035,7 +2035,7 @@ void OBJECT_OT_restrictview_clear(wmOperatorType *ot)
/* identifiers */
ot->name= "Clear restrict view";
ot->description = "Clear the object's restrict view flag (reveal the object from hidding).";
ot->description = "Reveal the object by setting the restrictview flag.";
ot->idname= "OBJECT_OT_restrictview_clear";
/* api callbacks */
@@ -2093,7 +2093,7 @@ void OBJECT_OT_restrictview_set(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set restrict view";
ot->description = "Set the object's restrict view flag (hide the object).";
ot->description = "Hide the object by setting the restrictview flag.";
ot->idname= "OBJECT_OT_restrictview_set";
/* api callbacks */
@@ -2691,7 +2691,7 @@ void OBJECT_OT_track_set(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Make Track";
ot->description = "Nake the object track another object, either by constraint or old way.";
ot->description = "Make the object track another object, either by constraint or old way or locked track.";
ot->idname= "OBJECT_OT_track_set";
/* api callbacks */
@@ -3124,7 +3124,7 @@ void OBJECT_OT_center_set(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set Center";
ot->description = "Set the object's center";
ot->description = "Set the object's center, by either moving the data, or set to center of data, or use 3d cursor";
ot->idname= "OBJECT_OT_center_set";
/* api callbacks */

View File

@@ -36,10 +36,7 @@ struct Object;
struct Mesh;
/* internal exports only */
#define CLEAR_OBJ_ROTATION 0
#define CLEAR_OBJ_LOCATION 1
#define CLEAR_OBJ_SCALE 2
#define CLEAR_OBJ_ORIGIN 3
/* object_edit.c */
void OBJECT_OT_editmode_toggle(struct wmOperatorType *ot);
@@ -47,12 +44,12 @@ void OBJECT_OT_parent_set(struct wmOperatorType *ot);
void OBJECT_OT_parent_clear(struct wmOperatorType *ot);
void OBJECT_OT_track_set(struct wmOperatorType *ot);
void OBJECT_OT_track_clear(struct wmOperatorType *ot);
void OBJECT_OT_selection_de_select_all(struct wmOperatorType *ot);
void OBJECT_OT_selection_invert(struct wmOperatorType *ot);
void OBJECT_OT_selection_random(struct wmOperatorType *ot);
void OBJECT_OT_selection_by_type(struct wmOperatorType *ot);
void OBJECT_OT_selection_by_layer(struct wmOperatorType *ot);
void OBJECT_OT_selection_linked(struct wmOperatorType *ot);
void OBJECT_OT_select_de_select_all(struct wmOperatorType *ot);
void OBJECT_OT_select_invert(struct wmOperatorType *ot);
void OBJECT_OT_select_random(struct wmOperatorType *ot);
void OBJECT_OT_select_by_type(struct wmOperatorType *ot);
void OBJECT_OT_select_by_layer(struct wmOperatorType *ot);
void OBJECT_OT_select_linked(struct wmOperatorType *ot);
void OBJECT_OT_location_clear(struct wmOperatorType *ot);
void OBJECT_OT_rotation_clear(struct wmOperatorType *ot);
void OBJECT_OT_scale_clear(struct wmOperatorType *ot);

View File

@@ -68,12 +68,12 @@ void ED_operatortypes_object(void)
WM_operatortype_append(OBJECT_OT_parent_clear);
WM_operatortype_append(OBJECT_OT_track_set);
WM_operatortype_append(OBJECT_OT_track_clear);
WM_operatortype_append(OBJECT_OT_selection_invert);
WM_operatortype_append(OBJECT_OT_selection_random);
WM_operatortype_append(OBJECT_OT_selection_de_select_all);
WM_operatortype_append(OBJECT_OT_selection_by_type);
WM_operatortype_append(OBJECT_OT_selection_by_layer);
WM_operatortype_append(OBJECT_OT_selection_linked);
WM_operatortype_append(OBJECT_OT_select_invert);
WM_operatortype_append(OBJECT_OT_select_random);
WM_operatortype_append(OBJECT_OT_select_de_select_all);
WM_operatortype_append(OBJECT_OT_select_by_type);
WM_operatortype_append(OBJECT_OT_select_by_layer);
WM_operatortype_append(OBJECT_OT_select_linked);
WM_operatortype_append(OBJECT_OT_location_clear);
WM_operatortype_append(OBJECT_OT_rotation_clear);
WM_operatortype_append(OBJECT_OT_scale_clear);
@@ -111,12 +111,12 @@ void ED_keymap_object(wmWindowManager *wm)
/* Note: this keymap gets disabled in non-objectmode, */
keymap= WM_keymap_listbase(wm, "Object Mode", 0, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_selection_de_select_all", AKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_selection_invert", IKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_selection_random", PADASTERKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_selection_by_type", PADASTERKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_selection_by_layer", PADASTERKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_selection_linked", LKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_select_de_select_all", AKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_select_invert", IKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_select_random", PADASTERKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_select_by_type", PADASTERKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_select_by_layer", PADASTERKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_select_linked", LKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_verify_item(keymap, "OBJECT_OT_parent_set", PKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_verify_item(keymap, "OBJECT_OT_parent_clear", PKEY, KM_PRESS, KM_ALT, 0);

View File

@@ -549,7 +549,7 @@ void VIEW3D_OT_viewrotate(wmOperatorType *ot)
/* identifiers */
ot->name= "Rotate view";
ot->description = "Rotate the current view.";
ot->description = "Rotate the view.";
ot->idname= "VIEW3D_OT_viewrotate";
/* api callbacks */
@@ -632,7 +632,7 @@ void VIEW3D_OT_viewmove(wmOperatorType *ot)
/* identifiers */
ot->name= "Move view";
ot->description = "Move the current view.";
ot->description = "Move the view.";
ot->idname= "VIEW3D_OT_viewmove";
/* api callbacks */
@@ -830,7 +830,7 @@ void VIEW3D_OT_viewzoom(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Zoom view";
ot->description = "Zoom in/out in the current view.";
ot->description = "Zoom in/out in the view.";
ot->idname= "VIEW3D_OT_viewzoom";
/* api callbacks */
@@ -1052,7 +1052,7 @@ void VIEW3D_OT_viewcenter(wmOperatorType *ot)
/* identifiers */
ot->name= "View center";
ot->description = "Move the view to the world center.";
ot->description = "Move the view to the selection center.";
ot->idname= "VIEW3D_OT_viewcenter";
/* api callbacks */
@@ -1123,7 +1123,7 @@ void VIEW3D_OT_render_border(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set Render Border";
ot->description = "Set the boundries of the border render.";
ot->description = "Set the boundries of the border render and enables border render .";
ot->idname= "VIEW3D_OT_render_border";
/* api callbacks */
@@ -1297,7 +1297,7 @@ void VIEW3D_OT_border_zoom(wmOperatorType *ot)
/* identifiers */
ot->name= "Border Zoom";
ot->description = "Zoom in the current view to the nearest object contained in the border.";
ot->description = "Zoom in the view to the nearest object contained in the border.";
ot->idname= "VIEW3D_OT_border_zoom";
/* api callbacks */
@@ -1465,7 +1465,7 @@ void VIEW3D_OT_viewnumpad(wmOperatorType *ot)
{
/* identifiers */
ot->name= "View numpad";
ot->description = "Set the current view.";
ot->description = "Set the view.";
ot->idname= "VIEW3D_OT_viewnumpad";
/* api callbacks */
@@ -1534,7 +1534,7 @@ void VIEW3D_OT_view_orbit(wmOperatorType *ot)
{
/* identifiers */
ot->name= "View Orbit";
ot->description = "Orbit the current view.";
ot->description = "Orbit the view.";
ot->idname= "VIEW3D_OT_view_orbit";
/* api callbacks */
@@ -1584,7 +1584,7 @@ void VIEW3D_OT_view_pan(wmOperatorType *ot)
{
/* identifiers */
ot->name= "View Pan";
ot->description = "Pan the current view.";
ot->description = "Pan the view.";
ot->idname= "VIEW3D_OT_view_pan";
/* api callbacks */
@@ -1616,7 +1616,7 @@ void VIEW3D_OT_view_persportho(wmOperatorType *ot)
{
/* identifiers */
ot->name= "View persp/ortho";
ot->description = "Switch the current view from percpective/orthographic.";
ot->description = "Switch the current view from perspective/orthographic.";
ot->idname= "VIEW3D_OT_view_persportho";
/* api callbacks */
@@ -1769,7 +1769,7 @@ void VIEW3D_OT_drawtype(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Change draw type";
ot->description = "Change the view type of the current view.";
ot->description = "Change the draw type of the view.";
ot->idname= "VIEW3D_OT_drawtype";
/* api callbacks */