diff options
Diffstat (limited to 'source/blender/editors/interface')
16 files changed, 65 insertions, 36 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index c54b062c815..d6357f392b5 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -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. * * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. * All rights reserved. @@ -1189,6 +1189,12 @@ void ui_get_but_vectorf(uiBut *but, float *vec) float *fp= (float *)but->poin; VECCOPY(vec, fp); } + else { + if (but->editvec==NULL) { + fprintf(stderr, "ui_get_but_vectorf: can't get color, should never happen\n"); + vec[0]= vec[1]= vec[2]= 0.0f; + } + } } /* for buttons pointing to color for example */ @@ -2096,6 +2102,15 @@ void ui_check_but(uiBut *but) strncpy(but->drawstr+2, but->str, UI_MAX_DRAW_STR-2); } break; + + case HSVCUBE: + case HSVCIRCLE: + { + float rgb[3]; + ui_get_but_vectorf(but, rgb); + rgb_to_hsv(rgb[0], rgb[1], rgb[2], but->hsv, but->hsv+1, but->hsv+2); + } + break; default: strncpy(but->drawstr, but->str, UI_MAX_DRAW_STR); @@ -2361,13 +2376,6 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, char *str, short } } } - - if(ELEM(but->type, HSVCUBE, HSVCIRCLE)) { /* hsv buttons temp storage */ - float rgb[3]; - ui_get_but_vectorf(but, rgb); - - rgb_to_hsv(rgb[0], rgb[1], rgb[2], but->hsv, but->hsv+1, but->hsv+2); - } if((block->flag & UI_BLOCK_LOOP) || ELEM7(but->type, MENU, TEX, LABEL, IDPOIN, BLOCK, BUTM, SEARCH_MENU)) but->flag |= (UI_TEXT_LEFT|UI_ICON_LEFT); diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index 2ba7d8bb457..aaf9ba6e214 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -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. * * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. * All rights reserved. diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 76a98479d55..effd856828f 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -13,7 +13,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. * * The Original Code is Copyright (C) 2008 Blender Foundation. * All rights reserved. diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 7608014b150..457713755fd 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -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. * * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. * All rights reserved. diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index e0669a19286..4f7a97f0579 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -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. * * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. * All rights reserved. diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 52ea0a99762..8ba2cd75cb2 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -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): Blender Foundation 2009. * diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index 268f6d6e648..c23e7f86833 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -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. * * The Original Code is Copyright (C) 2009 Blender Foundation. * All rights reserved. @@ -227,7 +227,7 @@ void UI_OT_copy_data_path_button(wmOperatorType *ot) /* identifiers */ ot->name= "Copy Data Path"; ot->idname= "UI_OT_copy_data_path_button"; - ot->description= "Copy the RNA data path for this property to the clipboard."; + ot->description= "Copy the RNA data path for this property to the clipboard"; /* callbacks */ ot->exec= copy_data_path_button_exec; @@ -367,7 +367,7 @@ void UI_OT_copy_to_selected_button(wmOperatorType *ot) /* identifiers */ ot->name= "Copy To Selected"; ot->idname= "UI_OT_copy_to_selected_button"; - ot->description= "Copy property from this object to selected objects or bones."; + ot->description= "Copy property from this object to selected objects or bones"; /* callbacks */ ot->poll= copy_to_selected_button_poll; diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index c70bb2dcfa5..bf4a2a49fcb 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -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. * * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. * All rights reserved. diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index b332db09086..8eba7e5505f 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -13,7 +13,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. * * The Original Code is Copyright (C) 2008 Blender Foundation. * All rights reserved. diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index c80db9a1588..777fb7806ad 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -13,7 +13,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. * * The Original Code is Copyright (C) 2009 Blender Foundation. * All rights reserved. diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index ab77926b0ba..12e0066c53c 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -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): Blender Foundation 2009. * diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c index a8cd0e017ed..c9024704b5e 100644 --- a/source/blender/editors/interface/interface_utils.c +++ b/source/blender/editors/interface/interface_utils.c @@ -13,7 +13,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. * * The Original Code is Copyright (C) 2009 Blender Foundation. * All rights reserved. diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 6f17a0d4e6a..e02a8f53a4e 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -13,7 +13,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. * * The Original Code is Copyright (C) 2009 Blender Foundation. * All rights reserved. diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 313b03fdec3..00c6e796f8c 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -18,7 +18,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. * * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. * All rights reserved. @@ -293,6 +293,8 @@ char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) cp= &ts->facedot_size; break; case TH_NORMAL: cp= ts->normal; break; + case TH_VNORMAL: + cp= ts->vertex_normal; break; case TH_BONE_SOLID: cp= ts->bone_solid; break; case TH_BONE_POSE: @@ -486,6 +488,7 @@ void ui_theme_init_userdef(void) SETCOL(btheme->tv3d.face, 0, 0, 0, 18); SETCOL(btheme->tv3d.face_select, 255, 133, 0, 60); SETCOL(btheme->tv3d.normal, 0x22, 0xDD, 0xDD, 255); + SETCOL(btheme->tv3d.vertex_normal, 0x23, 0x61, 0xDD, 255); SETCOL(btheme->tv3d.face_dot, 255, 133, 0, 255); btheme->tv3d.facedot_size= 4; SETCOL(btheme->tv3d.cframe, 0x60, 0xc0, 0x40, 255); @@ -614,6 +617,7 @@ void ui_theme_init_userdef(void) /* space console */ btheme->tconsole= btheme->tv3d; + SETCOL(btheme->tconsole.back, 0, 0, 0, 255); SETCOL(btheme->tconsole.console_output, 96, 128, 255, 255); SETCOL(btheme->tconsole.console_input, 255, 255, 255, 255); SETCOL(btheme->tconsole.console_info, 0, 170, 0, 255); @@ -984,6 +988,9 @@ void init_userdef_do_versions(void) if(btheme->tv3d.normal[3]==0) { SETCOL(btheme->tv3d.normal, 0x22, 0xDD, 0xDD, 255); } + if(btheme->tv3d.vertex_normal[3]==0) { + SETCOL(btheme->tv3d.vertex_normal, 0x23, 0x61, 0xDD, 255); + } if(btheme->tv3d.face_dot[3]==0) { SETCOL(btheme->tv3d.face_dot, 255, 138, 48, 255); btheme->tv3d.facedot_size= 4; diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index 229cf187035..f13d61f8102 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -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. * * The Original Code is Copyright (C) 2008 Blender Foundation. * All rights reserved. diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index e84c9196e8b..7476751fecd 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -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. * * The Original Code is Copyright (C) 2008 Blender Foundation. * All rights reserved. @@ -286,7 +286,7 @@ void VIEW2D_OT_pan(wmOperatorType *ot) { /* identifiers */ ot->name= "Pan View"; - ot->description= "Pan the view."; + ot->description= "Pan the view"; ot->idname= "VIEW2D_OT_pan"; /* api callbacks */ @@ -336,7 +336,7 @@ void VIEW2D_OT_scroll_right(wmOperatorType *ot) { /* identifiers */ ot->name= "Scroll Right"; - ot->description= "Scroll the view right."; + ot->description= "Scroll the view right"; ot->idname= "VIEW2D_OT_scroll_right"; /* api callbacks */ @@ -383,7 +383,7 @@ void VIEW2D_OT_scroll_left(wmOperatorType *ot) { /* identifiers */ ot->name= "Scroll Left"; - ot->description= "Scroll the view left."; + ot->description= "Scroll the view left"; ot->idname= "VIEW2D_OT_scroll_left"; /* api callbacks */ @@ -429,7 +429,7 @@ void VIEW2D_OT_scroll_down(wmOperatorType *ot) { /* identifiers */ ot->name= "Scroll Down"; - ot->description= "Scroll the view down."; + ot->description= "Scroll the view down"; ot->idname= "VIEW2D_OT_scroll_down"; /* api callbacks */ @@ -476,7 +476,7 @@ void VIEW2D_OT_scroll_up(wmOperatorType *ot) { /* identifiers */ ot->name= "Scroll Up"; - ot->description= "Scroll the view up."; + ot->description= "Scroll the view up"; ot->idname= "VIEW2D_OT_scroll_up"; /* api callbacks */ @@ -692,7 +692,7 @@ void VIEW2D_OT_zoom_in(wmOperatorType *ot) { /* identifiers */ ot->name= "Zoom In"; - ot->description= "Zoom in the view."; + ot->description= "Zoom in the view"; ot->idname= "VIEW2D_OT_zoom_in"; /* api callbacks */ @@ -748,7 +748,7 @@ void VIEW2D_OT_zoom_out(wmOperatorType *ot) { /* identifiers */ ot->name= "Zoom Out"; - ot->description= "Zoom out the view."; + ot->description= "Zoom out the view"; ot->idname= "VIEW2D_OT_zoom_out"; /* api callbacks */ @@ -1004,7 +1004,7 @@ void VIEW2D_OT_zoom(wmOperatorType *ot) { /* identifiers */ ot->name= "Zoom View"; - ot->description= "Zoom in/out the view."; + ot->description= "Zoom in/out the view"; ot->idname= "VIEW2D_OT_zoom"; /* api callbacks */ @@ -1106,7 +1106,7 @@ void VIEW2D_OT_zoom_border(wmOperatorType *ot) { /* identifiers */ ot->name= "Zoom to Border"; - ot->description= "Zoom in the view to the nearest item contained in the border."; + ot->description= "Zoom in the view to the nearest item contained in the border"; ot->idname= "VIEW2D_OT_zoom_border"; /* api callbacks */ @@ -1472,7 +1472,7 @@ void VIEW2D_OT_scroller_activate(wmOperatorType *ot) { /* identifiers */ ot->name= "Scroller Activate"; - ot->description= "Scroll view by mouse click and drag."; + ot->description= "Scroll view by mouse click and drag"; ot->idname= "VIEW2D_OT_scroller_activate"; /* flags */ @@ -1539,7 +1539,7 @@ void VIEW2D_OT_reset(wmOperatorType *ot) { /* identifiers */ ot->name= "Reset View"; - ot->description= "Reset the view."; + ot->description= "Reset the view"; ot->idname= "VIEW2D_OT_reset"; /* api callbacks */ @@ -1603,6 +1603,18 @@ void UI_view2d_keymap(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_right", WHEELDOWNMOUSE, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_left", WHEELUPMOUSE, KM_PRESS, 0, 0); + /* alternatives for page up/down to scroll */ +#if 0 // XXX disabled, since this causes conflicts with hotkeys in animation editors + /* scroll up/down may fall through to left/right */ + WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_down", PAGEDOWNKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_up", PAGEUPKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_right", PAGEDOWNKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_left", PAGEUPKEY, KM_PRESS, 0, 0); + /* shift for moving view left/right with page up/down */ + WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_right", PAGEDOWNKEY, KM_PRESS, KM_SHIFT, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_left", PAGEUPKEY, KM_PRESS, KM_SHIFT, 0); +#endif + /* zoom - drag */ WM_keymap_add_item(keymap, "VIEW2D_OT_zoom", MIDDLEMOUSE, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "VIEW2D_OT_zoom", MOUSEZOOM, 0, 0, 0); @@ -1619,6 +1631,8 @@ void UI_view2d_keymap(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "VIEW2D_OT_pan", MOUSEPAN, 0, 0, 0); WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_down", WHEELDOWNMOUSE, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_up", WHEELUPMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_down", PAGEDOWNKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_up", PAGEUPKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "VIEW2D_OT_zoom", MIDDLEMOUSE, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "VIEW2D_OT_zoom", MOUSEZOOM, 0, 0, 0); WM_keymap_add_item(keymap, "VIEW2D_OT_zoom_out", PADMINUS, KM_PRESS, 0, 0); |