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-02 13:32:39 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-12-02 13:32:39 +0300
commit8c5d021d1931446d08a3686347221baf5616df16 (patch)
treeafc7e7ab7090a45b85dd8bc561ebce3fda7b7270 /release/scripts
parent39f42df424beb032d3306cd30b4d633a3108210d (diff)
rename armature RNA props
armature_matrix --> matrix_local armature_head --> head_local armature_tail --> tail_local
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/io/export_fbx.py8
-rw-r--r--release/scripts/modules/graphviz_export.py14
2 files changed, 17 insertions, 5 deletions
diff --git a/release/scripts/io/export_fbx.py b/release/scripts/io/export_fbx.py
index e5bf01b0d9d..c821e1d4fad 100644
--- a/release/scripts/io/export_fbx.py
+++ b/release/scripts/io/export_fbx.py
@@ -486,7 +486,7 @@ def write(filename, batch_objects = None, \
self.blenBone = blenBone
self.blenMeshes = {} # fbxMeshObName : mesh
self.fbxArm = fbxArm
- self.restMatrix = blenBone.armature_matrix
+ self.restMatrix = blenBone.matrix_local
# self.restMatrix = blenBone.matrix['ARMATURESPACE']
# not used yet
@@ -664,13 +664,13 @@ def write(filename, batch_objects = None, \
# we know we have a matrix
# matrix = mtx4_z90 * (ob.matrix['ARMATURESPACE'] * matrix_mod)
- matrix = mtx4_z90 * ob.armature_matrix # dont apply armature matrix anymore
+ matrix = mtx4_z90 * ob.matrix_local # dont apply armature matrix anymore
# matrix = mtx4_z90 * ob.matrix['ARMATURESPACE'] # dont apply armature matrix anymore
parent = ob.parent
if parent:
#par_matrix = mtx4_z90 * (parent.matrix['ARMATURESPACE'] * matrix_mod)
- par_matrix = mtx4_z90 * parent.armature_matrix # dont apply armature matrix anymore
+ par_matrix = mtx4_z90 * parent.matrix_local # dont apply armature matrix anymore
# par_matrix = mtx4_z90 * parent.matrix['ARMATURESPACE'] # dont apply armature matrix anymore
matrix = matrix * par_matrix.copy().invert()
@@ -841,7 +841,7 @@ def write(filename, batch_objects = None, \
"""
file.write('\n\t\t\tProperty: "LimbLength", "double", "",%.6f' %
- (my_bone.blenBone.armature_head - my_bone.blenBone.armature_tail).length)
+ (my_bone.blenBone.head_local - my_bone.blenBone.tail_local).length)
# (my_bone.blenBone.head['ARMATURESPACE'] - my_bone.blenBone.tail['ARMATURESPACE']).length)
#file.write('\n\t\t\tProperty: "LimbLength", "double", "",1')
diff --git a/release/scripts/modules/graphviz_export.py b/release/scripts/modules/graphviz_export.py
index c5b8b185893..84614c9dc70 100644
--- a/release/scripts/modules/graphviz_export.py
+++ b/release/scripts/modules/graphviz_export.py
@@ -16,6 +16,8 @@
#
# ##### END GPL LICENSE BLOCK #####
+import bpy
+
header = '''
digraph ancestors {
graph [fontsize=30 labelloc="t" label="" splines=false overlap=true, rankdir=BT];
@@ -84,6 +86,8 @@ def graph_armature(obj, path, FAKE_PARENT=True, CONSTRAINTS=True, DRIVERS=True):
fw('"%s" [%s];\n' % (bone.name, ','.join(opts)))
+ fw('\n\n# Hierarchy:\n')
+
# Root node.
if FAKE_PARENT:
fw('"Object::%s" [];\n' % obj.name)
@@ -110,7 +114,10 @@ def graph_armature(obj, path, FAKE_PARENT=True, CONSTRAINTS=True, DRIVERS=True):
# constraints
if CONSTRAINTS:
- for pbone in obj.pose.bones:
+ fw('\n\n# Constraints:\n')
+ for bone in bones:
+ pbone = obj.pose.bones[bone]
+ # must be ordered
for constraint in pbone.constraints:
subtarget = constraint.subtarget
if subtarget:
@@ -122,6 +129,7 @@ def graph_armature(obj, path, FAKE_PARENT=True, CONSTRAINTS=True, DRIVERS=True):
# Drivers
if DRIVERS:
+ fw('\n\n# Drivers:\n')
def rna_path_as_pbone(rna_path):
if not rna_path.startswith("pose.bones["):
return None
@@ -156,9 +164,13 @@ def graph_armature(obj, path, FAKE_PARENT=True, CONSTRAINTS=True, DRIVERS=True):
fw(footer)
file.close()
+ '''
print(".", end='')
import sys
sys.stdout.flush()
+ '''
+ print("\nSaved:", path)
+ return True
if __name__ == "__main__":
import bpy