[Bf-blender-cvs] [4571ea1bddf] modifier-panels-ui: Cleanup: Synchronize more changes with patches

Hans Goudey noreply at git.blender.org
Thu Apr 23 16:41:52 CEST 2020


Commit: 4571ea1bddf2522367ca221f2df825149232e71b
Author: Hans Goudey
Date:   Thu Apr 23 09:41:44 2020 -0500
Branches: modifier-panels-ui
https://developer.blender.org/rB4571ea1bddf2522367ca221f2df825149232e71b

Cleanup: Synchronize more changes with patches

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

M	release/scripts/startup/bl_ui/properties_constraint.py
M	release/scripts/startup/bl_ui/properties_data_modifier.py
M	source/blender/blenloader/intern/versioning_290.c
M	source/blender/editors/interface/interface_templates.c
M	source/blender/makesdna/DNA_modifier_types.h
M	source/blender/makesrna/intern/rna_ui_api.c

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

diff --git a/release/scripts/startup/bl_ui/properties_constraint.py b/release/scripts/startup/bl_ui/properties_constraint.py
index 347d5abbb9a..ebc41645b11 100644
--- a/release/scripts/startup/bl_ui/properties_constraint.py
+++ b/release/scripts/startup/bl_ui/properties_constraint.py
@@ -259,7 +259,7 @@ class OBJECT_PT_bKinematicConstraint(ConstraintButtonsPanel):
             self.draw_influence(layout, con)
 
 
-# HANS-TODO: Find constraint type info name
+# Unreachable in UI
 class OBJECT_PT_constraints_ik_copy_pose(ConstraintButtonsPanel):
 
     def draw(self, context):
@@ -303,7 +303,7 @@ class OBJECT_PT_constraints_ik_copy_pose(ConstraintButtonsPanel):
         self.draw_influence(layout, con)
 
 
-# HANS-TODO: Find constraint type info name
+# Not currently accessible in UI
 class OBJECT_PT_constraints_ik_distance(ConstraintButtonsPanel):
 
     def draw(self, context):
@@ -889,7 +889,6 @@ class OBJECT_PT_bTransformConstraint_source(ConstraintButtonsSubPanel):
     bl_parent_id = "OBJECT_PT_bTransformConstraint"
     bl_label = "Source"
     bl_order = 1
-    # HANS-TODO: I'm guessing bl_order isn't working for subpanels, the order isn't working
 
     def draw(self, context):
         layout = self.layout
@@ -915,7 +914,7 @@ class OBJECT_PT_bTransformConstraint_source(ConstraintButtonsSubPanel):
 
         col = layout.column(align=True)
         col.prop(con, "from_min_z" + ext, text="Z Min")
-        col.prop(con, "from_max_z" + ext, text="Max")        
+        col.prop(con, "from_max_z" + ext, text="Max")
 
 class OBJECT_PT_bTransformConstraint_mapping(ConstraintButtonsSubPanel):
     bl_parent_id = "OBJECT_PT_bTransformConstraint"
@@ -1285,7 +1284,7 @@ classes = (
     OBJECT_PT_bChildOfConstraint,
     OBJECT_PT_bTrackToConstraint,
     OBJECT_PT_bKinematicConstraint,
-    #OBJECT_PT_constraints_ik_copy_pose, HANS-TODO: Deprecated.. delete?
+    #OBJECT_PT_constraints_ik_copy_pose, Deprecated unreachable UI. Delete?
     #OBJECT_PT_constraints_ik_distance,
     OBJECT_PT_bFollowPathConstraint,
     OBJECT_PT_bRotLimitConstraint,
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 997c841dca2..50c4059f792 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -41,6 +41,8 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         layout = self.layout
         layout.operator_menu_enum("object.modifier_add", "type")
         layout.template_modifiers()
+
+
 class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
     bl_label = "Modifiers"
 
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c
index 940db2b0f39..803ef64ec99 100644
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@ -65,7 +65,7 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
       }
     }
 
-    /* Transition to saving expansion for all of a modifier's subpanels. */
+    /* Transition to saving expansion for all of a constraint's subpanels. */
     if (!DNA_struct_elem_find(fd->filesdna, "bSizeLikeConstraint", "short", "ui_expand_flag")) {
       for (Object *object = bmain->objects.first; object != NULL; object = object->id.next) {
         LISTBASE_FOREACH (bConstraint *, con, &object->constraints) {
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index de6338e9576..3b318c93e19 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -2041,8 +2041,7 @@ static uiLayout *gpencil_draw_modifier(uiLayout *layout, Object *ob, GpencilModi
   uiItemO(row, "", ICON_X, "OBJECT_OT_gpencil_modifier_remove");
   UI_block_emboss_set(block, UI_EMBOSS);
 
-  /* modifier settings (under the header) ---------------------------------------------------
-   */
+  /* modifier settings (under the header) --------------------------------------------------- */
   if (md->mode & eGpencilModifierMode_Expanded) {
     /* apply/convert/copy */
     box = uiLayoutBox(column);
@@ -4884,8 +4883,8 @@ static void CurveProfile_buttons_layout(uiLayout *layout, PointerRNA *ptr, RNAUp
   uiLayoutRow(layout, false);
 
   /* Preset selector */
-  /* There is probably potential to use simpler "uiItemR" functions here, but automatic
-   * updating after a preset is selected would be more complicated. */
+  /* There is probably potential to use simpler "uiItemR" functions here, but automatic updating
+   * after a preset is selected would be more complicated. */
   bt = uiDefBlockBut(
       block, CurveProfile_buttons_presets, profile, "Preset", 0, 0, UI_UNIT_X, UI_UNIT_X, "");
   UI_but_funcN_set(bt, rna_update_cb, MEM_dupallocN(cb), NULL);
@@ -5843,8 +5842,8 @@ static void uilist_filter_items_default(struct uiList *ui_list,
       int new_idx;
       /* note: order_idx equals either to ui_list->items_len if no filtering done,
        *       or to ui_list->items_shown if filter is enabled,
-       *       or to (ui_list->items_len - ui_list->items_shown) if filtered items are
-       * excluded. This way, we only sort items we actually intend to draw!
+       *       or to (ui_list->items_len - ui_list->items_shown) if filtered items are excluded.
+       *       This way, we only sort items we actually intend to draw!
        */
       qsort(names, order_idx, sizeof(StringCmp), cmpstringp);
 
@@ -5871,8 +5870,7 @@ typedef struct {
 } _uilist_item;
 
 typedef struct {
-  int visual_items; /* Visual number of items (i.e. number of items we have room to display).
-                     */
+  int visual_items; /* Visual number of items (i.e. number of items we have room to display). */
   int start_idx;    /* Index of first item to display. */
   int end_idx;      /* Index of last item to display + 1. */
 } uiListLayoutdata;
@@ -5945,8 +5943,7 @@ static void uilist_resize_update_cb(bContext *C, void *arg1, void *UNUSED(arg2))
   uiList *ui_list = arg1;
   uiListDyn *dyn_data = ui_list->dyn_data;
 
-  /* This way we get diff in number of additional items to show (positive) or hide (negative).
-   */
+  /* This way we get diff in number of additional items to show (positive) or hide (negative). */
   const int diff = round_fl_to_int((float)(dyn_data->resize - dyn_data->resize_prev) /
                                    (float)UI_UNIT_Y);
 
@@ -6276,6 +6273,7 @@ void uiTemplateList(uiLayout *layout,
           if (i == activei) {
             ui_layout_list_set_labels_active(sub);
           }
+
           UI_block_flag_disable(subblock, UI_BLOCK_LIST_ITEM);
         }
       }
@@ -6412,6 +6410,7 @@ void uiTemplateList(uiLayout *layout,
           if (i == activei) {
             ui_layout_list_set_labels_active(sub);
           }
+
           UI_block_flag_disable(subblock, UI_BLOCK_LIST_ITEM);
         }
       }
@@ -7111,8 +7110,7 @@ static struct MenuSearch_Data *menu_items_from_ui_create(bContext *C,
     UI_block_free(NULL, block);
 
     /* Add key-map items as a second pass,
-     * so all menus are accessed from the header & top-bar before key shortcuts are expanded.
-     */
+     * so all menus are accessed from the header & top-bar before key shortcuts are expanded. */
     if ((menu_stack == NULL) && (has_keymap_menu_items == false)) {
       has_keymap_menu_items = true;
       menu_types_add_from_keymap_items(
@@ -7675,8 +7673,8 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C)
   /* icon and report message on top */
   icon = UI_icon_from_report_type(report->type);
 
-  /* XXX: temporary operator to dump all reports to a text block, but only if more than 1
-   * report to be shown instead of icon when appropriate...
+  /* XXX: temporary operator to dump all reports to a text block, but only if more than 1 report
+   * to be shown instead of icon when appropriate...
    */
   UI_block_emboss_set(block, UI_EMBOSS_NONE);
 
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index aac67dd8b8c..b77869c9297 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -102,7 +102,7 @@ typedef enum ModifierMode {
   eModifierMode_Render = (1 << 1),
   eModifierMode_Editmode = (1 << 2),
   eModifierMode_OnCage = (1 << 3),
-  /* Old modifier box expansion, just for do versions. */
+  /* Old modifier box expansion, just for versioning. */
   eModifierMode_Expanded_DEPRECATED = (1 << 4),
   eModifierMode_Virtual = (1 << 5),
   eModifierMode_ApplyOnSpline = (1 << 6),
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index 677547b19a4..38c269c97e3 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -1200,7 +1200,7 @@ void RNA_api_ui_layout(StructRNA *srna)
 
   func = RNA_def_function(srna, "template_constraints", "uiTemplateConstraints");
   RNA_def_function_flag(func, FUNC_USE_CONTEXT);
-  RNA_def_function_ui_description(func, "Generates the UI layout for the constraint stack");
+  RNA_def_function_ui_description(func, "Generates the panels for the constraint stack");
 
   func = RNA_def_function(srna, "template_greasepencil_modifier", "uiTemplateGpencilModifier");
   RNA_def_function_flag(func, FUNC_USE_CONTEXT);



More information about the Bf-blender-cvs mailing list