I did some more work for python https://github.com/realXtend/naali/commit/b2a25515c384e53bd5c6382bec541711edd2948c
New tundra.py that you import and use the core APIs: https://github.com/realXtend/naali/blob/tundra2/bin/pyplugins/tundra.py New apitests.py that you can run using Tundra.exe --pythonapitests to verify everything works: https://github.com/realXtend/naali/blob/tundra2/bin/pyplugins/lib/apitests.py I'm quite pleased how clean I got the main PythonScriptModule.cpp https://github.com/realXtend/naali/blob/tundra2/src/Application/PythonScriptModule/PythonScriptModule.cpp Gutted it from almost 3000 lines into 600. The python side is now missing the modulemanager.py implementation (the circuits one), but that seemed to be full of legacy things as well. I think we will see how we implement that in the new things. I guess many people liked doing those Circuits.Component or did they? I mean now that we have the FrameAPI you can get frame updates without the whole modulemanager/circuits doing it for us. I think it could be enough if we just implemented a thing that loads startup .py plugins just like the js ones are defined now aswell in the startup config (see here https://github.com/realXtend/naali/blob/tundra2/bin/viewer.xml) Imo we should just make python script loading with the same system and forget all the rest. We will see what toni thinks when he gets back from holiday. Todo for PythonScriptModule: - .py plugin load system on startup - Expose new math lib to python (at least what EC_Mesh, EC_Placeable etc require for full functionality). - Possibly make a system for exposing classes outside PythonModule to PythonQt so that it does not have to link to everything. I'm not really sure how this can be done. Either PythonModule needs to link to everything vital or other stuff needs to link to PythonQt or something. I guess the first option is much better. Best regards, Jonne Nauha Adminotech developer On Sat, Jul 23, 2011 at 12:00 AM, Jonne Nauha <[email protected]> wrote: > That would be helpful if you can give concrete use cases. But I recon youll > do mighty well if we just expose all the SDK APIs and the full chain of > scene -> entity -> component -> attribute. The problem with the old python > module is that there are all kinds of special getters and setter and own > magic how to access things. We must fix this and make it similar to C++ and > JavaScript, all languages should access things in Tundra with same calls to > framework objects/APIs. > > Tundra 2.0 is just a name/version, it could be as well Tundra 1.1 or 1.5. > It just means "we are making big changes, just look at the version number". > Meaning that when you start working with the 2.0 SDK you should already know > that you might need to port some code lines to newer calls etc. :) I can't > say for everyone but we at Adminotech want to move to 2.0 full time, we > think its a step in the right direction. So far what I have seen, 2.0 brings > alot of nice new features, polishes the code that was already there, removes > years of "legacy" code and cruft that we really don't need. I am confident > once people get to see the new stuff they will be happy to move along. The > advantages for developers are huge, easier code base to work all around. So > when Qt releases 4.8 I don't think anyone there still works on 4.7 or 4.6 > versions of the code base, so I dont see a reason for us to do so either :) > > CIE has their own c++ code and scripts, and I actually visited there > yesterday. But with the talks I have had with them they want to move to the > new stuff when their timetables allows it. I/we need to properly first port > existing code into 2.0 and have a solid working build on linux before they > can jump along. But knowing the guys there and the code they are working > with, this will be a trivial max day per module port. It took me 10 minutes > on some modules to have a working 2.0 plugin from old module code :P > > I can tell everyone aswell that the dreaded code port from tundra to tundra > 2.0 is very very simple and minimal work for the benefits you will actually > enjoy once its done. I haven't ported JavaScript or python yet, but I cannot > see more than search and replace stuff and some minor things with the new > math lib that you will need to "learn". So I encourage people not to fear > this jump too much even if the talks were controversial here at some point. > I might have been the most afraid how much our company code will have to be > changed, but now I see no problems :) If you have probs please use the > mailing lists, we are here to help. > > Long live 2.0! > > P.S. But as you said propably good to wait for our first rex release, we > will do that once we get things sorted out. That might take some weeks > though as everyone is on holiday and I cant make decisions alone even if I > am the windows "release master". > > Best regards, > Jonne Nauha > Adminotech developer > > > On Fri, Jul 22, 2011 at 9:46 PM, ilikia <[email protected]> wrote: > >> Thanks again, I'll look at it next week. Might even try to think about >> what kinds of methods the new tundra.py module would need. >> >> On Jul 22, 9:25 pm, Jonne Nauha <[email protected]> wrote: >> > Alright Ilikia I committed my stuffhttps:// >> github.com/realXtend/naali/commit/f2bd3a2ade72223a4262c80af7e... >> > >> > < >> https://github.com/realXtend/naali/commit/f2bd3a2ade72223a4262c80af7e.. >> .>Please >> > do read the commit msg and understand i did not test this yet. You may >> do >> > that if you check out our tundra2 branch like instructed earlier. I >> don't >> > have time to test and finalize it now :) But it builds now. One thing I >> > changed is the python '_naali' import to '_tundra'. So we need to make >> > tundra.py that does the equivalent things as naali.py before (provides >> all >> > the nice funcs and APIs). >> > >> > Best regards, >> > Jonne Nauha >> > Adminotech developer >> > >> > >> > >> > >> > >> > >> > >> > On Fri, Jul 22, 2011 at 8:08 PM, Jonne Nauha <[email protected]> >> wrote: >> > > Actually we have discussed this with Jukka from Ludo (and with Toni >> for >> > > many years moving sources to /src). What was discussed with Jukka >> before he >> > > left for summer holidays was the SDK vs. app level split being more >> strict. >> > > I have only done initial steps to do this separations. And >> > > I acknowledge that after everyone gets back things might still change, >> so >> > > its been on my mind. >> > >> > > The idea Jukka had was to move the application layer to a different >> repo, >> > > that would then be fetched as a git submodule on top of the SDK, or >> even >> > > just pointing TUNDRA_SDK_ROOT to the app layer build system (this >> would be >> > > optimal imo). And the work I have been doing now supports all those >> > > possibilities once we decide something concrete. >> > >> > > P.S Yeah dont spend too much on code, have a nice holiday ;) >> > >> > > Best regards, >> > > Jonne Nauha >> > > Adminotech developer >> > >> > > On Fri, Jul 22, 2011 at 6:44 PM, Ali Kämäräinen <[email protected] >> >wrote: >> > >> > >> The new math classes are not currently exposed to Python. The math >> classes >> > >> are not QObjects, nor will be afaik. The QScriptBindings bindings >> generator >> > >> (found in JavascriptModule) can be probably extended to generate >> Python >> > >> bindings too. Whether they will be done using the decorator technique >> or >> > >> not, I don't know atm. The shape of PythonScriptModule and >> bin/pymodules is >> > >> horrible indeed, hear hear, and some major cleanup is needed. >> > >> > >> I haven't paid much attention to the stuff that you have been working >> on >> > >> the tundra2-wip branch as I'm currently on my summer vacation, but >> what I've >> > >> glanced, there seems to be some good stuff happening there. But if I >> were >> > >> you, I wouldn't spend too much of a time yet fully restructuring the >> whole >> > >> project on my own as no other Tundra developer party have been >> consulted in >> > >> any way on the matter, nor any meetings (irl or irc) have been held. >> So my >> > >> advice would to hold your horses a bit, and it to start working on >> this >> > >> matter later in August. >> > >> > >> Grey skies, >> > >> Ali Kämäräinen >> > >> > >> -- >> > >>http://groups.google.com/group/realxtend >> > >>http://www.realxtend.org >> >> -- >> http://groups.google.com/group/realxtend >> http://www.realxtend.org >> > > -- http://groups.google.com/group/realxtend http://www.realxtend.org
