Revision: 39564
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39564
Author:   campbellbarton
Date:     2011-08-19 20:25:25 +0000 (Fri, 19 Aug 2011)
Log Message:
-----------
remove over zealous undo's on operators that don't need it.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/render/render_shading.c
    trunk/blender/source/blender/editors/space_image/image_ops.c
    trunk/blender/source/blender/editors/space_info/info_ops.c
    trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c

Modified: trunk/blender/source/blender/editors/render/render_shading.c
===================================================================
--- trunk/blender/source/blender/editors/render/render_shading.c        
2011-08-19 19:25:20 UTC (rev 39563)
+++ trunk/blender/source/blender/editors/render/render_shading.c        
2011-08-19 20:25:25 UTC (rev 39564)
@@ -787,7 +787,7 @@
        ot->poll= envmap_save_poll;
        
        /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       ot->flag= OPTYPE_REGISTER; /* no undo since this doesnt modify the 
env-map */
        
        /* properties */
        //RNA_def_enum(ot->srna, "file_type", image_file_type_items, R_PNG, 
"File Type", "File type to save image as.");
@@ -875,8 +875,6 @@
 
        copy_matcopybuf(ma);
 
-       WM_event_add_notifier(C, NC_MATERIAL, ma);
-
        return OPERATOR_FINISHED;
 }
 
@@ -891,7 +889,7 @@
        ot->exec= copy_material_exec;
 
        /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       ot->flag= OPTYPE_REGISTER; /* no undo needed since no changes are made 
to the material */
 }
 
 static int paste_material_exec(bContext *C, wmOperator *UNUSED(op))
@@ -1015,8 +1013,6 @@
 
        copy_mtex_copybuf(id);
 
-       WM_event_add_notifier(C, NC_TEXTURE, NULL);
-
        return OPERATOR_FINISHED;
 }
 
@@ -1039,7 +1035,7 @@
        ot->poll= copy_mtex_poll;
        
        /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       ot->flag= OPTYPE_REGISTER; /* no undo needed since no changes are made 
to the mtex */
 }
 
 static int paste_mtex_exec(bContext *C, wmOperator *UNUSED(op))

Modified: trunk/blender/source/blender/editors/space_image/image_ops.c
===================================================================
--- trunk/blender/source/blender/editors/space_image/image_ops.c        
2011-08-19 19:25:20 UTC (rev 39563)
+++ trunk/blender/source/blender/editors/space_image/image_ops.c        
2011-08-19 20:25:25 UTC (rev 39564)
@@ -1331,7 +1331,7 @@
        ot->exec= reload_exec;
 
        /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       ot->flag= OPTYPE_REGISTER; /* no undo, image buffer is not handled by 
undo */
 }
 
 /********************** new image operator *********************/
@@ -1989,7 +1989,7 @@
        ot->cancel= WM_gesture_straightline_cancel;
        
        /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       ot->flag= 0; /* no undo/register since this operates on the space */
        
        WM_operator_properties_gesture_straightline(ot, CURSOR_EDIT);
 }

Modified: trunk/blender/source/blender/editors/space_info/info_ops.c
===================================================================
--- trunk/blender/source/blender/editors/space_info/info_ops.c  2011-08-19 
19:25:20 UTC (rev 39563)
+++ trunk/blender/source/blender/editors/space_info/info_ops.c  2011-08-19 
20:25:25 UTC (rev 39564)
@@ -273,7 +273,7 @@
        ot->exec= report_missing_files_exec;
 
        /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       ot->flag= 0; /* only reports so no need to undo/register */
 }
 
 /********************* find missing files operator *********************/

Modified: trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c
===================================================================
--- trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c       
2011-08-19 19:25:20 UTC (rev 39563)
+++ trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c       
2011-08-19 20:25:25 UTC (rev 39564)
@@ -1202,7 +1202,7 @@
        ot->poll= sequencer_edit_poll;
        
        /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       ot->flag= OPTYPE_REGISTER; /* no undo, the data changed is stored 
outside 'main' */
 }
 
 /* reload operator */
@@ -2522,7 +2522,7 @@
        ot->poll= sequencer_edit_poll;
 
        /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+       ot->flag= OPTYPE_REGISTER;
 
        /* properties */
 }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to