Merge branch 'master' into blender2.8
[blender.git] / source / blender / editors / transform / transform_ops.c
index 870c0e36a3bbb2f8af4d4de95132513de9a283d9..36c444a0ca35dd1b28417cbb7b428273e3573561 100644 (file)
@@ -262,7 +262,7 @@ static int create_orientation_exec(bContext *C, wmOperator *op)
 
        WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d);
        WM_event_add_notifier(C, NC_SCENE | NA_EDITED, CTX_data_scene(C));
-       
+
        return OPERATOR_FINISHED;
 }
 
@@ -466,7 +466,7 @@ static int transform_exec(bContext *C, wmOperator *op)
        transformEnd(C, t);
 
        transformops_exit(C, op);
-       
+
        WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
 
        return OPERATOR_FINISHED;
@@ -549,7 +549,7 @@ void Transform_Properties(struct wmOperatorType *ot, int flags)
                        RNA_def_property_flag(prop, PROP_HIDDEN);
                        prop = RNA_def_float_vector(ot->srna, "snap_point", 3, NULL, -FLT_MAX, FLT_MAX, "Point", "", -FLT_MAX, FLT_MAX);
                        RNA_def_property_flag(prop, PROP_HIDDEN);
-                       
+
                        if (flags & P_ALIGN_SNAP) {
                                prop = RNA_def_boolean(ot->srna, "snap_align", 0, "Align with Point Normal", "");
                                RNA_def_property_flag(prop, PROP_HIDDEN);
@@ -558,11 +558,11 @@ void Transform_Properties(struct wmOperatorType *ot, int flags)
                        }
                }
        }
-       
+
        if (flags & P_GPENCIL_EDIT) {
                RNA_def_boolean(ot->srna, "gpencil_strokes", 0, "Edit Grease Pencil", "Edit selected Grease Pencil strokes");
        }
-       
+
        if ((flags & P_OPTIONS) && !(flags & P_NO_TEXSPACE)) {
                RNA_def_boolean(ot->srna, "texture_space", 0, "Edit Texture Space", "Edit Object data texture space");
                prop = RNA_def_boolean(ot->srna, "remove_on_cancel", 0, "Remove on Cancel", "Remove elements on cancel");
@@ -616,7 +616,7 @@ static void TRANSFORM_OT_resize(struct wmOperatorType *ot)
 {
        /* identifiers */
        ot->name   = "Resize";
-       ot->description = "Scale (resize) selected items"; 
+       ot->description = "Scale (resize) selected items";
        ot->idname = OP_RESIZE;
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING;
 
@@ -649,7 +649,7 @@ static void TRANSFORM_OT_skin_resize(struct wmOperatorType *ot)
 {
        /* identifiers */
        ot->name   = "Skin Resize";
-       ot->description = "Scale selected vertices' skin radii"; 
+       ot->description = "Scale selected vertices' skin radii";
        ot->idname = OP_SKIN_RESIZE;
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING;
 
@@ -720,7 +720,7 @@ static void TRANSFORM_OT_tilt(struct wmOperatorType *ot)
        /* optional -
         * "Tilt selected vertices"
         * "Specify an extra axis rotation for selected vertices of 3D curve" */
-       ot->description = "Tilt selected control vertices of 3D curve"; 
+       ot->description = "Tilt selected control vertices of 3D curve";
        ot->idname = OP_TILT;
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING;
 
@@ -833,7 +833,7 @@ static void TRANSFORM_OT_tosphere(struct wmOperatorType *ot)
 {
        /* identifiers */
        ot->name   = "To Sphere";
-       //added "around mesh center" to differentiate between "MESH_OT_vertices_to_sphere()" 
+       //added "around mesh center" to differentiate between "MESH_OT_vertices_to_sphere()"
        ot->description = "Move selected vertices outward in a spherical shape around mesh center";
        ot->idname = OP_TOSPHERE;
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING;
@@ -876,7 +876,7 @@ static void TRANSFORM_OT_edge_slide(struct wmOperatorType *ot)
 
        /* identifiers */
        ot->name   = "Edge Slide";
-       ot->description = "Slide an edge loop along a mesh"; 
+       ot->description = "Slide an edge loop along a mesh";
        ot->idname = OP_EDGE_SLIDE;
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING;
 
@@ -1067,7 +1067,7 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac
 {
        wmKeyMapItem *kmi;
        wmKeyMap *modalmap;
-       
+
        /* transform.c, only adds modal map once, checks if it's there */
        modalmap = transform_modal_keymap(keyconf);
 
@@ -1080,7 +1080,7 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac
                }
                WM_modalkeymap_assign(modalmap, "TRANSFORM_OT_transform");
        }
-       
+
        switch (spaceid) {
                case SPACE_VIEW3D:
                        WM_keymap_add_item(keymap, OP_TRANSLATION, GKEY, KM_PRESS, 0, 0);
@@ -1125,41 +1125,41 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac
                case SPACE_ACTION:
                        kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", GKEY, KM_PRESS, 0, 0);
                        RNA_enum_set(kmi->ptr, "mode", TFM_TIME_TRANSLATE);
-                       
+
                        kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", EVT_TWEAK_S, KM_ANY, 0, 0);
                        RNA_enum_set(kmi->ptr, "mode", TFM_TIME_TRANSLATE);
-                       
+
                        kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", EKEY, KM_PRESS, 0, 0);
                        RNA_enum_set(kmi->ptr, "mode", TFM_TIME_EXTEND);
-                       
+
                        kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, 0, 0);
                        RNA_enum_set(kmi->ptr, "mode", TFM_TIME_SCALE);
-                       
+
                        kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", TKEY, KM_PRESS, KM_SHIFT, 0);
                        RNA_enum_set(kmi->ptr, "mode", TFM_TIME_SLIDE);
                        break;
                case SPACE_IPO:
                        WM_keymap_add_item(keymap, OP_TRANSLATION, GKEY, KM_PRESS, 0, 0);
-                       
+
                        WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_S, KM_ANY, 0, 0);
-                       
+
                        kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", EKEY, KM_PRESS, 0, 0);
                        RNA_enum_set(kmi->ptr, "mode", TFM_TIME_EXTEND);
-                       
+
                        WM_keymap_add_item(keymap, OP_ROTATION, RKEY, KM_PRESS, 0, 0);
-                       
+
                        WM_keymap_add_item(keymap, OP_RESIZE, SKEY, KM_PRESS, 0, 0);
                        break;
                case SPACE_NLA:
                        kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", GKEY, KM_PRESS, 0, 0);
                        RNA_enum_set(kmi->ptr, "mode", TFM_TRANSLATION);
-                       
+
                        kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", EVT_TWEAK_S, KM_ANY, 0, 0);
                        RNA_enum_set(kmi->ptr, "mode", TFM_TRANSLATION);
-                       
+
                        kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", EKEY, KM_PRESS, 0, 0);
                        RNA_enum_set(kmi->ptr, "mode", TFM_TIME_EXTEND);
-                       
+
                        kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, 0, 0);
                        RNA_enum_set(kmi->ptr, "mode", TFM_TIME_SCALE);
                        break;