[Bf-blender-cvs] [036f60d3000] greasepencil-object: Cleanup: Remove unused code
Antonio Vazquez
noreply at git.blender.org
Mon Sep 18 12:23:11 CEST 2017
Commit: 036f60d3000ce4d28df8906b343986e5b45f6949
Author: Antonio Vazquez
Date: Mon Sep 18 12:22:58 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rB036f60d3000ce4d28df8906b343986e5b45f6949
Cleanup: Remove unused code
===================================================================
M source/blender/blenloader/intern/versioning_defaults.c
M source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
M source/blender/draw/engines/gpencil/gpencil_engine.c
M source/blender/draw/engines/gpencil/gpencil_geom.c
M source/blender/makesrna/intern/rna_gpencil.c
M source/blender/modifiers/intern/MOD_gpencilarray.c
M source/blender/modifiers/intern/MOD_gpencilcolor.c
M source/blender/modifiers/intern/MOD_gpencildupli.c
M source/blender/modifiers/intern/MOD_gpencillattice.c
M source/blender/modifiers/intern/MOD_gpencilnoise.c
M source/blender/modifiers/intern/MOD_gpencilopacity.c
M source/blender/modifiers/intern/MOD_gpencilsimplify.c
M source/blender/modifiers/intern/MOD_gpencilsubdiv.c
M source/blender/modifiers/intern/MOD_gpencilthick.c
M source/blender/modifiers/intern/MOD_gpenciltint.c
===================================================================
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index 5f0d212e0e3..06583ee788d 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -144,10 +144,6 @@ void BLO_update_defaults_startup_blend(Main *bmain)
GP_BrushEdit_Settings *gset = &ts->gp_sculpt;
GP_EditBrush_Data *brush;
float curcolor_add[3], curcolor_sub[3];
-#if 0
- float curcolor[3];
- ARRAY_SET_ITEMS(curcolor, 1.0f, 1.0f, 1.0f);
-#endif
ARRAY_SET_ITEMS(curcolor_add, 1.0f, 0.6f, 0.6f);
ARRAY_SET_ITEMS(curcolor_sub, 0.6f, 0.6f, 1.0f);
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
index 47126c9b4cb..2da346c8592 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
@@ -1064,9 +1064,6 @@ void DRW_gpencil_populate_datablock(GPENCIL_e_data *e_data, void *vedata, Scene
{
GPENCIL_StorageList *stl = ((GPENCIL_Data *)vedata)->stl;
bGPDframe *derived_gpf = NULL;
-#if 0
- bool is_edit = (bool)(gpd->flag & (GP_DATA_STROKE_EDITMODE | GP_DATA_STROKE_SCULPTMODE | GP_DATA_STROKE_WEIGHTMODE));
-#endif
bool no_onion = (bool)(gpd->flag & GP_DATA_STROKE_WEIGHTMODE);
if (G.debug_value == 668) {
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index b41146d6988..7fbfb28e99b 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -368,9 +368,6 @@ static void GPENCIL_cache_init(void *vedata)
static void GPENCIL_cache_populate(void *vedata, Object *ob)
{
GPENCIL_StorageList *stl = ((GPENCIL_Data *)vedata)->stl;
-#if 0
- GPENCIL_PassList *psl = ((GPENCIL_Data *)vedata)->psl;
-#endif
const DRWContextState *draw_ctx = DRW_context_state_get();
Scene *scene = draw_ctx->scene;
ToolSettings *ts = scene->toolsettings;
@@ -466,14 +463,8 @@ static void gpencil_vfx_passes(void *vedata, tGPencilObjectCache *cache)
{
float clearcol[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
-#if 0
- GPENCIL_StorageList *stl = ((GPENCIL_Data *)vedata)->stl;
-#endif
GPENCIL_PassList *psl = ((GPENCIL_Data *)vedata)->psl;
GPENCIL_FramebufferList *fbl = ((GPENCIL_Data *)vedata)->fbl;
-#if 0
- DefaultFramebufferList *dfbl = DRW_viewport_framebuffer_list_get();
-#endif
DRW_framebuffer_bind(fbl->vfx_color_fb_a);
DRW_framebuffer_clear(true, true, false, clearcol, 1.0f);
diff --git a/source/blender/draw/engines/gpencil/gpencil_geom.c b/source/blender/draw/engines/gpencil/gpencil_geom.c
index 62ed7ee4d06..6c7e1bba8e1 100644
--- a/source/blender/draw/engines/gpencil/gpencil_geom.c
+++ b/source/blender/draw/engines/gpencil/gpencil_geom.c
@@ -614,10 +614,6 @@ Gwn_Batch *DRW_gpencil_get_edit_geom(bGPDstroke *gps, float alpha, short dflag)
const DRWContextState *draw_ctx = DRW_context_state_get();
Object *ob = draw_ctx->obact;
bGPdata *gpd = ob->gpd;
-#if 0
- Scene *scene = draw_ctx->scene;
- ToolSettings *ts = scene->toolsettings;
-#endif
bool is_weight_paint = (gpd) && (gpd->flag & GP_DATA_STROKE_WEIGHTMODE);
int vgindex = ob->actdef - 1;
@@ -712,9 +708,6 @@ Gwn_Batch *DRW_gpencil_get_edit_geom(bGPDstroke *gps, float alpha, short dflag)
Gwn_Batch *DRW_gpencil_get_edlin_geom(bGPDstroke *gps, float alpha, short UNUSED(dflag))
{
const DRWContextState *draw_ctx = DRW_context_state_get();
-#if 0
- Scene *scene = draw_ctx->scene;
-#endif
Object *ob = draw_ctx->obact;
bGPdata *gpd = ob->gpd;
bool is_weight_paint = (gpd) && (gpd->flag & GP_DATA_STROKE_WEIGHTMODE);
@@ -724,27 +717,6 @@ Gwn_Batch *DRW_gpencil_get_edlin_geom(bGPDstroke *gps, float alpha, short UNUSED
vgindex = -1;
}
-#if 0
- /* Get size of verts:
- * - The selected state needs to be larger than the unselected state so that
- * they stand out more.
- * - We use the theme setting for size of the unselected verts
- */
- float bsize = UI_GetThemeValuef(TH_GP_VERTEX_SIZE);
- float vsize;
- if ((int)bsize > 8) {
- vsize = 10.0f;
- bsize = 8.0f;
- }
- else {
- vsize = bsize + 2;
- }
-
- /* for now, we assume that the base color of the points is not too close to the real color */
- /* set color using palette */
- PaletteColor *palcolor = gps->palcolor;
-#endif
-
float selectColor[4];
UI_GetThemeColor3fv(TH_GP_VERTEX_SELECT, selectColor);
selectColor[3] = alpha;
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index 2471fe917a0..86bd5247ae4 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -148,10 +148,6 @@ static int rna_GPencilLayer_active_frame_editable(PointerRNA *ptr, const char **
static void rna_GPencilLayer_line_width_range(PointerRNA *UNUSED(ptr), int *min, int *max,
int *softmin, int *softmax)
{
-#if 0
- bGPDlayer *gpl = ptr->data;
-#endif
-
*min = -300;
*max = 300;
diff --git a/source/blender/modifiers/intern/MOD_gpencilarray.c b/source/blender/modifiers/intern/MOD_gpencilarray.c
index 7afaaeeefe8..f7c11fda1da 100644
--- a/source/blender/modifiers/intern/MOD_gpencilarray.c
+++ b/source/blender/modifiers/intern/MOD_gpencilarray.c
@@ -78,11 +78,6 @@ static void initData(ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
-#if 0
- GpencilArrayModifierData *smd = (GpencilArrayModifierData *)md;
- GpencilArrayModifierData *tsmd = (GpencilArrayModifierData *)target;
-#endif
-
modifier_copyData_generic(md, target);
}
@@ -91,9 +86,6 @@ static Object *object_add_type(bContext *C, int UNUSED(type), const char *UNUSED
{
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
-#if 0
- SceneLayer *sl = CTX_data_scene_layer(C);
-#endif
Object *ob;
const float loc[3] = { 0, 0, 0 };
const float rot[3] = { 0, 0, 0 };
@@ -120,12 +112,6 @@ static DerivedMesh *applyModifier(
ModifierData *fmd;
bContext *C = (bContext *)mmd->C;
Main *bmain = CTX_data_main(C);
-#if 0
- Scene *scene = CTX_data_scene(C);
- SceneLayer *sl = CTX_data_scene_layer(C);
- SceneCollection *sc = CTX_data_scene_collection(C);
- Base *base_new = NULL;
-#endif
Object *newob = NULL;
int xyz[3], sh;
float mat[4][4], finalmat[4][4];
diff --git a/source/blender/modifiers/intern/MOD_gpencilcolor.c b/source/blender/modifiers/intern/MOD_gpencilcolor.c
index 0917dbe15d5..89fbe259e04 100644
--- a/source/blender/modifiers/intern/MOD_gpencilcolor.c
+++ b/source/blender/modifiers/intern/MOD_gpencilcolor.c
@@ -57,11 +57,6 @@ static void initData(ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
-#if 0
- GpencilColorModifierData *smd = (GpencilColorModifierData *)md;
- GpencilColorModifierData *tsmd = (GpencilColorModifierData *)target;
-#endif
-
modifier_copyData_generic(md, target);
}
diff --git a/source/blender/modifiers/intern/MOD_gpencildupli.c b/source/blender/modifiers/intern/MOD_gpencildupli.c
index aff2fb679ab..d55c8f06b18 100644
--- a/source/blender/modifiers/intern/MOD_gpencildupli.c
+++ b/source/blender/modifiers/intern/MOD_gpencildupli.c
@@ -61,11 +61,6 @@ static void initData(ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
-#if 0
- GpencilDupliModifierData *smd = (GpencilDupliModifierData *)md;
- GpencilDupliModifierData *tsmd = (GpencilDupliModifierData *)target;
-#endif
-
modifier_copyData_generic(md, target);
}
@@ -73,9 +68,6 @@ static DerivedMesh *applyModifier(ModifierData *md, const struct EvaluationConte
DerivedMesh *UNUSED(dm),
ModifierApplyFlag UNUSED(flag))
{
-#if 0
- GpencilDupliModifierData *mmd = (GpencilDupliModifierData *)md;
-#endif
bGPdata *gpd;
if ((!ob) || (!ob->gpd)) {
return NULL;
diff --git a/source/blender/modifiers/intern/MOD_gpencillattice.c b/source/blender/modifiers/intern/MOD_gpencillattice.c
index 2e28f02bd8c..ff223e59bff 100644
--- a/source/blender/modifiers/intern/MOD_gpencillattice.c
+++ b/source/blender/modifiers/intern/MOD_gpencillattice.c
@@ -65,11 +65,6 @@ static void initData(ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
-#if 0
- GpencilLatticeModifierData *smd = (GpencilLatticeModifierData *)md;
- GpencilLatticeModifierData *tsmd = (GpencilLatticeModifierData *)target;
-#endif
-
modifier_copyData_generic(md, target);
}
diff --git a/source/blender/modifiers/intern/MOD_gpencilnoise.c b/source/blender/modifiers/intern/MOD_gpencilnoise.c
index 1b1dfb25981..05a9cd57c85 100644
--- a/source/blender/modifiers/intern/MOD_gpencilnoise.c
+++ b/source/blender/modifiers/intern/MOD_gpencilnoise.c
@@ -62,11 +62,6 @@ static void initData(ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
-#if 0
- GpencilNoiseModifierData *smd = (GpencilNoiseModifierData *)md;
- GpencilNoiseModifierData *tsmd = (GpencilNoiseModifierData *)target;
-#endif
-
modifier_copyData_generic(md, target);
}
@@ -75,9 +70,6 @@ static DerivedMesh *applyModifier(
DerivedMesh *UNUSED(dm),
ModifierApplyFlag UNUSED(flag))
{
-#if 0
- GpencilNoiseModifierData *mmd = (GpencilNoiseModifierData *)md;
-#endif
bGPdata *gpd;
if ((!ob) || (!ob->gpd)) {
return NULL;
diff --git a/source/blender/modifiers/intern/MOD_gpencilopacity.c b/source/blender/modifiers/intern/MOD_gpencilopacity.c
index 0ceb6b0ef72..feed88cb2a2 100644
--- a/source/blender/modifiers/intern/MOD_gpencilopacity.c
+++ b/source/blender/modifiers/intern/MOD_gpencilopacity.c
@@ -56,11 +56,6 @@ static void initData(ModifierData *md)
static void copyData(ModifierData *md, ModifierData *target)
{
-#if 0
- GpencilOpacityModifierData *smd = (GpencilOpacityModifierData *)md;
- GpencilOpacityModifierData *tsmd = (GpencilOpacityModifierData *)target;
-#endif
-
modifier_copyData_generic(md, target);
}
@@ -68,9 +63,6 @@ static DerivedMesh *applyModifier(ModifierData *md, const struct EvaluationConte
DerivedMesh *UNUSED(dm),
ModifierApplyFlag UNUSED(flag))
{
-#if 0
- GpencilOpacityModifierData *mmd = (GpencilOpacityModifierData *)md;
-#endif
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list