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:
Diffstat (limited to 'rigify/utils.py')
-rw-r--r--rigify/utils.py13
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.