Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-addons
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
blender-addons
Commits
b3f0ffc5
Commit
b3f0ffc5
authored
2 years ago
by
Campbell Barton
Browse files
Options
Downloads
Patches
Plain Diff
rigify: update for changes in Blender
Update names matching changes in c468aeefb5b17b43f12e0bb69b60641721033e8a.
parent
534bf3b7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
rigify/operators/action_layers.py
+1
-1
1 addition, 1 deletion
rigify/operators/action_layers.py
rigify/operators/generic_ui_list.py
+10
-10
10 additions, 10 deletions
rigify/operators/generic_ui_list.py
with
11 additions
and
11 deletions
rigify/operators/action_layers.py
+
1
−
1
View file @
b3f0ffc5
...
@@ -336,7 +336,7 @@ class DATA_PT_rigify_actions(Panel):
...
@@ -336,7 +336,7 @@ class DATA_PT_rigify_actions(Panel):
layout
,
context
,
layout
,
context
,
class_name
=
'
RIGIFY_UL_action_slots
'
,
class_name
=
'
RIGIFY_UL_action_slots
'
,
list_context_path
=
'
object.data.rigify_action_slots
'
,
list_context_path
=
'
object.data.rigify_action_slots
'
,
active_i
d
x_context_path
=
'
object.data.rigify_active_action_slot
'
,
active_i
nde
x_context_path
=
'
object.data.rigify_active_action_slot
'
,
)
)
if
len
(
action_slots
)
==
0
:
if
len
(
action_slots
)
==
0
:
...
...
This diff is collapsed.
Click to expand it.
rigify/operators/generic_ui_list.py
+
10
−
10
View file @
b3f0ffc5
...
@@ -17,16 +17,16 @@ class GenericUIListOperator(Operator):
...
@@ -17,16 +17,16 @@ class GenericUIListOperator(Operator):
bl_options
=
{
'
REGISTER
'
,
'
UNDO
'
,
'
INTERNAL
'
}
bl_options
=
{
'
REGISTER
'
,
'
UNDO
'
,
'
INTERNAL
'
}
list_context_path
:
StringProperty
()
list_context_path
:
StringProperty
()
active_i
d
x_context_path
:
StringProperty
()
active_i
nde
x_context_path
:
StringProperty
()
def
get_list
(
self
,
context
):
def
get_list
(
self
,
context
):
return
get_context_attr
(
context
,
self
.
list_context_path
)
return
get_context_attr
(
context
,
self
.
list_context_path
)
def
get_active_index
(
self
,
context
):
def
get_active_index
(
self
,
context
):
return
get_context_attr
(
context
,
self
.
active_i
d
x_context_path
)
return
get_context_attr
(
context
,
self
.
active_i
nde
x_context_path
)
def
set_active_index
(
self
,
context
,
index
):
def
set_active_index
(
self
,
context
,
index
):
set_context_attr
(
context
,
self
.
active_i
d
x_context_path
,
index
)
set_context_attr
(
context
,
self
.
active_i
nde
x_context_path
,
index
)
# noinspection PyPep8Naming
# noinspection PyPep8Naming
...
@@ -103,7 +103,7 @@ class UILIST_OT_entry_move(GenericUIListOperator):
...
@@ -103,7 +103,7 @@ class UILIST_OT_entry_move(GenericUIListOperator):
def
draw_ui_list
(
def
draw_ui_list
(
layout
,
context
,
class_name
=
"
UI_UL_list
"
,
*
,
layout
,
context
,
class_name
=
"
UI_UL_list
"
,
*
,
list_context_path
:
str
,
# Eg. "object.vertex_groups".
list_context_path
:
str
,
# Eg. "object.vertex_groups".
active_i
d
x_context_path
:
str
,
# Eg., "object.vertex_groups.active_index".
active_i
nde
x_context_path
:
str
,
# Eg., "object.vertex_groups.active_index".
insertion_operators
=
True
,
insertion_operators
=
True
,
move_operators
=
True
,
move_operators
=
True
,
menu_class_name
=
""
,
menu_class_name
=
""
,
...
@@ -117,8 +117,8 @@ def draw_ui_list(
...
@@ -117,8 +117,8 @@ def draw_ui_list(
list_owner
=
get_context_attr
(
context
,
"
.
"
.
join
(
list_context_path
.
split
(
"
.
"
)[:
-
1
]))
list_owner
=
get_context_attr
(
context
,
"
.
"
.
join
(
list_context_path
.
split
(
"
.
"
)[:
-
1
]))
list_prop_name
=
list_context_path
.
split
(
"
.
"
)[
-
1
]
list_prop_name
=
list_context_path
.
split
(
"
.
"
)[
-
1
]
idx_owner
=
get_context_attr
(
context
,
"
.
"
.
join
(
active_i
d
x_context_path
.
split
(
"
.
"
)[:
-
1
]))
idx_owner
=
get_context_attr
(
context
,
"
.
"
.
join
(
active_i
nde
x_context_path
.
split
(
"
.
"
)[:
-
1
]))
idx_prop_name
=
active_i
d
x_context_path
.
split
(
"
.
"
)[
-
1
]
idx_prop_name
=
active_i
nde
x_context_path
.
split
(
"
.
"
)[
-
1
]
my_list
=
get_context_attr
(
context
,
list_context_path
)
my_list
=
get_context_attr
(
context
,
list_context_path
)
...
@@ -136,13 +136,13 @@ def draw_ui_list(
...
@@ -136,13 +136,13 @@ def draw_ui_list(
if
insertion_operators
:
if
insertion_operators
:
add_op
=
col
.
operator
(
UILIST_OT_entry_add
.
bl_idname
,
text
=
""
,
icon
=
'
ADD
'
)
add_op
=
col
.
operator
(
UILIST_OT_entry_add
.
bl_idname
,
text
=
""
,
icon
=
'
ADD
'
)
add_op
.
list_context_path
=
list_context_path
add_op
.
list_context_path
=
list_context_path
add_op
.
active_i
d
x_context_path
=
active_i
d
x_context_path
add_op
.
active_i
nde
x_context_path
=
active_i
nde
x_context_path
row
=
col
.
row
()
row
=
col
.
row
()
row
.
enabled
=
len
(
my_list
)
>
0
row
.
enabled
=
len
(
my_list
)
>
0
remove_op
=
row
.
operator
(
UILIST_OT_entry_remove
.
bl_idname
,
text
=
""
,
icon
=
'
REMOVE
'
)
remove_op
=
row
.
operator
(
UILIST_OT_entry_remove
.
bl_idname
,
text
=
""
,
icon
=
'
REMOVE
'
)
remove_op
.
list_context_path
=
list_context_path
remove_op
.
list_context_path
=
list_context_path
remove_op
.
active_i
d
x_context_path
=
active_i
d
x_context_path
remove_op
.
active_i
nde
x_context_path
=
active_i
nde
x_context_path
col
.
separator
()
col
.
separator
()
...
@@ -156,12 +156,12 @@ def draw_ui_list(
...
@@ -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
=
col
.
operator
(
UILIST_OT_entry_move
.
bl_idname
,
text
=
""
,
icon
=
'
TRIA_UP
'
)
move_up_op
.
direction
=
'
UP
'
move_up_op
.
direction
=
'
UP
'
move_up_op
.
list_context_path
=
list_context_path
move_up_op
.
list_context_path
=
list_context_path
move_up_op
.
active_i
d
x_context_path
=
active_i
d
x_context_path
move_up_op
.
active_i
nde
x_context_path
=
active_i
nde
x_context_path
move_down_op
=
col
.
operator
(
UILIST_OT_entry_move
.
bl_idname
,
text
=
""
,
icon
=
'
TRIA_DOWN
'
)
move_down_op
=
col
.
operator
(
UILIST_OT_entry_move
.
bl_idname
,
text
=
""
,
icon
=
'
TRIA_DOWN
'
)
move_down_op
.
direction
=
'
DOWN
'
move_down_op
.
direction
=
'
DOWN
'
move_down_op
.
list_context_path
=
list_context_path
move_down_op
.
list_context_path
=
list_context_path
move_down_op
.
active_i
d
x_context_path
=
active_i
d
x_context_path
move_down_op
.
active_i
nde
x_context_path
=
active_i
nde
x_context_path
# Return the right-side column.
# Return the right-side column.
return
col
return
col
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment