Re: Ocean Simulator: The research continues...
Moderators: jesterKing, stiv
-
- Posts: 0
- Joined: Tue May 18, 2004 8:11 am
Well I fired up NEdit again to have another crack as the code (as part of a break from my masters) and did some debugging.
Now the code looks at the bmx directory for modules, it checks for the extensions ".so" for unix and ".dll" for windows. If after doing further checks it finds that it is valid it adds it to a linked list, otherwise it finds the next entry in the directory.
As it is doing this you can just see the status bar move across the bottom of the splash screen (it is very fast) -- and very cool!
Since I havent made any BMX's yet this is as far as I can go for now: The module loading and swapping routines are in place and so is a reasonably capable core API but that will have to wait. but these still need to be debugged.
I have already have in my mind some ideas of how to expand the current API method so as to allow python methods to be called directly from C and C methods to be called directlly from Python however this will have to wait as I would like to get some "clay" to work with before I go about doing any cool stuff.
Anyway, This project still hasn't been forgotten.
Kind Regards
Simon Harvey
Now the code looks at the bmx directory for modules, it checks for the extensions ".so" for unix and ".dll" for windows. If after doing further checks it finds that it is valid it adds it to a linked list, otherwise it finds the next entry in the directory.
As it is doing this you can just see the status bar move across the bottom of the splash screen (it is very fast) -- and very cool!
Since I havent made any BMX's yet this is as far as I can go for now: The module loading and swapping routines are in place and so is a reasonably capable core API but that will have to wait. but these still need to be debugged.
I have already have in my mind some ideas of how to expand the current API method so as to allow python methods to be called directly from C and C methods to be called directlly from Python however this will have to wait as I would like to get some "clay" to work with before I go about doing any cool stuff.
Anyway, This project still hasn't been forgotten.
Kind Regards
Simon Harvey
-
- Site Admin
- Posts: 207
- Joined: Fri Oct 18, 2002 12:48 pm
- Location: Finland
I'd be happy if the API for scripting would be as 'generic' as possible. I'm currently working on embedding Lua in Blender (and extending it with Blender data, naturally. See BLU on the wiki). Having a 'generic' API for that could potentially allow for other scripting languages to be added to Blender. I don't know if it is desirable at all (or possible). Anyway, this is probably something that could/should be discussed with the BPy team, too.simonharvey wrote:I have already have in my mind some ideas of how to expand the current API method so as to allow python methods to be called directly from C and C methods to be called directlly from Python however this will have to wait as I would like to get some "clay" to work with before I go about doing any cool stuff.
/Nathan
-
- Posts: 0
- Joined: Tue May 18, 2004 8:11 am
AgreedjesterKing wrote:Anyway, this is probably something that could/should be discussed with the BPy team, too.
I am thinking that the only thing that the Bpy team need to know is how to create/access and release an interface, the actual interfaces themselves would be created by individual developers who would not need the blessing of the python team to implement and use other modules.
In terms of implementation details it is going to be more like JNI meets makesdna so it would really be more of an architectual thing (think ton & the gang). However all of this is in the future and should be treated as vaporware for now.
Kind Regards
Simon Harvey
-
- Posts: 0
- Joined: Tue May 18, 2004 8:11 am
Hi All
I thought that an update would be in order: I am almost in at the hand in stage with my Masters, with the last boring parts to do (tedious).
I have been doing some loose coding every now and then on ModBlender: It can now dynamically load up a test BMX however it seems to crash when it gets to the debuging APIs (oh the irony!!!).
I am sorry for the lack of progress and updates over the last several months, I spend about 30min/day on the blender.org forums looking for anything intresting when I could perhaps be doing something alot more fruitful such as coding, debugging or (gasp!!) finishing my masters thesis!!!
Anyway, there are lots of changes that I would like to make to the code but right now it is just trying to get something out of the door.
Kind Regards
Simon Harvey
I thought that an update would be in order: I am almost in at the hand in stage with my Masters, with the last boring parts to do (tedious).
I have been doing some loose coding every now and then on ModBlender: It can now dynamically load up a test BMX however it seems to crash when it gets to the debuging APIs (oh the irony!!!).
I am sorry for the lack of progress and updates over the last several months, I spend about 30min/day on the blender.org forums looking for anything intresting when I could perhaps be doing something alot more fruitful such as coding, debugging or (gasp!!) finishing my masters thesis!!!
Anyway, there are lots of changes that I would like to make to the code but right now it is just trying to get something out of the door.
Kind Regards
Simon Harvey
-
- Site Admin
- Posts: 207
- Joined: Fri Oct 18, 2002 12:48 pm
- Location: Finland
-
- Posts: 0
- Joined: Tue May 18, 2004 8:11 am
-
- Posts: 0
- Joined: Tue May 18, 2004 8:11 am
Can anybody spare ~12MB of server space on an HTTP server to upload the source files to?simonharvey wrote:Shouldn't be far away
It must have an HTTP interface (ie. web form). I am sorry if this asking for too much but I have tried FTP and SFTP but I am just getting no love with these.
Kind Regards
Simon Harvey
mailto kidb at kidb dot desimonharvey wrote:Can anybody spare ~12MB of server space on an HTTP server to upload the source files to?simonharvey wrote:Shouldn't be far away
It must have an HTTP interface (ie. web form). I am sorry if this asking for too much but I have tried FTP and SFTP but I am just getting no love with these.
Kind Regards
Simon Harvey
-
- Site Admin
- Posts: 207
- Joined: Fri Oct 18, 2002 12:48 pm
- Location: Finland
-
- Posts: 0
- Joined: Tue May 18, 2004 8:11 am
Indeed!jesterKing wrote:Three cheers for kidb's mirrorring and download services!
Anyway, I thought that I should write this up just to prepare thoes who have a proper build system of what to expect. These points are in no order.
1. This has been written for my linux system (Fedora Core 1), it uses the blender defiled APIs for DLL loading however there may be some problems on non-UNIX-like operating systems. Code has been added to allow for it to theoretically load up windows DLLs but this of course hasnt been tested.
2. the main code can be found in:
$ROOT$/source/blender/src/module-core.c
most of it hasnt been debugged for this release, just the basics:
* module loading; and
* core API functionality
The module code, ie. MOD_SendMessage() is there, but it just hasnt been debugged because i have been with this project for a very long time now and I just wanted to have something public to show for it.
3. You will need to treat this as a Blender 2.31 installation, since that was the code base that I started off with. I would have tried other, much more recent releases, but I always had TTF library problems (the headers).
4. The status bar on the splash screen whips accross so fast that it looks like it has done nothing, This would change with more modules.
5. The api->error() API write its output to an error log in: $ROOT$/logs (ie. an added directory) which is closed and flushed after every,
Code: Select all
api->error("Some thing really, really bad happened, and after this error gets written to this file then blender is going to crash\n");
Example:
Code: Select all
Module error log, created: Mon Nov 21 12:22:11 2005
*************************************************************
Error:
Error string 7 - my lucky number!
Descr: Module ID: 0 Class: NULL
Binary: Trans-application binary
Code: Select all
api->error("Error string %d - my lucky number!\n", 7);
Anyway,
Once kidb get the emails through (hopefully the 10MB limit has not been set on his account!) the two archives will be concatinated and you all can have a play.
Kind Regards
Simon Harvey
http://blendertestbuilds.de/index.php?d ... /20051121/simonharvey wrote: Anyway,
Once kidb get the emails through (hopefully the 10MB limit has not been set on his account!) the two archives will be concatinated and you all can have a play.
Kind Regards
Simon Harvey
-
- Posts: 0
- Joined: Tue May 18, 2004 8:11 am
-
- Site Admin
- Posts: 207
- Joined: Fri Oct 18, 2002 12:48 pm
- Location: Finland
-
- Posts: 0
- Joined: Tue May 18, 2004 8:11 am
Well, now that I have handed in and looking for a job I have had some time left over for debugging module-core.c, and in doing so have had to create some extra modules:

The reason why I gan give you this screenshot is because somewhere is an infinite loop causing the bootup sequence to freeze...
The next release will have basically the message passing subsystem working as well as some more of the APIs (memory, DLL loading and the APIs assioacated with module instanting). And, maybe after that some kind of a module build system (based on scons of course) however that is for the future.
I have been playing around with code from JamVM (the JNI stuff) that allows Intel i386 users to call a C style function dynamically (using a function prototype provided at runtime as opposed to compile time). This is going to be handy when a C interface gets added such that you want to call it from python but cant use a specially written C wrapper.
That is all from now,
Kind Regards
Simon Harvey

The reason why I gan give you this screenshot is because somewhere is an infinite loop causing the bootup sequence to freeze...
The next release will have basically the message passing subsystem working as well as some more of the APIs (memory, DLL loading and the APIs assioacated with module instanting). And, maybe after that some kind of a module build system (based on scons of course) however that is for the future.
I have been playing around with code from JamVM (the JNI stuff) that allows Intel i386 users to call a C style function dynamically (using a function prototype provided at runtime as opposed to compile time). This is going to be handy when a C interface gets added such that you want to call it from python but cant use a specially written C wrapper.
That is all from now,
Kind Regards
Simon Harvey
Mmmmm
Is this going to be added to blender before Xmas 05?