[Bf-blender-cvs] [67960e8d79d] greasepencil-object: Cleanup: unused warnings
Campbell Barton
noreply at git.blender.org
Tue May 22 16:52:48 CEST 2018
Commit: 67960e8d79dc71057a4ddd6663b963de1ae95e38
Author: Campbell Barton
Date: Tue May 22 16:51:46 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB67960e8d79dc71057a4ddd6663b963de1ae95e38
Cleanup: unused warnings
===================================================================
M source/blender/blenkernel/BKE_object.h
M source/blender/blenkernel/intern/object.c
M source/blender/editors/gpencil/drawgpencil.c
M source/blender/editors/gpencil/gpencil_add_monkey.c
M source/blender/editors/gpencil/gpencil_brush.c
M source/blender/editors/gpencil/gpencil_convert.c
M source/blender/editors/gpencil/gpencil_data.c
M source/blender/editors/gpencil/gpencil_edit.c
M source/blender/editors/gpencil/gpencil_fill.c
M source/blender/editors/gpencil/gpencil_interpolate.c
M source/blender/editors/gpencil/gpencil_primitive.c
M source/blender/editors/gpencil/gpencil_select.c
M source/blender/editors/gpencil/gpencil_utils.c
M source/blender/editors/include/ED_gpencil.h
M source/blender/editors/object/object_relations.c
M source/blender/editors/render/render_opengl.c
M source/blender/editors/screen/screen_context.c
M source/blender/modifiers/intern/MOD_gpencilsmooth.c
===================================================================
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h
index b0511c693c7..d1625ac499d 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -109,7 +109,7 @@ struct Object *BKE_object_add_from(
int type, const char *name, struct Object *ob_src)
ATTR_NONNULL(1, 2, 3, 6) ATTR_RETURNS_NONNULL;
struct Object *BKE_object_add_for_data(
- struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer,
+ struct Main *bmain, struct ViewLayer *view_layer,
int type, const char *name, struct ID *data, bool add_user) ATTR_RETURNS_NONNULL;
void *BKE_object_obdata_add_from_type(
struct Main *bmain,
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 32e8b94373f..b582e45e3a1 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -834,7 +834,7 @@ Object *BKE_object_add_from(
* assigning it to the object.
*/
Object *BKE_object_add_for_data(
- Main *bmain, Scene *scene, ViewLayer *view_layer,
+ Main *bmain, ViewLayer *view_layer,
int type, const char *name, ID *data, bool add_user)
{
Object *ob;
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index a2793a1e3a6..491dedf2727 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -1923,7 +1923,7 @@ void ED_gpencil_draw_view3d(wmWindowManager *wm,
/* check that we have grease-pencil stuff to draw */
// XXX: This is the only place that still uses this function
- bGPdata *gpd = ED_gpencil_data_get_active_v3d(scene, view_layer);
+ bGPdata *gpd = ED_gpencil_data_get_active_v3d(view_layer);
if (gpd == NULL) return;
/* when rendering to the offscreen buffer we don't want to
diff --git a/source/blender/editors/gpencil/gpencil_add_monkey.c b/source/blender/editors/gpencil/gpencil_add_monkey.c
index 254fcf54d2e..c994dbd0833 100644
--- a/source/blender/editors/gpencil/gpencil_add_monkey.c
+++ b/source/blender/editors/gpencil/gpencil_add_monkey.c
@@ -1424,7 +1424,6 @@ static const ColorTemplate gp_monkey_pct_pupils = {
/* add a 2D Suzanne (original model created by Matias Mendiola) */
void ED_gpencil_create_monkey(bContext *C, float mat[4][4])
{
- Scene *scene = CTX_data_scene(C);
Main *bmain = CTX_data_main(C);
Object *ob = CTX_data_active_object(C);
Depsgraph *depsgraph = CTX_data_depsgraph(C);
diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c
index e451fe6d560..8ef5bf5bfc9 100644
--- a/source/blender/editors/gpencil/gpencil_brush.c
+++ b/source/blender/editors/gpencil/gpencil_brush.c
@@ -1010,7 +1010,6 @@ static void gp_brush_clone_add(bContext *C, tGP_BrushEditData *gso)
{
tGPSB_CloneBrushData *data = gso->customdata;
- Scene *scene = gso->scene;
Object *ob = CTX_data_active_object(C);
bGPDlayer *gpl = CTX_data_active_gpencil_layer(C);
Depsgraph *depsgraph = CTX_data_depsgraph(C);
@@ -1337,7 +1336,6 @@ static int gpsculpt_brush_poll(bContext *C)
static void gpsculpt_brush_init_stroke(tGP_BrushEditData *gso)
{
- Scene *scene = gso->scene;
bGPdata *gpd = gso->gpd;
bGPDlayer *gpl;
diff --git a/source/blender/editors/gpencil/gpencil_convert.c b/source/blender/editors/gpencil/gpencil_convert.c
index ca48d0ad1ce..5910197a8bf 100644
--- a/source/blender/editors/gpencil/gpencil_convert.c
+++ b/source/blender/editors/gpencil/gpencil_convert.c
@@ -1124,7 +1124,6 @@ static void gp_layer_to_curve(bContext *C, ReportList *reports, bGPdata *gpd, bG
const bool norm_weights, const float rad_fac, const bool link_strokes, tGpTimingData *gtd)
{
struct Main *bmain = CTX_data_main(C);
- Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
Collection *collection = CTX_data_collection(C);
Depsgraph *depsgraph = CTX_data_depsgraph(C);
@@ -1235,7 +1234,6 @@ static void gp_layer_to_curve(bContext *C, ReportList *reports, bGPdata *gpd, bG
*/
static bool gp_convert_check_has_valid_timing(bContext *C, bGPDlayer *gpl, wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
Depsgraph *depsgraph = CTX_data_depsgraph(C);
int cfra_eval = (int)DEG_get_ctime(depsgraph);
@@ -1300,7 +1298,6 @@ static int gp_convert_poll(bContext *C)
bGPDlayer *gpl = NULL;
bGPDframe *gpf = NULL;
ScrArea *sa = CTX_wm_area(C);
- Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
/* only if the current view is 3D View, if there's valid data (i.e. at least one stroke!),
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index 15bb9749a85..553728fd77f 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -383,7 +383,6 @@ enum {
static int gp_frame_duplicate_exec(bContext *C, wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
bGPdata *gpd = ED_gpencil_data_get_active(C);
bGPDlayer *gpl = BKE_gpencil_layer_getactive(gpd);
Depsgraph *depsgraph = CTX_data_depsgraph(C);
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 197915751b2..04ee9c1bcce 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -895,7 +895,6 @@ typedef enum eGP_PasteMode {
static int gp_strokes_paste_exec(bContext *C, wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
Object *ob = CTX_data_active_object(C);
bGPdata *gpd = ED_gpencil_data_get_active(C);
bGPDlayer *gpl = CTX_data_active_gpencil_layer(C); /* only use active for copy merge */
@@ -1128,7 +1127,6 @@ static int gp_move_to_layer_exec(bContext *C, wmOperator *op)
/* Paste them all in one go */
if (strokes.first) {
- Scene *scene = CTX_data_scene(C);
bGPDframe *gpf = BKE_gpencil_layer_getframe(target_layer, cfra_eval, true);
BLI_movelisttolist(&gpf->strokes, &strokes);
@@ -1185,7 +1183,6 @@ static int UNUSED_FUNCTION(gp_blank_frame_add_poll)(bContext *C)
static int gp_blank_frame_add_exec(bContext *C, wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
bGPdata *gpd = ED_gpencil_data_get_active(C);
Depsgraph *depsgraph = CTX_data_depsgraph(C);
int cfra_eval = (int)DEG_get_ctime(depsgraph);
@@ -1261,7 +1258,6 @@ static int gp_actframe_delete_poll(bContext *C)
/* delete active frame - wrapper around API calls */
static int gp_actframe_delete_exec(bContext *C, wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
bGPdata *gpd = ED_gpencil_data_get_active(C);
bGPDlayer *gpl = BKE_gpencil_layer_getactive(gpd);
@@ -1319,7 +1315,6 @@ static int gp_actframe_delete_all_poll(bContext *C)
static int gp_actframe_delete_all_exec(bContext *C, wmOperator *op)
{
bGPdata *gpd = ED_gpencil_data_get_active(C);
- Scene *scene = CTX_data_scene(C);
Depsgraph *depsgraph = CTX_data_depsgraph(C);
int cfra_eval = (int)DEG_get_ctime(depsgraph);
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c
index 751ff0b99d4..56b152ae049 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -188,7 +188,6 @@ static void gp_draw_datablock(tGPDfill *tgpf, float ink[4])
GP_DRAWFILLS_ONLY3D = (1 << 1), /* only draw 3d-strokes */
};
- Scene *scene = tgpf->scene;
Object *ob = tgpf->ob;
bGPdata *gpd = tgpf->gpd;
int cfra_eval = (int)DEG_get_ctime(tgpf->depsgraph);
@@ -807,7 +806,6 @@ static void gpencil_points_from_stack(tGPDfill *tgpf)
/* create a grease pencil stroke using points in buffer */
static void gpencil_stroke_from_buffer(tGPDfill *tgpf)
{
- Scene *scene = tgpf->scene;
ToolSettings *ts = tgpf->scene->toolsettings;
int cfra_eval = (int)DEG_get_ctime(tgpf->depsgraph);
diff --git a/source/blender/editors/gpencil/gpencil_interpolate.c b/source/blender/editors/gpencil/gpencil_interpolate.c
index 29ab16b7814..e93a9e1c2ee 100644
--- a/source/blender/editors/gpencil/gpencil_interpolate.c
+++ b/source/blender/editors/gpencil/gpencil_interpolate.c
@@ -495,7 +495,6 @@ static int gpencil_interpolate_init(bContext *C, wmOperator *op)
static int gpencil_interpolate_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
{
wmWindow *win = CTX_wm_window(C);
- Scene *scene = CTX_data_scene(C);
bGPdata *gpd = CTX_data_gpencil_data(C);
bGPDlayer *gpl = CTX_data_active_gpencil_layer(C);
Depsgraph *depsgraph = CTX_data_depsgraph(C);
@@ -917,7 +916,6 @@ static int gpencil_interpolate_seq_exec(bContext *C, wmOperator *op)
bGPDlayer *active_gpl = CTX_data_active_gpencil_layer(C);
bGPDframe *actframe = active_gpl->actframe;
- Scene *scene = CTX_data_scene(C);
Object *ob = CTX_data_active_object(C);
ToolSettings *ts = CTX_data_tool_settings(C);
Depsgraph *depsgraph = CTX_data_depsgraph(C);
diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c
index 4fb954f9759..b1448f695ad 100644
--- a/source/blender/editors/gpencil/gpencil_primitive.c
+++ b/source/blender/editors/gpencil/gpencil_primitive.c
@@ -135,7 +135,6 @@ static int gpencil_primitive_add_poll(bContext *C)
/* Helper: Create internal strokes primitives data */
static void gp_primitive_set_initdata(bContext *C, tGPDprimitive *tgpi)
{
- Scene *scene = CTX_data_scene(C);
ToolSettings *ts = CTX_data_tool_settings(C);
Depsgraph *depsgraph = CTX_data_depsgraph(C);
int cfra_eval = (int)DEG_get_ctime(depsgraph);
diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c
index e79235eff70..d5356a088e8 100644
--- a/source/blender/editors/gpencil/gpencil_select.c
+++ b/source/blender/editors/gpencil/gpencil_select.c
@@ -358,7 +358,6 @@ typedef enum eGP_SelectGrouped {
/* On each visible layer, check for selected strokes - if found, select all others */
static void gp_select_same_layer(bContext *C)
{
- Scene *scene = CTX_data_scene(C);
Depsgraph *depsgraph = CT
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list