Can I use blender as library (with out gui)

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

DreamArtist
Posts: 20
Joined: Thu Aug 24, 2006 8:35 pm

Can I use blender as library (with out gui)

Postby DreamArtist » Mon Jul 23, 2012 3:14 am

Hi,
I am trying to see if I can use blender as library for simulations without loading gui. I think I can compile it as a library. I want to use something like:

mesh = getmesh()
updatemesh()
rotatebone()
save()

But I am worried if the current "main" function does some initialization inside gui. Moreover, all these functions might be updating some gui events. Can some one clarify that I don't need to touch the gui for running blender as c library? Or is it a very hard thing to ignore in current blender's design?

Thanks a lot
-DA

spaces
Posts: 22
Joined: Sat Sep 10, 2011 7:03 am

Re: Can I use blender as library (with out gui)

Postby spaces » Mon Jul 23, 2012 4:20 pm

You would be better to do your simulation in Blenderplayer.

I have seen the Blender code. You don't wanna do this. :D

If you really want to this you can lookup the dude who controlled a robotic arm with Blender. Pretty neat stuff but not for the faint hearted. :D

stiv
Posts: 3646
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Postby stiv » Mon Jul 23, 2012 6:24 pm

The command "blender -h" is your friend here.

Specifically, the -b flag for running a job in background mode and the -P flag for running python scripts.

DreamArtist
Posts: 20
Joined: Thu Aug 24, 2006 8:35 pm

Postby DreamArtist » Sun Jul 29, 2012 10:20 pm

Thanks a lot for the replies. spaces, can you please point me to some link/code reg. the guy who controlled robot's arm?


Return to “Coding Blender”

Who is online

Users browsing this forum: No registered users and 0 guests