Merge pull request #10107 from birarda/bug/recording-cache

make sure HeadData is present before processing recording frames
This commit is contained in:
Seth Alves 2017-04-03 16:11:18 -07:00 committed by GitHub
commit e7f458ccaf

View file

@ -336,6 +336,10 @@ void Agent::executeScript() {
// call model URL setters with empty URLs so our avatar, if user, will have the default models
scriptedAvatar->setSkeletonModelURL(QUrl());
// force lazy initialization of the head data for the scripted avatar
// since it is referenced below by computeLoudness and getAudioLoudness
scriptedAvatar->getHeadOrientation();
// give this AvatarData object to the script engine
_scriptEngine->registerGlobalObject("Avatar", scriptedAvatar.data());