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

Campbell Barton ideasman42 at gmail.com
Mon Jul 6 04:31:41 CEST 2009


Not sure if you saw these mockups William made.
http://www.reynish.com/files/blender25/gameproperties_scene.png
http://www.reynish.com/files/blender25/gameproperties_object.png

While I like them in general they do mix settings from object/world a bit.
as far as I know this is all thats been done so far towards the BGE ui.

Excuse the brief answers...
1) don't have a strong opinion as to where these settings should go,
G.main, should be replaced by CTX_data_main(C))
1.b) no
2) no, not afaik.

re: data being readonly, there is a readonly option in RNA
RNA_def_property_clear_flag(prop, PROP_EDITABLE);

On Sun, Jul 5, 2009 at 3:56 PM, Dalai Felinto<dfelinto at gmail.com> 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
>



-- 
- Campbell


More information about the Bf-taskforce25 mailing list