save code
This commit is contained in:
+4
-7
@@ -1370,7 +1370,7 @@ void FaceApp::drawFrame(long long frameTime)
|
||||
// changeMotion(motion);
|
||||
//}
|
||||
|
||||
string FaceApp::preLoadMotionList(const vector<string>& motions, Callback callback)
|
||||
string FaceApp::preLoadMotionList(string motion_list_str, Callback callback)
|
||||
{
|
||||
if (_isLoadMotion)
|
||||
{
|
||||
@@ -1379,12 +1379,9 @@ string FaceApp::preLoadMotionList(const vector<string>& motions, Callback callba
|
||||
_isLoadMotion = true;
|
||||
_callback_loadfinish = callback;
|
||||
_preLoadMotions.clear();
|
||||
for (auto s : motions)
|
||||
{
|
||||
json j = json::parse(s);
|
||||
Motion motion = j.get<Motion>();
|
||||
_preLoadMotions.push_back(motion);
|
||||
}
|
||||
json j = json::parse(motion_list_str);
|
||||
MotionList motion_list = j.get<MotionList>();
|
||||
_preLoadMotions = motion_list.motions;
|
||||
worker_ = std::thread(&FaceApp::loadMotionThread, this);
|
||||
return "ok";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user