fix for exporting a rig to a graph
authorCampbell Barton <ideasman42@gmail.com>
Fri, 30 Apr 2010 05:45:02 +0000 (05:45 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 30 Apr 2010 05:45:02 +0000 (05:45 +0000)
release/scripts/modules/graphviz_export.py

index 1e7c7adfb7fe58634333a3a9e699910b479d8299..fd32a7ee3b97513949cd3b7cfceac2fac43193c6 100644 (file)
@@ -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()