Bugfix #17965
authorTon Roosendaal <ton@blender.org>
Mon, 10 Nov 2008 10:05:09 +0000 (10:05 +0000)
committerTon Roosendaal <ton@blender.org>
Mon, 10 Nov 2008 10:05:09 +0000 (10:05 +0000)
Most Surface (NURBS) tools in buttons didn't add undo pushes.

source/blender/src/buttons_editing.c

index 6cbf14d47fb7dbce901e156c415d618cad4c7bb2..b6dfd29d62a85b7c9c53bbe32913663f28f192f7 100644 (file)
@@ -3246,6 +3246,7 @@ void do_curvebuts(unsigned short event)
        case B_CONVERTNURB:
                if(G.obedit) {
                        setsplinetype(event-B_CONVERTPOLY);
        case B_CONVERTNURB:
                if(G.obedit) {
                        setsplinetype(event-B_CONVERTPOLY);
+                       BIF_undo_push("Convert type");
                        DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);
                        allqueue(REDRAWVIEW3D, 0);
                }
                        DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);
                        allqueue(REDRAWVIEW3D, 0);
                }
@@ -3277,6 +3278,7 @@ void do_curvebuts(unsigned short event)
                                }
                                nu= nu->next;
                        }
                                }
                                nu= nu->next;
                        }
+                       BIF_undo_push("Cyclic");
                        DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);
                        allqueue(REDRAWVIEW3D, 0);
                }
                        DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);
                        allqueue(REDRAWVIEW3D, 0);
                }
@@ -3284,6 +3286,7 @@ void do_curvebuts(unsigned short event)
        case B_SETWEIGHT:
                if(G.obedit) {
                        weightflagNurb(1, editbutweight, 0);
        case B_SETWEIGHT:
                if(G.obedit) {
                        weightflagNurb(1, editbutweight, 0);
+                       BIF_undo_push("Set weight");
                        DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);
                        allqueue(REDRAWVIEW3D, 0);
                }
                        DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);
                        allqueue(REDRAWVIEW3D, 0);
                }
@@ -3317,6 +3320,7 @@ void do_curvebuts(unsigned short event)
                                }
                                makeknots(nu, 2, nu->flagv>>1);
                        }
                                }
                                makeknots(nu, 2, nu->flagv>>1);
                        }
+                       BIF_undo_push("Make knots");
                        DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);
                        allqueue(REDRAWVIEW3D, 0);
                }
                        DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);
                        allqueue(REDRAWVIEW3D, 0);
                }
@@ -3368,6 +3372,7 @@ void do_curvebuts(unsigned short event)
                                nu= nu->next;
                        }
                }
                                nu= nu->next;
                        }
                }
+               BIF_undo_push("Make 2D/3D");
                DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
                allqueue(REDRAWVIEW3D, 0);
                break;
                DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
                allqueue(REDRAWVIEW3D, 0);
                break;
@@ -3383,6 +3388,7 @@ void do_curvebuts(unsigned short event)
                        }
                }
 
                        }
                }
 
+               BIF_undo_push("Set resolution");
                DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
                allqueue(REDRAWVIEW3D, 0);
                allqueue(REDRAWBUTSALL, 0);
                DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
                allqueue(REDRAWVIEW3D, 0);
                allqueue(REDRAWBUTSALL, 0);