The idea is to have a startup shell (I call it ‘pod’) to begin from scratch a panda3d application using the power of Wxwidgets to ease as much as possible the job.
The stuff is known to work on panda3D 1.5.4 and 1.6.x on a linux desktop and on windowsXP with python 2.5 or 2.6 and WxWidgets 2.7.8 and 2.8.9
I should point out that there’s a similar thing to this available already in the Panda3D source code. It’s called the WxAppShell and it will be available in 1.6.0 and later. This code looks more or less like the WxAppShell though – what is exactly the difference between them?
[size=92]I should also mention that (in case you took code from either the WxAppShell or the Panda3D Editor from the other thread) the BSD license (afaik) does not permit relicensing (even if you specify “no license”) with or without modified code.[/size]
Yes i saw it and that inspired me this but this it very different - that was an empty wx shell with just a base.userExit() P3D code and mine is a complete and working environment where you can start from scratch coding you P3D app without doing anything else. I hope the fact it have a similar menu and about messagebox will not raise licensing issues…
Anyway I’m curious to know what David think about it
I have used your code well, thanks for it.
I created a wx.Frame decendant which allows you to have multiple frames open on the same or different parent window.
I have finally managed to set up a nodepath attached to the camera node of each frame upon which a gui is rendered with scale set like aspect2d to duplicate the wx coordinate system.
Also I have attached a 3d model underneath the mouse cursor (or in place of) which, along with the other hud items (which are soon to be click3d/drag3dable) is also parented under the perspective lense of the frames camera nodepath to allow 3d scenes to look more realistic when viewed as hud items.
The source will be put to use in my current project ($) so I wont be releasing it unles you post which specific project of yours it is for.
Next I plan to find a way to autogenerate all of the widget classes using the other half of the project - an app designer/compiler which uses my panel3d for the interface. I am planning on using a ZUI.
I actually ain’t get where you are planning to go Derek, but sound you’re starting something big. I’m looking forward to see it when you got some to show.
About my piece of code, it is not intended to develop any particular project but to have a generic starting point to build p3d apps with the commodity of wxWindows library and as less effort as possible.
Soon I’ll post an update with new stuff so stay tuned!
nice stuff Derek! this is something I would do by myself sooner or later but if you got some to share do not hesitate to send me or post here - if I think that could be useful I’ll fit into the project.
People, as I said before I got a first less drafty revision of this snippet. I have tons of ideas to add but for now I guess could be a nice start.
Check the first post of this thread, download and play and maybe tellme what you think about.
I’m getting similar errors too (GLXBadDrawable), it happens because panda’s window gets reparented before the wx window is fully opened.
In p3dwxpod.py, replace the line that says “self.init_end()” with something like this:
squish the bug correctly pointed out by the always precious pro_rsoft has gone, BUT looks like there is more: in my rig 2 (see my signature) the Ubuntu flavor, I can’t say if it is a matter of something changed in the P3D 1.6 or the ATI drivers but I’m experiencing a bad behavior whit the Panda overlay (either using my pod or the usual panda window) revealing out whatever window I put in front of it and therefore the wx menus are not visible 'cos are covered by the P3d overlay. Download again the pod and see for yourselves.
hey thankyo dude, I’m glad you like it - would you believe I started to make it to replace pview? then the little snippet has grown since then - it is under the hood of my p3ddojo - but it is open enough to make any kind of p3d app.
@astelix: In fact that’s the very problem I was talking about (with graphics drivers), I also have an ATI card (and I can’t do anything about it, it’s a laptop…). I filed this bug if you want to take a look: bugs.freedesktop.org/show_bug.cgi?id=21600