diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-22 11:26:09 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-22 11:26:09 +0400 |
commit | 4c3bb77012024a3f14181eafe850b4d68bca1191 (patch) | |
tree | 0b90fefff48b03ad117c5e16d65f6e653ff5f57b /source/blender/editors/space_view3d | |
parent | 675628d24deba0afdc3da5b7a5bc802b13506251 (diff) |
style cleanup: spaces aroudn operators for operator definitions.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 230 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_header.c | 14 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_select.c | 78 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_snap.c | 72 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_toolbar.c | 12 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_view.c | 68 |
6 files changed, 237 insertions, 237 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index c04f352a5d0..4ddc518b814 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -948,18 +948,18 @@ void VIEW3D_OT_rotate(wmOperatorType *ot) { /* identifiers */ - ot->name= "Rotate view"; + ot->name = "Rotate view"; ot->description = "Rotate the view"; - ot->idname= "VIEW3D_OT_rotate"; + ot->idname = "VIEW3D_OT_rotate"; /* api callbacks */ - ot->invoke= viewrotate_invoke; - ot->modal= viewrotate_modal; - ot->poll= ED_operator_region_view3d_active; - ot->cancel= viewrotate_cancel; + ot->invoke = viewrotate_invoke; + ot->modal = viewrotate_modal; + ot->poll = ED_operator_region_view3d_active; + ot->cancel = viewrotate_cancel; /* flags */ - ot->flag= OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER; + ot->flag = OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER; } /* NDOF utility functions @@ -1375,18 +1375,18 @@ void VIEW3D_OT_move(wmOperatorType *ot) { /* identifiers */ - ot->name= "Move view"; + ot->name = "Move view"; ot->description = "Move the view"; - ot->idname= "VIEW3D_OT_move"; + ot->idname = "VIEW3D_OT_move"; /* api callbacks */ - ot->invoke= viewmove_invoke; - ot->modal= viewmove_modal; - ot->poll= ED_operator_view3d_active; - ot->cancel= viewmove_cancel; + ot->invoke = viewmove_invoke; + ot->modal = viewmove_modal; + ot->poll = ED_operator_view3d_active; + ot->cancel = viewmove_cancel; /* flags */ - ot->flag= OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER; + ot->flag = OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER; } /* ************************ viewzoom ******************************** */ @@ -1758,19 +1758,19 @@ static int viewzoom_cancel(bContext *C, wmOperator *op) void VIEW3D_OT_zoom(wmOperatorType *ot) { /* identifiers */ - ot->name= "Zoom View"; + ot->name = "Zoom View"; ot->description = "Zoom in/out in the view"; - ot->idname= "VIEW3D_OT_zoom"; + ot->idname = "VIEW3D_OT_zoom"; /* api callbacks */ - ot->invoke= viewzoom_invoke; - ot->exec= viewzoom_exec; - ot->modal= viewzoom_modal; - ot->poll= ED_operator_region_view3d_active; - ot->cancel= viewzoom_cancel; + ot->invoke = viewzoom_invoke; + ot->exec = viewzoom_exec; + ot->modal = viewzoom_modal; + ot->poll = ED_operator_region_view3d_active; + ot->cancel = viewzoom_cancel; /* flags */ - ot->flag= OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER; + ot->flag = OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER; RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, "Delta", "", INT_MIN, INT_MAX); RNA_def_int(ot->srna, "mx", 0, 0, INT_MAX, "Zoom Position X", "", 0, INT_MAX); @@ -1991,19 +1991,19 @@ static int viewdolly_cancel(bContext *C, wmOperator *op) void VIEW3D_OT_dolly(wmOperatorType *ot) { /* identifiers */ - ot->name= "Dolly view"; + ot->name = "Dolly view"; ot->description = "Dolly in/out in the view"; - ot->idname= "VIEW3D_OT_dolly"; + ot->idname = "VIEW3D_OT_dolly"; /* api callbacks */ - ot->invoke= viewdolly_invoke; - ot->exec= viewdolly_exec; - ot->modal= viewdolly_modal; - ot->poll= viewdolly_poll; - ot->cancel= viewdolly_cancel; + ot->invoke = viewdolly_invoke; + ot->exec = viewdolly_exec; + ot->modal = viewdolly_modal; + ot->poll = viewdolly_poll; + ot->cancel = viewdolly_cancel; /* flags */ - ot->flag= OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER; + ot->flag = OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER; RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, "Delta", "", INT_MIN, INT_MAX); RNA_def_int(ot->srna, "mx", 0, 0, INT_MAX, "Zoom Position X", "", 0, INT_MAX); @@ -2100,16 +2100,16 @@ static int view3d_all_exec(bContext *C, wmOperator *op) /* was view3d_home() in void VIEW3D_OT_view_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "View All"; + ot->name = "View All"; ot->description = "View all objects in scene"; - ot->idname= "VIEW3D_OT_view_all"; + ot->idname = "VIEW3D_OT_view_all"; /* api callbacks */ - ot->exec= view3d_all_exec; - ot->poll= ED_operator_region_view3d_active; + ot->exec = view3d_all_exec; + ot->poll = ED_operator_region_view3d_active; /* flags */ - ot->flag= 0; + ot->flag = 0; RNA_def_boolean(ot->srna, "center", 0, "Center", ""); } @@ -2247,16 +2247,16 @@ void VIEW3D_OT_view_selected(wmOperatorType *ot) { /* identifiers */ - ot->name= "View Selected"; + ot->name = "View Selected"; ot->description = "Move the view to the selection center"; - ot->idname= "VIEW3D_OT_view_selected"; + ot->idname = "VIEW3D_OT_view_selected"; /* api callbacks */ - ot->exec= viewselected_exec; - ot->poll= ED_operator_region_view3d_active; + ot->exec = viewselected_exec; + ot->poll = ED_operator_region_view3d_active; /* flags */ - ot->flag= 0; + ot->flag = 0; } static int viewcenter_cursor_exec(bContext *C, wmOperator *UNUSED(op)) @@ -2282,16 +2282,16 @@ static int viewcenter_cursor_exec(bContext *C, wmOperator *UNUSED(op)) void VIEW3D_OT_view_center_cursor(wmOperatorType *ot) { /* identifiers */ - ot->name= "Center View to Cursor"; - ot->description= "Center the view so that the cursor is in the middle of the view"; - ot->idname= "VIEW3D_OT_view_center_cursor"; + ot->name = "Center View to Cursor"; + ot->description = "Center the view so that the cursor is in the middle of the view"; + ot->idname = "VIEW3D_OT_view_center_cursor"; /* api callbacks */ - ot->exec= viewcenter_cursor_exec; - ot->poll= ED_operator_view3d_active; + ot->exec = viewcenter_cursor_exec; + ot->poll = ED_operator_view3d_active; /* flags */ - ot->flag= 0; + ot->flag = 0; } static int view3d_center_camera_exec(bContext *C, wmOperator *UNUSED(op)) /* was view3d_home() in 2.4x */ @@ -2327,16 +2327,16 @@ static int view3d_center_camera_exec(bContext *C, wmOperator *UNUSED(op)) /* was void VIEW3D_OT_view_center_camera(wmOperatorType *ot) { /* identifiers */ - ot->name= "View Camera Center"; + ot->name = "View Camera Center"; ot->description = "Center the camera view"; - ot->idname= "VIEW3D_OT_view_center_camera"; + ot->idname = "VIEW3D_OT_view_center_camera"; /* api callbacks */ - ot->exec= view3d_center_camera_exec; - ot->poll= view3d_camera_user_poll; + ot->exec = view3d_center_camera_exec; + ot->poll = view3d_camera_user_poll; /* flags */ - ot->flag= 0; + ot->flag = 0; } /* ********************* Set render border operator ****************** */ @@ -2393,20 +2393,20 @@ static int render_border_exec(bContext *C, wmOperator *op) void VIEW3D_OT_render_border(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Render Border"; + ot->name = "Set Render Border"; ot->description = "Set the boundaries of the border render and enables border render"; - ot->idname= "VIEW3D_OT_render_border"; + ot->idname = "VIEW3D_OT_render_border"; /* api callbacks */ - ot->invoke= WM_border_select_invoke; - ot->exec= render_border_exec; - ot->modal= WM_border_select_modal; - ot->cancel= WM_border_select_cancel; + ot->invoke = WM_border_select_invoke; + ot->exec = render_border_exec; + ot->modal = WM_border_select_modal; + ot->cancel = WM_border_select_cancel; - ot->poll= view3d_camera_active_poll; + ot->poll = view3d_camera_active_poll; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* rna */ RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX); @@ -2559,20 +2559,20 @@ static int view3d_zoom_border_invoke(bContext *C, wmOperator *op, wmEvent *event void VIEW3D_OT_zoom_border(wmOperatorType *ot) { /* identifiers */ - ot->name= "Border Zoom"; + ot->name = "Border Zoom"; ot->description = "Zoom in the view to the nearest object contained in the border"; - ot->idname= "VIEW3D_OT_zoom_border"; + ot->idname = "VIEW3D_OT_zoom_border"; /* api callbacks */ - ot->invoke= view3d_zoom_border_invoke; - ot->exec= view3d_zoom_border_exec; - ot->modal= WM_border_select_modal; - ot->cancel= WM_border_select_cancel; + ot->invoke = view3d_zoom_border_invoke; + ot->exec = view3d_zoom_border_exec; + ot->modal = WM_border_select_modal; + ot->cancel = WM_border_select_cancel; - ot->poll= ED_operator_region_view3d_active; + ot->poll = ED_operator_region_view3d_active; /* flags */ - ot->flag= 0; + ot->flag = 0; /* rna */ RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX); @@ -2615,16 +2615,16 @@ static int view3d_zoom_1_to_1_camera_exec(bContext *C, wmOperator *UNUSED(op)) void VIEW3D_OT_zoom_camera_1_to_1(wmOperatorType *ot) { /* identifiers */ - ot->name= "Zoom Camera 1:1"; + ot->name = "Zoom Camera 1:1"; ot->description = "Match the camera to 1:1 to the render output"; - ot->idname= "VIEW3D_OT_zoom_camera_1_to_1"; + ot->idname = "VIEW3D_OT_zoom_camera_1_to_1"; /* api callbacks */ - ot->exec= view3d_zoom_1_to_1_camera_exec; - ot->poll= view3d_camera_user_poll; + ot->exec = view3d_zoom_1_to_1_camera_exec; + ot->poll = view3d_camera_user_poll; /* flags */ - ot->flag= 0; + ot->flag = 0; } /* ********************* Changing view operator ****************** */ @@ -2856,16 +2856,16 @@ static int viewnumpad_exec(bContext *C, wmOperator *op) void VIEW3D_OT_viewnumpad(wmOperatorType *ot) { /* identifiers */ - ot->name= "View numpad"; + ot->name = "View numpad"; ot->description = "Set the view"; - ot->idname= "VIEW3D_OT_viewnumpad"; + ot->idname = "VIEW3D_OT_viewnumpad"; /* api callbacks */ - ot->exec= viewnumpad_exec; - ot->poll= ED_operator_rv3d_user_region_poll; + ot->exec = viewnumpad_exec; + ot->poll = ED_operator_rv3d_user_region_poll; /* flags */ - ot->flag= 0; + ot->flag = 0; RNA_def_enum(ot->srna, "type", prop_view_items, 0, "View", "The Type of view"); RNA_def_boolean(ot->srna, "align_active", 0, "Align Active", "Align to the active object's axis"); @@ -2929,16 +2929,16 @@ static int vieworbit_exec(bContext *C, wmOperator *op) void VIEW3D_OT_view_orbit(wmOperatorType *ot) { /* identifiers */ - ot->name= "View Orbit"; + ot->name = "View Orbit"; ot->description = "Orbit the view"; - ot->idname= "VIEW3D_OT_view_orbit"; + ot->idname = "VIEW3D_OT_view_orbit"; /* api callbacks */ - ot->exec= vieworbit_exec; - ot->poll= ED_operator_rv3d_user_region_poll; + ot->exec = vieworbit_exec; + ot->poll = ED_operator_rv3d_user_region_poll; /* flags */ - ot->flag= 0; + ot->flag = 0; RNA_def_enum(ot->srna, "type", prop_view_orbit_items, 0, "Orbit", "Direction of View Orbit"); } @@ -2977,16 +2977,16 @@ static int viewpan_exec(bContext *C, wmOperator *op) void VIEW3D_OT_view_pan(wmOperatorType *ot) { /* identifiers */ - ot->name= "View Pan"; + ot->name = "View Pan"; ot->description = "Pan the view"; - ot->idname= "VIEW3D_OT_view_pan"; + ot->idname = "VIEW3D_OT_view_pan"; /* api callbacks */ - ot->exec= viewpan_exec; - ot->poll= ED_operator_region_view3d_active; + ot->exec = viewpan_exec; + ot->poll = ED_operator_region_view3d_active; /* flags */ - ot->flag= 0; + ot->flag = 0; RNA_def_enum(ot->srna, "type", prop_view_pan_items, 0, "Pan", "Direction of View Pan"); } @@ -3014,16 +3014,16 @@ static int viewpersportho_exec(bContext *C, wmOperator *UNUSED(op)) void VIEW3D_OT_view_persportho(wmOperatorType *ot) { /* identifiers */ - ot->name= "View Persp/Ortho"; + ot->name = "View Persp/Ortho"; ot->description = "Switch the current view from perspective/orthographic"; - ot->idname= "VIEW3D_OT_view_persportho"; + ot->idname = "VIEW3D_OT_view_persportho"; /* api callbacks */ - ot->exec= viewpersportho_exec; - ot->poll= ED_operator_rv3d_user_region_poll; + ot->exec = viewpersportho_exec; + ot->poll = ED_operator_rv3d_user_region_poll; /* flags */ - ot->flag= 0; + ot->flag = 0; } @@ -3083,7 +3083,7 @@ void VIEW3D_OT_background_image_add(wmOperatorType *ot) { /* identifiers */ ot->name = "Add Background Image"; - ot->description= "Add a new background image"; + ot->description = "Add a new background image"; ot->idname = "VIEW3D_OT_background_image_add"; /* api callbacks */ @@ -3122,7 +3122,7 @@ void VIEW3D_OT_background_image_remove(wmOperatorType *ot) { /* identifiers */ ot->name = "Remove Background Image"; - ot->description= "Remove a background image from the 3D view"; + ot->description = "Remove a background image from the 3D view"; ot->idname = "VIEW3D_OT_background_image_remove"; /* api callbacks */ @@ -3220,20 +3220,20 @@ void VIEW3D_OT_clip_border(wmOperatorType *ot) { /* identifiers */ - ot->name= "Clipping Border"; + ot->name = "Clipping Border"; ot->description = "Set the view clipping border"; - ot->idname= "VIEW3D_OT_clip_border"; + ot->idname = "VIEW3D_OT_clip_border"; /* api callbacks */ - ot->invoke= view3d_clipping_invoke; - ot->exec= view3d_clipping_exec; - ot->modal= WM_border_select_modal; - ot->cancel= WM_border_select_cancel; + ot->invoke = view3d_clipping_invoke; + ot->exec = view3d_clipping_exec; + ot->modal = WM_border_select_modal; + ot->cancel = WM_border_select_cancel; - ot->poll= ED_operator_region_view3d_active; + ot->poll = ED_operator_region_view3d_active; /* flags */ - ot->flag= 0; + ot->flag = 0; /* rna */ RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX); @@ -3314,17 +3314,17 @@ void VIEW3D_OT_cursor3d(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set 3D Cursor"; + ot->name = "Set 3D Cursor"; ot->description = "Set the location of the 3D cursor"; - ot->idname= "VIEW3D_OT_cursor3d"; + ot->idname = "VIEW3D_OT_cursor3d"; /* api callbacks */ - ot->invoke= set_3dcursor_invoke; + ot->invoke = set_3dcursor_invoke; - ot->poll= ED_operator_view3d_active; + ot->poll = ED_operator_view3d_active; /* flags */ -// ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +// ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* rna later */ @@ -3356,14 +3356,14 @@ void VIEW3D_OT_manipulator(wmOperatorType *ot) { /* identifiers */ - ot->name= "3D Manipulator"; + ot->name = "3D Manipulator"; ot->description = "Manipulate selected item by axis"; - ot->idname= "VIEW3D_OT_manipulator"; + ot->idname = "VIEW3D_OT_manipulator"; /* api callbacks */ - ot->invoke= manipulator_invoke; + ot->invoke = manipulator_invoke; - ot->poll= ED_operator_view3d_active; + ot->poll = ED_operator_view3d_active; /* properties to pass to transform */ Transform_Properties(ot, P_CONSTRAINT); @@ -3390,13 +3390,13 @@ static int enable_manipulator_invoke(bContext *C, wmOperator *op, wmEvent *UNUSE void VIEW3D_OT_enable_manipulator(wmOperatorType *ot) { /* identifiers */ - ot->name= "Enable 3D Manipulator"; + ot->name = "Enable 3D Manipulator"; ot->description = "Enable the transform manipulator for use"; - ot->idname= "VIEW3D_OT_enable_manipulator"; + ot->idname = "VIEW3D_OT_enable_manipulator"; /* api callbacks */ - ot->invoke= enable_manipulator_invoke; - ot->poll= ED_operator_view3d_active; + ot->invoke = enable_manipulator_invoke; + ot->poll = ED_operator_view3d_active; /* rna later */ RNA_def_boolean(ot->srna, "translate", 0, "Translate", "Enable the translate manipulator"); diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 541c8028fe5..532ca805125 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -254,17 +254,17 @@ static int view3d_layers_poll(bContext *C) void VIEW3D_OT_layers(wmOperatorType *ot) { /* identifiers */ - ot->name= "Layers"; - ot->description= "Toggle layer(s) visibility"; - ot->idname= "VIEW3D_OT_layers"; + ot->name = "Layers"; + ot->description = "Toggle layer(s) visibility"; + ot->idname = "VIEW3D_OT_layers"; /* api callbacks */ - ot->invoke= view3d_layers_invoke; - ot->exec= view3d_layers_exec; - ot->poll= view3d_layers_poll; + ot->invoke = view3d_layers_invoke; + ot->exec = view3d_layers_exec; + ot->poll = view3d_layers_poll; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; RNA_def_int(ot->srna, "nr", 1, 0, 20, "Number", "The layer number to set, zero for all layers", 0, 20); RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Add this layer to the current view layers"); diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index a7c711968aa..22e5eabe5b0 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -997,18 +997,18 @@ 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->name = "Lasso Select"; + ot->description = "Select items using lasso selection"; + ot->idname = "VIEW3D_OT_select_lasso"; - ot->invoke= WM_gesture_lasso_invoke; - ot->modal= WM_gesture_lasso_modal; - ot->exec= view3d_lasso_select_exec; - ot->poll= view3d_selectable_data; - ot->cancel= WM_gesture_lasso_cancel; + ot->invoke = WM_gesture_lasso_invoke; + ot->modal = WM_gesture_lasso_modal; + ot->exec = view3d_lasso_select_exec; + ot->poll = view3d_selectable_data; + ot->cancel = WM_gesture_lasso_cancel; /* flags */ - ot->flag= OPTYPE_UNDO; + ot->flag = OPTYPE_UNDO; RNA_def_collection_runtime(ot->srna, "path", &RNA_OperatorMousePath, "Path", ""); RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "Deselect rather than select items"); @@ -1150,22 +1150,22 @@ void VIEW3D_OT_select_menu(wmOperatorType *ot) PropertyRNA *prop; /* identifiers */ - ot->name= "Select Menu"; + ot->name = "Select Menu"; ot->description = "Menu object selection"; - ot->idname= "VIEW3D_OT_select_menu"; + ot->idname = "VIEW3D_OT_select_menu"; /* api callbacks */ - ot->invoke= WM_menu_invoke; - ot->exec= object_select_menu_exec; + ot->invoke = WM_menu_invoke; + ot->exec = object_select_menu_exec; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* keyingset to use (dynamic enum) */ prop= RNA_def_enum(ot->srna, "name", DummyRNA_NULL_items, 0, "Object Name", ""); RNA_def_enum_funcs(prop, object_select_menu_enum_itemf); RNA_def_property_flag(prop, PROP_HIDDEN); - ot->prop= prop; + ot->prop = prop; RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first"); } @@ -2136,19 +2136,19 @@ static int view3d_borderselect_exec(bContext *C, wmOperator *op) 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"; + ot->name = "Border Select"; + ot->description = "Select items using border selection"; + ot->idname = "VIEW3D_OT_select_border"; /* api callbacks */ - ot->invoke= WM_border_select_invoke; - ot->exec= view3d_borderselect_exec; - ot->modal= WM_border_select_modal; - ot->poll= view3d_selectable_data; - ot->cancel= WM_border_select_cancel; + ot->invoke = WM_border_select_invoke; + ot->exec = view3d_borderselect_exec; + ot->modal = WM_border_select_modal; + ot->poll = view3d_selectable_data; + ot->cancel = WM_border_select_cancel; /* flags */ - ot->flag= OPTYPE_UNDO; + ot->flag = OPTYPE_UNDO; /* rna */ WM_operator_properties_gesture_border(ot, TRUE); @@ -2269,16 +2269,16 @@ static int view3d_select_invoke(bContext *C, wmOperator *op, wmEvent *event) void VIEW3D_OT_select(wmOperatorType *ot) { /* identifiers */ - ot->name= "Activate/Select"; - ot->description= "Activate/select item(s)"; - ot->idname= "VIEW3D_OT_select"; + ot->name = "Activate/Select"; + ot->description = "Activate/select item(s)"; + ot->idname = "VIEW3D_OT_select"; /* api callbacks */ - ot->invoke= view3d_select_invoke; - ot->poll= ED_operator_view3d_active; + ot->invoke = view3d_select_invoke; + ot->poll = ED_operator_view3d_active; /* flags */ - ot->flag= OPTYPE_UNDO; + ot->flag = OPTYPE_UNDO; /* properties */ RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first"); @@ -2726,18 +2726,18 @@ 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->name = "Circle Select"; + ot->description = "Select items using circle selection"; + ot->idname = "VIEW3D_OT_select_circle"; - ot->invoke= WM_gesture_circle_invoke; - ot->modal= WM_gesture_circle_modal; - ot->exec= view3d_circle_select_exec; - ot->poll= view3d_selectable_data; - ot->cancel= WM_gesture_circle_cancel; + ot->invoke = WM_gesture_circle_invoke; + ot->modal = WM_gesture_circle_modal; + ot->exec = view3d_circle_select_exec; + ot->poll = view3d_selectable_data; + ot->cancel = WM_gesture_circle_cancel; /* flags */ - ot->flag= OPTYPE_UNDO; + ot->flag = OPTYPE_UNDO; RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX); RNA_def_int(ot->srna, "y", 0, INT_MIN, INT_MAX, "Y", "", INT_MIN, INT_MAX); diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index ef02e96b47e..55cc5af493e 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -635,16 +635,16 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op)) 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"; + 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 */ - ot->exec= snap_sel_to_grid; - ot->poll= ED_operator_region_view3d_active; + ot->exec = snap_sel_to_grid; + ot->poll = ED_operator_region_view3d_active; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } /* *************************************************** */ @@ -759,16 +759,16 @@ static int snap_sel_to_curs(bContext *C, wmOperator *UNUSED(op)) 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"; + ot->name = "Snap Selection to Cursor"; + ot->description = "Snap selected item(s) to cursor"; + ot->idname = "VIEW3D_OT_snap_selected_to_cursor"; /* api callbacks */ - ot->exec= snap_sel_to_curs; - ot->poll= ED_operator_view3d_active; + ot->exec = snap_sel_to_curs; + ot->poll = ED_operator_view3d_active; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } /* *************************************************** */ @@ -795,16 +795,16 @@ static int snap_curs_to_grid(bContext *C, wmOperator *UNUSED(op)) 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"; + ot->name = "Snap Cursor to Grid"; + ot->description = "Snap cursor to nearest grid node"; + ot->idname = "VIEW3D_OT_snap_cursor_to_grid"; /* api callbacks */ - ot->exec= snap_curs_to_grid; - ot->poll= ED_operator_region_view3d_active; + ot->exec = snap_curs_to_grid; + ot->poll = ED_operator_region_view3d_active; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } /* **************************************************** */ @@ -958,16 +958,16 @@ static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op)) 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"; + 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 */ - ot->exec= snap_curs_to_sel; - ot->poll= ED_operator_view3d_active; + ot->exec = snap_curs_to_sel; + ot->poll = ED_operator_view3d_active; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } /* ********************************************** */ @@ -1008,16 +1008,16 @@ static int snap_curs_to_active(bContext *C, wmOperator *UNUSED(op)) 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"; + ot->name = "Snap Cursor to Active"; + ot->description = "Snap cursor to active item"; + ot->idname = "VIEW3D_OT_snap_cursor_to_active"; /* api callbacks */ - ot->exec= snap_curs_to_active; - ot->poll= ED_operator_view3d_active; + ot->exec = snap_curs_to_active; + ot->poll = ED_operator_view3d_active; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } /* **************************************************** */ @@ -1041,16 +1041,16 @@ static int snap_curs_to_center(bContext *C, wmOperator *UNUSED(op)) void VIEW3D_OT_snap_cursor_to_center(wmOperatorType *ot) { /* identifiers */ - ot->name= "Snap Cursor to Center"; - ot->description= "Snap cursor to the Center"; - ot->idname= "VIEW3D_OT_snap_cursor_to_center"; + ot->name = "Snap Cursor to Center"; + ot->description = "Snap cursor to the Center"; + ot->idname = "VIEW3D_OT_snap_cursor_to_center"; /* api callbacks */ - ot->exec= snap_curs_to_center; - ot->poll= ED_operator_view3d_active; + ot->exec = snap_curs_to_center; + ot->poll = ED_operator_view3d_active; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } /* **************************************************** */ diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c index 355febcde5d..3db9be02af1 100644 --- a/source/blender/editors/space_view3d/view3d_toolbar.c +++ b/source/blender/editors/space_view3d/view3d_toolbar.c @@ -257,14 +257,14 @@ static int view3d_toolshelf(bContext *C, wmOperator *UNUSED(op)) void VIEW3D_OT_toolshelf(wmOperatorType *ot) { - ot->name= "Tool Shelf"; - ot->description= "Toggles tool shelf display"; - ot->idname= "VIEW3D_OT_toolshelf"; + ot->name = "Tool Shelf"; + ot->description = "Toggles tool shelf display"; + ot->idname = "VIEW3D_OT_toolshelf"; - ot->exec= view3d_toolshelf; - ot->poll= ED_operator_view3d_active; + ot->exec = view3d_toolshelf; + ot->poll = ED_operator_view3d_active; /* flags */ - ot->flag= 0; + ot->flag = 0; } diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index 7bd878351d9..5174c832ac4 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -334,14 +334,14 @@ void VIEW3D_OT_smoothview(wmOperatorType *ot) { /* identifiers */ - ot->name= "Smooth View"; - ot->idname= "VIEW3D_OT_smoothview"; - ot->description="The time to animate the change of view (in milliseconds)"; + ot->name = "Smooth View"; + ot->idname = "VIEW3D_OT_smoothview"; + ot->description = "The time to animate the change of view (in milliseconds)"; /* api callbacks */ - ot->invoke= view3d_smoothview_invoke; + ot->invoke = view3d_smoothview_invoke; - ot->poll= ED_operator_view3d_active; + ot->poll = ED_operator_view3d_active; } /* ****************** change view operators ****************** */ @@ -389,16 +389,16 @@ static int view3d_camera_to_view_poll(bContext *C) void VIEW3D_OT_camera_to_view(wmOperatorType *ot) { /* identifiers */ - ot->name= "Align Camera To View"; - ot->description= "Set camera view to active view"; - ot->idname= "VIEW3D_OT_camera_to_view"; + ot->name = "Align Camera To View"; + ot->description = "Set camera view to active view"; + ot->idname = "VIEW3D_OT_camera_to_view"; /* api callbacks */ - ot->exec= view3d_camera_to_view_exec; - ot->poll= view3d_camera_to_view_poll; + ot->exec = view3d_camera_to_view_exec; + ot->poll = view3d_camera_to_view_poll; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } /* unlike VIEW3D_OT_view_selected this is for framing a render and not @@ -456,16 +456,16 @@ static int view3d_camera_to_view_selected_poll(bContext *C) void VIEW3D_OT_camera_to_view_selected(wmOperatorType *ot) { /* identifiers */ - ot->name= "Camera Fit Frame to Selected"; - ot->description= "Move the camera so selected objects are framed"; - ot->idname= "VIEW3D_OT_camera_to_view_selected"; + ot->name = "Camera Fit Frame to Selected"; + ot->description = "Move the camera so selected objects are framed"; + ot->idname = "VIEW3D_OT_camera_to_view_selected"; /* api callbacks */ - ot->exec= view3d_camera_to_view_selected_exec; - ot->poll= view3d_camera_to_view_selected_poll; + ot->exec = view3d_camera_to_view_selected_exec; + ot->poll = view3d_camera_to_view_selected_poll; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } @@ -510,16 +510,16 @@ void VIEW3D_OT_object_as_camera(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Active Object as Camera"; - ot->description= "Set the active object as the active camera for this view or scene"; - ot->idname= "VIEW3D_OT_object_as_camera"; + ot->name = "Set Active Object as Camera"; + ot->description = "Set the active object as the active camera for this view or scene"; + ot->idname = "VIEW3D_OT_object_as_camera"; /* api callbacks */ - ot->exec= view3d_setobjectascamera_exec; - ot->poll= ED_operator_rv3d_user_region_poll; + ot->exec = view3d_setobjectascamera_exec; + ot->poll = ED_operator_rv3d_user_region_poll; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; } /* ********************************** */ @@ -1580,15 +1580,15 @@ void VIEW3D_OT_localview(wmOperatorType *ot) { /* identifiers */ - ot->name= "Local View"; - ot->description= "Toggle display of selected object(s) separately and centered in view"; - ot->idname= "VIEW3D_OT_localview"; + ot->name = "Local View"; + ot->description = "Toggle display of selected object(s) separately and centered in view"; + ot->idname = "VIEW3D_OT_localview"; /* api callbacks */ - ot->exec= localview_exec; - ot->flag= OPTYPE_UNDO; /* localview changes object layer bitflags */ + ot->exec = localview_exec; + ot->flag = OPTYPE_UNDO; /* localview changes object layer bitflags */ - ot->poll= ED_operator_view3d_active; + ot->poll = ED_operator_view3d_active; } #ifdef WITH_GAMEENGINE @@ -1814,14 +1814,14 @@ void VIEW3D_OT_game_start(wmOperatorType *ot) { /* identifiers */ - ot->name= "Start Game Engine"; - ot->description= "Start game engine"; - ot->idname= "VIEW3D_OT_game_start"; + ot->name = "Start Game Engine"; + ot->description = "Start game engine"; + ot->idname = "VIEW3D_OT_game_start"; /* api callbacks */ - ot->exec= game_engine_exec; + ot->exec = game_engine_exec; - ot->poll= game_engine_poll; + ot->poll = game_engine_poll; } /* ************************************** */ |