Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2019-09-15 11:30:26 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2019-09-15 11:30:39 +0300
commit9a9923dd278703f05206037a31b4226b337d8448 (patch)
treefc6cca9917b86bc7eaa260ed41b4206caf4abbe8 /rigify/utils
parentf31572ecd2ef3b0cb08c175ed8343a97af01dc9c (diff)
Rigify: replace deprecated use_inherit_scale and use_offset properties.
Diffstat (limited to 'rigify/utils')
-rw-r--r--rigify/utils/bones.py2
-rw-r--r--rigify/utils/switch_parent.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/rigify/utils/bones.py b/rigify/utils/bones.py
index b5559a76..738f5d42 100644
--- a/rigify/utils/bones.py
+++ b/rigify/utils/bones.py
@@ -150,8 +150,8 @@ def copy_bone(obj, bone_name, assign_name='', *, parent=False, bbone=False, leng
edit_bone_2.use_connect = edit_bone_1.use_connect
edit_bone_2.use_inherit_rotation = edit_bone_1.use_inherit_rotation
- edit_bone_2.use_inherit_scale = edit_bone_1.use_inherit_scale
edit_bone_2.use_local_location = edit_bone_1.use_local_location
+ edit_bone_2.inherit_scale = edit_bone_1.inherit_scale
if bbone:
for name in ['bbone_segments',
diff --git a/rigify/utils/switch_parent.py b/rigify/utils/switch_parent.py
index 5daa6a6c..85e6e130 100644
--- a/rigify/utils/switch_parent.py
+++ b/rigify/utils/switch_parent.py
@@ -106,6 +106,7 @@ class SwitchParentBuilder(GeneratorPlugin, MechanismUtilityMixin):
ctrl_bone User visible control bone that depends on this parent (for switch & keep transform)
no_fix_* Disable "Switch and Keep Transform" correction for specific channels.
copy_* Override the specified components by copying from another bone.
+ inherit_scale Inherit scale mode for the child bone (default: AVERAGE).
Lazy parameters:
'extra_parents', 'select_parent', 'prop_bone', 'controls', 'copy_*'
@@ -161,6 +162,7 @@ class SwitchParentBuilder(GeneratorPlugin, MechanismUtilityMixin):
'ctrl_bone': None,
'no_fix_location': False, 'no_fix_rotation': False, 'no_fix_scale': False,
'copy_location': None, 'copy_rotation': None, 'copy_scale': None,
+ 'inherit_scale': 'AVERAGE',
}
def assign_child_options(self, child, options):
@@ -217,6 +219,7 @@ class SwitchParentBuilder(GeneratorPlugin, MechanismUtilityMixin):
# Parent child to the MCH proxy
if mch != child['bone']:
rig.set_bone_parent(child['bone'], mch)
+ rig.get_bone(child['bone']).inherit_scale = child['inherit_scale']
def configure_bones(self):
for child in self.child_list: