[Bf-taskforce25] Game Settings - rna questions, discussion and UI.
Ton Roosendaal
ton at blender.org
Wed Jul 8 18:02:59 CEST 2009
Hi,
> 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?
Forsofar the game settings relate to running a specific game, Scene is
a good place to put this. I wouldn't abuse struct RenderData though,
make a new GameData or so?
If the settings relate to hardware profiles (opengl etc) there's an
unresolved issue still... in Blender it's in userpref, which is also
not accurate. Such profiles should belong somewhere else, similar as
for configuring Blender itself.
> 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?
Once you remove data from DNA files, the variables get stripped on file
reading, and before you can do a do_versions() patch. This is quite
obvious... the data has to be mapped to the existing C structs, and
non-existing members in structs are just not addressable!
I would try to define which of those variables are crucial to read, and
which you can expect people to set again. Just leave in some old
variables, and add a comment in DNA source about their deprication
state. In a few years or so we kick them out.
-Ton-
------------------------------------------------------------------------
Ton Roosendaal Blender Foundation ton at blender.org www.blender.org
Blender Institute Entrepotdok 57A 1018AD Amsterdam The Netherlands
On 6 Jul, 2009, at 0:56, Dalai Felinto wrote:
> (I sent to the wrong mailing list, sorry. Sending again :)
>
> 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 :)
> _______________________________________________
> Bf-taskforce25 mailing list
> Bf-taskforce25 at blender.org
> http://lists.blender.org/mailman/listinfo/bf-taskforce25
>
More information about the Bf-taskforce25
mailing list