Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2019-03-19 13:01:27 +0300
committerAntonioya <blendergit@gmail.com>2019-03-19 13:03:55 +0300
commit8f790720b07d2f92f1222157be6836ff28a46902 (patch)
tree69dc71fabb8fcd8316cda622da7675fe9303545e
parent8aeb1dbb27aca735efe0df651710c8523212780d (diff)
GPencil: Rename annotation functions
The annotation drawing functions were using gpencil prefix and it's better to keep all annotation code separated to avoid confusion.
-rw-r--r--source/blender/draw/intern/draw_manager.c4
-rw-r--r--source/blender/editors/gpencil/annotate_draw.c6
-rw-r--r--source/blender/editors/include/ED_gpencil.h7
-rw-r--r--source/blender/editors/space_clip/clip_draw.c4
-rw-r--r--source/blender/editors/space_image/image_draw.c4
-rw-r--r--source/blender/editors/space_node/node_draw.c4
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c4
7 files changed, 17 insertions, 16 deletions
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index e517b6f8e45..45a49f2a25f 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -1570,7 +1570,7 @@ void DRW_draw_render_loop_ex(
if (do_annotations) {
GPU_depth_test(false);
/* XXX: as scene->gpd is not copied for COW yet */
- ED_gpencil_draw_view3d_annotations(DEG_get_input_scene(depsgraph), depsgraph, v3d, ar, true);
+ ED_annotation_draw_view3d(DEG_get_input_scene(depsgraph), depsgraph, v3d, ar, true);
GPU_depth_test(true);
}
@@ -1609,7 +1609,7 @@ void DRW_draw_render_loop_ex(
{
GPU_depth_test(false);
/* XXX: as scene->gpd is not copied for COW yet */
- ED_gpencil_draw_view3d_annotations(DEG_get_input_scene(depsgraph), depsgraph, v3d, ar, false);
+ ED_annotation_draw_view3d(DEG_get_input_scene(depsgraph), depsgraph, v3d, ar, false);
GPU_depth_test(true);
}
diff --git a/source/blender/editors/gpencil/annotate_draw.c b/source/blender/editors/gpencil/annotate_draw.c
index 8a72702505c..43e2b5bd3bf 100644
--- a/source/blender/editors/gpencil/annotate_draw.c
+++ b/source/blender/editors/gpencil/annotate_draw.c
@@ -981,7 +981,7 @@ static void gp_draw_data_all(
* ............................ */
/* draw grease-pencil sketches to specified 2d-view that uses ibuf corrections */
-void ED_gpencil_draw_2dimage(const bContext *C)
+void ED_annotation_draw_2dimage(const bContext *C)
{
wmWindowManager *wm = CTX_wm_manager(C);
ScrArea *sa = CTX_wm_area(C);
@@ -1049,7 +1049,7 @@ void ED_gpencil_draw_2dimage(const bContext *C)
/* draw grease-pencil sketches to specified 2d-view assuming that matrices are already set correctly
* Note: this gets called twice - first time with onlyv2d=true to draw 'canvas' strokes,
* second time with onlyv2d=false for screen-aligned strokes */
-void ED_gpencil_draw_view2d(const bContext *C, bool onlyv2d)
+void ED_annotation_draw_view2d(const bContext *C, bool onlyv2d)
{
wmWindowManager *wm = CTX_wm_manager(C);
ScrArea *sa = CTX_wm_area(C);
@@ -1083,7 +1083,7 @@ void ED_gpencil_draw_view2d(const bContext *C, bool onlyv2d)
/* draw annotations sketches to specified 3d-view assuming that matrices are already set correctly
* Note: this gets called twice - first time with only3d=true to draw 3d-strokes,
* second time with only3d=false for screen-aligned strokes */
-void ED_gpencil_draw_view3d_annotations(
+void ED_annotation_draw_view3d(
Scene *scene, struct Depsgraph *depsgraph,
View3D *v3d, ARegion *ar,
bool only3d)
diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h
index 46aca340ea9..21bccc99b6e 100644
--- a/source/blender/editors/include/ED_gpencil.h
+++ b/source/blender/editors/include/ED_gpencil.h
@@ -135,8 +135,6 @@ void ED_gpencil_strokes_copybuf_free(void);
/* ------------ Grease-Pencil Drawing API ------------------ */
/* drawgpencil.c */
-void ED_gpencil_draw_2dimage(const struct bContext *C);
-void ED_gpencil_draw_view2d(const struct bContext *C, bool onlyv2d);
void ED_gpencil_draw_view3d(
struct wmWindowManager *wm,
struct Scene *scene,
@@ -145,7 +143,10 @@ void ED_gpencil_draw_view3d(
struct View3D *v3d,
struct ARegion *ar,
bool only3d);
-void ED_gpencil_draw_view3d_annotations(
+
+void ED_annotation_draw_2dimage(const struct bContext *C);
+void ED_annotation_draw_view2d(const struct bContext *C, bool onlyv2d);
+void ED_annotation_draw_view3d(
struct Scene *scene, struct Depsgraph *depsgraph,
struct View3D *v3d, struct ARegion *ar,
bool only3d);
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c
index 54830c14b85..7c400f8a417 100644
--- a/source/blender/editors/space_clip/clip_draw.c
+++ b/source/blender/editors/space_clip/clip_draw.c
@@ -1879,12 +1879,12 @@ void clip_draw_grease_pencil(bContext *C, int onlyv2d)
}
}
- ED_gpencil_draw_2dimage(C);
+ ED_annotation_draw_2dimage(C);
GPU_matrix_pop();
}
}
else {
- ED_gpencil_draw_view2d(C, 0);
+ ED_annotation_draw_view2d(C, 0);
}
}
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index 885a9c18346..e3fd36347fc 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -587,14 +587,14 @@ void draw_image_grease_pencil(bContext *C, bool onlyv2d)
/* draw in View2D space? */
if (onlyv2d) {
/* draw grease-pencil ('image' strokes) */
- ED_gpencil_draw_2dimage(C);
+ ED_annotation_draw_2dimage(C);
}
else {
/* assume that UI_view2d_restore(C) has been called... */
//SpaceImage *sima = (SpaceImage *)CTX_wm_space_data(C);
/* draw grease-pencil ('screen' strokes) */
- ED_gpencil_draw_view2d(C, 0);
+ ED_annotation_draw_view2d(C, 0);
}
}
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index 0a33e5ebf12..b2ae7cac41e 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -1432,7 +1432,7 @@ void drawnodespace(const bContext *C, ARegion *ar)
if (snode->flag & SNODE_SHOW_GPENCIL) {
/* draw grease-pencil ('canvas' strokes) */
- ED_gpencil_draw_view2d(C, true);
+ ED_annotation_draw_view2d(C, true);
}
}
else {
@@ -1451,7 +1451,7 @@ void drawnodespace(const bContext *C, ARegion *ar)
if (snode->treepath.last) {
if (snode->flag & SNODE_SHOW_GPENCIL) {
/* draw grease-pencil (screen strokes, and also paintbuffer) */
- ED_gpencil_draw_view2d(C, false);
+ ED_annotation_draw_view2d(C, false);
}
}
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 8a64b6f39db..7d1748f4bb0 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -1023,13 +1023,13 @@ static void sequencer_display_size(Scene *scene, float r_viewrect[2])
static void sequencer_draw_gpencil(const bContext *C)
{
/* draw grease-pencil (image aligned) */
- ED_gpencil_draw_2dimage(C);
+ ED_annotation_draw_2dimage(C);
/* ortho at pixel level */
UI_view2d_view_restore(C);
/* draw grease-pencil (screen aligned) */
- ED_gpencil_draw_view2d(C, 0);
+ ED_annotation_draw_view2d(C, 0);
}
/* draws content borders plus safety borders if needed */