[Bf-blender-cvs] [cd9a64b9c0e] modifier-panels-ui: Merge branch 'modifier-panels-ui' of git.blender.org:blender into modifier-panels-ui

Hans Goudey noreply at git.blender.org
Fri Apr 3 23:47:18 CEST 2020


Commit: cd9a64b9c0ecb940a9e8d6881c0ffefe0ca0626d
Author: Hans Goudey
Date:   Fri Apr 3 16:35:28 2020 -0500
Branches: modifier-panels-ui
https://developer.blender.org/rBcd9a64b9c0ecb940a9e8d6881c0ffefe0ca0626d

Merge branch 'modifier-panels-ui' of git.blender.org:blender into modifier-panels-ui

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



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

diff --cc source/blender/modifiers/intern/MOD_boolean.c
index 806ed1c0d0b,c976dd874a5..feb7aaec702
--- a/source/blender/modifiers/intern/MOD_boolean.c
+++ b/source/blender/modifiers/intern/MOD_boolean.c
@@@ -359,23 -359,16 +359,14 @@@ static void requiredDataMask(Object *UN
  
  static void panel_draw(const bContext *C, Panel *panel)
  {
-   uiLayout *col, *split;
-   uiLayout *layout = panel->layout;
- 
    PointerRNA ptr;
    modifier_panel_get_property_pointers(C, panel, NULL, &ptr);
-   modifier_panel_buttons(C, panel);
- 
-   split = uiLayoutSplit(layout, 0.5f, false);
- 
-   col = uiLayoutColumn(split, false);
-   uiItemL(col, IFACE_("Operation:"), ICON_NONE);
-   uiItemR(col, &ptr, "operation", 0, "", ICON_NONE);
+   uiLayout *layout = panel->layout;
  
-   col = uiLayoutColumn(split, false);
-   uiItemL(col, IFACE_("Object:"), ICON_NONE);
-   uiItemR(col, &ptr, "object", 0, "", ICON_NONE);
+   uiLayoutSetPropSep(layout, true);
  
 -  uiItemR(layout, &ptr, "operation", 0, 0, ICON_NONE);
 -
 -  uiItemR(layout, &ptr, "object", 0, 0, ICON_NONE);
 -
++  uiItemR(layout, &ptr, "operation", 0, "", ICON_NONE);
++  uiItemR(layout, &ptr, "object", 0, "", ICON_NONE);
    uiItemR(layout, &ptr, "double_threshold", 0, NULL, ICON_NONE);
  
    if (G.debug) {
diff --cc source/blender/modifiers/intern/MOD_displace.c
index 028a145e08c,40942b2b059..4a3b5f04ec7
--- a/source/blender/modifiers/intern/MOD_displace.c
+++ b/source/blender/modifiers/intern/MOD_displace.c
@@@ -424,19 -424,30 +424,31 @@@ static void panel_draw(const bContext *
    PointerRNA ptr;
    PointerRNA ob_ptr;
    modifier_panel_get_property_pointers(C, panel, &ob_ptr, &ptr);
 +  modifier_panel_buttons(C, panel);
  
    PointerRNA texture_ptr = RNA_pointer_get(&ptr, "texture");
-   bool has_texture = RNA_pointer_is_null(&texture_ptr);
+   bool has_texture = !RNA_pointer_is_null(&texture_ptr);
    bool has_vertex_group = RNA_string_length(&ptr, "vertex_group") != 0;
  
-   uiItemL(layout, IFACE_("Texture:"), ICON_NONE);
+   uiLayoutSetPropSep(layout, true);
+ 
    uiTemplateID(layout, C, &ptr, "texture", "texture.new", NULL, NULL, 0, ICON_NONE, NULL);
  
-   split = uiLayoutSplit(layout, 0.5f, false);
-   col = uiLayoutColumn(split, false);
-   uiItemL(col, IFACE_("Direction:"), ICON_NONE);
-   uiItemR(col, &ptr, "direction", 0, "", ICON_NONE);
+   col = uiLayoutColumn(layout, false);
+   uiLayoutSetActive(col, has_texture);
+   uiItemR(col, &ptr, "texture_coords", 0, 0, ICON_NONE);
+   int texture_coords = RNA_enum_get(&ptr, "texture_coords");
+   if (texture_coords == MOD_DISP_MAP_OBJECT) {
+     uiItemR(col, &ptr, "texture_coords_object", 0, NULL, ICON_NONE);
+   }
+   else if (texture_coords == MOD_DISP_MAP_UV && RNA_enum_get(&ob_ptr, "type") == OB_MESH) {
+     uiItemR(col, &ptr, "uv_layer", 0, NULL, ICON_NONE);
+   }
+ 
+   uiItemS(layout);
+ 
+   col = uiLayoutColumn(layout, false);
+   uiItemR(col, &ptr, "direction", 0, 0, ICON_NONE);
    if (ELEM(RNA_enum_get(&ptr, "direction"),
             MOD_DISP_DIR_X,
             MOD_DISP_DIR_Y,
diff --cc source/blender/modifiers/intern/MOD_edgesplit.c
index 85ad97e5203,affd6efdadc..c436925b454
--- a/source/blender/modifiers/intern/MOD_edgesplit.c
+++ b/source/blender/modifiers/intern/MOD_edgesplit.c
@@@ -146,18 -144,10 +144,11 @@@ static void panel_draw(const bContext *
    PointerRNA ptr;
    PointerRNA ob_ptr;
    modifier_panel_get_property_pointers(C, panel, &ob_ptr, &ptr);
 +  modifier_panel_buttons(C, panel);
  
-   row = uiLayoutColumn(layout, false);
-   uiLayoutSetActive(row, RNA_boolean_get(&ptr, "use_edge_angle"));
-   uiItemR(row, &ptr, "split_angle", 0, NULL, ICON_NONE);
- 
-   split = uiLayoutSplit(layout, 0.5f, false);
-   col = uiLayoutColumn(split, false);
-   uiItemR(col, &ptr, "use_edge_angle", 0, IFACE_("Edge Angle"), ICON_NONE);
+   uiLayoutSetPropSep(layout, true);
  
-   col = uiLayoutColumn(split, false);
-   uiItemR(col, &ptr, "use_edge_sharp", 0, IFACE_("Sharp Edges"), ICON_NONE);
+   uiItemR(layout, &ptr, "use_edge_sharp", 0, IFACE_("Sharp Edges"), ICON_NONE);
  
    modifier_panel_end(layout, &ptr);
  }



More information about the Bf-blender-cvs mailing list