[Bf-blender-cvs] [68ede390342] greasepencil-refactor: GPencil: Add new AA simplify option
Antonio Vazquez
noreply at git.blender.org
Mon Jan 6 11:09:10 CET 2020
Commit: 68ede39034220c4fd55c7d16f66f3796b4c88b3e
Author: Antonio Vazquez
Date: Mon Jan 6 11:08:59 2020 +0100
Branches: greasepencil-refactor
https://developer.blender.org/rB68ede39034220c4fd55c7d16f66f3796b4c88b3e
GPencil: Add new AA simplify option
Also some cleanup in other simplify options
===================================================================
M release/scripts/startup/bl_ui/properties_grease_pencil_common.py
M source/blender/blenkernel/BKE_gpencil.h
M source/blender/makesdna/DNA_scene_types.h
M source/blender/makesrna/intern/rna_scene.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 484334c39a6..74b33a1a62f 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -731,16 +731,17 @@ class GreasePencilSimplifyPanel:
layout.active = rd.simplify_gpencil
col = layout.column()
- col.prop(rd, "simplify_gpencil_onplay", text="Playback Only")
- col.prop(rd, "simplify_gpencil_view_modifier", text="Modifiers")
- col.prop(rd, "simplify_gpencil_shader_fx", text="ShaderFX")
- col.prop(rd, "simplify_gpencil_blend", text="Layers Blending")
- col.prop(rd, "simplify_gpencil_tint", text="Layers Tinting")
+ col.prop(rd, "simplify_gpencil_onplay")
+ col.prop(rd, "simplify_gpencil_view_modifier")
+ col.prop(rd, "simplify_gpencil_shader_fx")
+ col.prop(rd, "simplify_gpencil_blend")
+ col.prop(rd, "simplify_gpencil_tint")
+ col.prop(rd, "simplify_gpencil_antialiasing")
col.prop(rd, "simplify_gpencil_view_fill")
sub = col.column()
sub.active = rd.simplify_gpencil_view_fill
- sub.prop(rd, "simplify_gpencil_remove_lines", text="Lines")
+ sub.prop(rd, "simplify_gpencil_remove_lines")
class GreasePencilLayerAdjustmentsPanel:
diff --git a/source/blender/blenkernel/BKE_gpencil.h b/source/blender/blenkernel/BKE_gpencil.h
index c1d8d714286..1e13158c0c4 100644
--- a/source/blender/blenkernel/BKE_gpencil.h
+++ b/source/blender/blenkernel/BKE_gpencil.h
@@ -64,6 +64,8 @@ struct MDeformVert;
#define GPENCIL_SIMPLIFY_TINT(scene, playing) \
((GPENCIL_SIMPLIFY_ONPLAY(playing) && (GPENCIL_SIMPLIFY(scene)) && \
(scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_TINT)))
+#define GPENCIL_SIMPLIFY_AA(scene) \
+ ((GPENCIL_SIMPLIFY(scene)) && (scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_AA)))
/* Vertex Color macros. */
#define GPENCIL_USE_VERTEX_COLOR(toolsettings) \
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index f1facdf8e9a..a87b2f71a91 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -2284,6 +2284,8 @@ typedef enum eGPencil_SimplifyFlags {
SIMPLIFY_GPENCIL_BLEND = (1 << 6),
/* Simplify layer tint */
SIMPLIFY_GPENCIL_TINT = (1 << 7),
+ /* Simplify Antialiasing */
+ SIMPLIFY_GPENCIL_AA = (1 << 8),
} eGPencil_SimplifyFlags;
/* ToolSettings.gpencil_*_align - Stroke Placement mode flags */
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index d7eb86692c0..25e032859a4 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -6295,7 +6295,12 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
prop = RNA_def_property(srna, "simplify_gpencil_onplay", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "simplify_gpencil", SIMPLIFY_GPENCIL_ON_PLAY);
RNA_def_property_ui_text(
- prop, "Simplify Playback", "Simplify Grease Pencil only during animation playback");
+ prop, "Playback Only", "Simplify Grease Pencil only during animation playback");
+ RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
+
+ prop = RNA_def_property(srna, "simplify_gpencil_antialiasing", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "simplify_gpencil", SIMPLIFY_GPENCIL_AA);
+ RNA_def_property_ui_text(prop, "Antialiasing", "Use Antialiasing to smooth stroke edges");
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
prop = RNA_def_property(srna, "simplify_gpencil_view_fill", PROP_BOOLEAN, PROP_NONE);
@@ -6306,18 +6311,18 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
prop = RNA_def_property(srna, "simplify_gpencil_remove_lines", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(
prop, NULL, "simplify_gpencil", SIMPLIFY_GPENCIL_REMOVE_FILL_LINE);
- RNA_def_property_ui_text(prop, "Disable Lines", "Display external lines of fill strokes");
+ RNA_def_property_ui_text(prop, "Lines", "Display external lines of fill strokes");
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
prop = RNA_def_property(srna, "simplify_gpencil_view_modifier", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(
prop, NULL, "simplify_gpencil", SIMPLIFY_GPENCIL_MODIFIER);
- RNA_def_property_ui_text(prop, "Disable Modifiers", "Display modifiers in the viewport");
+ RNA_def_property_ui_text(prop, "Modifiers", "Display modifiers in the viewport");
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
prop = RNA_def_property(srna, "simplify_gpencil_shader_fx", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "simplify_gpencil", SIMPLIFY_GPENCIL_FX);
- RNA_def_property_ui_text(prop, "Simplify Shaders", "Display Shader FX");
+ RNA_def_property_ui_text(prop, "ShadersFX", "Display Shader FX");
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
prop = RNA_def_property(srna, "simplify_gpencil_blend", PROP_BOOLEAN, PROP_NONE);
More information about the Bf-blender-cvs
mailing list