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
path: root/rigify
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2020-12-05 00:27:10 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2020-12-05 00:27:20 +0300
commit0871d330e9028820bf6059d804f09b66021122d7 (patch)
tree9153e2858333d56d09eed2df8a7532b4cb129a02 /rigify
parent1a2a24bf4af96c6788eab79c257c32e19124ec26 (diff)
Rigify: a number of small fixes.
- Don't try to add an update callback to CollectionProperty. - Restore exact alignment of the super_finger master control to 1st bone. - Add an option to run a sub-object after all methods of the parent. - Fix wrong identifier in SideZ.from_parts.
Diffstat (limited to 'rigify')
-rw-r--r--rigify/__init__.py3
-rw-r--r--rigify/rigs/limbs/super_finger.py2
-rw-r--r--rigify/utils/metaclass.py8
-rw-r--r--rigify/utils/naming.py4
4 files changed, 12 insertions, 5 deletions
diff --git a/rigify/__init__.py b/rigify/__init__.py
index df584872..7e5ee944 100644
--- a/rigify/__init__.py
+++ b/rigify/__init__.py
@@ -474,7 +474,8 @@ class RigifyParameterValidator(object):
print("!!! PREVIOUS DEFINITION BY %s:\n\n %s\n" % (cur_rig, format_property_spec(cur_info)))
# inject a generic update callback that calls the appropriate rig classmethod
- val[1]['update'] = update_callback(name)
+ if val[0] != bpy.props.CollectionProperty:
+ val[1]['update'] = update_callback(name)
setattr(self.__params, name, val)
self.__prop_table[name] = (self.__rig_name, new_def)
diff --git a/rigify/rigs/limbs/super_finger.py b/rigify/rigs/limbs/super_finger.py
index 5dd7e681..b50d54f9 100644
--- a/rigify/rigs/limbs/super_finger.py
+++ b/rigify/rigs/limbs/super_finger.py
@@ -63,7 +63,7 @@ class Rig(SimpleChainRig):
first_bone = self.get_bone(orgs[0])
last_bone = self.get_bone(orgs[-1])
- self.get_bone(name).tail += (last_bone.tail - first_bone.head) * 1.25
+ self.get_bone(name).length += (last_bone.tail - first_bone.head).length * 1.25
@stage.configure_bones
def configure_master_control(self):
diff --git a/rigify/utils/metaclass.py b/rigify/utils/metaclass.py
index 9e169e05..c9d4ec1a 100644
--- a/rigify/utils/metaclass.py
+++ b/rigify/utils/metaclass.py
@@ -135,6 +135,7 @@ class StagedMetaclass(type):
class BaseStagedClass(object, metaclass=StagedMetaclass):
rigify_sub_objects = tuple()
+ rigify_sub_object_run_late = False
def rigify_invoke_stage(self, stage):
"""Call all methods decorated with the given stage, followed by the callback."""
@@ -145,11 +146,16 @@ class BaseStagedClass(object, metaclass=StagedMetaclass):
getattr(self, stage)()
for sub in self.rigify_sub_objects:
- sub.rigify_invoke_stage(stage)
+ if not sub.rigify_sub_object_run_late:
+ sub.rigify_invoke_stage(stage)
for method_name in cls.rigify_stage_map[stage]:
getattr(self, method_name)()
+ for sub in self.rigify_sub_objects:
+ if sub.rigify_sub_object_run_late:
+ sub.rigify_invoke_stage(stage)
+
#=============================================
# Per-owner singleton class
diff --git a/rigify/utils/naming.py b/rigify/utils/naming.py
index 415dddaf..45307323 100644
--- a/rigify/utils/naming.py
+++ b/rigify/utils/naming.py
@@ -131,9 +131,9 @@ class SideZ(enum.IntEnum):
if parts.side_z[1].lower() == 't':
return SideZ.TOP
else:
- return Side.BOTTOM
+ return SideZ.BOTTOM
else:
- return Side.MIDDLE
+ return SideZ.MIDDLE
@staticmethod
def to_string(parts, side):