[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [975] trunk/py/scripts/addons: updates for changes in blender.

Campbell Barton ideasman42 at gmail.com
Fri Sep 3 09:26:27 CEST 2010


Revision: 975
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-extensions&revision=975
Author:   campbellbarton
Date:     2010-09-03 09:26:27 +0200 (Fri, 03 Sep 2010)

Log Message:
-----------
updates for changes in blender.

Modified Paths:
--------------
    trunk/py/scripts/addons/io_anim_camera.py
    trunk/py/scripts/addons/io_export_directx_x.py
    trunk/py/scripts/addons/io_export_unreal_psk_psa.py
    trunk/py/scripts/addons/io_import_images_as_planes.py
    trunk/py/scripts/addons/io_import_scene_mhx.py
    trunk/py/scripts/addons/io_import_scene_unreal_psk.py

Modified: trunk/py/scripts/addons/io_anim_camera.py
===================================================================
--- trunk/py/scripts/addons/io_anim_camera.py	2010-09-03 06:27:53 UTC (rev 974)
+++ trunk/py/scripts/addons/io_anim_camera.py	2010-09-03 07:26:27 UTC (rev 975)
@@ -79,9 +79,9 @@
 
 
     for f in frame_range:
-        scene.set_frame(f)
+        scene.frame_set(f)
         fw("# new frame\n")
-        fw("scene.set_frame(%d + frame)\n" % f)
+        fw("scene.frame_set(%d + frame)\n" % f)
 
         for obj, obj_data in cameras:
             fw("obj = cameras['%s']\n" % obj.name)

Modified: trunk/py/scripts/addons/io_export_directx_x.py
===================================================================
--- trunk/py/scripts/addons/io_export_directx_x.py	2010-09-03 06:27:53 UTC (rev 974)
+++ trunk/py/scripts/addons/io_export_directx_x.py	2010-09-03 07:26:27 UTC (rev 975)
@@ -669,7 +669,7 @@
                 if len(AllKeyframes):
                     Config.File.write("{}2;\n{}{};\n".format("  " * Config.Whitespace, "  " * Config.Whitespace, len(AllKeyframes)))
                     for Keyframe in AllKeyframes:
-                        bpy.context.scene.set_frame(Keyframe)
+                        bpy.context.scene.frame_set(Keyframe)
                         Position = Vector()
                         Position[0] = ((PositionFCurves[0][Keyframe] if Keyframe in PositionFCurves[0] else Object.location[0]) if PositionFCurves[0] else Object.location[0])
                         Position[1] = ((PositionFCurves[1][Keyframe] if Keyframe in PositionFCurves[1] else Object.location[1]) if PositionFCurves[1] else Object.location[1])
@@ -678,7 +678,7 @@
                         Config.File.write("{}{}{:9f},{:9f},{:9f};;\n".format("  " * Config.Whitespace, (str(Keyframe - bpy.context.scene.frame_start) + ";3;").ljust(8), Position[0], Position[1], Position[2]))
                 else:
                     Config.File.write("{}2;\n{}1;\n".format("  " * Config.Whitespace, "  " * Config.Whitespace))
-                    bpy.context.scene.set_frame(bpy.context.scene.frame_start)
+                    bpy.context.scene.frame_set(bpy.context.scene.frame_start)
                     Position = Config.SystemMatrix * Object.location
                     Config.File.write("{}{}{:9f},{:9f},{:9f};;\n".format("  " * Config.Whitespace, ("0;3;").ljust(8), Position[0], Position[1], Position[2]))
                 Config.Whitespace -= 1
@@ -704,7 +704,7 @@
                 if len(AllKeyframes):
                     Config.File.write("{}0;\n{}{};\n".format("  " * Config.Whitespace, "  " * Config.Whitespace, len(AllKeyframes)))
                     for Keyframe in AllKeyframes:
-                        bpy.context.scene.set_frame(Keyframe)
+                        bpy.context.scene.frame_set(Keyframe)
                         Rotation = Euler()
                         Rotation[0] = ((RotationFCurves[0][Keyframe] if Keyframe in RotationFCurves[0] else Object.rotation_euler[0]) if RotationFCurves[0] else Object.rotation_euler[0])
                         Rotation[1] = ((RotationFCurves[1][Keyframe] if Keyframe in RotationFCurves[1] else Object.rotation_euler[1]) if RotationFCurves[1] else Object.rotation_euler[1])
@@ -713,7 +713,7 @@
                         Config.File.write("{}{}{:9f},{:9f},{:9f},{:9f};;\n".format("  " * Config.Whitespace, (str(Keyframe - bpy.context.scene.frame_start) + ";4;").ljust(8), - Rotation[0], Rotation[1], Rotation[2], Rotation[3]))
                 else:
                     Config.File.write("{}0;\n{}1;\n".format("  " * Config.Whitespace, "  " * Config.Whitespace))
-                    bpy.context.scene.set_frame(bpy.context.scene.frame_start)
+                    bpy.context.scene.frame_set(bpy.context.scene.frame_start)
                     Rotation = (Config.SystemMatrix * (Object.rotation_euler.to_matrix().to_4x4()) * Config.InverseSystemMatrix).to_quat()
                     Config.File.write("{}{}{:9f},{:9f},{:9f},{:9f};;\n".format("  " * Config.Whitespace, ("0;4;").ljust(8), -Rotation[0], Rotation[1], Rotation[2], Rotation[3]))
                 Config.Whitespace -= 1
@@ -739,7 +739,7 @@
                 if len(AllKeyframes):
                     Config.File.write("{}1;\n{}{};\n".format("  " * Config.Whitespace, "  " * Config.Whitespace, len(AllKeyframes)))
                     for Keyframe in AllKeyframes:
-                        bpy.context.scene.set_frame(Keyframe)
+                        bpy.context.scene.frame_set(Keyframe)
                         Scale = Vector()
                         Scale[0] = ((ScaleFCurves[0][Keyframe] if Keyframe in ScaleFCurves[0] else Object.scale[0]) if ScaleFCurves[0] else Object.scale[0])
                         Scale[1] = ((ScaleFCurves[1][Keyframe] if Keyframe in ScaleFCurves[1] else Object.scale[1]) if ScaleFCurves[1] else Object.scale[1])
@@ -748,7 +748,7 @@
                         Config.File.write("{}{}{:9f},{:9f},{:9f};;\n".format("  " * Config.Whitespace, (str(Keyframe - bpy.context.scene.frame_start) + ";3;").ljust(8), Scale[0], Scale[1], Scale[2]))
                 else:
                     Config.File.write("{}1;\n{}1;\n".format("  " * Config.Whitespace, "  " * Config.Whitespace))
-                    bpy.context.scene.set_frame(bpy.context.scene.frame_start)
+                    bpy.context.scene.frame_set(bpy.context.scene.frame_start)
                     Scale = Config.SystemMatrix * Object.scale
                     Config.File.write("{}{}{:9f},{:9f},{:9f};;\n".format("  " * Config.Whitespace, ("0;3;").ljust(8), Scale[0], Scale[1], Scale[2]))
                 Config.Whitespace -= 1
@@ -807,7 +807,7 @@
                         AllKeyframes = [bpy.context.scene.frame_start]
                     Config.File.write("{}2;\n{}{};\n".format("  " * Config.Whitespace, "  " * Config.Whitespace, len(AllKeyframes)))
                     for Keyframe in AllKeyframes:
-                        bpy.context.scene.set_frame(Keyframe)
+                        bpy.context.scene.frame_set(Keyframe)
                         
                         if Bone.parent:
                             PoseMatrix = (Bone.parent.matrix * Matrix.Rotation(radians(-90), 4, "X")).invert()
@@ -843,7 +843,7 @@
                         AllKeyframes = [bpy.context.scene.frame_start]
                     Config.File.write("{}0;\n{}{};\n".format("  " * Config.Whitespace, "  " * Config.Whitespace, len(AllKeyframes)))
                     for Keyframe in AllKeyframes:
-                        bpy.context.scene.set_frame(Keyframe)
+                        bpy.context.scene.frame_set(Keyframe)
                         
                         if Bone.parent:
                             PoseMatrix = (Bone.parent.matrix * Matrix.Rotation(radians(-90), 4, "X")).invert()
@@ -879,7 +879,7 @@
                         AllKeyframes = [bpy.context.scene.frame_start]
                     Config.File.write("{}1;\n{}{};\n".format("  " * Config.Whitespace, "  " * Config.Whitespace, len(AllKeyframes)))
                     for Keyframe in AllKeyframes:
-                        bpy.context.scene.set_frame(Keyframe)
+                        bpy.context.scene.frame_set(Keyframe)
                         
                         if Bone.parent:
                             PoseMatrix = (Bone.parent.matrix * Matrix.Rotation(radians(-90), 4, "X")).invert()
@@ -930,7 +930,7 @@
         Config.Whitespace += 1
         Config.File.write("{}2;\n{}{};\n".format("  " * Config.Whitespace, "  " * Config.Whitespace, KeyframeCount))
         for Frame in range(0, KeyframeCount):
-            bpy.context.scene.set_frame(Frame + bpy.context.scene.frame_start)
+            bpy.context.scene.frame_set(Frame + bpy.context.scene.frame_start)
             Position = Config.SystemMatrix * Object.location
             Config.File.write("{}{}{:9f},{:9f},{:9f};;\n".format("  " * Config.Whitespace, (str(Frame) + ";3;").ljust(8), Position[0], Position[1], Position[2]))
         Config.Whitespace -= 1
@@ -945,7 +945,7 @@
         Config.Whitespace += 1
         Config.File.write("{}0;\n{}{};\n".format("  " * Config.Whitespace, "  " * Config.Whitespace, KeyframeCount))
         for Frame in range(0, KeyframeCount):
-            bpy.context.scene.set_frame(Frame + bpy.context.scene.frame_start)
+            bpy.context.scene.frame_set(Frame + bpy.context.scene.frame_start)
             Rotation = Config.SystemQuaternion.cross(Object.rotation_euler.to_quat().cross(Config.InverseSystemQuaternion))
             Config.File.write("{}{}{:9f},{:9f},{:9f},{:9f};;\n".format("  " * Config.Whitespace, (str(Frame) + ";4;").ljust(8), Rotation[0], Rotation[1], Rotation[2], Config.FlipZ * Rotation[3]))
         Config.Whitespace -= 1
@@ -960,7 +960,7 @@
         Config.Whitespace += 1
         Config.File.write("{}1;\n{}{};\n".format("  " * Config.Whitespace, "  " * Config.Whitespace, KeyframeCount))
         for Frame in range(0, KeyframeCount):
-            bpy.context.scene.set_frame(Frame + bpy.context.scene.frame_start)
+            bpy.context.scene.frame_set(Frame + bpy.context.scene.frame_start)
             Scale = Config.SystemMatrix * Object.scale
             Config.File.write("{}{}{:9f},{:9f},{:9f};;\n".format("  " * Config.Whitespace, (str(Frame) + ";3;").ljust(8), Scale[0], Scale[1], Scale[2]))
         Config.Whitespace -= 1
@@ -990,7 +990,7 @@
                 Config.Whitespace += 1
                 Config.File.write("{}2;\n{}{};\n".format("  " * Config.Whitespace, "  " * Config.Whitespace, KeyframeCount))
                 for Frame in range(0, KeyframeCount):
-                    bpy.context.scene.set_frame(Frame + bpy.context.scene.frame_start)
+                    bpy.context.scene.frame_set(Frame + bpy.context.scene.frame_start)
                     
                     if Bone.parent:
                         PoseMatrix = (Bone.parent.matrix * Matrix.Rotation(radians(-90), 4, "X")).invert()
@@ -1014,7 +1014,7 @@
                 Config.Whitespace += 1
                 Config.File.write("{}0;\n{}{};\n".format("  " * Config.Whitespace, "  " * Config.Whitespace, KeyframeCount))
                 for Frame in range(0, KeyframeCount):
-                    bpy.context.scene.set_frame(Frame + bpy.context.scene.frame_start)

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-extensions-cvs mailing list