merge with 2.5/trunk at r23271

This commit is contained in:
2009-09-16 17:43:09 +00:00
parent 6b0679a399
commit deebf4f8f0
686 changed files with 43627 additions and 31602 deletions

View File

@@ -292,8 +292,7 @@ static void ui_apply_autokey_undo(bContext *C, uiBut *but)
uiAfterFunc *after;
char *str= NULL;
if ELEM6(but->type, BLOCK, BUT, LABEL, PULLDOWN, ROUNDBOX, LISTBOX);
else {
if(but->flag & UI_BUT_UNDO) {
/* define which string to use for undo */
if ELEM(but->type, LINK, INLINK) str= "Add button link";
else if ELEM(but->type, MENU, ICONTEXTROW) str= but->drawstr;
@@ -678,7 +677,11 @@ static void ui_add_link(uiBut *from, uiBut *to)
return;
}
if (from->type==LINK && to->type==INLINK) {
if (from->type==INLINK && to->type==INLINK) {
printf("cannot link\n");
return;
}
else if (from->type==LINK && to->type==INLINK) {
if( from->link->tocode != (int)to->hardmin ) {
printf("cannot link\n");
return;
@@ -1436,16 +1439,20 @@ static void ui_textedit_next_but(uiBlock *block, uiBut *actbut, uiHandleButtonDa
for(but= actbut->next; but; but= but->next) {
if(ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) {
data->postbut= but;
data->posttype= BUTTON_ACTIVATE_TEXT_EDITING;
return;
if(!(but->flag & UI_BUT_DISABLED)) {
data->postbut= but;
data->posttype= BUTTON_ACTIVATE_TEXT_EDITING;
return;
}
}
}
for(but= block->buttons.first; but!=actbut; but= but->next) {
if(ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) {
data->postbut= but;
data->posttype= BUTTON_ACTIVATE_TEXT_EDITING;
return;
if(!(but->flag & UI_BUT_DISABLED)) {
data->postbut= but;
data->posttype= BUTTON_ACTIVATE_TEXT_EDITING;
return;
}
}
}
}
@@ -1460,16 +1467,20 @@ static void ui_textedit_prev_but(uiBlock *block, uiBut *actbut, uiHandleButtonDa
for(but= actbut->prev; but; but= but->prev) {
if(ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) {
data->postbut= but;
data->posttype= BUTTON_ACTIVATE_TEXT_EDITING;
return;
if(!(but->flag & UI_BUT_DISABLED)) {
data->postbut= but;
data->posttype= BUTTON_ACTIVATE_TEXT_EDITING;
return;
}
}
}
for(but= block->buttons.last; but!=actbut; but= but->prev) {
if(ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) {
data->postbut= but;
data->posttype= BUTTON_ACTIVATE_TEXT_EDITING;
return;
if(!(but->flag & UI_BUT_DISABLED)) {
data->postbut= but;
data->posttype= BUTTON_ACTIVATE_TEXT_EDITING;
return;
}
}
}
}
@@ -3261,18 +3272,18 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event)
ui_but_copy_paste(C, but, data, (event->type == CKEY)? 'c': 'v');
return WM_UI_HANDLER_BREAK;
}
/* handle keyframeing */
/* handle keyframing */
else if(event->type == IKEY && event->val == KM_PRESS) {
if(event->alt)
ui_but_anim_delete_keyframe(C);
else
ui_but_anim_insert_keyframe(C);
ED_region_tag_redraw(CTX_wm_region(C));
return WM_UI_HANDLER_BREAK;
}
/* handle driver adding */
/* handle drivers */
else if(event->type == DKEY && event->val == KM_PRESS) {
if(event->alt)
ui_but_anim_remove_driver(C);
@@ -3283,6 +3294,17 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event)
return WM_UI_HANDLER_BREAK;
}
/* handle keyingsets */
else if(event->type == KKEY && event->val == KM_PRESS) {
if(event->alt)
ui_but_anim_remove_keyingset(C);
else
ui_but_anim_remove_keyingset(C);
ED_region_tag_redraw(CTX_wm_region(C));
return WM_UI_HANDLER_BREAK;
}
/* handle menu */
else if(event->type == RIGHTMOUSE && event->val == KM_PRESS) {
/* RMB has two options now */