[Bf-blender-cvs] [15e63742e25] master: Cleanup: use RNA icon instead of passing as an arg
Campbell Barton
noreply at git.blender.org
Wed Jan 2 07:25:00 CET 2019
Commit: 15e63742e25028225f8746e1b663548e8c0569cd
Author: Campbell Barton
Date: Wed Jan 2 17:23:57 2019 +1100
Branches: master
https://developer.blender.org/rB15e63742e25028225f8746e1b663548e8c0569cd
Cleanup: use RNA icon instead of passing as an arg
===================================================================
M release/scripts/startup/bl_ui/properties_paint_common.py
M source/blender/makesrna/intern/rna_brush.c
M source/blender/makesrna/intern/rna_scene.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
index f36e5616c6e..51db0a99b7d 100644
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@ -356,15 +356,15 @@ def brush_basic_sculpt_settings(layout, context, brush, *, compact=False):
capabilities = brush.sculpt_capabilities
row = layout.row(align=True)
+ UnifiedPaintPanel.prop_unified_size(row, context, brush, "use_locked_size")
+
ups = tool_settings.unified_paint_settings
if (
(ups.use_unified_size and ups.use_locked_size) or
((not ups.use_unified_size) and brush.use_locked_size)
):
- UnifiedPaintPanel.prop_unified_size(row, context, brush, "use_locked_size", icon='LOCKED')
UnifiedPaintPanel.prop_unified_size(row, context, brush, "unprojected_radius", slider=True, text="Radius")
else:
- UnifiedPaintPanel.prop_unified_size(row, context, brush, "use_locked_size", icon='UNLOCKED')
UnifiedPaintPanel.prop_unified_size(row, context, brush, "size", slider=True, text="Radius")
UnifiedPaintPanel.prop_unified_size(row, context, brush, "use_pressure_size")
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 7ccdf32b44c..03081ff606d 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -1734,6 +1734,7 @@ static void rna_def_brush(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Use Blender Units",
"When locked brush stays same size relative to object; when unlocked brush size is "
"given in pixels");
+ RNA_def_property_ui_icon(prop, ICON_UNLOCKED, true);
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop = RNA_def_property(srna, "use_edge_to_edge", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 18db0cae8c0..ee306558a68 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -2939,6 +2939,7 @@ static void rna_def_unified_paint_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Use Blender Units",
"When locked brush stays same size relative to object; "
"when unlocked brush size is given in pixels");
+ RNA_def_property_ui_icon(prop, ICON_UNLOCKED, true);
}
More information about the Bf-blender-cvs
mailing list