[Bf-committers] Game Settings - rna questions, discussion and UI.

Dalai Felinto dfelinto at gmail.com
Mon Jul 6 00:52:59 CEST 2009


Hello there. I started wrapping gamesettings and have a few questions
regarding this:

1) in 2.4xx we have game settings sorted all around Blender (Scene,
RenderData, ...). So far I moved all variables in the Game Settings
menu (not the top game menu) to scene.
Is that right? From RNA docs we are going to have a G.main. Is that
still correct?

1.b) Can I delete the old variables from the DNA file and still copy
the values from the file? I read that blend files store their own DNA,
is that true? How can I do it?
eg:: I need to do: sce->gs.fullscreen = sce->r.fullscreen;
But there will be no more r.fullscreen element available in DNA data
(DNA_scene_types.h)

2) Is there any UI design already approved for GameSettings? What are
going to be in the GameMenu, and what can be in the Property panel of
Logic Space?
2.b) My proposal: Gui Settings under space_logic.py replacing Logic Properties:

full script: [1]
# # #
class LOGIC_PT_properties(bpy.types.Panel):
 __space_type__ = "LOGIC_EDITOR"
 __region_type__ = "UI"
 __label__ = "Game Settings"

 def draw(self, context):
  layout = self.layout
  gs = context.scene.game_settings
  flow = layout.column_flow()
  flow.itemR(gs, "resolution_x", slider=False)
  flow.itemR(gs, ...)
# # #

However the data is read-only there. Why? How can I work that out?
I tried putting it in the buttons_scene.py and they work fine there
(it can be edited).

3) My GUI proposal [2]. I'm planning indeed to create a variable to
store [no_stereo, stereo, dome] so we can have the buttons according
to this variable (instead of an enum with all stero options including
no_stereo and dome). I can't see how to make the gui as the image
without changing that.

The [Launch View] button would be to launch a 3D view with exactly the
player size. Handy for BGE GUI tests.

[1] - ui python code: http://www.pasteall.org/6466/python
[2] - gui proposal - http://blenderecia.orgfree.com/blender/25_gs_gui.png
[3] - the wip patch - http://blenderecia.orgfree.com/blender/game_settings.patch

Your thoughts and help on that will be very appreciated :)
Best regards,

Dalai
* extra note: I'm loving 2.5 code. It looks organized, clean, fast to
work with :)


More information about the Bf-committers mailing list