Cleanup: use eSpace_Type enum type
This commit is contained in:
@@ -760,15 +760,15 @@ static void annotation_draw_data_all(Scene *scene,
|
|||||||
int winy,
|
int winy,
|
||||||
int cfra,
|
int cfra,
|
||||||
int dflag,
|
int dflag,
|
||||||
const char spacetype)
|
const eSpace_Type space_type)
|
||||||
{
|
{
|
||||||
bGPdata *gpd_source = NULL;
|
bGPdata *gpd_source = NULL;
|
||||||
|
|
||||||
if (scene) {
|
if (scene) {
|
||||||
if (spacetype == SPACE_VIEW3D) {
|
if (space_type == SPACE_VIEW3D) {
|
||||||
gpd_source = (scene->gpd ? scene->gpd : NULL);
|
gpd_source = (scene->gpd ? scene->gpd : NULL);
|
||||||
}
|
}
|
||||||
else if (spacetype == SPACE_CLIP && scene->clip) {
|
else if (space_type == SPACE_CLIP && scene->clip) {
|
||||||
/* currently drawing only gpencil data from either clip or track,
|
/* currently drawing only gpencil data from either clip or track,
|
||||||
* but not both - XXX fix logic behind */
|
* but not both - XXX fix logic behind */
|
||||||
gpd_source = (scene->clip->gpd ? scene->clip->gpd : NULL);
|
gpd_source = (scene->clip->gpd ? scene->clip->gpd : NULL);
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ static ScrArea *screen_addarea_ex(ScrAreaMap *area_map,
|
|||||||
ScrVert *top_left,
|
ScrVert *top_left,
|
||||||
ScrVert *top_right,
|
ScrVert *top_right,
|
||||||
ScrVert *bottom_right,
|
ScrVert *bottom_right,
|
||||||
short spacetype)
|
const eSpace_Type space_type)
|
||||||
{
|
{
|
||||||
ScrArea *area = MEM_callocN(sizeof(ScrArea), "addscrarea");
|
ScrArea *area = MEM_callocN(sizeof(ScrArea), "addscrarea");
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ static ScrArea *screen_addarea_ex(ScrAreaMap *area_map,
|
|||||||
area->v2 = top_left;
|
area->v2 = top_left;
|
||||||
area->v3 = top_right;
|
area->v3 = top_right;
|
||||||
area->v4 = bottom_right;
|
area->v4 = bottom_right;
|
||||||
area->spacetype = spacetype;
|
area->spacetype = space_type;
|
||||||
|
|
||||||
BLI_addtail(&area_map->areabase, area);
|
BLI_addtail(&area_map->areabase, area);
|
||||||
|
|
||||||
@@ -87,10 +87,10 @@ static ScrArea *screen_addarea(bScreen *screen,
|
|||||||
ScrVert *left_top,
|
ScrVert *left_top,
|
||||||
ScrVert *right_top,
|
ScrVert *right_top,
|
||||||
ScrVert *right_bottom,
|
ScrVert *right_bottom,
|
||||||
short spacetype)
|
const eSpace_Type space_type)
|
||||||
{
|
{
|
||||||
return screen_addarea_ex(
|
return screen_addarea_ex(
|
||||||
AREAMAP_FROM_SCREEN(screen), left_bottom, left_top, right_top, right_bottom, spacetype);
|
AREAMAP_FROM_SCREEN(screen), left_bottom, left_top, right_top, right_bottom, space_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void screen_delarea(bContext *C, bScreen *screen, ScrArea *area)
|
static void screen_delarea(bContext *C, bScreen *screen, ScrArea *area)
|
||||||
@@ -972,7 +972,7 @@ int ED_screen_area_active(const bContext *C)
|
|||||||
*/
|
*/
|
||||||
static ScrArea *screen_area_create_with_geometry(ScrAreaMap *area_map,
|
static ScrArea *screen_area_create_with_geometry(ScrAreaMap *area_map,
|
||||||
const rcti *rect,
|
const rcti *rect,
|
||||||
short spacetype)
|
eSpace_Type space_type)
|
||||||
{
|
{
|
||||||
ScrVert *bottom_left = screen_geom_vertex_add_ex(area_map, rect->xmin, rect->ymin);
|
ScrVert *bottom_left = screen_geom_vertex_add_ex(area_map, rect->xmin, rect->ymin);
|
||||||
ScrVert *top_left = screen_geom_vertex_add_ex(area_map, rect->xmin, rect->ymax);
|
ScrVert *top_left = screen_geom_vertex_add_ex(area_map, rect->xmin, rect->ymax);
|
||||||
@@ -984,7 +984,7 @@ static ScrArea *screen_area_create_with_geometry(ScrAreaMap *area_map,
|
|||||||
screen_geom_edge_add_ex(area_map, top_right, bottom_right);
|
screen_geom_edge_add_ex(area_map, top_right, bottom_right);
|
||||||
screen_geom_edge_add_ex(area_map, bottom_right, bottom_left);
|
screen_geom_edge_add_ex(area_map, bottom_right, bottom_left);
|
||||||
|
|
||||||
return screen_addarea_ex(area_map, bottom_left, top_left, top_right, bottom_right, spacetype);
|
return screen_addarea_ex(area_map, bottom_left, top_left, top_right, bottom_right, space_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void screen_area_set_geometry_rect(ScrArea *area, const rcti *rect)
|
static void screen_area_set_geometry_rect(ScrArea *area, const rcti *rect)
|
||||||
@@ -1001,7 +1001,7 @@ static void screen_area_set_geometry_rect(ScrArea *area, const rcti *rect)
|
|||||||
|
|
||||||
static void screen_global_area_refresh(wmWindow *win,
|
static void screen_global_area_refresh(wmWindow *win,
|
||||||
bScreen *screen,
|
bScreen *screen,
|
||||||
eSpace_Type space_type,
|
const eSpace_Type space_type,
|
||||||
GlobalAreaAlign align,
|
GlobalAreaAlign align,
|
||||||
const rcti *rect,
|
const rcti *rect,
|
||||||
const short height_cur,
|
const short height_cur,
|
||||||
|
|||||||
Reference in New Issue
Block a user