diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-04-30 09:45:02 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-04-30 09:45:02 +0400 |
commit | 188d1ccf562f5ff9e14fdcb56aae56ce2b33c25e (patch) | |
tree | 28f9551ffe10573c9eca5fe4c7bff6ea237704b3 /release/scripts/modules/graphviz_export.py | |
parent | 16e7ed28be8e764437e5ad7fa1587c29f352def1 (diff) |
fix for exporting a rig to a graph
Diffstat (limited to 'release/scripts/modules/graphviz_export.py')
-rw-r--r-- | release/scripts/modules/graphviz_export.py | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/release/scripts/modules/graphviz_export.py b/release/scripts/modules/graphviz_export.py index 1e7c7adfb7f..fd32a7ee3b9 100644 --- a/release/scripts/modules/graphviz_export.py +++ b/release/scripts/modules/graphviz_export.py @@ -157,17 +157,18 @@ def graph_armature(obj, path, FAKE_PARENT=True, CONSTRAINTS=True, DRIVERS=True, pbone = rna_path_as_pbone(rna_path) if pbone: - for target in fcurve_driver.driver.targets: - pbone_target = rna_path_as_pbone(target.data_path) - rna_path_target = target.data_path - if pbone_target: - opts = ['dir=forward', "weight=1", "arrowhead=normal", "arrowtail=none", "constraint=false", 'color="blue"', "labelfontsize=4"] # , - display_source = rna_path.replace("pose.bones", "") - display_target = rna_path_target.replace("pose.bones", "") - if XTRA_INFO: - label = "%s\\n%s" % (display_source, display_target) - opts.append('label="%s"' % compat_str(label)) - fw('"%s" -> "%s" [%s] ;\n' % (pbone_target.name, pbone.name, ','.join(opts))) + for var in fcurve_driver.driver.variables: + for target in var.targets: + pbone_target = rna_path_as_pbone(target.data_path) + rna_path_target = target.data_path + if pbone_target: + opts = ['dir=forward', "weight=1", "arrowhead=normal", "arrowtail=none", "constraint=false", 'color="blue"', "labelfontsize=4"] # , + display_source = rna_path.replace("pose.bones", "") + display_target = rna_path_target.replace("pose.bones", "") + if XTRA_INFO: + label = "%s\\n%s" % (display_source, display_target) + opts.append('label="%s"' % compat_str(label)) + fw('"%s" -> "%s" [%s] ;\n' % (pbone_target.name, pbone.name, ','.join(opts))) fw(footer) fileobject.close() |