diff options
author | Nathan Vegdahl <cessen@cessen.com> | 2011-06-24 00:17:34 +0400 |
---|---|---|
committer | Nathan Vegdahl <cessen@cessen.com> | 2011-06-24 00:17:34 +0400 |
commit | 653ccca3171d69d9b49f340f405de6ce5f981661 (patch) | |
tree | 0fae83ad67e47b0d7dba11ef0f042501c13da391 /rigify/utils.py | |
parent | b930f0c1a6b731554caadd485d221314a35a3ff9 (diff) |
Rigify: drivers now get transfered from the metarig to the generated rig.
This is the last piece that should allow some pretty extensive custom rigging
in the metarig, if advanced users choose to do so.
Diffstat (limited to 'rigify/utils.py')
-rw-r--r-- | rigify/utils.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/rigify/utils.py b/rigify/utils.py index 4add7a15..44f3e249 100644 --- a/rigify/utils.py +++ b/rigify/utils.py @@ -375,6 +375,19 @@ def create_root_widget(rig, bone_name): # Misc #============================================= +def copy_attributes(a, b): + keys = dir(a) + for key in keys: + if not key.startswith("_") \ + and not key.startswith("error_") \ + and key != "is_valid" \ + and key != "rna_type" \ + and key != "bl_rna": + try: + setattr(b, key, getattr(a, key)) + except AttributeError: + pass + def get_rig_type(rig_type): """ Fetches a rig module by name, and returns it. |