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
11871509
Commit
11871509
authored
5 years ago
by
Alexander Gavrilov
Browse files
Options
Downloads
Plain Diff
Merge branch 'blender-v2.81-release'
parents
dd723151
5b18c3f4
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
rigify/base_generate.py
+2
-1
2 additions, 1 deletion
rigify/base_generate.py
rigify/generate.py
+5
-0
5 additions, 0 deletions
rigify/generate.py
rigify/rigs/spines/super_spine.py
+1
-1
1 addition, 1 deletion
rigify/rigs/spines/super_spine.py
rigify/utils/misc.py
+24
-1
24 additions, 1 deletion
rigify/utils/misc.py
with
32 additions
and
3 deletions
rigify/base_generate.py
+
2
−
1
View file @
11871509
...
...
@@ -27,7 +27,7 @@ from .utils.errors import MetarigError, RaiseErrorMixin
from
.utils.naming
import
random_id
from
.utils.metaclass
import
SingletonPluginMetaclass
from
.utils.rig
import
list_bone_names_depth_first_sorted
,
get_rigify_type
from
.utils.misc
import
assign_parameters
from
.utils.misc
import
clone_parameters
,
assign_parameters
from
.
import
base_rig
...
...
@@ -78,6 +78,7 @@ class SubstitutionRig(RaiseErrorMixin):
self
.
obj
=
generator
.
obj
self
.
base_bone
=
pose_bone
.
name
self
.
params
=
pose_bone
.
rigify_parameters
self
.
params_copy
=
clone_parameters
(
self
.
params
)
def
substitute
(
self
):
# return [rig1, rig2...]
...
...
This diff is collapsed.
Click to expand it.
rigify/generate.py
+
5
−
0
View file @
11871509
...
...
@@ -165,8 +165,13 @@ class Generator(base_generate.BaseGenerator):
# Select the target rig and join
select_object
(
context
,
obj
)
saved_matrix
=
obj
.
matrix_world
.
copy
()
obj
.
matrix_world
=
metarig
.
matrix_world
bpy
.
ops
.
object
.
join
()
obj
.
matrix_world
=
saved_matrix
# Select the generated rig
select_object
(
context
,
obj
,
deselect_all
=
True
)
...
...
This diff is collapsed.
Click to expand it.
rigify/rigs/spines/super_spine.py
+
1
−
1
View file @
11871509
...
...
@@ -33,7 +33,7 @@ class Rig(SubstitutionRig, BoneUtilityMixin):
"""
Compatibility proxy for the monolithic super_spine rig that splits it into parts.
"""
def
substitute
(
self
):
params_copy
=
dict
(
self
.
params
)
params_copy
=
self
.
params
_copy
orgs
=
[
self
.
base_bone
]
+
connected_children_names
(
self
.
obj
,
self
.
base_bone
)
# Split the bone list according to the settings
...
...
This diff is collapsed.
Click to expand it.
rigify/utils/misc.py
+
24
−
1
View file @
11871509
...
...
@@ -24,6 +24,7 @@ import collections
from
itertools
import
tee
,
chain
,
islice
,
repeat
from
mathutils
import
Vector
,
Matrix
,
Color
from
rna_prop_ui
import
rna_idprop_value_to_python
#=============================================
...
...
@@ -170,8 +171,30 @@ def copy_attributes(a, b):
pass
def
property_to_python
(
value
):
value
=
rna_idprop_value_to_python
(
value
)
if
isinstance
(
value
,
dict
):
return
{
k
:
property_to_python
(
v
)
for
k
,
v
in
value
.
items
()
}
elif
isinstance
(
value
,
list
):
return
map_list
(
property_to_python
,
value
)
else
:
return
value
def
clone_parameters
(
target
):
return
property_to_python
(
dict
(
target
))
def
assign_parameters
(
target
,
val_dict
=
None
,
**
params
):
data
=
{
**
val_dict
,
**
params
}
if
val_dict
else
params
if
val_dict
is
not
None
:
for
key
in
list
(
target
.
keys
()):
del
target
[
key
]
data
=
{
**
val_dict
,
**
params
}
else
:
data
=
params
for
key
,
value
in
data
.
items
():
try
:
target
[
key
]
=
value
...
...
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