[Bf-blender-cvs] [626def1ac2b] blender2.8: Cleanup: naming

Campbell Barton noreply at git.blender.org
Wed Oct 10 02:22:24 CEST 2018


Commit: 626def1ac2b0b8a3020cbd7eee351743663c6d14
Author: Campbell Barton
Date:   Wed Oct 10 11:18:09 2018 +1100
Branches: blender2.8
https://developer.blender.org/rB626def1ac2b0b8a3020cbd7eee351743663c6d14

Cleanup: naming

lockaxis -> lock_axis

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

M	release/scripts/startup/bl_ui/space_view3d.py
M	source/blender/makesrna/intern/rna_sculpt_paint.c

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

diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 22624ce8482..b6b07f7e6d1 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -230,9 +230,8 @@ class VIEW3D_HT_header(Header):
             )
 
         if object_mode in {'GPENCIL_PAINT', 'GPENCIL_SCULPT'}:
-            lock = tool_settings.gpencil_sculpt.lockaxis
-            gp_lock = \
-                tool_settings.gpencil_sculpt.bl_rna.properties['lockaxis'].enum_items[lock]
+            lock = tool_settings.gpencil_sculpt.lock_axis
+            gp_lock = tool_settings.gpencil_sculpt.bl_rna.properties["lock_axis"].enum_items[lock]
 
             lk_icon = getattr(gp_lock, "icon", "BLANK1")
             lk_name = getattr(gp_lock, "name", "None")
@@ -4899,7 +4898,7 @@ class VIEW3D_PT_gpencil_lock(Panel):
 
         row = layout.row()
         col = row.column()
-        col.prop(context.tool_settings.gpencil_sculpt, "lockaxis", expand=True)
+        col.prop(context.tool_settings.gpencil_sculpt, "lock_axis", expand=True)
 
 
 class VIEW3D_PT_overlay_gpencil_options(Panel):
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index 40177d4d45c..e6e9ff6664d 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -83,7 +83,7 @@ static EnumPropertyItem rna_enum_gpencil_weight_brush_items[] = {
 	{ 0, NULL, 0, NULL, NULL }
 };
 
-static const EnumPropertyItem rna_enum_gpencil_lockaxis_items[] = {
+static const EnumPropertyItem rna_enum_gpencil_lock_axis_items[] = {
 	{ GP_LOCKAXIS_NONE, "GP_LOCKAXIS_NONE", ICON_UNLOCKED, "None", "" },
 	{ GP_LOCKAXIS_X, "GP_LOCKAXIS_X", ICON_AXIS_SIDE, "Y-Z Plane", "Project strokes to plane locked to X" },
 	{ GP_LOCKAXIS_Y, "GP_LOCKAXIS_Y", ICON_AXIS_FRONT, "X-Z Plane", "Project strokes to plane locked to Y" },
@@ -1183,9 +1183,9 @@ static void rna_def_gpencil_sculpt(BlenderRNA *brna)
 	RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
 
 	/* lock axis */
-	prop = RNA_def_property(srna, "lockaxis", PROP_ENUM, PROP_NONE);
+	prop = RNA_def_property(srna, "lock_axis", PROP_ENUM, PROP_NONE);
 	RNA_def_property_enum_sdna(prop, NULL, "lock_axis");
-	RNA_def_property_enum_items(prop, rna_enum_gpencil_lockaxis_items);
+	RNA_def_property_enum_items(prop, rna_enum_gpencil_lock_axis_items);
 	RNA_def_property_ui_text(prop, "Lock Axis", "");
 	RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0);
 	RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);



More information about the Bf-blender-cvs mailing list