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/uvedit | |
parent | 675628d24deba0afdc3da5b7a5bc802b13506251 (diff) |
style cleanup: spaces aroudn operators for operator definitions.
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_ops.c | 262 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_smart_stitch.c | 2 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_unwrap_ops.c | 100 |
3 files changed, 182 insertions, 182 deletions
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 744a415b23c..f3ca618b547 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -1549,14 +1549,14 @@ static void UV_OT_align(wmOperatorType *ot) {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Align"; - ot->description= "Align selected UV vertices to an axis"; - ot->idname= "UV_OT_align"; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->name = "Align"; + ot->description = "Align selected UV vertices to an axis"; + ot->idname = "UV_OT_align"; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* api callbacks */ - ot->exec= align_exec; - ot->poll= ED_operator_image_active; /* requires space image */; + ot->exec = align_exec; + ot->poll = ED_operator_image_active; /* requires space image */; /* properties */ RNA_def_enum(ot->srna, "axis", axis_items, 'a', "Axis", "Axis to align UV locations on"); @@ -1574,14 +1574,14 @@ static int weld_exec(bContext *C, wmOperator *UNUSED(op)) static void UV_OT_weld(wmOperatorType *ot) { /* identifiers */ - ot->name= "Weld"; - ot->description= "Weld selected UV vertices together"; - ot->idname= "UV_OT_weld"; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->name = "Weld"; + ot->description = "Weld selected UV vertices together"; + ot->idname = "UV_OT_weld"; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* api callbacks */ - ot->exec= weld_exec; - ot->poll= ED_operator_uvedit; + ot->exec = weld_exec; + ot->poll = ED_operator_uvedit; } @@ -1684,14 +1684,14 @@ static int select_all_exec(bContext *C, wmOperator *op) static void UV_OT_select_all(wmOperatorType *ot) { /* identifiers */ - ot->name= "(De)select All"; - ot->description= "Change selection of all UV vertices"; - ot->idname= "UV_OT_select_all"; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->name = "(De)select All"; + ot->description = "Change selection of all UV vertices"; + ot->idname = "UV_OT_select_all"; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* api callbacks */ - ot->exec= select_all_exec; - ot->poll= ED_operator_uvedit; + ot->exec = select_all_exec; + ot->poll = ED_operator_uvedit; WM_operator_properties_select_all(ot); } @@ -2045,15 +2045,15 @@ static int select_invoke(bContext *C, wmOperator *op, wmEvent *event) static void UV_OT_select(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select"; - ot->description= "Select UV vertices"; - ot->idname= "UV_OT_select"; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->name = "Select"; + ot->description = "Select UV vertices"; + ot->idname = "UV_OT_select"; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* api callbacks */ - ot->exec= select_exec; - ot->invoke= select_invoke; - ot->poll= ED_operator_image_active; /* requires space image */; + ot->exec = select_exec; + ot->invoke = select_invoke; + ot->poll = ED_operator_image_active; /* requires space image */; /* properties */ RNA_def_boolean(ot->srna, "extend", 0, @@ -2090,15 +2090,15 @@ static int select_loop_invoke(bContext *C, wmOperator *op, wmEvent *event) static void UV_OT_select_loop(wmOperatorType *ot) { /* identifiers */ - ot->name= "Loop Select"; - ot->description= "Select a loop of connected UV vertices"; - ot->idname= "UV_OT_select_loop"; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->name = "Loop Select"; + ot->description = "Select a loop of connected UV vertices"; + ot->idname = "UV_OT_select_loop"; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* api callbacks */ - ot->exec= select_loop_exec; - ot->invoke= select_loop_invoke; - ot->poll= ED_operator_image_active; /* requires space image */; + ot->exec = select_loop_exec; + ot->invoke = select_loop_invoke; + ot->poll = ED_operator_image_active; /* requires space image */; /* properties */ RNA_def_boolean(ot->srna, "extend", 0, @@ -2165,14 +2165,14 @@ static int select_linked_exec(bContext *C, wmOperator *op) static void UV_OT_select_linked(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Linked"; - ot->description= "Select all UV vertices linked to the active UV map"; - ot->idname= "UV_OT_select_linked"; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->name = "Select Linked"; + ot->description = "Select all UV vertices linked to the active UV map"; + ot->idname = "UV_OT_select_linked"; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* api callbacks */ - ot->exec= select_linked_exec; - ot->poll= ED_operator_image_active; /* requires space image */ + ot->exec = select_linked_exec; + ot->poll = ED_operator_image_active; /* requires space image */ /* properties */ RNA_def_boolean(ot->srna, "extend", 0, @@ -2192,15 +2192,15 @@ static int select_linked_pick_exec(bContext *C, wmOperator *op) static void UV_OT_select_linked_pick(wmOperatorType *ot) { /* identifiers */ - ot->name= "Select Linked Pick"; - ot->description= "Select all UV vertices linked under the mouse"; - ot->idname= "UV_OT_select_linked_pick"; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->name = "Select Linked Pick"; + ot->description = "Select all UV vertices linked under the mouse"; + ot->idname = "UV_OT_select_linked_pick"; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* api callbacks */ - ot->invoke= select_linked_pick_invoke; - ot->exec= select_linked_pick_exec; - ot->poll= ED_operator_image_active; /* requires space image */; + ot->invoke = select_linked_pick_invoke; + ot->exec = select_linked_pick_exec; + ot->poll = ED_operator_image_active; /* requires space image */; /* properties */ RNA_def_boolean(ot->srna, "extend", 0, @@ -2263,14 +2263,14 @@ static int unlink_selection_exec(bContext *C, wmOperator *op) static void UV_OT_unlink_selected(wmOperatorType *ot) { /* identifiers */ - ot->name= "Unlink Selection"; - ot->description= "Unlink selected UV vertices from active UV map"; - ot->idname= "UV_OT_unlink_selected"; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->name = "Unlink Selection"; + ot->description = "Unlink selected UV vertices from active UV map"; + ot->idname = "UV_OT_unlink_selected"; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* api callbacks */ - ot->exec= unlink_selection_exec; - ot->poll= ED_operator_uvedit; + ot->exec = unlink_selection_exec; + ot->poll = ED_operator_uvedit; } /* ******************** border select operator **************** */ @@ -2528,19 +2528,19 @@ static int border_select_exec(bContext *C, wmOperator *op) static void UV_OT_select_border(wmOperatorType *ot) { /* identifiers */ - ot->name= "Border Select"; - ot->description= "Select UV vertices using border selection"; - ot->idname= "UV_OT_select_border"; + ot->name = "Border Select"; + ot->description = "Select UV vertices using border selection"; + ot->idname = "UV_OT_select_border"; /* api callbacks */ - ot->invoke= WM_border_select_invoke; - ot->exec= border_select_exec; - ot->modal= WM_border_select_modal; - ot->poll= ED_operator_image_active; /* requires space image */; - ot->cancel= WM_border_select_cancel; + ot->invoke = WM_border_select_invoke; + ot->exec = border_select_exec; + ot->modal = WM_border_select_modal; + ot->poll = ED_operator_image_active; /* requires space image */; + ot->cancel = WM_border_select_cancel; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ RNA_def_boolean(ot->srna, "pinned", 0, "Pinned", "Border select pinned UVs only"); @@ -2620,19 +2620,19 @@ static int circle_select_exec(bContext *C, wmOperator *op) static void UV_OT_circle_select(wmOperatorType *ot) { /* identifiers */ - ot->name= "Circle Select"; - ot->description= "Select UV vertices using circle selection"; - ot->idname= "UV_OT_circle_select"; + ot->name = "Circle Select"; + ot->description = "Select UV vertices using circle selection"; + ot->idname = "UV_OT_circle_select"; /* api callbacks */ - ot->invoke= WM_gesture_circle_invoke; - ot->modal= WM_gesture_circle_modal; - ot->exec= circle_select_exec; - ot->poll= ED_operator_image_active; /* requires space image */; - ot->cancel= WM_gesture_circle_cancel; + ot->invoke = WM_gesture_circle_invoke; + ot->modal = WM_gesture_circle_modal; + ot->exec = circle_select_exec; + ot->poll = ED_operator_image_active; /* requires space image */; + ot->cancel = WM_gesture_circle_cancel; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX); @@ -2696,14 +2696,14 @@ static void UV_OT_snap_cursor(wmOperatorType *ot) {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Snap Cursor"; - ot->description= "Snap cursor to target type"; - ot->idname= "UV_OT_snap_cursor"; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->name = "Snap Cursor"; + ot->description = "Snap cursor to target type"; + ot->idname = "UV_OT_snap_cursor"; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* api callbacks */ - ot->exec= snap_cursor_exec; - ot->poll= ED_operator_image_active; /* requires space image */; + ot->exec = snap_cursor_exec; + ot->poll = ED_operator_image_active; /* requires space image */; /* properties */ RNA_def_enum(ot->srna, "target", target_items, 0, "Target", "Target to snap the selected UVs to"); @@ -2909,14 +2909,14 @@ static void UV_OT_snap_selected(wmOperatorType *ot) {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Snap Selection"; - ot->description= "Snap selected UV vertices to target type"; - ot->idname= "UV_OT_snap_selected"; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->name = "Snap Selection"; + ot->description = "Snap selected UV vertices to target type"; + ot->idname = "UV_OT_snap_selected"; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* api callbacks */ - ot->exec= snap_selection_exec; - ot->poll= ED_operator_image_active; /* requires space image */; + ot->exec = snap_selection_exec; + ot->poll = ED_operator_image_active; /* requires space image */; /* properties */ RNA_def_enum(ot->srna, "target", target_items, 0, "Target", "Target to snap the selected UVs to"); @@ -2963,14 +2963,14 @@ static int pin_exec(bContext *C, wmOperator *op) static void UV_OT_pin(wmOperatorType *ot) { /* identifiers */ - ot->name= "Pin"; - ot->description= "Set/clear selected UV vertices as anchored between multiple unwrap operations"; - ot->idname= "UV_OT_pin"; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->name = "Pin"; + ot->description = "Set/clear selected UV vertices as anchored between multiple unwrap operations"; + ot->idname = "UV_OT_pin"; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* api callbacks */ - ot->exec= pin_exec; - ot->poll= ED_operator_uvedit; + ot->exec = pin_exec; + ot->poll = ED_operator_uvedit; /* properties */ RNA_def_boolean(ot->srna, "clear", 0, "Clear", "Clear pinning for the selection instead of setting it"); @@ -3011,14 +3011,14 @@ static int select_pinned_exec(bContext *C, wmOperator *UNUSED(op)) static void UV_OT_select_pinned(wmOperatorType *ot) { /* identifiers */ - ot->name= "Selected Pinned"; - ot->description= "Select all pinned UV vertices"; - ot->idname= "UV_OT_select_pinned"; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->name = "Selected Pinned"; + ot->description = "Select all pinned UV vertices"; + ot->idname = "UV_OT_select_pinned"; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* api callbacks */ - ot->exec= select_pinned_exec; - ot->poll= ED_operator_uvedit; + ot->exec = select_pinned_exec; + ot->poll = ED_operator_uvedit; } /********************** hide operator *********************/ @@ -3104,14 +3104,14 @@ static int hide_exec(bContext *C, wmOperator *op) static void UV_OT_hide(wmOperatorType *ot) { /* identifiers */ - ot->name= "Hide Selected"; - ot->description= "Hide (un)selected UV vertices"; - ot->idname= "UV_OT_hide"; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->name = "Hide Selected"; + ot->description = "Hide (un)selected UV vertices"; + ot->idname = "UV_OT_hide"; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* api callbacks */ - ot->exec= hide_exec; - ot->poll= ED_operator_uvedit; + ot->exec = hide_exec; + ot->poll = ED_operator_uvedit; /* props */ RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected"); @@ -3221,14 +3221,14 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op)) static void UV_OT_reveal(wmOperatorType *ot) { /* identifiers */ - ot->name= "Reveal Hidden"; - ot->description= "Reveal all hidden UV vertices"; - ot->idname= "UV_OT_reveal"; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->name = "Reveal Hidden"; + ot->description = "Reveal all hidden UV vertices"; + ot->idname = "UV_OT_reveal"; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* api callbacks */ - ot->exec= reveal_exec; - ot->poll= ED_operator_uvedit; + ot->exec = reveal_exec; + ot->poll = ED_operator_uvedit; } /******************** set 3d cursor operator ********************/ @@ -3264,17 +3264,17 @@ static int set_2d_cursor_invoke(bContext *C, wmOperator *op, wmEvent *event) static void UV_OT_cursor_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set 2D Cursor"; - ot->description= "Set 2D cursor location"; - ot->idname= "UV_OT_cursor_set"; + ot->name = "Set 2D Cursor"; + ot->description = "Set 2D cursor location"; + ot->idname = "UV_OT_cursor_set"; /* api callbacks */ - ot->exec= set_2d_cursor_exec; - ot->invoke= set_2d_cursor_invoke; - ot->poll= ED_operator_image_active; /* requires space image */; + ot->exec = set_2d_cursor_exec; + ot->invoke = set_2d_cursor_invoke; + ot->poll = ED_operator_image_active; /* requires space image */; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, "Location", "Cursor location in normalised (0.0-1.0) coordinates", -10.0f, 10.0f); @@ -3330,17 +3330,17 @@ static int set_tile_invoke(bContext *C, wmOperator *op, wmEvent *event) static void UV_OT_tile_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Tile"; - ot->description= "Set UV image tile coordinates"; - ot->idname= "UV_OT_tile_set"; + ot->name = "Set Tile"; + ot->description = "Set UV image tile coordinates"; + ot->idname = "UV_OT_tile_set"; /* api callbacks */ - ot->exec= set_tile_exec; - ot->invoke= set_tile_invoke; - ot->poll= ED_operator_image_active; /* requires space image */; + ot->exec = set_tile_exec; + ot->invoke = set_tile_invoke; + ot->poll = ED_operator_image_active; /* requires space image */; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ RNA_def_int_vector(ot->srna, "tile", 2, NULL, 0, INT_MAX, "Tile", "Tile coordinate", 0, 10); @@ -3461,16 +3461,16 @@ static int seams_from_islands_exec(bContext *C, wmOperator *op) static void UV_OT_seams_from_islands(wmOperatorType *ot) { /* identifiers */ - ot->name= "Seams From Islands"; - ot->description= "Set mesh seams according to island setup in the UV editor"; - ot->idname= "UV_OT_seams_from_islands"; + ot->name = "Seams From Islands"; + ot->description = "Set mesh seams according to island setup in the UV editor"; + ot->idname = "UV_OT_seams_from_islands"; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* api callbacks */ - ot->exec= seams_from_islands_exec; - ot->poll= ED_operator_uvedit; + ot->exec = seams_from_islands_exec; + ot->poll = ED_operator_uvedit; RNA_def_boolean(ot->srna, "mark_seams", 1, "Mark Seams", "Mark boundary edges as seams"); RNA_def_boolean(ot->srna, "mark_sharp", 0, "Mark Sharp", "Mark boundary edges as sharp"); @@ -3510,16 +3510,16 @@ static int mark_seam_exec(bContext *C, wmOperator *UNUSED(op)) static void UV_OT_mark_seam(wmOperatorType *ot) { /* identifiers */ - ot->name= "Mark Seams"; - ot->description= "Mark selected UV edges as seams"; - ot->idname= "UV_OT_mark_seam"; + ot->name = "Mark Seams"; + ot->description = "Mark selected UV edges as seams"; + ot->idname = "UV_OT_mark_seam"; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* api callbacks */ - ot->exec= mark_seam_exec; - ot->poll= ED_operator_uvedit; + ot->exec = mark_seam_exec; + ot->poll = ED_operator_uvedit; } diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index 64c15f6f496..ad96142ae86 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -1451,7 +1451,7 @@ void UV_OT_stitch(wmOperatorType *ot) ot->modal = stitch_modal; ot->exec = stitch_exec; ot->cancel = stitch_cancel; - ot->poll= ED_operator_uvedit; + ot->poll = ED_operator_uvedit; /* properties */ RNA_def_boolean(ot->srna, "use_limit", 0, "Use Limit", "Stitch UVs within a specified limit distance"); diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index cfb0128486a..94879ff8e7f 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -684,17 +684,17 @@ static int minimize_stretch_cancel(bContext *C, wmOperator *op) void UV_OT_minimize_stretch(wmOperatorType *ot) { /* identifiers */ - ot->name= "Minimize Stretch"; - ot->idname= "UV_OT_minimize_stretch"; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_GRAB_POINTER|OPTYPE_BLOCKING; - ot->description="Reduce UV stretching by relaxing angles"; + ot->name = "Minimize Stretch"; + ot->idname = "UV_OT_minimize_stretch"; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_GRAB_POINTER|OPTYPE_BLOCKING; + ot->description = "Reduce UV stretching by relaxing angles"; /* api callbacks */ - ot->exec= minimize_stretch_exec; - ot->invoke= minimize_stretch_invoke; - ot->modal= minimize_stretch_modal; - ot->cancel= minimize_stretch_cancel; - ot->poll= ED_operator_uvedit; + ot->exec = minimize_stretch_exec; + ot->invoke = minimize_stretch_invoke; + ot->modal = minimize_stretch_modal; + ot->cancel = minimize_stretch_cancel; + ot->poll = ED_operator_uvedit; /* properties */ RNA_def_boolean(ot->srna, "fill_holes", 1, "Fill Holes", "Virtual fill holes in mesh before unwrapping, to better avoid overlaps and preserve symmetry"); @@ -737,13 +737,13 @@ static int pack_islands_exec(bContext *C, wmOperator *op) void UV_OT_pack_islands(wmOperatorType *ot) { /* identifiers */ - ot->name= "Pack Islands"; - ot->idname= "UV_OT_pack_islands"; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->name = "Pack Islands"; + ot->idname = "UV_OT_pack_islands"; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* api callbacks */ - ot->exec= pack_islands_exec; - ot->poll= ED_operator_uvedit; + ot->exec = pack_islands_exec; + ot->poll = ED_operator_uvedit; /* properties */ RNA_def_float_factor(ot->srna, "margin", 0.0f, 0.0f, 1.0f, "Margin", "Space between islands", 0.0f, 1.0f); @@ -777,13 +777,13 @@ static int average_islands_scale_exec(bContext *C, wmOperator *UNUSED(op)) void UV_OT_average_islands_scale(wmOperatorType *ot) { /* identifiers */ - ot->name= "Average Islands Scale"; - ot->idname= "UV_OT_average_islands_scale"; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->name = "Average Islands Scale"; + ot->idname = "UV_OT_average_islands_scale"; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* api callbacks */ - ot->exec= average_islands_scale_exec; - ot->poll= ED_operator_uvedit; + ot->exec = average_islands_scale_exec; + ot->poll = ED_operator_uvedit; } /**************** Live Unwrap *****************/ @@ -1191,14 +1191,14 @@ void UV_OT_unwrap(wmOperatorType *ot) {0, NULL, 0, NULL, NULL}}; /* identifiers */ - ot->name= "Unwrap"; - ot->description= "Unwrap the mesh of the object being edited"; - ot->idname= "UV_OT_unwrap"; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->name = "Unwrap"; + ot->description = "Unwrap the mesh of the object being edited"; + ot->idname = "UV_OT_unwrap"; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* api callbacks */ - ot->exec= unwrap_exec; - ot->poll= ED_operator_uvmap; + ot->exec = unwrap_exec; + ot->poll = ED_operator_uvmap; /* properties */ RNA_def_enum(ot->srna, "method", method_items, 0, "Method", @@ -1304,13 +1304,13 @@ static int uv_from_view_poll(bContext *C) void UV_OT_from_view(wmOperatorType *ot) { /* identifiers */ - ot->name= "Project From View"; - ot->idname= "UV_OT_project_from_view"; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->name = "Project From View"; + ot->idname = "UV_OT_project_from_view"; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* api callbacks */ - ot->exec= uv_from_view_exec; - ot->poll= uv_from_view_poll; + ot->exec = uv_from_view_exec; + ot->poll = uv_from_view_poll; /* properties */ RNA_def_boolean(ot->srna, "orthographic", 0, "Orthographic", "Use orthographic projection"); @@ -1343,13 +1343,13 @@ static int reset_exec(bContext *C, wmOperator *UNUSED(op)) void UV_OT_reset(wmOperatorType *ot) { /* identifiers */ - ot->name= "Reset"; - ot->idname= "UV_OT_reset"; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->name = "Reset"; + ot->idname = "UV_OT_reset"; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* api callbacks */ - ot->exec= reset_exec; - ot->poll= ED_operator_uvmap; + ot->exec = reset_exec; + ot->poll = ED_operator_uvmap; } /****************** Sphere Project operator ***************/ @@ -1444,13 +1444,13 @@ static int sphere_project_exec(bContext *C, wmOperator *op) void UV_OT_sphere_project(wmOperatorType *ot) { /* identifiers */ - ot->name= "Sphere Projection"; - ot->idname= "UV_OT_sphere_project"; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->name = "Sphere Projection"; + ot->idname = "UV_OT_sphere_project"; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* api callbacks */ - ot->exec= sphere_project_exec; - ot->poll= ED_operator_uvmap; + ot->exec = sphere_project_exec; + ot->poll = ED_operator_uvmap; /* properties */ uv_transform_properties(ot, 0); @@ -1517,13 +1517,13 @@ static int cylinder_project_exec(bContext *C, wmOperator *op) void UV_OT_cylinder_project(wmOperatorType *ot) { /* identifiers */ - ot->name= "Cylinder Projection"; - ot->idname= "UV_OT_cylinder_project"; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->name = "Cylinder Projection"; + ot->idname = "UV_OT_cylinder_project"; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* api callbacks */ - ot->exec= cylinder_project_exec; - ot->poll= ED_operator_uvmap; + ot->exec = cylinder_project_exec; + ot->poll = ED_operator_uvmap; /* properties */ uv_transform_properties(ot, 1); @@ -1595,13 +1595,13 @@ static int cube_project_exec(bContext *C, wmOperator *op) void UV_OT_cube_project(wmOperatorType *ot) { /* identifiers */ - ot->name= "Cube Projection"; - ot->idname= "UV_OT_cube_project"; - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + ot->name = "Cube Projection"; + ot->idname = "UV_OT_cube_project"; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; /* api callbacks */ - ot->exec= cube_project_exec; - ot->poll= ED_operator_uvmap; + ot->exec = cube_project_exec; + ot->poll = ED_operator_uvmap; /* properties */ RNA_def_float(ot->srna, "cube_size", 1.0f, 0.0f, FLT_MAX, "Cube Size", "Size of the cube to project on", 0.001f, 100.0f); |