[Bf-blender-cvs] [c5c987cde9d] blender2.8: Cleanup: flip option unlock -> lock

Campbell Barton noreply at git.blender.org
Thu Sep 27 00:38:48 CEST 2018


Commit: c5c987cde9da3f19280856f53a82024d0646ee50
Author: Campbell Barton
Date:   Thu Sep 27 08:51:26 2018 +1000
Branches: blender2.8
https://developer.blender.org/rBc5c987cde9da3f19280856f53a82024d0646ee50

Cleanup: flip option unlock -> lock

Nearly all options are currently to toggle locking.

===================================================================

M	release/scripts/startup/bl_ui/properties_data_gpencil.py
M	source/blender/makesrna/intern/rna_gpencil.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_data_gpencil.py b/release/scripts/startup/bl_ui/properties_data_gpencil.py
index d502df6c0d3..0f57ff07914 100644
--- a/release/scripts/startup/bl_ui/properties_data_gpencil.py
+++ b/release/scripts/startup/bl_ui/properties_data_gpencil.py
@@ -189,7 +189,7 @@ class DATA_PT_gpencil_layer_optionpanel(LayerDataButtonsPanel, Panel):
         col.prop(gpl, "line_change", text="Stroke Thickness")
 
         col = layout.row(align=True)
-        col.prop(gpl, "unlock_material")
+        col.prop(gpl, "lock_material")
 
 
 class DATA_PT_gpencil_parentpanel(LayerDataButtonsPanel, Panel):
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index 48e1261f815..ac7a6da6c18 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -1097,12 +1097,10 @@ static void rna_def_gpencil_layer(BlenderRNA *brna)
 	RNA_def_property_ui_text(prop, "Frame Locked", "Lock current frame displayed by layer");
 	RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
 
-	/* Unlock colors */
-	prop = RNA_def_property(srna, "unlock_material", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_UNLOCK_COLOR);
+	prop = RNA_def_property(srna, "lock_material", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GP_LAYER_UNLOCK_COLOR);
 	RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
-	RNA_def_property_ui_text(prop, "Override Locked Materials",
-	                         "Allow Locked Materials edition");
+	RNA_def_property_ui_text(prop, "Lock Material", "Disable Material editing");
 	RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);



More information about the Bf-blender-cvs mailing list