Armature export problem
20 March 2015 02:44
Hi,
I'm exporting an skinned model using Rigify addon using blend4web v15.02 and Blender 2.73 and I get the following error:
Traceback (most recent call last):
File "/Users/imanolmartin/Library/Application Support/Blender/2.73/scripts/addons/blend4web/anim_baker.py", line 54, in execute
bpy.ops.object.mode_set(mode='POSE')
File "/Applications/Blender/blender.app/Contents/MacOS/../Resources/2.73/scripts/modules/bpy/ops.py", line 189, in __call__
ret = op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.object.mode_set.poll() failed, context is incorrect
location: <unknown location>:-1
I'm a bit lost here, any idea of what I am doing wrong?.
Thanks and congrats for the great work.
20 March 2015 10:26
Hi,
It is pretty difficult to say what is the issue without seeing the scene.
Could you please give us an example of the blend file which is causing this error?
It is better to attach it to the post. Or, if you don't want to share your work right now, you can send it to my email: evgeny-ar@blend4web.com
It is pretty difficult to say what is the issue without seeing the scene.
Could you please give us an example of the blend file which is causing this error?
It is better to attach it to the post. Or, if you don't want to share your work right now, you can send it to my email: evgeny-ar@blend4web.com
21 March 2015 12:35
21 March 2015 16:48
23 March 2015 12:00
23 March 2015 20:37
Hi Evgeny,
Thanks, that seems to be the reason. By the way, it also fails if it is in another layer, I suppose it's the same case as being hidden.
I've made it visible and it's baking the actions correctly, I get a _B4W_BAKED action for each on of the actions I have. Then I export everything but I don't see any animation present when I open it in the Viewer. I've followed the instructions in the documentation so I'm not sure what am I doing wrong. You can reproduce it using the test case above. If you need any other detail, let me know.
Thanks again.
Thanks, that seems to be the reason. By the way, it also fails if it is in another layer, I suppose it's the same case as being hidden.
I've made it visible and it's baking the actions correctly, I get a _B4W_BAKED action for each on of the actions I have. Then I export everything but I don't see any animation present when I open it in the Viewer. I've followed the instructions in the documentation so I'm not sure what am I doing wrong. You can reproduce it using the test case above. If you need any other detail, let me know.
Thanks again.
24 March 2015 11:55
Hi,
Actually, you don't need the metarig object. You can set Do Not Export flag on it.
As it is described in the documentation you can also set Animation: Use Default flag in order the animation to be played automatically, and set the required behavior for the rig object.
Also, you need to apply "Mirror" modifier if you want to use armature animation. (This is a Blend4Web limitation for now)
Actually, you don't need the metarig object. You can set Do Not Export flag on it.
As it is described in the documentation you can also set Animation: Use Default flag in order the animation to be played automatically, and set the required behavior for the rig object.
Also, you need to apply "Mirror" modifier if you want to use armature animation. (This is a Blend4Web limitation for now)
25 March 2015 02:37
Thanks again Evgeny,
So I had "Apply modifiers" activated in my object's blend4web export settings as I was using a Mirror modifier, but that also applied the Armature modifier and that seems to be the reason why the animations were not being exported. I have applied the mirror modifier as you said and now my animations are exported.
Now I'm facing another issue: the animations are exported but they are not correct. They are fine in Blender but they are not correct when I open the export in the viewer. I have tried to apply all transformations to the object and armature and also activated "Apply scale" in the objects blend4web export options but it doens't seem to help. Any idea of what I am doing wrong?. The whole object is just one mesh and it just have the armature modifier (as I have already applied the mirror one).
Here is a video demonstrating the issue: https://youtu.be/7F68ohX6JQA
Thanks once again for your support.
So I had "Apply modifiers" activated in my object's blend4web export settings as I was using a Mirror modifier, but that also applied the Armature modifier and that seems to be the reason why the animations were not being exported. I have applied the mirror modifier as you said and now my animations are exported.
Now I'm facing another issue: the animations are exported but they are not correct. They are fine in Blender but they are not correct when I open the export in the viewer. I have tried to apply all transformations to the object and armature and also activated "Apply scale" in the objects blend4web export options but it doens't seem to help. Any idea of what I am doing wrong?. The whole object is just one mesh and it just have the armature modifier (as I have already applied the mirror one).
Here is a video demonstrating the issue: https://youtu.be/7F68ohX6JQA
Thanks once again for your support.
25 March 2015 11:01
26 March 2015 01:20
Hi Evgeny,
I've set both objects origins to the same position but It doesn't seem to be working with my current rig. I just have rigged it again with the origins already set at the same position (before making the poses) and it seems to be working now. Any chances of fixing that for my current rigs without needing to re-rig again?
Thanks for your support.
I've set both objects origins to the same position but It doesn't seem to be working with my current rig. I just have rigged it again with the origins already set at the same position (before making the poses) and it seems to be working now. Any chances of fixing that for my current rigs without needing to re-rig again?
Thanks for your support.