From 188d1ccf562f5ff9e14fdcb56aae56ce2b33c25e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 30 Apr 2010 05:45:02 +0000 Subject: fix for exporting a rig to a graph --- release/scripts/modules/graphviz_export.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'release/scripts/modules/graphviz_export.py') 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() -- cgit v1.2.3