fix for [#18772] c3d_import script crashes

Patch from Roger Wickes update to 2.48 sFrame, eFrame, fps.


[#18794] GE API conversion script: 2.48 -> 2.49
patch from Alex Fraser (z0r), will test further in the next few days.
 --- 
This is text plug in and standalone script that updates Blender 2.48 Game Engine scripts to be compatible with the 2.49
API.

The script contains a mapping of attribute names to functions that do the conversion. Most of the mappings were extracted
from the documentation in GameTypes.py. Where the conversion is ambiguous, the script will not change the source except
to insert a warning as a comment. This means that the script does not completely automate the conversion process, but
will do a lot of the work.

The script still needs a fair bit of testing. Many of the mappings have not been tested and could result in broken scripts.
I'm submitting this patch now to start the review process early. I think I might need help if it is to be included in
2.49.
This commit is contained in:
2009-05-20 23:31:58 +00:00
parent fcdb34f593
commit 3daa8bd4ef
3 changed files with 764 additions and 5 deletions

View File

@@ -527,9 +527,10 @@ def setupAnim(StartFrame, EndFrame, VideoFrameRate):
if VideoFrameRate>120: VideoFrameRate=120
# set up anim panel for them
context=scn.getRenderingContext()
context.startFrame(StartFrame)
context.endFrame(EndFrame)
context.framesPerSec(int(VideoFrameRate))
context.sFrame=StartFrame
context.eFrame=EndFrame
context.fps=int(VideoFrameRate)
Blender.Set("curframe",StartFrame)
Blender.Redraw()
return