[Bf-blender-cvs] [5b9bb688e79] master: UI: ShaderFX: Manually add X/Z labels for rim lighting

Aaron Carlisle noreply at git.blender.org
Wed Jun 24 01:21:13 CEST 2020


Commit: 5b9bb688e79cc1d6e79a1d3f92c8d6deb3b6b064
Author: Aaron Carlisle
Date:   Tue Jun 23 19:21:06 2020 -0400
Branches: master
https://developer.blender.org/rB5b9bb688e79cc1d6e79a1d3f92c8d6deb3b6b064

UI: ShaderFX: Manually add X/Z labels for rim lighting

These need to be labeled manually  because offset is a #PROP_PIXEL.

Matches other changes made in rBbb4cef71eeaf36aa61187d47b8a8ae06ba55f7c0

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

M	source/blender/shader_fx/intern/FX_shader_rim.c

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

diff --git a/source/blender/shader_fx/intern/FX_shader_rim.c b/source/blender/shader_fx/intern/FX_shader_rim.c
index 4b3ce0109c3..fc515a776b4 100644
--- a/source/blender/shader_fx/intern/FX_shader_rim.c
+++ b/source/blender/shader_fx/intern/FX_shader_rim.c
@@ -60,6 +60,7 @@ static void copyData(const ShaderFxData *md, ShaderFxData *target)
 
 static void panel_draw(const bContext *C, Panel *panel)
 {
+  uiLayout *col;
   uiLayout *layout = panel->layout;
 
   PointerRNA ptr;
@@ -70,13 +71,19 @@ static void panel_draw(const bContext *C, Panel *panel)
   uiItemR(layout, &ptr, "rim_color", 0, NULL, ICON_NONE);
   uiItemR(layout, &ptr, "mask_color", 0, NULL, ICON_NONE);
   uiItemR(layout, &ptr, "mode", 0, IFACE_("Blend"), ICON_NONE);
-  uiItemR(layout, &ptr, "offset", 0, NULL, ICON_NONE);
+
+  /* Add the X, Z labels manually because offset is a #PROP_PIXEL. */
+  col = uiLayoutColumn(layout, true);
+  PropertyRNA *prop = RNA_struct_find_property(&ptr, "offset");
+  uiItemFullR(col, &ptr, prop, 0, 0, 0, IFACE_("Offset X"), ICON_NONE);
+  uiItemFullR(col, &ptr, prop, 1, 0, 0, IFACE_("Z"), ICON_NONE);
 
   shaderfx_panel_end(layout, &ptr);
 }
 
 static void blur_panel_draw(const bContext *C, Panel *panel)
 {
+  uiLayout *col;
   uiLayout *layout = panel->layout;
 
   PointerRNA ptr;
@@ -84,7 +91,12 @@ static void blur_panel_draw(const bContext *C, Panel *panel)
 
   uiLayoutSetPropSep(layout, true);
 
-  uiItemR(layout, &ptr, "blur", 0, NULL, ICON_NONE);
+  /* Add the X, Z labels manually because blur is a #PROP_PIXEL. */
+  col = uiLayoutColumn(layout, true);
+  PropertyRNA *prop = RNA_struct_find_property(&ptr, "blur");
+  uiItemFullR(col, &ptr, prop, 0, 0, 0, IFACE_("Blur X"), ICON_NONE);
+  uiItemFullR(col, &ptr, prop, 1, 0, 0, IFACE_("Z"), ICON_NONE);
+
   uiItemR(layout, &ptr, "samples", 0, NULL, ICON_NONE);
 }



More information about the Bf-blender-cvs mailing list