Forum

Run script python over blend4web

01 February 2017 18:44
Hello,
I have already create a project in blender with some boutons that run script python to modeling object 3D.
Now, I want to run my project with buttons ovec the web, that's why i install blend4web.
I want to display also my buttons or create a buttons which run my script python.
I already search on logic editor but i don't found the solution;
Can you help me with a tutorial or an example to do this?
Thanks
03 February 2017 00:35
is there any reply?
03 February 2017 10:24
Hello,
I have already create a project in blender with some boutons that run script python to modeling object 3D.
Now, I want to run my project with buttons ovec the web, that's why i install blend4web.
I want to display also my buttons or create a buttons which run my script python.
I already search on logic editor but i don't found the solution;
Can you help me with a tutorial or an example to do this?
Thanks

Good morning! What exactly you want from scrypt to do. Please specify it's action. Some of things can be implemented using logic node system, otherwise you need to code it in javascript (not python), or may be it can be done with combination of logic node system and a part of javascript code.

is there any reply?
I think we have a different timezone, so you wrote when we all already gone to sleep.
Blend4web and that kind of thing.
03 February 2017 11:23
Thank you for your reply.
my script contains boolean functions, then decimate, wireframe, subdivision, solidify.
I also create a GUI buttons to run my script. And now, i want to make all this in the web.
03 February 2017 11:51
my script contains boolean functions, then decimate, wireframe, subdivision, solidify.
Sorry, but Blend4Web dosn't support modifyers and their dynamic applying. You can apply all your modifyers and then export the result to the blend4web engine.

GUI buttons can be made using HTML code or Blend4Web logic node system.

So, I think you will need to remake all that you made in some different way than more native to the web. Instead of python you will need to use javascript, instead of Blender Game Logic you will need to use JavaScript code or Blend4Web Logic Node System if it fits your needs, and so on…

Can you tell us wat you want to achieve and we can offer you another solution which can be implemented using Blend4Web tools.
Blend4web and that kind of thing.
03 February 2017 12:26
I would automatically generate custom gloves on a 3D hand as I import it each time.
So, i want an interaction with modification in real time with the object3D.
is there any solution to do this process on the web?
03 February 2017 16:10
Hi!

You can use this method to copy an existing object.

Then you can use the the change_image function to change assigned texture or even the inherit_material method to assign another material to it. But keep in mind that the last method has many limitations at the moment.

In order to change the geometry you can use a low-level method override_geometry. The object has to have the "Dynamic Geometry" flag switched on in this case.
03 February 2017 17:09
ok thank you i will to do this.
Do you have an Example of application of these functions?
03 February 2017 17:50
You can find examples in the Documentation->Code Snippets section of the website.
E.g. here is an example of the change_image usage.
03 February 2017 18:42
I don't found somethings like what i want. and i don't know if i can generate the glove automaticly on measures of the hand 3D with a button.
i use in python boolean and decimate and wireframe and subdivision and solidify functions.
 
Please register or log in to leave a reply.