From 651336d5dfdea5faaebb26e5e153efd65676631a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 5 Dec 2009 20:45:51 +0000 Subject: fixes for automatic tests and some errors in last commit --- release/scripts/modules/graphviz_export.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 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 5d0ff4fe824..5227237c51b 100644 --- a/release/scripts/modules/graphviz_export.py +++ b/release/scripts/modules/graphviz_export.py @@ -47,7 +47,8 @@ def compat_str(text, line_length=0): text = text.replace('"', '\\"') return "* " + text -def graph_armature(obj, path, FAKE_PARENT=True, CONSTRAINTS=True, DRIVERS=True): +def graph_armature(obj, path, FAKE_PARENT=True, CONSTRAINTS=True, DRIVERS=True, XTRA_INFO=False): + CONSTRAINTS = DRIVERS = True file = open(path, "w") fw = file.write @@ -76,7 +77,7 @@ def graph_armature(obj, path, FAKE_PARENT=True, CONSTRAINTS=True, DRIVERS=True): label.append("%s = %s" % (key, value)) - opts = ["shape=box", "regular=1", "style=filled", 'width="2.33"', 'height="0.35"', "fixedsize=false", 'label="%s"' % compat_str('\n'.join(label))] + opts = ["shape=box", "regular=1", "style=filled", "fixedsize=false", 'label="%s"' % compat_str('\n'.join(label))] if bone.name.startswith('ORG'): opts.append("fillcolor=yellow") @@ -123,8 +124,9 @@ def graph_armature(obj, path, FAKE_PARENT=True, CONSTRAINTS=True, DRIVERS=True): if subtarget: # TODO, not internal links opts = ['dir=forward', "weight=1", "arrowhead=normal", "arrowtail=none", "constraint=false", 'color="red"', 'labelfontsize=4'] - label = "%s\n%s" % (constraint.type, constraint.name) - opts.append('label="%s"' % compat_str(label)) + if XTRA_INFO: + label = "%s\n%s" % (constraint.type, constraint.name) + opts.append('label="%s"' % compat_str(label)) fw('"%s" -> "%s" [%s] ;\n' % (subtarget, pbone.name, ','.join(opts))) # Drivers @@ -157,8 +159,9 @@ def graph_armature(obj, path, FAKE_PARENT=True, CONSTRAINTS=True, DRIVERS=True): 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", "") - label = "%s\\n%s" % (display_source, display_target) - opts.append('label="%s"' % compat_str(label)) + 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) -- cgit v1.2.3