merge with trunk at r27259 and commit of a patch by anthony jones to fix msvc (though...
[blender-staging.git] / source / blender / editors / uvedit / uvedit_ops.c
index 67a0642399349157ff7511fdbb784bfed44f264f..e7ae94f97c4e013e75fc9cd2ebd9430175b6b54d 100644 (file)
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
  * All rights reserved.
@@ -1265,14 +1265,14 @@ static int align_exec(bContext *C, wmOperator *op)
 void UV_OT_align(wmOperatorType *ot)
 {
        static EnumPropertyItem axis_items[] = {
-               {'a', "ALIGN_AUTO", 0, "Align Auto", "Automatically choose the axis on which there is most alignment already."},
-               {'x', "ALIGN_X", 0, "Align X", "Align UVs on X axis."},
-               {'y', "ALIGN_Y", 0, "Align Y", "Align UVs on Y axis."},
+               {'a', "ALIGN_AUTO", 0, "Align Auto", "Automatically choose the axis on which there is most alignment already"},
+               {'x', "ALIGN_X", 0, "Align X", "Align UVs on X axis"},
+               {'y', "ALIGN_Y", 0, "Align Y", "Align UVs on Y axis"},
                {0, NULL, 0, NULL, NULL}};
 
        /* identifiers */
        ot->name= "Align";
-       ot->description= "Align selected UV vertices to an axis.";
+       ot->description= "Align selected UV vertices to an axis";
        ot->idname= "UV_OT_align";
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
@@ -1297,7 +1297,7 @@ void UV_OT_weld(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Weld";
-       ot->description= "Weld selected UV vertices together.";
+       ot->description= "Weld selected UV vertices together";
        ot->idname= "UV_OT_weld";
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
@@ -1465,7 +1465,7 @@ void UV_OT_stitch(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Stitch";
-       ot->description= "Stitch selected UV vertices by proximity.";
+       ot->description= "Stitch selected UV vertices by proximity";
        ot->idname= "UV_OT_stitch";
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
@@ -1525,7 +1525,7 @@ void UV_OT_select_inverse(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Select Inverse";
-       ot->description= "Select inverse of (un)selected UV vertices.";
+       ot->description= "Select inverse of (un)selected UV vertices";
        ot->idname= "UV_OT_select_inverse";
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
@@ -1632,7 +1632,7 @@ void UV_OT_select_all(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Select or Deselect All";
-       ot->description= "Change selection of all UV vertices.";
+       ot->description= "Change selection of all UV vertices";
        ot->idname= "UV_OT_select_all";
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
@@ -1976,7 +1976,7 @@ void UV_OT_select(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Select";
-       ot->description= "Select UV vertice.";
+       ot->description= "Select UV vertice";
        ot->idname= "UV_OT_select";
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
@@ -2025,7 +2025,7 @@ void UV_OT_select_loop(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Loop Select";
-       ot->description= "Select a loop of connected UV vertices.";
+       ot->description= "Select a loop of connected UV vertices";
        ot->idname= "UV_OT_select_loop";
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
@@ -2104,7 +2104,7 @@ 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->description= "Select all UV vertices linked to the active UV map";
        ot->idname= "UV_OT_select_linked";
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
@@ -2131,7 +2131,7 @@ 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->description= "Select all UV vertices linked under the mouse";
        ot->idname= "UV_OT_select_linked_pick";
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
@@ -2202,7 +2202,7 @@ void UV_OT_unlink_selection(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Unlink Selection";
-       ot->description= "Unlink selected UV vertices from active UV map.";
+       ot->description= "Unlink selected UV vertices from active UV map";
        ot->idname= "UV_OT_unlink_selection";
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
@@ -2460,7 +2460,7 @@ void UV_OT_select_border(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Border Select";
-       ot->description= "Select UV vertices using border selection.";
+       ot->description= "Select UV vertices using border selection";
        ot->idname= "UV_OT_select_border";
        
        /* api callbacks */
@@ -2553,7 +2553,7 @@ void UV_OT_circle_select(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Circle Select";
-       ot->description= "Select UV vertices using circle selection.";
+       ot->description= "Select UV vertices using circle selection";
        ot->idname= "UV_OT_circle_select";
        
        /* api callbacks */
@@ -2629,7 +2629,7 @@ void UV_OT_snap_cursor(wmOperatorType *ot)
 
        /* identifiers */
        ot->name= "Snap Cursor";
-       ot->description= "Snap cursor to target type.";
+       ot->description= "Snap cursor to target type";
        ot->idname= "UV_OT_snap_cursor";
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
@@ -2838,7 +2838,7 @@ void UV_OT_snap_selection(wmOperatorType *ot)
 
        /* identifiers */
        ot->name= "Snap Selection";
-       ot->description= "Snap selected UV vertices to target type.";
+       ot->description= "Snap selected UV vertices to target type";
        ot->idname= "UV_OT_snap_selection";
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
@@ -2892,7 +2892,7 @@ void UV_OT_pin(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Pin";
-       ot->description= "Set/clear selected UV vertices as anchored between multiple unwrap operations.";
+       ot->description= "Set/clear selected UV vertices as anchored between multiple unwrap operations";
        ot->idname= "UV_OT_pin";
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
@@ -2940,7 +2940,7 @@ void UV_OT_select_pinned(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Selected Pinned";
-       ot->description= "Select all pinned UV vertices.";
+       ot->description= "Select all pinned UV vertices";
        ot->idname= "UV_OT_select_pinned";
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
@@ -3008,7 +3008,7 @@ void UV_OT_hide(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Hide Selected";
-       ot->description= "Hide (un)selected UV vertices.";
+       ot->description= "Hide (un)selected UV vertices";
        ot->idname= "UV_OT_hide";
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
@@ -3072,7 +3072,7 @@ void UV_OT_reveal(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Reveal Hidden";
-       ot->description= "Reveal all hidden UV vertices.";
+       ot->description= "Reveal all hidden UV vertices";
        ot->idname= "UV_OT_reveal";
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
@@ -3115,7 +3115,7 @@ void UV_OT_cursor_set(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Set 2D Cursor";
-       ot->description= "Set 2D cursor location.";
+       ot->description= "Set 2D cursor location";
        ot->idname= "UV_OT_cursor_set";
        
        /* api callbacks */
@@ -3181,7 +3181,7 @@ void UV_OT_tile_set(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Set Tile";
-       ot->description= "Set UV image tile coordinates.";
+       ot->description= "Set UV image tile coordinates";
        ot->idname= "UV_OT_tile_set";
        
        /* api callbacks */
@@ -3265,6 +3265,8 @@ void ED_keymap_uvedit(wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "UV_OT_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "UV_OT_select_pinned", PKEY, KM_PRESS, KM_SHIFT, 0);
 
+       WM_keymap_add_item(keymap, "UV_OT_weld", WKEY, KM_PRESS, 0, 0);
+
        /* uv operations */
        WM_keymap_add_item(keymap, "UV_OT_stitch", VKEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "UV_OT_pin", PKEY, KM_PRESS, 0, 0);