Blender  V3.3
io_gpencil_utils.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2020 Blender Foundation. All rights reserved. */
3 
8 #ifdef WITH_IO_GPENCIL
9 
10 # include "DNA_space_types.h"
11 
12 # include "BKE_context.h"
13 # include "BKE_screen.h"
14 
15 # include "WM_api.h"
16 
17 # include "io_gpencil.h"
18 
20 {
21  bScreen *screen = CTX_wm_screen(C);
22  if (screen == NULL) {
23  return NULL;
24  }
26  if (area == NULL) {
27  return NULL;
28  }
29 
31 
32  return region;
33 }
34 
36 {
37  bScreen *screen = CTX_wm_screen(C);
38  if (screen == NULL) {
39  return NULL;
40  }
42  if (area == NULL) {
43  return NULL;
44  }
45  if (area) {
46  return area->spacedata.first;
47  }
48 
49  return NULL;
50 }
51 
52 #endif /* WITH_IO_GPENCIL */
struct bScreen * CTX_wm_screen(const bContext *C)
Definition: context.c:733
struct ARegion * BKE_area_find_region_type(const struct ScrArea *area, int type)
struct ARegion struct ARegion struct ScrArea struct ScrArea * BKE_screen_find_big_area(struct bScreen *screen, int spacetype, short min)
Definition: screen.c:937
@ RGN_TYPE_WINDOW
@ SPACE_VIEW3D
#define C
Definition: RandGen.cpp:25
struct View3D * get_invoke_view3d(struct bContext *C)
struct ARegion * get_invoke_region(struct bContext *C)
static void area(int d1, int d2, int e1, int e2, float weights[2])