[Bf-blender-cvs] [144f9e588ed] greasepencil-refactor: GPencil: Rename gpencil_paper to fade_objects
Antonio Vazquez
noreply at git.blender.org
Tue Jan 21 16:05:22 CET 2020
Commit: 144f9e588ed68c41a9e1afb7ea47142e8228bc86
Author: Antonio Vazquez
Date: Tue Jan 21 11:42:07 2020 +0100
Branches: greasepencil-refactor
https://developer.blender.org/rB144f9e588ed68c41a9e1afb7ea47142e8228bc86
GPencil: Rename gpencil_paper to fade_objects
The name was not clear now because is not a "paper" in front of the 3d meshes as it was done in old system.
===================================================================
M release/scripts/startup/bl_ui/space_view3d.py
M source/blender/makesdna/DNA_view3d_types.h
M source/blender/makesrna/intern/rna_space.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 2a23ef634c9..e7ea1133bc9 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -6468,11 +6468,11 @@ class VIEW3D_PT_overlay_gpencil_options(Panel):
sub.prop(overlay, "gpencil_fade_layer", text="Fade Layers", slider=True)
row = col.row()
- row.prop(overlay, "use_gpencil_paper", text="")
+ row.prop(overlay, "use_gpencil_fade_objects", text="")
sub = row.row(align=True)
- sub.active = overlay.use_gpencil_paper
- sub.prop(overlay, "gpencil_paper_opacity", text="Fade Objects", slider=True)
- sub.prop(overlay, "use_gpencil_fade_objects", text="", icon='OUTLINER_OB_GREASEPENCIL')
+ sub.active = overlay.use_gpencil_fade_objects
+ sub.prop(overlay, "gpencil_fade_objects", text="Fade Objects", slider=True)
+ sub.prop(overlay, "use_gpencil_fade_gp_objects", text="", icon='OUTLINER_OB_GREASEPENCIL')
if context.object.mode in {'EDIT_GPENCIL', 'SCULPT_GPENCIL', 'WEIGHT_GPENCIL', 'VERTEX_GPENCIL'}:
split = layout.split()
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
index da3864ee251..3aaadd9fa96 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -400,8 +400,8 @@ typedef struct View3D {
#define V3D_FLAG2_UNUSED_15 (1 << 15) /* cleared */
/** #View3D.gp_flag (short) */
-#define V3D_GP_SHOW_PAPER (1 << 0) /* Activate paper to cover all viewport */
-#define V3D_GP_SHOW_GRID (1 << 1) /* Activate paper grid */
+#define V3D_GP_FADE_OBJECTS (1 << 0) /* Fade all non GP objects */
+#define V3D_GP_SHOW_GRID (1 << 1) /* Activate paper grid */
#define V3D_GP_SHOW_EDIT_LINES (1 << 2)
#define V3D_GP_SHOW_MULTIEDIT_LINES (1 << 3)
#define V3D_GP_SHOW_ONION_SKIN (1 << 4) /* main switch at view level */
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 411e4d8e5e4..a9f9fc0fcb7 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -3688,8 +3688,8 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Show Annotation", "Show annotations for this view");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
- prop = RNA_def_property(srna, "use_gpencil_paper", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "gp_flag", V3D_GP_SHOW_PAPER);
+ prop = RNA_def_property(srna, "use_gpencil_fade_objects", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "gp_flag", V3D_GP_FADE_OBJECTS);
RNA_def_property_ui_text(
prop,
"Fade Objects",
@@ -3707,7 +3707,7 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna)
prop, "Fade Layers", "Toggle fading of Grease Pencil layers except the active one");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
- prop = RNA_def_property(srna, "use_gpencil_fade_objects", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_gpencil_fade_gp_objects", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gp_flag", V3D_GP_FADE_NOACTIVE_GPENCIL);
RNA_def_property_ui_text(
prop, "Fade Grease Pencil Objects", "Fade Grease Pencil Objects, except the active one");
@@ -3734,7 +3734,7 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
/* Paper opacity factor */
- prop = RNA_def_property(srna, "gpencil_paper_opacity", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "gpencil_fade_objects", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "overlay.gpencil_paper_opacity");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Opacity", "Fade factor");
More information about the Bf-blender-cvs
mailing list