diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2019-03-30 22:00:55 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2019-09-14 09:29:26 +0300 |
commit | 3423174b37a0784dc12035ff3f2fb536835099e1 (patch) | |
tree | 3a54580902cdebdef5ebacd6099e86cc79ba75b3 /rigify/rigs/experimental | |
parent | 12af8a28c14b608e9b9b08568d981273c86590c1 (diff) |
Rigify: redesign generate.py and introduce a base rig class.
The main goals are to provide an official way for rigs to
interact in a structured way, and to remove mode switching
within rigs.
This involves introducing a base class for rigs that holds
rig-to-rig and rig-to-bone references, converting the main
generator into a class and passing it to rigs, and splitting
the single generate method into multiple passes.
For backward compatibility, old rigs are automatically handled
via a wrapper that translates between old and new API.
In addition, a way to create objects that receive the generate
callbacks that aren't rigs is introduced via the GeneratorPlugin
class. The UI script generation code is converted into a plugin.
Making generic rig 'template' classes that are intended to be
subclassed in specific rigs involves splitting operations done
in each stage into multiple methods that can be overridden
separately. The main callback thus ends up simply calling a
sequence of other methods.
To make such code cleaner it's better to allow registering
those methods as new callbacks that would be automatically
called by the system. This can be done via decorators.
A new metaclass used for all rig and generate plugin classes
builds and validates a table of all decorated methods, and
allows calling them all together with the main callback.
A new way to switch parents for IK bones based on the new
features is introduced, and used in the existing limb rigs.
Reviewers: icappiello campbellbarton
Differential Revision: https://developer.blender.org/D4624
Diffstat (limited to 'rigify/rigs/experimental')
-rw-r--r-- | rigify/rigs/experimental/super_chain.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rigify/rigs/experimental/super_chain.py b/rigify/rigs/experimental/super_chain.py index f3d0e182..592441fe 100644 --- a/rigify/rigs/experimental/super_chain.py +++ b/rigify/rigs/experimental/super_chain.py @@ -14,7 +14,7 @@ class Rig: def __init__(self, obj, bone_name, params): """ Chain with pivot Rig """ - eb = obj.data.edit_bones + eb = obj.data.bones self.obj = obj self.org_bones = [bone_name] + connected_children_names(obj, bone_name) |