[Bf-blender-cvs] [25a3c3f11f8] greasepencil-object: Cleanup: Remove unused code

Antonio Vazquez noreply at git.blender.org
Fri Apr 6 16:17:56 CEST 2018


Commit: 25a3c3f11f884bfd1866e97c3fa1c759114c46a0
Author: Antonio Vazquez
Date:   Fri Apr 6 16:17:44 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB25a3c3f11f884bfd1866e97c3fa1c759114c46a0

Cleanup: Remove unused code

===================================================================

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_paint.c

===================================================================

diff --git a/source/blender/editors/gpencil/gpencil_convert.c b/source/blender/editors/gpencil/gpencil_convert.c
index 9eef5830d9c..a6f3642b001 100644
--- a/source/blender/editors/gpencil/gpencil_convert.c
+++ b/source/blender/editors/gpencil/gpencil_convert.c
@@ -55,7 +55,6 @@
 #include "DNA_space_types.h"
 #include "DNA_view3d_types.h"
 #include "DNA_gpencil_types.h"
-#include "DNA_workspace_types.h"
 
 #include "BKE_collection.h"
 #include "BKE_context.h"
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index f01f33d74d9..9b478c556c4 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -55,7 +55,6 @@
 #include "DNA_screen_types.h"
 #include "DNA_space_types.h"
 #include "DNA_view3d_types.h"
-#include "DNA_workspace_types.h"
 
 #include "BKE_main.h"
 #include "BKE_brush.h"
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index bc9320a7c3c..c443cde60a8 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -53,7 +53,6 @@
 #include "DNA_space_types.h"
 #include "DNA_view3d_types.h"
 #include "DNA_gpencil_types.h"
-#include "DNA_workspace_types.h"
 
 #include "BKE_main.h"
 #include "BKE_context.h"
@@ -106,7 +105,6 @@ static int gpencil_editmode_toggle_exec(bContext *C, wmOperator *op)
 {
 	const int back = RNA_int_get(op->ptr, "back");
 
-	WorkSpace *workspace = CTX_wm_workspace(C);
 	bGPdata *gpd = ED_gpencil_data_get_active(C);
 	bool is_object = false;
 	short mode;
@@ -188,7 +186,6 @@ static int gpencil_paintmode_toggle_exec(bContext *C, wmOperator *op)
 {
 	const int back = RNA_int_get(op->ptr, "back");
 
-	WorkSpace *workspace = CTX_wm_workspace(C);
 	bGPdata *gpd = ED_gpencil_data_get_active(C);
 	ToolSettings *ts = CTX_data_tool_settings(C);
 
@@ -274,7 +271,6 @@ static int gpencil_sculptmode_toggle_exec(bContext *C, wmOperator *op)
 {
 	const int back = RNA_int_get(op->ptr, "back");
 
-	WorkSpace *workspace = CTX_wm_workspace(C);
 	bGPdata *gpd = ED_gpencil_data_get_active(C);
 	bool is_object = false;
 	short mode;
@@ -351,7 +347,6 @@ static int gpencil_weightmode_toggle_exec(bContext *C, wmOperator *op)
 {
 	const int back = RNA_int_get(op->ptr, "back");
 
-	WorkSpace *workspace = CTX_wm_workspace(C);
 	bGPdata *gpd = ED_gpencil_data_get_active(C);
 	bool is_object = false;
 	short mode;
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 7074966a62f..9b6d2fbf95e 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -51,7 +51,6 @@
 #include "DNA_gpencil_types.h"
 #include "DNA_brush_types.h"
 #include "DNA_windowmanager_types.h"
-#include "DNA_workspace_types.h"
 
 #include "BKE_main.h"
 #include "BKE_brush.h"
@@ -2673,7 +2672,6 @@ static int gpencil_draw_invoke(bContext *C, wmOperator *op, const wmEvent *event
 	/* enable paint mode */
 	if (p->sa->spacetype == SPACE_VIEW3D) {
 		Object *ob = CTX_data_active_object(C);
-		WorkSpace *workspace = CTX_wm_workspace(C);
 		if (ob && (ob->type == OB_GPENCIL) && ((p->gpd->flag & GP_DATA_STROKE_PAINTMODE) == 0)) {
 			/* Just set paintmode flag... */
 			p->gpd->flag |= GP_DATA_STROKE_PAINTMODE;



More information about the Bf-blender-cvs mailing list