Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-12-05 23:45:51 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-12-05 23:45:51 +0300
commit651336d5dfdea5faaebb26e5e153efd65676631a (patch)
treef172bbbbf960ca875fac3a5eae734f86f7315fa4 /release/scripts/modules/graphviz_export.py
parentbca53f09060e8686fe824f0353881ef0671997f8 (diff)
fixes for automatic tests and some errors in last commit
Diffstat (limited to 'release/scripts/modules/graphviz_export.py')
-rw-r--r--release/scripts/modules/graphviz_export.py15
1 files changed, 9 insertions, 6 deletions
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)