Selectable object follows path
06 June 2016 16:10
Hi,
I am a newbie and from this tutorial : https://www.blend4web.com/en/article/23/
I try to have a selectrable object (cube) follows bezier curve.
With ctrl P : I have attached cube to curve and in Obect->Animation->Bake Action
But when I run the app, the cube selection doesn't work.
The other objects with simple keyframe (I) works well.
Any idea ?
06 June 2016 16:55
06 June 2016 17:37
06 June 2016 18:08
06 June 2016 18:25
I think I don't know what does it mean "export to engine"…Hello!
In apps_dev, I make python3 project.py -p myproject compile
And I use .html in deploy/apps
Isn't it enough to "export to the engine" ?
"compile" command doesn't export the scene. It is for engine compiling/updating (depends on the type of the project).
To export your blender scene you need to use:
python3 project.py -p myproject reexport
Besides you can check in the browser console if your cube is really selectable:
var obj = b4w.scenes.get_object_by_name("obj_name");
obj.render.selectable
06 June 2016 18:42
My cube is selectable, but it doesn't move along the curve when I select it……
«function main_canvas_click(e) {
if (e.preventDefault)
e.preventDefault();
var x = e.clientX;
var y = e.clientY;
var obj = m_scenes.pick_object(x, y);
if (obj) {
if (_previous_selected_obj) {
m_anim.stop(_previous_selected_obj);
m_anim.set_frame(_previous_selected_obj, 0);
}
_previous_selected_obj = obj;
m_anim.apply_def(obj);
m_anim.play(obj);
}
}
»
The above code works on objects with "baked action" option ?
06 June 2016 18:57
06 June 2016 21:46
Actually I can't use project manager because I get an error with "create new project" :
"Traceback (most recent call last):
File "/media/prince/a94a0881-d13f-49b3-ab1b-5ff15a8e571e/CreationInteractive/Blender/blend4web_sdk_free/apps_dev/project.py", line 43, in
import project_cli
File "/media/prince/a94a0881-d13f-49b3-ab1b-5ff15a8e571e/CreationInteractive/Blender/blend4web_sdk_free/scripts/lib/project_cli.py", line 327
print(" " + "-"*(len(err)), file=sys.stderr)
^
SyntaxError: invalid syntax
"
I use Ubuntu.
Hard luck !!! :)
"Traceback (most recent call last):
File "/media/prince/a94a0881-d13f-49b3-ab1b-5ff15a8e571e/CreationInteractive/Blender/blend4web_sdk_free/apps_dev/project.py", line 43, in
import project_cli
File "/media/prince/a94a0881-d13f-49b3-ab1b-5ff15a8e571e/CreationInteractive/Blender/blend4web_sdk_free/scripts/lib/project_cli.py", line 327
print(" " + "-"*(len(err)), file=sys.stderr)
^
SyntaxError: invalid syntax
"
I use Ubuntu.
Hard luck !!! :)
07 June 2016 10:11