Page MenuHome

create an area for the context at start time (for "auto start game" Blender files)
Closed, ArchivedPublicPATCH

Description

Campbell, can you take a look at auto_2.patch ?

It assigns an area to the context at Blender launch time (when autoplay is on). To test creates a file with auto start on (in the Game Menu), save it and open it with Blender.

Notes/Remaining issues:
1) (G.fileflags & G_SCRIPT_AUTOEXEC) is always false in creator.c::1044
Therefore it was commented out

2) I'm taking the first 3D View found in the screen. I can worry about picking the biggest one later

3) Blender Interface hasn't been drawn at this time. Therefore the Blender UI outside the 3dview editor is black. If VIEW3D_OT_game_start eventually becomes a modal operator - as I saw Brecht suggesting once - it would be naturally "fixed".

4) So far it's working only for autoplay. It could be extended for a generic function for other operators launched with -P not to break (or not to have their pools returning 0).

Thanks,
Dalai

Event Timeline

updated the patch after recent fix on creator.c.
auto_3.patch

Bastien Montagne (mont29) changed the task status from Unknown Status to Unknown Status.Aug 10 2014, 12:54 PM

Sounds like archive time!