[Bf-blender-cvs] [75d0559b046] temp-gpencil-eval: Cleanup: Remove unused code and old comments
Antonio Vazquez
noreply at git.blender.org
Tue Jan 14 19:38:28 CET 2020
Commit: 75d0559b046abf27235ecc4ce7e1d6c4bef6f164
Author: Antonio Vazquez
Date: Tue Jan 14 18:11:59 2020 +0100
Branches: temp-gpencil-eval
https://developer.blender.org/rB75d0559b046abf27235ecc4ce7e1d6c4bef6f164
Cleanup: Remove unused code and old comments
===================================================================
M source/blender/editors/gpencil/drawgpencil.c
M source/blender/editors/gpencil/gpencil_interpolate.c
M source/blender/editors/gpencil/gpencil_paint.c
M source/blender/makesrna/intern/rna_gpencil_modifier.c
===================================================================
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index 599624f6359..091e57ef044 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -378,44 +378,6 @@ static void gp_add_filldata_tobuffer(const bGPDspoint *pt,
immVertex3fv(pos, fpt); /* position */
}
-#if 0 /* GPXX disabled, not used in annotations */
-/* assign image texture for filling stroke */
-static int gp_set_filling_texture(Image *image, short flag)
-{
- ImBuf *ibuf;
- uint *bind = &image->bindcode[TEXTARGET_TEXTURE_2D];
- int error = GL_NO_ERROR;
- ImageUser iuser = {NULL};
- void *lock;
-
- iuser.ok = true;
-
- ibuf = BKE_image_acquire_ibuf(image, &iuser, &lock);
-
- if (ibuf == NULL || ibuf->rect == NULL) {
- BKE_image_release_ibuf(image, ibuf, NULL);
- return (int)GL_INVALID_OPERATION;
- }
-
- GPU_create_gl_tex(
- bind, ibuf->rect, ibuf->rect_float, ibuf->x, ibuf->y, GL_TEXTURE_2D, false, false, image);
-
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- if (flag & GP_MATERIAL_TEX_CLAMP) {
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
- }
- else {
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
- }
- BKE_image_release_ibuf(image, ibuf, NULL);
-
- return error;
-}
-#endif
-
/* draw fills for shapes */
static void gp_draw_stroke_fill(bGPdata *gpd,
bGPDstroke *gps,
@@ -460,13 +422,7 @@ static void gp_draw_stroke_fill(bGPdata *gpd,
immUniform1f("texture_opacity", gp_style->texture_opacity);
immUniform1i("t_mix", (gp_style->flag & GP_MATERIAL_FILL_TEX_MIX) != 0);
immUniform1i("t_flip", (gp_style->flag & GP_MATERIAL_FLIP_FILL) != 0);
-#if 0 /* GPXX disabled, not used in annotations */
- /* image texture */
- if ((gp_style->fill_style == GP_MATERIAL_FILL_STYLE_TEXTURE) ||
- (gp_style->flag & GP_MATERIAL_COLOR_TEX_MIX)) {
- gp_set_filling_texture(gp_style->ima, gp_style->flag);
- }
-#endif
+
/* Draw all triangles for filling the polygon (cache must be calculated before) */
immBegin(GPU_PRIM_TRIS, gps->tot_triangles * 3);
/* TODO: use batch instead of immediate mode, to share vertices */
diff --git a/source/blender/editors/gpencil/gpencil_interpolate.c b/source/blender/editors/gpencil/gpencil_interpolate.c
index 152228e79cb..6a3d0853b4f 100644
--- a/source/blender/editors/gpencil/gpencil_interpolate.c
+++ b/source/blender/editors/gpencil/gpencil_interpolate.c
@@ -115,13 +115,6 @@ static void gp_interpolate_update_points(const bGPDstroke *gps_from,
pt->pressure = interpf(prev->pressure, next->pressure, 1.0f - factor);
pt->strength = interpf(prev->strength, next->strength, 1.0f - factor);
CLAMP(pt->strength, GPENCIL_STRENGTH_MIN, 1.0f);
-
- /* GPXX interpolate dverts */
-#if 0
- MDeformVert *dvert = &new_stroke->dvert[i];
- dvert->totweight = 0;
- dvert->dw = NULL;
-#endif
}
}
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 3a765480aaa..44cb863391c 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -956,8 +956,8 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
/* Point mix color. */
copy_v3_v3(pt->vert_color, brush->rgb);
pt->vert_color[3] = GPENCIL_USE_VERTEX_COLOR_STROKE(ts, brush) ?
- brush->gpencil_settings->vertex_factor :
- 0.0f;
+ brush->gpencil_settings->vertex_factor :
+ 0.0f;
pt++;
@@ -992,8 +992,8 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
/* Point mix color. */
copy_v3_v3(pt->vert_color, brush->rgb);
pt->vert_color[3] = GPENCIL_USE_VERTEX_COLOR_STROKE(ts, brush) ?
- brush->gpencil_settings->vertex_factor :
- 0.0f;
+ brush->gpencil_settings->vertex_factor :
+ 0.0f;
if ((ts->gpencil_flags & GP_TOOL_FLAG_CREATE_WEIGHTS) && (have_weight)) {
BKE_gpencil_dvert_ensure(gps);
@@ -1118,8 +1118,8 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
/* Point mix color. */
copy_v3_v3(pt->vert_color, brush->rgb);
pt->vert_color[3] = GPENCIL_USE_VERTEX_COLOR_STROKE(ts, brush) ?
- brush->gpencil_settings->vertex_factor :
- 0.0f;
+ brush->gpencil_settings->vertex_factor :
+ 0.0f;
if (dvert != NULL) {
dvert->totweight = 0;
@@ -1766,10 +1766,7 @@ static void gp_init_drawing_brush(bContext *C, tGPsdata *p)
/* use radius of eraser */
p->radius = (short)p->eraser->size;
- /* GPXX: Need this update to synchronize brush with draw manager.
- * Maybe this update can be removed when the new tool system
- * will be in place, but while, we need this to keep drawing working.
- */
+ /* Need this update to synchronize brush with draw manager. */
if (changed) {
DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE);
}
diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c
index 0e0fd495fb1..a340eb535fa 100644
--- a/source/blender/makesrna/intern/rna_gpencil_modifier.c
+++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c
@@ -1867,16 +1867,6 @@ static void rna_def_modifier_gpencilarmature(BlenderRNA *brna)
prop, "Preserve Volume", "Deform rotation interpolation with quaternions");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_dependency_update");
-# if 0 /* GPXX keep disabled now */
- prop = RNA_def_property(srna, "use_multi_modifier", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "multi", 0);
- RNA_def_property_ui_text(
- prop,
- "Multi Modifier",
- "Use same input as previous modifier, and mix results using overall vgroup");
- RNA_def_property_update(prop, 0, "rna_GpencilModifier_dependency_update");
-# endif
-
prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "vgname");
RNA_def_property_ui_text(
More information about the Bf-blender-cvs
mailing list