Controlling blender animation using a java application prog.

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
abcdef
Posts: 0
Joined: Mon Sep 18, 2006 5:23 pm

Controlling blender animation using a java application prog.

Post by abcdef » Mon Sep 18, 2006 8:24 pm

Hi all,

I am new to this group. I want to clarify a doubt. The doubt is illustrated as follows:
" I have a java application program that finds the shortest path among objects of different shapes. The application does various graphical operations like tilting,etc. Now i would a create a similar image of the object in blender. I want the object in blender to be controlled by the java application. I mean blender animation should function just as the java application program is functioning right now independent of any animation software".

Please do reply, its URGENT.

Thanks & Regards

abcdef
Posts: 0
Joined: Mon Sep 18, 2006 5:23 pm

Post by abcdef » Mon Sep 18, 2006 8:27 pm

Hi again,

I also want to know is there a way to do the above job by python scripting? If yes, how?
Any points please share.

Thanks & Regards

an-toni
Posts: 0
Joined: Wed Mar 17, 2004 5:20 pm

Post by an-toni » Tue Sep 19, 2006 4:56 pm

there seems to be some on-going work to enable using java libs from c-python (which is embedded in Blender), http://jpype.sourceforge.net/ - dunno about the status of that, never even heard of that earlier (i do use jython when need to run things on jvm)

otherwise you can use sockets or some other remote method calling solution

in both those cases i'm imagining activiting the animation running from Blender, which activates the script that then calls the java lib to do the math, return valuables and then the script in blender modifies the scene accordingly.

~Toni

EDIT: oh my, jpype seems to work - there is a more recent release, and this much seems to have worked already a couple of years ago (this from a normal ipython session, would work similarily inside Blender)

In [25]: from jpype import startJVM, getDefaultJVMPath, java

In [26]: startJVM(getDefaultJVMPath())

In [27]: java.lang.System.out.println('Hello world')
Hello world

there you have a JVM running inside python, in case of blender it would just run inside the blender process :p

Post Reply