####1. Describe Your Issue
I’m finally getting around to documenting the face api issues I encountered in particular since there has been some recent posts about dom manipulation of Jibo’s face.
Please see my simple git example at facetest
The issue : After setting _face.visible=false,_and then back to “true” again, I need to reset the dirty flags and perform a face update. Currenlty it is simple to hide the face element by manipulating the dom, I expected it to also to be as simple using the face API.
The example above works fine, however, it is easy to tweak to show how it can fail.
The numbering corresponds to my commented behaviors in the git example.
1a) ExecuteScript: jibo.face.visible = false;
(or possible to set face.eye.visible as well)
1b) PlayAnimation: Now I play an animation without a face as expected.
1c) ExecuteScript: jibo.face.visible = true;
Originally, I expected to see the face with eye again, but it remained black.
Note: I did not overwrite the eye as done in the 21-take photo example - so I didn’t expect to handle the “dirty” flags and do a face update.
To get the face back, I had to either run a new animation after setting visible=true (label #2 see the last bt in my example) ; if no animimation followed, no face .(
or execute (#1d script) the following code again after setting jibo.face.visible = true;
1d) execute script
//redraw each frame
jibo.face.renderOnlyWhenDirty = false;
//render only when dof values change
jibo.face.renderOnlyWhenDirty = true;
As said, the test skill works.
So, try to “skip” bt #1d that runs the code (dirty flags, face update) --> result: no face
Then “unskip” the last playanimation (currently skiped) – result : face appears with running #1d
I stayed with the dom manipulation of the face using jquery rather than fuss with the face API - I expected the face API to evolve. However, it would be good to either document this or … provide a fix or helper function to handle how we reset the face visiblity - as you best see fit.
thanks for listening