Operator docstring patch from Ron Walker, added console operator docs too.

This commit is contained in:
Campbell Barton
2009-09-07 04:52:42 +00:00
parent 84448173c3
commit f5e80e7a80
9 changed files with 31 additions and 3 deletions

View File

@@ -108,7 +108,7 @@ def get_console(console_id):
class CONSOLE_OT_exec(bpy.types.Operator):
'''
Operator documentatuon text, will be used for the operator tooltip and python docs.
Execute the current console line as a python expression.
'''
__idname__ = "console.execute"
__label__ = "Console Execute"
@@ -385,7 +385,7 @@ def autocomp(bcon):
class CONSOLE_OT_autocomplete(bpy.types.Operator):
'''
Operator documentatuon text, will be used for the operator tooltip and python docs.
Evaluate the namespace up until the cursor and give a list of options or complete the name if there is only one.
'''
__idname__ = "console.autocomplete"
__label__ = "Console Autocomplete"

View File

@@ -257,6 +257,7 @@ void VIEW2D_OT_pan(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Pan View";
ot->description= "Pan the view.";
ot->idname= "VIEW2D_OT_pan";
/* api callbacks */
@@ -305,6 +306,7 @@ void VIEW2D_OT_scroll_right(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Scroll Right";
ot->description= "Scroll the view right.";
ot->idname= "VIEW2D_OT_scroll_right";
/* api callbacks */
@@ -351,6 +353,7 @@ void VIEW2D_OT_scroll_left(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Scroll Left";
ot->description= "Scroll the view left.";
ot->idname= "VIEW2D_OT_scroll_left";
/* api callbacks */
@@ -396,6 +399,7 @@ void VIEW2D_OT_scroll_down(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Scroll Down";
ot->description= "Scroll the view down.";
ot->idname= "VIEW2D_OT_scroll_down";
/* api callbacks */
@@ -442,6 +446,7 @@ void VIEW2D_OT_scroll_up(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Scroll Up";
ot->description= "Scroll the view up.";
ot->idname= "VIEW2D_OT_scroll_up";
/* api callbacks */
@@ -575,6 +580,7 @@ void VIEW2D_OT_zoom_in(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Zoom In";
ot->description= "Zoom in the view.";
ot->idname= "VIEW2D_OT_zoom_in";
/* api callbacks */
@@ -611,6 +617,7 @@ void VIEW2D_OT_zoom_out(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Zoom Out";
ot->description= "Zoom out the view.";
ot->idname= "VIEW2D_OT_zoom_out";
/* api callbacks */
@@ -857,6 +864,7 @@ void VIEW2D_OT_zoom(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Zoom View";
ot->description= "Zoom in/out the view.";
ot->idname= "VIEW2D_OT_zoom";
/* api callbacks */
@@ -958,6 +966,7 @@ void VIEW2D_OT_zoom_border(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Zoom to Border";
ot->description= "Zoom in the view to the nearest item contained in the border.";
ot->idname= "VIEW2D_OT_zoom_border";
/* api callbacks */
@@ -1297,6 +1306,7 @@ void VIEW2D_OT_scroller_activate(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Scroller Activate";
ot->description= "Scroll view by mouse click and drag.";
ot->idname= "VIEW2D_OT_scroller_activate";
/* flags */
@@ -1363,6 +1373,7 @@ void VIEW2D_OT_reset(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Reset View";
ot->description= "Reset the view.";
ot->idname= "VIEW2D_OT_reset";
/* api callbacks */

View File

@@ -1451,6 +1451,7 @@ static int view3d_properties(bContext *C, wmOperator *op)
void VIEW3D_OT_properties(wmOperatorType *ot)
{
ot->name= "Properties";
ot->description= "Display the properties panel.";
ot->idname= "VIEW3D_OT_properties";
ot->exec= view3d_properties;

View File

@@ -1895,7 +1895,7 @@ void VIEW3D_OT_manipulator(wmOperatorType *ot)
/* identifiers */
ot->name= "3D Manipulator";
ot->description = "";
ot->description = "Manipulate selected item by axis.";
ot->idname= "VIEW3D_OT_manipulator";
/* api callbacks */

View File

@@ -252,6 +252,7 @@ void VIEW3D_OT_layers(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Layers";
ot->description= "Toggle layer(s) visibility.";
ot->idname= "VIEW3D_OT_layers";
/* api callbacks */

View File

@@ -756,6 +756,7 @@ static int view3d_lasso_select_exec(bContext *C, wmOperator *op)
void VIEW3D_OT_select_lasso(wmOperatorType *ot)
{
ot->name= "Lasso Select";
ot->description= "Select items using lasso selection.";
ot->idname= "VIEW3D_OT_select_lasso";
ot->invoke= WM_gesture_lasso_invoke;
@@ -1534,6 +1535,7 @@ void VIEW3D_OT_select_border(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Border Select";
ot->description= "Select items using border selection.";
ot->idname= "VIEW3D_OT_select_border";
/* api callbacks */
@@ -1593,6 +1595,7 @@ void VIEW3D_OT_select(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Activate/Select";
ot->description= "Activate/select item(s).";
ot->idname= "VIEW3D_OT_select";
/* api callbacks */
@@ -1831,6 +1834,7 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op)
void VIEW3D_OT_select_circle(wmOperatorType *ot)
{
ot->name= "Circle Select";
ot->description= "Select items using circle selection.";
ot->idname= "VIEW3D_OT_select_circle";
ot->invoke= WM_gesture_circle_invoke;

View File

@@ -555,6 +555,7 @@ void VIEW3D_OT_snap_selected_to_grid(wmOperatorType *ot)
/* identifiers */
ot->name= "Snap Selection to Grid";
ot->description= "Snap selected item(s) to nearest grid node.";
ot->idname= "VIEW3D_OT_snap_selected_to_grid";
/* api callbacks */
@@ -680,6 +681,7 @@ void VIEW3D_OT_snap_selected_to_cursor(wmOperatorType *ot)
/* identifiers */
ot->name= "Snap Selection to Cursor";
ot->description= "Snap selected item(s) to cursor.";
ot->idname= "VIEW3D_OT_snap_selected_to_cursor";
/* api callbacks */
@@ -715,6 +717,7 @@ void VIEW3D_OT_snap_cursor_to_grid(wmOperatorType *ot)
/* identifiers */
ot->name= "Snap Cursor to Grid";
ot->description= "Snap cursor to nearest grid node.";
ot->idname= "VIEW3D_OT_snap_cursor_to_grid";
/* api callbacks */
@@ -821,6 +824,7 @@ void VIEW3D_OT_snap_cursor_to_selected(wmOperatorType *ot)
/* identifiers */
ot->name= "Snap Cursor to Selected";
ot->description= "Snap cursor to center of selected item(s).";
ot->idname= "VIEW3D_OT_snap_cursor_to_selected";
/* api callbacks */
@@ -870,6 +874,7 @@ void VIEW3D_OT_snap_cursor_to_active(wmOperatorType *ot)
/* identifiers */
ot->name= "Snap Cursor to Active";
ot->description= "Snap cursor to active item.";
ot->idname= "VIEW3D_OT_snap_cursor_to_active";
/* api callbacks */
@@ -1069,6 +1074,7 @@ void VIEW3D_OT_snap_selected_to_center(wmOperatorType *ot)
/* identifiers */
ot->name= "Snap Selection to Center";
ot->description= "Snap selected items to selections geometric center.";
ot->idname= "VIEW3D_OT_snap_selected_to_center";
/* api callbacks */
@@ -1135,6 +1141,7 @@ void VIEW3D_OT_snap_menu(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Snap Menu";
ot->description= "Display snap menu.";
ot->idname= "VIEW3D_OT_snap_menu";
/* api callbacks */

View File

@@ -322,6 +322,7 @@ static int view3d_toolbar(bContext *C, wmOperator *op)
void VIEW3D_OT_toolbar(wmOperatorType *ot)
{
ot->name= "Toolbar";
ot->description= "Toggles toolbar display.";
ot->idname= "VIEW3D_OT_toolbar";
ot->exec= view3d_toolbar;

View File

@@ -415,6 +415,7 @@ void VIEW3D_OT_setcameratoview(wmOperatorType *ot)
/* identifiers */
ot->name= "Align Camera To View";
ot->description= "Set camera view to active view.";
ot->idname= "VIEW3D_OT_camera_to_view";
/* api callbacks */
@@ -1395,6 +1396,7 @@ void VIEW3D_OT_localview(wmOperatorType *ot)
/* identifiers */
ot->name= "Local View";
ot->description= "Toggle display of selected object(s) seperately and centered in view.";
ot->idname= "VIEW3D_OT_localview";
/* api callbacks */
@@ -1562,6 +1564,7 @@ void VIEW3D_OT_game_start(wmOperatorType *ot)
/* identifiers */
ot->name= "Start Game Engine";
ot->description= "Start game engine.";
ot->idname= "VIEW3D_OT_game_start";
/* api callbacks */