[Bf-blender-cvs] [51b282f404d] greasepencil-object: Fix various compiler warnings/errors
Joshua Leung
noreply at git.blender.org
Wed Apr 18 10:57:17 CEST 2018
Commit: 51b282f404da18265e3154395c488872e3e8eb8f
Author: Joshua Leung
Date: Wed Apr 18 10:57:09 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB51b282f404da18265e3154395c488872e3e8eb8f
Fix various compiler warnings/errors
===================================================================
M source/blender/editors/gpencil/drawgpencil.c
M source/blender/editors/gpencil/gpencil_paint.c
M source/blender/editors/include/ED_gpencil.h
M source/blender/editors/space_view3d/view3d_draw_legacy.c
===================================================================
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index fdf2cdfab8b..eaa8270d405 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -61,6 +61,8 @@
#include "BKE_gpencil.h"
#include "BKE_image.h"
+#include "DEG_depsgraph.h"
+
#include "WM_api.h"
#include "BIF_glutil.h"
@@ -1959,7 +1961,7 @@ void ED_gpencil_draw_view3d(wmWindowManager *wm,
/* draw grease-pencil sketches to specified 3d-view for gp object
* assuming that matrices are already set correctly
*/
-void ED_gpencil_draw_view3d_object(wmWindowManager *wm, Scene *scene, const struct Depsgraph *depsgraph, Object *ob, View3D *v3d, ARegion *ar, bool only3d)
+void ED_gpencil_draw_view3d_object(wmWindowManager *wm, Scene *scene, Depsgraph *depsgraph, Object *ob, View3D *v3d, ARegion *ar, bool only3d)
{
int dflag = 0;
RegionView3D *rv3d = ar->regiondata;
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index a90b80f123f..01fdf0596a9 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -2401,7 +2401,7 @@ static void gpencil_draw_apply(bContext *C, wmOperator *op, tGPsdata *p, Depsgra
}
/* handle draw event */
-static void gpencil_draw_apply_event(bContext *C, wmOperator *op, const wmEvent *event, const Depsgraph *depsgraph, int x, int y)
+static void gpencil_draw_apply_event(bContext *C, wmOperator *op, const wmEvent *event, Depsgraph *depsgraph, int x, int y)
{
tGPsdata *p = op->customdata;
PointerRNA itemptr;
diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h
index 60fa433a2f5..99b361eedf1 100644
--- a/source/blender/editors/include/ED_gpencil.h
+++ b/source/blender/editors/include/ED_gpencil.h
@@ -73,20 +73,20 @@ struct wmWindowManager;
* Used as part of the 'stroke cache' used during drawing of new strokes
*/
typedef struct tGPspoint {
- int x, y; /* x and y coordinates of cursor (in relative to area) */
- float pressure; /* pressure of tablet at this point */
- float strength; /* pressure of tablet at this point for alpha factor */
- float time; /* Time relative to stroke start (used when converting to path) */
- float uv_fac; /* factor of uv along the stroke */
- float uv_rot; /* uv rotation for dor mode */
+ int x, y; /* x and y coordinates of cursor (in relative to area) */
+ float pressure; /* pressure of tablet at this point */
+ float strength; /* pressure of tablet at this point for alpha factor */
+ float time; /* Time relative to stroke start (used when converting to path) */
+ float uv_fac; /* factor of uv along the stroke */
+ float uv_rot; /* uv rotation for dor mode */
} tGPspoint;
/* used to sort by zdepth gpencil objects in viewport */
/* TODO: this could be a system parameter in userprefs screen */
#define GP_CACHE_BLOCK_SIZE 16
typedef struct tGPencilSort {
- struct Base *base;
- float zdepth;
+ struct Base *base;
+ float zdepth;
} tGPencilSort;
/* ----------- Grease Pencil Tools/Context ------------- */
@@ -140,8 +140,8 @@ void ED_gpencil_draw_view3d(struct wmWindowManager *wm,
bool only3d);
void ED_gpencil_draw_view3d_object(struct wmWindowManager *wm,
struct Scene *scene,
- const struct Depsgraph *depsgraph,
- struct Object *ob,
+ struct Depsgraph *depsgraph,
+ struct Object *ob,
struct View3D *v3d,
struct ARegion *ar,
bool only3d);
diff --git a/source/blender/editors/space_view3d/view3d_draw_legacy.c b/source/blender/editors/space_view3d/view3d_draw_legacy.c
index a514da4c0f3..a55ff68580a 100644
--- a/source/blender/editors/space_view3d/view3d_draw_legacy.c
+++ b/source/blender/editors/space_view3d/view3d_draw_legacy.c
@@ -1488,7 +1488,7 @@ CustomDataMask ED_view3d_screen_datamask(const Scene *scene, const bScreen *scre
/**
* Draw grease pencil object strokes
*/
-static void draw_gpencil_object_strokes(const bContext *C, Scene *scene, const struct Depsgraph *depsgraph, View3D *v3d, ARegion *ar, Base *base)
+static void draw_gpencil_object_strokes(const bContext *C, Scene *scene, Depsgraph *depsgraph, View3D *v3d, ARegion *ar, Base *base)
{
const bool render_override = (v3d->flag2 & V3D_RENDER_OVERRIDE) != 0;
Object *ob = base->object;
@@ -1524,7 +1524,7 @@ static int compare_gpencil_zdepth(const void *a1, const void *a2)
}
/* draw objects in cache from back to from */
-static void gpencil_draw_objects(const bContext *C, Scene *scene, const struct Depsgraph *depsgraph, View3D *v3d, ARegion *ar, tGPencilSort *cache, int gp_cache_used)
+static void gpencil_draw_objects(const bContext *C, Scene *scene, Depsgraph *depsgraph, View3D *v3d, ARegion *ar, tGPencilSort *cache, int gp_cache_used)
{
if (gp_cache_used > 0) {
/* sort by zdepth */
More information about the Bf-blender-cvs
mailing list