Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--release/scripts/startup/bl_ui/properties_material_gpencil.py8
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_draw_utils.c6
-rw-r--r--source/blender/draw/engines/gpencil/shaders/gpencil_fill_frag.glsl14
-rw-r--r--source/blender/gpu/shaders/gpu_shader_gpencil_fill_frag.glsl20
-rw-r--r--source/blender/makesdna/DNA_material_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_material.c6
6 files changed, 28 insertions, 28 deletions
diff --git a/release/scripts/startup/bl_ui/properties_material_gpencil.py b/release/scripts/startup/bl_ui/properties_material_gpencil.py
index b4252b1afa4..29a89c7b4a3 100644
--- a/release/scripts/startup/bl_ui/properties_material_gpencil.py
+++ b/release/scripts/startup/bl_ui/properties_material_gpencil.py
@@ -189,25 +189,25 @@ class MATERIAL_PT_gpencil_fillcolor(GPMaterialButtonsPanel, Panel):
if gpcolor.fill_style != 'TEXTURE':
col.prop(gpcolor, "fill_color", text="Color")
- if gpcolor.fill_style in {'GRADIENT', 'CHESSBOARD'}:
+ if gpcolor.fill_style in {'GRADIENT', 'CHECKER'}:
col.prop(gpcolor, "mix_color", text="Secondary Color")
if gpcolor.fill_style == 'GRADIENT':
col.prop(gpcolor, "mix_factor", text="Mix Factor", slider=True)
- if gpcolor.fill_style in {'GRADIENT', 'CHESSBOARD'}:
+ if gpcolor.fill_style in {'GRADIENT', 'CHECKER'}:
col.prop(gpcolor, "flip", text="Flip Colors")
col.prop(gpcolor, "pattern_shift", text="Location")
col.prop(gpcolor, "pattern_scale", text="Scale")
- if gpcolor.gradient_type == 'RADIAL' and gpcolor.fill_style not in {'SOLID', 'CHESSBOARD'}:
+ if gpcolor.gradient_type == 'RADIAL' and gpcolor.fill_style not in {'SOLID', 'CHECKER'}:
col.prop(gpcolor, "pattern_radius", text="Radius")
else:
if gpcolor.fill_style != 'SOLID':
col.prop(gpcolor, "pattern_angle", text="Angle")
- if gpcolor.fill_style == 'CHESSBOARD':
+ if gpcolor.fill_style == 'CHECKER':
col.prop(gpcolor, "pattern_gridsize", text="Box Size")
# Texture
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index daa087c47a1..181d2efbabb 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -57,7 +57,7 @@
#define SOLID 0
#define GRADIENT 1
#define RADIAL 2
-#define CHESS 3
+#define CHECKER 3
#define TEXTURE 4
#define PATTERN 5
@@ -387,8 +387,8 @@ static DRWShadingGroup *gpencil_shgroup_fill_create(GPENCIL_Data *vedata,
stl->shgroups[id].fill_style = RADIAL;
}
break;
- case GP_STYLE_FILL_STYLE_CHESSBOARD:
- stl->shgroups[id].fill_style = CHESS;
+ case GP_STYLE_FILL_STYLE_CHECKER:
+ stl->shgroups[id].fill_style = CHECKER;
break;
case GP_STYLE_FILL_STYLE_TEXTURE:
if (gp_style->flag & GP_STYLE_FILL_PATTERN) {
diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_fill_frag.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_fill_frag.glsl
index 87bf116ff89..64bb70f2a3f 100644
--- a/source/blender/draw/engines/gpencil/shaders/gpencil_fill_frag.glsl
+++ b/source/blender/draw/engines/gpencil/shaders/gpencil_fill_frag.glsl
@@ -30,7 +30,7 @@ uniform vec4 wire_color;
#define SOLID 0
#define GRADIENT 1
#define RADIAL 2
-#define CHESS 3
+#define CHECKER 3
#define TEXTURE 4
#define PATTERN 5
@@ -103,7 +103,7 @@ void main()
texture_read_as_srgb(
myTexture, myTexturePremultiplied, clamp(rot_tex * texture_scale, 0.0, 1.0));
vec4 text_color = vec4(tmp_color[0], tmp_color[1], tmp_color[2], tmp_color[3] * texture_opacity);
- vec4 chesscolor;
+ vec4 checker_color;
/* wireframe with x-ray discard */
if ((viewport_xray == 1) && (shading_type[0] == OB_WIRE)) {
@@ -152,18 +152,18 @@ void main()
texture_flip,
fragColor);
}
- /* chessboard */
- if (fill_type == CHESS) {
+ /* Checkerboard */
+ if (fill_type == CHECKER) {
vec2 pos = rot / pattern_gridsize;
if ((fract(pos.x) < 0.5 && fract(pos.y) < 0.5) ||
(fract(pos.x) > 0.5 && fract(pos.y) > 0.5)) {
- chesscolor = (texture_flip == 0) ? finalColor : color2;
+ checker_color = (texture_flip == 0) ? finalColor : color2;
}
else {
- chesscolor = (texture_flip == 0) ? color2 : finalColor;
+ checker_color = (texture_flip == 0) ? color2 : finalColor;
}
/* mix with texture */
- fragColor = (texture_mix == 1) ? mix(chesscolor, text_color, mix_factor) : chesscolor;
+ fragColor = (texture_mix == 1) ? mix(checker_color, text_color, mix_factor) : checker_color;
fragColor.a *= layer_opacity;
}
/* texture */
diff --git a/source/blender/gpu/shaders/gpu_shader_gpencil_fill_frag.glsl b/source/blender/gpu/shaders/gpu_shader_gpencil_fill_frag.glsl
index 946fc752e17..56c9a2bd339 100644
--- a/source/blender/gpu/shaders/gpu_shader_gpencil_fill_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_gpencil_fill_frag.glsl
@@ -22,7 +22,7 @@ uniform sampler2D myTexture;
#define SOLID 0
#define GRADIENT 1
#define RADIAL 2
-#define CHESS 3
+#define CHECKER 3
#define TEXTURE 4
in vec2 texCoord_interp;
@@ -104,7 +104,7 @@ void main()
vec2 rot_tex = (matrot_tex * (texCoord_interp - t_center)) + t_center + t_offset;
vec4 tmp_color = texture2D(myTexture, rot_tex * t_scale);
vec4 text_color = vec4(tmp_color[0], tmp_color[1], tmp_color[2], tmp_color[3] * t_opacity);
- vec4 chesscolor;
+ vec4 checker_color;
/* solid fill */
if (fill_type == SOLID) {
@@ -144,32 +144,32 @@ void main()
}
set_color(color, color2, text_color, mix_factor, intensity, t_mix, t_flip, fragColor);
}
- /* chessboard */
- if (fill_type == CHESS) {
+ /* Checkerboard */
+ if (fill_type == CHECKER) {
vec2 pos = rot / g_boxsize;
if ((fract(pos.x) < 0.5 && fract(pos.y) < 0.5) ||
(fract(pos.x) > 0.5 && fract(pos.y) > 0.5)) {
if (t_flip == 0) {
- chesscolor = color;
+ checker_color = color;
}
else {
- chesscolor = color2;
+ checker_color = color2;
}
}
else {
if (t_flip == 0) {
- chesscolor = color2;
+ checker_color = color2;
}
else {
- chesscolor = color;
+ checker_color = color;
}
}
/* mix with texture */
if (t_mix == 1) {
- fragColor = mix(chesscolor, text_color, mix_factor);
+ fragColor = mix(checker_color, text_color, mix_factor);
}
else {
- fragColor = chesscolor;
+ fragColor = checker_color;
}
}
/* texture */
diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h
index d65a4896758..42308f54d7a 100644
--- a/source/blender/makesdna/DNA_material_types.h
+++ b/source/blender/makesdna/DNA_material_types.h
@@ -338,7 +338,7 @@ enum {
enum {
GP_STYLE_FILL_STYLE_SOLID = 0,
GP_STYLE_FILL_STYLE_GRADIENT,
- GP_STYLE_FILL_STYLE_CHESSBOARD,
+ GP_STYLE_FILL_STYLE_CHECKER,
GP_STYLE_FILL_STYLE_TEXTURE,
};
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index 3ff2e884d92..28989d1dd5f 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -433,11 +433,11 @@ static void rna_def_material_greasepencil(BlenderRNA *brna)
static EnumPropertyItem fill_style_items[] = {
{GP_STYLE_FILL_STYLE_SOLID, "SOLID", 0, "Solid", "Fill area with solid color"},
{GP_STYLE_FILL_STYLE_GRADIENT, "GRADIENT", 0, "Gradient", "Fill area with gradient color"},
- {GP_STYLE_FILL_STYLE_CHESSBOARD,
- "CHESSBOARD",
+ {GP_STYLE_FILL_STYLE_CHECKER,
+ "CHECKER",
0,
"Checker Board",
- "Fill area with chessboard pattern"},
+ "Fill area with checkerboard pattern"},
{GP_STYLE_FILL_STYLE_TEXTURE, "TEXTURE", 0, "Texture", "Fill area with image texture"},
{0, NULL, 0, NULL, NULL},
};