Revision: 36756 http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36756 Author: blendix Date: 2011-05-18 19:34:17 +0000 (Wed, 18 May 2011) Log Message: ----------- Cycles: get rid of (+) icon for region open, all regions already accesible through shortcut key or view menu.
Modified Paths: -------------- branches/cycles/source/blender/editors/screen/area.c Modified: branches/cycles/source/blender/editors/screen/area.c =================================================================== --- branches/cycles/source/blender/editors/screen/area.c 2011-05-18 19:30:28 UTC (rev 36755) +++ branches/cycles/source/blender/editors/screen/area.c 2011-05-18 19:34:17 UTC (rev 36756) @@ -479,84 +479,21 @@ BLI_init_rcti(&az->rect, az->x1, az->x2, az->y1, az->y2); } -static void region_azone_icon(ScrArea *sa, AZone *az, ARegion *ar) -{ - AZone *azt; - int tot=0; - - /* count how many actionzones with along same edge are available. - This allows for adding more action zones in the future without - having to worry about correct offset */ - for(azt= sa->actionzones.first; azt; azt= azt->next) { - if(azt->edge == az->edge) tot++; - } - - switch(az->edge) { - case AE_TOP_TO_BOTTOMRIGHT: - az->x1= ar->winrct.xmax - tot*2*AZONEPAD_ICON; - az->y1= ar->winrct.ymax + AZONEPAD_ICON; - az->x2= ar->winrct.xmax - tot*AZONEPAD_ICON; - az->y2= ar->winrct.ymax + 2*AZONEPAD_ICON; - break; - case AE_BOTTOM_TO_TOPLEFT: - az->x1= ar->winrct.xmin + AZONEPAD_ICON; - az->y1= ar->winrct.ymin - 2*AZONEPAD_ICON; - az->x2= ar->winrct.xmin + 2*AZONEPAD_ICON; - az->y2= ar->winrct.ymin - AZONEPAD_ICON; - break; - case AE_LEFT_TO_TOPRIGHT: - az->x1= ar->winrct.xmin - 2*AZONEPAD_ICON; - az->y1= ar->winrct.ymax - tot*2*AZONEPAD_ICON; - az->x2= ar->winrct.xmin - AZONEPAD_ICON; - az->y2= ar->winrct.ymax - tot*AZONEPAD_ICON; - break; - case AE_RIGHT_TO_TOPLEFT: - az->x1= ar->winrct.xmax + AZONEPAD_ICON; - az->y1= ar->winrct.ymax - tot*2*AZONEPAD_ICON; - az->x2= ar->winrct.xmax + 2*AZONEPAD_ICON; - az->y2= ar->winrct.ymax - tot*AZONEPAD_ICON; - break; - } - - BLI_init_rcti(&az->rect, az->x1, az->x2, az->y1, az->y2); - - /* if more azones on 1 spot, set offset */ - for(azt= sa->actionzones.first; azt; azt= azt->next) { - if(az!=azt) { - if( ABS(az->x1-azt->x1) < 2 && ABS(az->y1-azt->y1) < 2) { - if(az->edge==AE_TOP_TO_BOTTOMRIGHT || az->edge==AE_BOTTOM_TO_TOPLEFT) { - az->x1+= AZONESPOT; - az->x2+= AZONESPOT; - } - else{ - az->y1-= AZONESPOT; - az->y2-= AZONESPOT; - } - BLI_init_rcti(&az->rect, az->x1, az->x2, az->y1, az->y2); - } - } - } -} - static void region_azone_initialize(ScrArea *sa, ARegion *ar, AZEdge edge) { - AZone *az; - - az= (AZone *)MEM_callocN(sizeof(AZone), "actionzone"); - BLI_addtail(&(sa->actionzones), az); - az->type= AZONE_REGION; - az->ar= ar; - az->edge= edge; - - if (ar->flag & RGN_FLAG_HIDDEN) { - region_azone_icon(sa, az, ar); - } else { + if(!(ar->flag & RGN_FLAG_HIDDEN)) { + AZone *az; + + az= (AZone *)MEM_callocN(sizeof(AZone), "actionzone"); + BLI_addtail(&(sa->actionzones), az); + az->type= AZONE_REGION; + az->ar= ar; + az->edge= edge; + region_azone_edge(az, ar); } - } - /* *************************************************************** */ static void region_azone_add(ScrArea *sa, ARegion *ar, int alignment) _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs