[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [27044] branches/blender2.4/release/ scripts/bvh_import.py: [#20116] calculation problem in bvh_importer.py

Campbell Barton ideasman42 at gmail.com
Sun Feb 21 10:35:10 CET 2010


Revision: 27044
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27044
Author:   campbellbarton
Date:     2010-02-21 10:35:09 +0100 (Sun, 21 Feb 2010)

Log Message:
-----------
[#20116] calculation problem in bvh_importer.py
from Martin K (martinbk)

Modified Paths:
--------------
    branches/blender2.4/release/scripts/bvh_import.py

Modified: branches/blender2.4/release/scripts/bvh_import.py
===================================================================
--- branches/blender2.4/release/scripts/bvh_import.py	2010-02-21 08:25:14 UTC (rev 27043)
+++ branches/blender2.4/release/scripts/bvh_import.py	2010-02-21 09:35:09 UTC (rev 27044)
@@ -2,14 +2,14 @@
 
 """
 Name: 'Motion Capture (.bvh)...'
-Blender: 242
+Blender: 249
 Group: 'Import'
 Tip: 'Import a (.bvh) motion capture file'
 """
 
-__author__ = "Campbell Barton"
+__author__ = "Campbell Barton / Martin Knauf(BugFix)"
 __url__ = ("blender.org", "blenderartists.org")
-__version__ = "1.90 06/08/01"
+__version__ = "1.91 11/27/09"
 
 __bpydoc__ = """\
 This script imports BVH motion capture data to Blender.
@@ -206,7 +206,7 @@
 			rest_tail = Vector( GLOBAL_SCALE*float(file_lines[lineIdx][1]), GLOBAL_SCALE*float(file_lines[lineIdx][2]), GLOBAL_SCALE*float(file_lines[lineIdx][3]) )
 			
 			bvh_nodes_serial[-1].rest_tail_world= bvh_nodes_serial[-1].rest_head_world + rest_tail
-			bvh_nodes_serial[-1].rest_tail_local= rest_tail
+			bvh_nodes_serial[-1].rest_tail_local= bvh_nodes_serial[-1].rest_head_local + rest_tail
 			
 			
 			# Just so we can remove the Parents in a uniform way- End end never has kids
@@ -283,7 +283,7 @@
 				bvh_node.rest_tail_local = Vector(bvh_node.rest_head_local)
 			elif len(bvh_node.children)==1:
 				bvh_node.rest_tail_world= Vector(bvh_node.children[0].rest_head_world)
-				bvh_node.rest_tail_local= Vector(bvh_node.children[0].rest_head_local)
+				bvh_node.rest_tail_local= bvh_node.rest_head_local + bvh_node.children[0].rest_head_local
 			else:
 				# allow this, see above
 				#if not bvh_node.children:
@@ -698,7 +698,7 @@
 	
 	Draw= Blender.Draw
 	
-	IMPORT_SCALE = Draw.Create(0.1)
+	IMPORT_SCALE = Draw.Create(1.0)
 	IMPORT_START_FRAME = Draw.Create(1)
 	IMPORT_AS_ARMATURE = Draw.Create(1)
 	IMPORT_AS_EMPTIES = Draw.Create(0)





More information about the Bf-blender-cvs mailing list