Problem with redrawing scene

Hi guys,

I currently writing a script to import an own file format to Blender. The script works so far. But I have a problem with redrawing the scene if I use the script when it’s placed in Blender’s script folder. If I press “Run script” in the editor window in works great. Only if I use the file menu and the option import scripts it does not work the right way.

Here are two screenshots. The first shows the result of using the file menu. But if I select all objects in the scene and press the G-Key all objects jump to their right positions (see the second image). I tried to use some kinds of redrawing functions like Blender.Redraw(), scene.update() or Window.Redraw() but nothing works.

http://cip.uni-trier.de/%7Elutz//praktikum/prob0.jpg

http://cip.uni-trier.de/%7Elutz//praktikum/prob1.jpg

Can anybody help me please?
Thanks.
KoRn

Hello,
sorry i cannot help you much, but i think it might be a bug in Blender.
I have noticed a very similar thing: If you parent an object to another via python, then move the parent object, the child does not move with it. Then, if you select the child and press the “G”-key the child jumps to its correct position.
I tried scene.update(1) also - hoping it would update the object hierarchy somehow - no luck.
If you parent the object with CRTL+P, everything is fine.
Michael

Very strange problem.
But it works if I use Blender’s editor to run the script.
Does anybody else knows a solution?