[Bf-blender-cvs] [9e12fe36aa4] soc-2019-bevel-profiles: Bevel Tool UI: Offset field label uses offset type

Hans Goudey noreply at git.blender.org
Wed Aug 14 23:13:10 CEST 2019


Commit: 9e12fe36aa4617e71148cb5a01f23559fc6ce92b
Author: Hans Goudey
Date:   Wed Aug 14 13:26:44 2019 -0400
Branches: soc-2019-bevel-profiles
https://developer.blender.org/rB9e12fe36aa4617e71148cb5a01f23559fc6ce92b

Bevel Tool UI: Offset field label uses offset type

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

M	source/blender/editors/mesh/editmesh_bevel.c

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

diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c
index fe68ff47c88..cdd88d838e6 100644
--- a/source/blender/editors/mesh/editmesh_bevel.c
+++ b/source/blender/editors/mesh/editmesh_bevel.c
@@ -857,6 +857,9 @@ static void edbm_bevel_ui(bContext *C, wmOperator *op)
   uiLayout *layout = op->layout;
   uiLayout *row, *col, *split;
   PointerRNA ptr, toolsettings_ptr;
+  const char *offset_name;
+
+
 
   RNA_pointer_create(NULL, op->type->srna, op->properties, &ptr);
 
@@ -864,7 +867,18 @@ static void edbm_bevel_ui(bContext *C, wmOperator *op)
     uiItemR(layout, &ptr, "offset_pct", 0, NULL, ICON_NONE);
   }
   else {
-    uiItemR(layout, &ptr, "offset", 0, NULL, ICON_NONE);
+    switch (RNA_enum_get(&ptr, "offset_type")) {
+      case BEVEL_AMT_DEPTH:
+        offset_name = "Depth";
+        break;
+      case BEVEL_AMT_WIDTH:
+        offset_name = "Width";
+        break;
+      case BEVEL_AMT_OFFSET:
+        offset_name = "Offset";
+        break;
+    }
+    uiItemR(layout, &ptr, "offset", 0, offset_name, ICON_NONE);
   }
   row = uiLayoutRow(layout, true);
   uiItemR(row, &ptr, "offset_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);



More information about the Bf-blender-cvs mailing list