Orange; stuff for the animation department!
authorTon Roosendaal <ton@blender.org>
Tue, 3 Jan 2006 12:04:05 +0000 (12:04 +0000)
committerTon Roosendaal <ton@blender.org>
Tue, 3 Jan 2006 12:04:05 +0000 (12:04 +0000)
- Found the potential crasher for sound playback & undo. Test!
- PoseMode: NKey panel didn't work when actions where assigned
- NLA: "Add action strip" now displays in menu to which active object the
  actions are added.

source/blender/src/drawview.c
source/blender/src/editnla.c
source/blender/src/interface.c
source/blender/src/space.c

index 74e68ba5cb1e43971c97b0d16fd1a2f0b96ff780..2382857c44f21c1c2099634b62f35507d6d0150a 100644 (file)
@@ -1781,6 +1781,7 @@ void do_viewbuts(unsigned short event)
                /* no break, pass on */
        case B_ARMATUREPANEL2:
                {
+                       ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK);
                        DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
                        allqueue(REDRAWVIEW3D, 1);
                }
index d7c505a7f1c5b95693008aca717c558e00afe09d..c4b7d8c97776b20e75a33729a07c2b87dc5bafc3 100644 (file)
@@ -442,15 +442,17 @@ static void add_nlablock(void)
        Object *ob= OBACT;
        short event;
        short nr=0;
-       char *str;
+       char *str, title[64];
        
        if(ob==NULL) {
                error("Need active Object to add NLA strips");
                return;
        }
        
+       sprintf(title, "Add Action strip to: %s", ob->id.name+2);
+       
        /* Popup action menu */
-       IDnames_to_pupstring(&str, "Add Action strip", NULL, &G.main->action, (ID *)G.scene, &nr);
+       IDnames_to_pupstring(&str, title, NULL, &G.main->action, (ID *)G.scene, &nr);
        
        if(nr==-2) {
                MEM_freeN(str);
index d3379f375938c215ebd65569c19bcce98adff37a..3fd015ec500e74b4ce32b9bac356a444ca96acd3 100644 (file)
@@ -6010,8 +6010,12 @@ short pupmenu_col(char *instr, int maxrow)
        while (rows*columns<(md->nitems+columns) ) rows++;
                
        /* size and location */
-       if(md->title) width= 2*strlen(md->title)+BIF_GetStringWidth(uiBlockGetCurFont(block), md->title, (U.transopts & USER_TR_BUTTONS));
+       if(md->title) {
+               width= 2*strlen(md->title)+BIF_GetStringWidth(uiBlockGetCurFont(block), md->title, (U.transopts & USER_TR_BUTTONS));
+               width /= columns;
+       }
        else width= 0;
+       
        for(a=0; a<md->nitems; a++) {
                xmax= BIF_GetStringWidth(uiBlockGetCurFont(block), md->items[a].str, (U.transopts & USER_TR_BUTTONS));
                if(xmax>width) width= xmax;
@@ -6086,7 +6090,7 @@ short pupmenu_col(char *instr, int maxrow)
        if(md->title) {
                uiBut *bt;
                uiSetCurFont(block, UI_HELVB);
-               bt= uiDefBut(block, LABEL, 0, md->title, startx, (short)(starty+rows*boxh), (short)width, (short)boxh, NULL, 0.0, 0.0, 0, 0, "");
+               bt= uiDefBut(block, LABEL, 0, md->title, startx, (short)(starty+rows*boxh), columns*(short)width, (short)boxh, NULL, 0.0, 0.0, 0, 0, "");
                uiSetCurFont(block, UI_HELV);
                bt->flag= UI_TEXT_LEFT;
        }
index 402b484938e3a7c1ac48d4f5c52663b8569470fe..b2b091f572b2f52dc17270768d29a15e85ed0bf1 100644 (file)
@@ -681,7 +681,10 @@ void BIF_undo(void)
                else if(curarea->spacetype==SPACE_IMAGE && (G.sima->flag & SI_DRAWTOOL));
                else {
                        /* now also in faceselect mode */
-                       if(U.uiflag & USER_GLOBALUNDO) BKE_undo_step(1);
+                       if(U.uiflag & USER_GLOBALUNDO) {
+                               BKE_undo_step(1);
+                               sound_initialize_sounds();
+                       }
                }
        }
 }
@@ -699,7 +702,10 @@ void BIF_redo(void)
                        vpaint_undo();
                else {
                        /* includes faceselect now */
-                       if(U.uiflag & USER_GLOBALUNDO) BKE_undo_step(-1);
+                       if(U.uiflag & USER_GLOBALUNDO) {
+                               BKE_undo_step(-1);
+                               sound_initialize_sounds();
+                       }
                }
        }
 }