[Bf-committers] Blender Web Plugin compile (patch)
Marcelo Coraça de Freitas
mfreitas at ydeasolutions.com.br
Mon Aug 18 15:01:44 CEST 2008
Sorry I am only responding your e-mail now (even though I sent other -
short - message this weekend).
Em Dom, 2008-08-17 às 15:13 +0200, Enrico Fracasso escreveu:
> Hi all,
> Some weeks ago I managed to compile the blender web plugin and I've
> just sent the patch on the bug tracker (#17489).
> (sorry Marcelo for the delay, buy I was on vacation and I missed your mails)
No worries! Actually, that's awesome. Now I've got someone to talk to
about this issue and another working source code to play with.
> The web plugin doesn't work for a double locking issue, but it
> compiles fine and it can show a banner on execution if you "disable"
> the rendering of the animation (details are on bug post).
This issue was one of the reasons I decided to try writing it from
scratch. I'm assuming there might be some issue on mixing Java with C
code and also that blenderplayer has no known issue on running to
instances at the same time.
With that said, writing a working thread safe plugin would be simply
writing a plugin that spanned each instance into a forked process from
which the engine would run. Not as efficient as we would like but, as we
don't have someone working on this full time for now, IMHO it's the best
We have the intent to hire someone to work full time on this issue and
maybe even assemble a team with the help of other companies with
interest in this feature
> I haven't sent the patch early because I hoped to solve the locking
> problem first, but I can't work on this problem full time and maybe
> this patch can be useful to someone else.
Yes, it'll be very helpful! Thanks!
> I don't know if, after the double locking issue is solved, the plugin
> "just work"; maybe it's easier to rewrite the plugin from scratch (ie,
> rewrapping blenderplayer) as Marcelo is doing now.
I have several reasons for trying this approach (even though I know I
might end up with some code that is very close to the one that exists
1. no Java requirement - I know there is the compiled class already
in the subversion tree, but java is well... java got it's limitation.
I'd rather stick with the C++ limitations only as it's the language used
in the engine itself.
2. I don't know how deeper I'd have to change the plugin to implement
all the new features present in the standalone player. Starting from
what's already the most featured code would give me some pointers on how
to put everything together.
3. The gecko API for plugins is quite confusing. The developer docs
talk about some interface, but when you get to see the examples it's a
totally different one (each example implement it's own). So, after a
couple of days of headache I found where the mess is: there is no
standard API except for two functions (one to initialize and set all the
functions you'll use for each task and another to finalize the plugin
code). If I've started by the plugin I'd probably not know about this
right now and it could lead me to tons of difficulties in the future.
> Reading the source I understand how the web plugin worked (do you want
> I write some docs somewhere?), but what does Ketsji mean?
I'd love to get some pointers from you. Blender is quite a big project
and understanding it's code is a quite complex task. Having some help
would be very appreciated!
Right now I am confused - lots of names.. no complete documentation..
What I intended to do right now is to implement GHOST_IWindow and
GHOST_ISystem in a way they can use an embeded window. After that, using
fork() I'll assemble a simple plugin, based on the stand alone player.
All this plugin will do is load a .blend file already somewhere in the
Once it's working I'll work on the streaming code. At this point I'll
submit a patch (even though without Python sandbox - which I have no
idea on how to provide).
Am I in the right path?
Also, could please someone clarify some things:
. is Ketsji a deprecated code?
. should I call the physics, 3d rendering, sound, ... engines by
hand or should I use an already-implemented class?
More information about the Bf-committers