[Bf-extensions-cvs] [b3f0ffc5] master: rigify: update for changes in Blender

Campbell Barton noreply at git.blender.org
Fri Feb 3 05:09:18 CET 2023


Commit: b3f0ffc587d197b37eac9a1566d1d24b7bee7d9a
Author: Campbell Barton
Date:   Fri Feb 3 15:08:21 2023 +1100
Branches: master
https://developer.blender.org/rBAb3f0ffc587d197b37eac9a1566d1d24b7bee7d9a

rigify: update for changes in Blender

Update names matching changes in c468aeefb5b17b43f12e0bb69b60641721033e8a.

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

M	rigify/operators/action_layers.py
M	rigify/operators/generic_ui_list.py

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

diff --git a/rigify/operators/action_layers.py b/rigify/operators/action_layers.py
index b17a5221..241bc070 100644
--- a/rigify/operators/action_layers.py
+++ b/rigify/operators/action_layers.py
@@ -336,7 +336,7 @@ class DATA_PT_rigify_actions(Panel):
             layout, context,
             class_name='RIGIFY_UL_action_slots',
             list_context_path='object.data.rigify_action_slots',
-            active_idx_context_path='object.data.rigify_active_action_slot',
+            active_index_context_path='object.data.rigify_active_action_slot',
         )
 
         if len(action_slots) == 0:
diff --git a/rigify/operators/generic_ui_list.py b/rigify/operators/generic_ui_list.py
index ae67745f..848a3029 100644
--- a/rigify/operators/generic_ui_list.py
+++ b/rigify/operators/generic_ui_list.py
@@ -17,16 +17,16 @@ class GenericUIListOperator(Operator):
     bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
 
     list_context_path: StringProperty()
-    active_idx_context_path: StringProperty()
+    active_index_context_path: StringProperty()
 
     def get_list(self, context):
         return get_context_attr(context, self.list_context_path)
 
     def get_active_index(self, context):
-        return get_context_attr(context, self.active_idx_context_path)
+        return get_context_attr(context, self.active_index_context_path)
 
     def set_active_index(self, context, index):
-        set_context_attr(context, self.active_idx_context_path, index)
+        set_context_attr(context, self.active_index_context_path, index)
 
 
 # noinspection PyPep8Naming
@@ -103,7 +103,7 @@ class UILIST_OT_entry_move(GenericUIListOperator):
 def draw_ui_list(
         layout, context, class_name="UI_UL_list", *,
         list_context_path: str,  # Eg. "object.vertex_groups".
-        active_idx_context_path: str,  # Eg., "object.vertex_groups.active_index".
+        active_index_context_path: str,  # Eg., "object.vertex_groups.active_index".
         insertion_operators=True,
         move_operators=True,
         menu_class_name="",
@@ -117,8 +117,8 @@ def draw_ui_list(
 
     list_owner = get_context_attr(context, ".".join(list_context_path.split(".")[:-1]))
     list_prop_name = list_context_path.split(".")[-1]
-    idx_owner = get_context_attr(context, ".".join(active_idx_context_path.split(".")[:-1]))
-    idx_prop_name = active_idx_context_path.split(".")[-1]
+    idx_owner = get_context_attr(context, ".".join(active_index_context_path.split(".")[:-1]))
+    idx_prop_name = active_index_context_path.split(".")[-1]
 
     my_list = get_context_attr(context, list_context_path)
 
@@ -136,13 +136,13 @@ def draw_ui_list(
     if insertion_operators:
         add_op = col.operator(UILIST_OT_entry_add.bl_idname, text="", icon='ADD')
         add_op.list_context_path = list_context_path
-        add_op.active_idx_context_path = active_idx_context_path
+        add_op.active_index_context_path = active_index_context_path
 
         row = col.row()
         row.enabled = len(my_list) > 0
         remove_op = row.operator(UILIST_OT_entry_remove.bl_idname, text="", icon='REMOVE')
         remove_op.list_context_path = list_context_path
-        remove_op.active_idx_context_path = active_idx_context_path
+        remove_op.active_index_context_path = active_index_context_path
 
         col.separator()
 
@@ -156,12 +156,12 @@ def draw_ui_list(
         move_up_op = col.operator(UILIST_OT_entry_move.bl_idname, text="", icon='TRIA_UP')
         move_up_op.direction = 'UP'
         move_up_op.list_context_path = list_context_path
-        move_up_op.active_idx_context_path = active_idx_context_path
+        move_up_op.active_index_context_path = active_index_context_path
 
         move_down_op = col.operator(UILIST_OT_entry_move.bl_idname, text="", icon='TRIA_DOWN')
         move_down_op.direction = 'DOWN'
         move_down_op.list_context_path = list_context_path
-        move_down_op.active_idx_context_path = active_idx_context_path
+        move_down_op.active_index_context_path = active_index_context_path
 
     # Return the right-side column.
     return col



More information about the Bf-extensions-cvs mailing list