merge with trunk at r27259 and commit of a patch by anthony jones to fix msvc (though...
[blender-staging.git] / source / blender / editors / transform / transform_ops.c
index 6d352f47ef3bad72e42b59ce7dc8dca87d2d72d0..95e0d270fde3cbe716356517e01ce5b0bdc53a71 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.
  *
  * Contributor(s): none yet.
  *
@@ -108,7 +108,7 @@ static int snap_type_exec(bContext *C, wmOperator *op)
 
        ts->snap_mode = RNA_enum_get(op->ptr,"type");
 
-       WM_event_add_notifier(C, NC_SCENE|ND_MODE, NULL); /* header redraw */
+       WM_event_add_notifier(C, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
 
        return OPERATOR_FINISHED;
 }
@@ -117,7 +117,7 @@ void TRANSFORM_OT_snap_type(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Snap Type";
-       ot->description= "Set the snap element type.";
+       ot->description= "Set the snap element type";
        ot->idname= "TRANSFORM_OT_snap_type";
 
        /* api callbacks */
@@ -130,7 +130,7 @@ void TRANSFORM_OT_snap_type(wmOperatorType *ot)
        ot->flag= OPTYPE_UNDO;
 
        /* props */
-       RNA_def_enum(ot->srna, "type", snap_element_items, 0, "Type", "Set the snap element type");
+       ot->prop= RNA_def_enum(ot->srna, "type", snap_element_items, 0, "Type", "Set the snap element type");
 
 }
 
@@ -164,7 +164,7 @@ void TRANSFORM_OT_select_orientation(struct wmOperatorType *ot)
 
        /* identifiers */
        ot->name   = "Select Orientation";
-       ot->description= "Select transformation orientation.";
+       ot->description= "Select transformation orientation";
        ot->idname = "TRANSFORM_OT_select_orientation";
        ot->flag   = OPTYPE_UNDO;
 
@@ -174,7 +174,7 @@ void TRANSFORM_OT_select_orientation(struct wmOperatorType *ot)
        ot->poll   = ED_operator_areaactive;
 
        prop= RNA_def_property(ot->srna, "orientation", PROP_ENUM, PROP_NONE);
-       RNA_def_property_ui_text(prop, "Orientation", "Transformation orientation.");
+       RNA_def_property_ui_text(prop, "Orientation", "Transformation orientation");
        RNA_def_enum_funcs(prop, rna_TransformOrientation_itemf);
 }
 
@@ -187,6 +187,7 @@ static int delete_orientation_exec(bContext *C, wmOperator *op)
        BIF_removeTransformOrientationIndex(C, selected_index);
        
        WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, CTX_wm_view3d(C));
+       WM_event_add_notifier(C, NC_SCENE|NA_EDITED, CTX_data_scene(C));
 
        return OPERATOR_FINISHED;
 }
@@ -216,7 +217,7 @@ void TRANSFORM_OT_delete_orientation(struct wmOperatorType *ot)
 {
        /* identifiers */
        ot->name   = "Delete Orientation";
-       ot->description= "Delete transformation orientation.";
+       ot->description= "Delete transformation orientation";
        ot->idname = "TRANSFORM_OT_delete_orientation";
        ot->flag   = OPTYPE_UNDO;
 
@@ -237,6 +238,7 @@ static int create_orientation_exec(bContext *C, wmOperator *op)
        BIF_createTransformOrientation(C, op->reports, name, use, overwrite);
 
        WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, CTX_wm_view3d(C));
+       WM_event_add_notifier(C, NC_SCENE|NA_EDITED, CTX_data_scene(C));
        
        return OPERATOR_FINISHED;
 }
@@ -250,7 +252,7 @@ void TRANSFORM_OT_create_orientation(struct wmOperatorType *ot)
 {
        /* identifiers */
        ot->name   = "Create Orientation";
-       ot->description= "Create transformation orientation from selection.";
+       ot->description= "Create transformation orientation from selection";
        ot->idname = "TRANSFORM_OT_create_orientation";
        ot->flag   = OPTYPE_REGISTER|OPTYPE_UNDO;
 
@@ -394,7 +396,7 @@ void Properties_Axis(struct wmOperatorType *ot)
 
        prop= RNA_def_property(ot->srna, "axis", PROP_FLOAT, PROP_DIRECTION);
        RNA_def_property_array(prop, 3);
-       RNA_def_property_ui_text(prop, "Axis", "The axis around which the transformation occurs.");
+       RNA_def_property_ui_text(prop, "Axis", "The axis around which the transformation occurs");
 }
 
 void Properties_Snapping(struct wmOperatorType *ot, short fullsnap, short align)
@@ -418,7 +420,7 @@ void Properties_Constraints(struct wmOperatorType *ot)
 
        RNA_def_boolean_vector(ot->srna, "constraint_axis", 3, NULL, "Constraint Axis", "");
        prop= RNA_def_property(ot->srna, "constraint_orientation", PROP_ENUM, PROP_NONE);
-       RNA_def_property_ui_text(prop, "Orientation", "Transformation orientation.");
+       RNA_def_property_ui_text(prop, "Orientation", "Transformation orientation");
        RNA_def_enum_funcs(prop, rna_TransformOrientation_itemf);
 }
 
@@ -426,7 +428,7 @@ void TRANSFORM_OT_translate(struct wmOperatorType *ot)
 {
        /* identifiers */
        ot->name   = "Translate";
-       ot->description= "Translate selected items.";
+       ot->description= "Translate selected items";
        ot->idname = OP_TRANSLATION;
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 
@@ -452,7 +454,7 @@ void TRANSFORM_OT_resize(struct wmOperatorType *ot)
 {
        /* identifiers */
        ot->name   = "Resize";
-       ot->description= "Resize selected items."; 
+       ot->description= "Resize selected items"; 
        ot->idname = OP_RESIZE;
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 
@@ -479,7 +481,7 @@ void TRANSFORM_OT_trackball(struct wmOperatorType *ot)
 {
        /* identifiers */
        ot->name   = "Trackball";
-       ot->description= "Trackball style rotation of selected items.";
+       ot->description= "Trackball style rotation of selected items";
        ot->idname = OP_TRACKBALL;
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 
@@ -503,7 +505,7 @@ void TRANSFORM_OT_rotate(struct wmOperatorType *ot)
 {
        /* identifiers */
        ot->name   = "Rotate";
-       ot->description= "Rotate selected items.";
+       ot->description= "Rotate selected items";
        ot->idname = OP_ROTATION;
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 
@@ -534,7 +536,7 @@ void TRANSFORM_OT_tilt(struct wmOperatorType *ot)
     /*optionals - 
         "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;
 
@@ -560,7 +562,7 @@ void TRANSFORM_OT_warp(struct wmOperatorType *ot)
 {
        /* identifiers */
        ot->name   = "Warp";
-       ot->description= "Warp selected items around the cursor.";
+       ot->description= "Warp selected items around the cursor";
        ot->idname = OP_WARP;
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 
@@ -587,7 +589,7 @@ void TRANSFORM_OT_shear(struct wmOperatorType *ot)
 {
        /* identifiers */
        ot->name   = "Shear";
-       ot->description= "Shear selected items along the horizontal screen axis.";
+       ot->description= "Shear selected items along the horizontal screen axis";
        ot->idname = OP_SHEAR;
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 
@@ -614,7 +616,7 @@ void TRANSFORM_OT_shrink_fatten(struct wmOperatorType *ot)
 {
        /* identifiers */
        ot->name   = "Shrink/Fatten";
-       ot->description= "Shrink/fatten selected vertices along normals.";
+       ot->description= "Shrink/fatten selected vertices along normals";
        ot->idname = OP_SHRINK_FATTEN;
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 
@@ -639,7 +641,7 @@ void TRANSFORM_OT_tosphere(struct wmOperatorType *ot)
        /* identifiers */
        ot->name   = "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->description= "Move selected vertices outward in a spherical shape around mesh center";
        ot->idname = OP_TOSPHERE;
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 
@@ -663,7 +665,7 @@ void TRANSFORM_OT_mirror(struct wmOperatorType *ot)
 {
        /* identifiers */
        ot->name   = "Mirror";
-       ot->description= "Mirror selected vertices around one or more axes.";
+       ot->description= "Mirror selected vertices around one or more axes";
        ot->idname = OP_MIRROR;
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 
@@ -682,7 +684,7 @@ 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;
 
@@ -704,7 +706,7 @@ void TRANSFORM_OT_edge_crease(struct wmOperatorType *ot)
 {
        /* identifiers */
        ot->name   = "Edge Crease";
-       ot->description= "Change the crease of edges.";
+       ot->description= "Change the crease of edges";
        ot->idname = OP_EDGE_CREASE;
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 
@@ -724,7 +726,7 @@ void TRANSFORM_OT_seq_slide(struct wmOperatorType *ot)
 {
        /* identifiers */
        ot->name   = "Sequence Slide";
-       ot->description= "Slide a sequence strip in time.";
+       ot->description= "Slide a sequence strip in time";
        ot->idname = OP_SEQ_SLIDE;
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 
@@ -776,7 +778,7 @@ void TRANSFORM_OT_transform(struct wmOperatorType *ot)
 
        /* identifiers */
        ot->name   = "Transform";
-       ot->description= "Transform selected items by mode type.";
+       ot->description= "Transform selected items by mode type";
        ot->idname = "TRANSFORM_OT_transform";
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 
@@ -863,7 +865,7 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac
                        km = WM_keymap_add_item(keymap, "WM_OT_context_toggle", TABKEY, KM_PRESS, KM_SHIFT, 0);
                        RNA_string_set(km->ptr, "path", "tool_settings.snap");
 
-                       km = WM_keymap_add_item(keymap, "TRANSFORM_OT_snap_type", TABKEY, KM_PRESS, KM_SHIFT|KM_CLICK, 0);
+                       km = WM_keymap_add_item(keymap, "TRANSFORM_OT_snap_type", TABKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
 
                        break;
                case SPACE_ACTION: