Key "objects" in Json hold a dict of tracked objects

This commit is contained in:
Brenno
2021-05-08 20:24:39 -03:00
parent 7a9d196d8c
commit c6ce5b0e16
2 changed files with 25 additions and 23 deletions

View File

@@ -382,25 +382,19 @@ void TrackedObjectBBox::SetJsonValue(const Json::Value root)
if (!root["BaseFPS"]["den"].isNull())
BaseFps.den = (int)root["BaseFPS"]["den"].asInt();
}
// Set the TimeScale by the given JSON object
if (!root["TimeScale"].isNull())
{
double scale = (double)root["TimeScale"].asDouble();
this->ScalePoints(scale);
}
// Set the protobuf data path by the given JSON object
if (!root["protobuf_data_path"].isNull())
protobufDataPath = root["protobuf_data_path"].asString();
// Set the id of the child clip
if (!root["child_clip_id"].isNull() && root["child_clip_id"].asString() != ""){
Clip* parentClip = (Clip *) ParentClip();
if(parentClip && (root["child_clip_id"].asString() != parentClip->Id())){
ChildClipId(root["child_clip_id"].asString());
}
ChildClipId(root["child_clip_id"].asString());
}
// Set the Keyframes by the given JSON object