[Bf-blender-cvs] [c2517ae75a6] greasepencil-object: Cleanup: unused variables & args
Campbell Barton
noreply at git.blender.org
Mon Apr 16 21:08:39 CEST 2018
Commit: c2517ae75a630fc8373c54ea67fc5ac91ff5349c
Author: Campbell Barton
Date: Mon Apr 16 21:07:33 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rBc2517ae75a630fc8373c54ea67fc5ac91ff5349c
Cleanup: unused variables & args
===================================================================
M source/blender/blenkernel/intern/gpencil.c
M source/blender/draw/engines/gpencil/gpencil_depth_of_field.c
M source/blender/draw/engines/gpencil/gpencil_engine.c
M source/blender/draw/engines/gpencil/gpencil_geom.c
M source/blender/draw/engines/gpencil/gpencil_vfx.c
M source/blender/draw/intern/draw_manager.c
M source/blender/editors/gpencil/gpencil_brush.c
M source/blender/editors/gpencil/gpencil_fill.c
M source/blender/editors/gpencil/gpencil_paint.c
M source/blender/editors/gpencil/gpencil_utils.c
M source/blender/editors/include/ED_gpencil.h
M source/blender/editors/object/object_add.c
M source/blender/editors/sculpt_paint/paint_ops.c
M source/blender/editors/undo/ed_undo.c
M source/blender/makesrna/intern/rna_brush.c
M source/blender/modifiers/intern/MOD_gpencil_util.c
M source/blender/modifiers/intern/MOD_gpencilbuild.c
===================================================================
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 0c02ee66c73..9faad565a23 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -2084,7 +2084,7 @@ bool BKE_gpencil_vgroup_remove_point_weight(bGPDspoint *pt, int index)
bool BKE_gp_smooth_stroke(bGPDstroke *gps, int i, float inf)
{
bGPDspoint *pt = &gps->points[i];
- float pressure = 0.0f;
+ // float pressure = 0.0f;
float sco[3] = { 0.0f };
/* Do nothing if not enough points to smooth out */
diff --git a/source/blender/draw/engines/gpencil/gpencil_depth_of_field.c b/source/blender/draw/engines/gpencil/gpencil_depth_of_field.c
index 97708ea5620..dfdbd8ddb52 100644
--- a/source/blender/draw/engines/gpencil/gpencil_depth_of_field.c
+++ b/source/blender/draw/engines/gpencil/gpencil_depth_of_field.c
@@ -251,8 +251,8 @@ void GPENCIL_depth_of_field_draw(GPENCIL_e_data *e_data, GPENCIL_Data *vedata)
GPENCIL_PassList *psl = ((GPENCIL_Data *)vedata)->psl;
GPENCIL_StorageList *stl = ((GPENCIL_Data *)vedata)->stl;
GPENCIL_FramebufferList *fbl = ((GPENCIL_Data *)vedata)->fbl;
- DefaultFramebufferList *dfbl = DRW_viewport_framebuffer_list_get();
- bool is_render = stl->storage->is_render;
+ // DefaultFramebufferList *dfbl = DRW_viewport_framebuffer_list_get();
+ // bool is_render = stl->storage->is_render;
/* Depth Of Field */
if (stl->storage->enable_dof == true) {
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 1c8c4dbb79c..48095069278 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -289,7 +289,7 @@ static void GPENCIL_cache_init(void *vedata)
Scene *scene = draw_ctx->scene;
ToolSettings *ts = scene->toolsettings;
View3D *v3d = draw_ctx->v3d;
- RegionView3D *rv3d = draw_ctx->rv3d;
+ // RegionView3D *rv3d = draw_ctx->rv3d;
Object *obact = draw_ctx->obact;
if (!stl->g_data) {
@@ -501,7 +501,7 @@ static void GPENCIL_cache_populate(void *vedata, Object *ob)
const DRWContextState *draw_ctx = DRW_context_state_get();
Scene *scene = draw_ctx->scene;
ToolSettings *ts = scene->toolsettings;
- bool playing = (bool)stl->storage->playing;
+ // bool playing = (bool)stl->storage->playing;
/* object datablock (this is not draw now) */
if (ob->type == OB_GPENCIL && ob->data) {
@@ -511,7 +511,7 @@ static void GPENCIL_cache_populate(void *vedata, Object *ob)
}
/* if render set as dirty */
- if (stl->storage->is_render == true) {
+ if (stl->storage->is_render == true) {
bGPdata *gpd = (bGPdata *)ob->data;
gpd->flag |= GP_DATA_CACHE_IS_DIRTY;
}
@@ -542,7 +542,7 @@ static void GPENCIL_cache_finish(void *vedata)
ToolSettings *ts = scene->toolsettings;
tGPencilObjectCache *cache;
bool is_multiedit = false;
- bool playing = (bool)stl->storage->playing;
+ // bool playing = (bool)stl->storage->playing;
/* if painting session, don't need to do more */
if (stl->g_data->session_flag & GP_DRW_PAINT_PAINTING) {
@@ -663,9 +663,9 @@ static void GPENCIL_draw_scene(void *vedata)
const DRWContextState *draw_ctx = DRW_context_state_get();
View3D *v3d = draw_ctx->v3d;
- RegionView3D *rv3d = draw_ctx->rv3d;
- Scene *scene = draw_ctx->scene;
- ToolSettings *ts = scene->toolsettings;
+ // RegionView3D *rv3d = draw_ctx->rv3d;
+ // Scene *scene = draw_ctx->scene;
+ // ToolSettings *ts = scene->toolsettings;
Object *obact = draw_ctx->obact;
bool playing = (bool)stl->storage->playing;
bool is_render = stl->storage->is_render;
@@ -855,7 +855,7 @@ static void DRW_framebuffer_multisample_ensure(DefaultFramebufferList *dfbl, Def
}
/* init render data */
-void GPENCIL_render_init(GPENCIL_Data *ved, RenderEngine *engine, struct Depsgraph *depsgraph)
+static void GPENCIL_render_init(GPENCIL_Data *ved, RenderEngine *engine, struct Depsgraph *depsgraph)
{
GPENCIL_Data *vedata = (GPENCIL_Data *)ved;
GPENCIL_StorageList *stl = vedata->stl;
@@ -918,7 +918,7 @@ void GPENCIL_render_init(GPENCIL_Data *ved, RenderEngine *engine, struct Depsgra
}
/* render all objects and select only grease pencil */
-void GPENCIL_render_cache(
+static void GPENCIL_render_cache(
void *vedata, struct Object *ob,
struct RenderEngine *UNUSED(engine), struct Depsgraph *UNUSED(depsgraph))
{
diff --git a/source/blender/draw/engines/gpencil/gpencil_geom.c b/source/blender/draw/engines/gpencil/gpencil_geom.c
index e86c3e66530..e7bace3bb24 100644
--- a/source/blender/draw/engines/gpencil/gpencil_geom.c
+++ b/source/blender/draw/engines/gpencil/gpencil_geom.c
@@ -322,7 +322,6 @@ Gwn_Batch *DRW_gpencil_get_buffer_fill_geom(bGPdata *gpd)
Scene *scene = draw_ctx->scene;
View3D *v3d = draw_ctx->v3d;
ARegion *ar = draw_ctx->ar;
- RegionView3D *rv3d = draw_ctx->rv3d;
ToolSettings *ts = scene->toolsettings;
Object *ob = draw_ctx->obact;
diff --git a/source/blender/draw/engines/gpencil/gpencil_vfx.c b/source/blender/draw/engines/gpencil/gpencil_vfx.c
index 3d165781229..1897a6d334d 100644
--- a/source/blender/draw/engines/gpencil/gpencil_vfx.c
+++ b/source/blender/draw/engines/gpencil/gpencil_vfx.c
@@ -53,6 +53,7 @@ bool gpencil_object_use_vfx(Object *ob)
}
/* verify if this modifier is available in the context, return NULL if not available */
+#if 0 /* UNUSED */
static ModifierData *modifier_available(Object *ob, ModifierType type, bool is_render)
{
ModifierData *md = modifiers_findByType(ob, type);
@@ -77,6 +78,7 @@ static ModifierData *modifier_available(Object *ob, ModifierType type, bool is_r
return NULL;
}
+#endif
/* verify if this modifier is active */
static bool modifier_is_active(Object *ob, ModifierData *md, bool is_render)
@@ -311,7 +313,7 @@ static void DRW_gpencil_vfx_flip(
if (md == NULL) {
return;
}
- Object *ob = cache->ob;
+ // Object *ob = cache->ob;
GpencilFlipModifierData *mmd = (GpencilFlipModifierData *)md;
GPENCIL_StorageList *stl = ((GPENCIL_Data *)vedata)->stl;
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index bb32a438962..04be1c0c270 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -1385,7 +1385,7 @@ void DRW_render_gpencil(struct RenderEngine *engine, struct Depsgraph *depsgraph
Scene *scene = DEG_get_evaluated_scene(depsgraph);
ViewLayer *view_layer = DEG_get_evaluated_view_layer(depsgraph);
RenderEngineType *engine_type = engine->type;
- DrawEngineType *draw_engine_type = engine_type->draw_engine;
+ // DrawEngineType *draw_engine_type = engine_type->draw_engine;
RenderData *r = &scene->r;
Render *render = engine->re;
/* Changing Context */
diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c
index 8fddfc119b8..ca47445c504 100644
--- a/source/blender/editors/gpencil/gpencil_brush.c
+++ b/source/blender/editors/gpencil/gpencil_brush.c
@@ -278,13 +278,14 @@ static bool gp_brush_smooth_apply(
tGP_BrushEditData *gso, bGPDstroke *gps, int pt_index,
const int radius, const int co[2])
{
- GP_EditBrush_Data *brush = gso->brush;
+ // GP_EditBrush_Data *brush = gso->brush;
float inf = gp_brush_influence_calc(gso, radius, co);
/* need one flag enabled by default */
- if ((gso->settings->flag & (GP_BRUSHEDIT_FLAG_APPLY_POSITION |
- GP_BRUSHEDIT_FLAG_APPLY_STRENGTH |
- GP_BRUSHEDIT_FLAG_APPLY_THICKNESS |
- GP_BRUSHEDIT_FLAG_APPLY_UV)) == 0)
+ if ((gso->settings->flag &
+ (GP_BRUSHEDIT_FLAG_APPLY_POSITION |
+ GP_BRUSHEDIT_FLAG_APPLY_STRENGTH |
+ GP_BRUSHEDIT_FLAG_APPLY_THICKNESS |
+ GP_BRUSHEDIT_FLAG_APPLY_UV)) == 0)
{
gso->settings->flag |= GP_BRUSHEDIT_FLAG_APPLY_POSITION;
}
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c
index b62f45360eb..903aca5e149 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -611,7 +611,7 @@ static void gpencil_get_outline_points(tGPDfill *tgpf)
int current_check_co[2];
int prev_check_co[2];
int backtracked_offset[1][2] = { { 0,0 } };
- bool boundary_found = false;
+ // bool boundary_found = false;
bool start_found = false;
const int NEIGHBOR_COUNT = 8;
@@ -692,7 +692,7 @@ static void gpencil_get_outline_points(tGPDfill *tgpf)
boundary_co[1] == start_co[1])
{
BLI_stack_pop(tgpf->stack, &v);
- boundary_found = true;
+ // boundary_found = true;
break;
}
}
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index ced15d5b43a..ae2701247d7 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1528,7 +1528,6 @@ static void gp_init_drawing_brush(bContext *C, tGPsdata *p)
ToolSettings *ts = CTX_data_tool_settings(C);
Paint *paint = BKE_brush_get_gpencil_paint(ts);
- Main *bmain = CTX_data_main(C);
/* if not exist, create a new one */
if (paint->brush == NULL) {
@@ -2123,12 +2122,12 @@ static void gp_paint_cleanup(tGPsdata *p)
/* ------------------------------- */
/* Helper callback for drawing the cursor itself */
-static void gpencil_draw_eraser(bContext *C, int x, int y, void *p_ptr)
+static void gpencil_draw_eraser(bContext *UNUSED(C), int x, int y, void *p_ptr)
{
tGPsdata *p = (tGPsdata *)p_ptr;
if ((p) && (p->paintmode == GP_PAINTMODE_ERASER)) {
- ED_gpencil_brush_draw_eraser(C, p->eraser, x, y);
+ ED_gpencil_brush_draw_eraser(p->eraser, x, y);
}
}
@@ -2143,9 +2142,10 @@ static void gpencil_draw_toggle_eraser_cursor(bContext *C, tGPsdata *p, short en
else if (enable && !p->erasercursor) {
ED_gpencil_toggle_brush_cursor(p->C, false, NULL);
/* enable cursor */
- p->erasercursor = WM_paint_cursor_activate(CTX_wm_manager(C),
- NULL, /* XXX */
- gpencil_draw_eraser, p);
+ p->erasercursor = WM_paint_cursor_activate(
+ CTX_wm_manager(C),
+
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list