Skip to content

Commit

Permalink
Bug fix. Prevent adding the same clip as child in the Tracker and Obj…
Browse files Browse the repository at this point in the history
…ect Detection Effects
  • Loading branch information
BrennoCaldato committed Aug 14, 2021
1 parent 91aaf18 commit 4d5bf9b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/TrackedObjectBBox.cpp
Expand Up @@ -395,10 +395,13 @@ void TrackedObjectBBox::SetJsonValue(const Json::Value root)
// 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() != ""){
if (!root["child_clip_id"].isNull() && root["child_clip_id"].asString() != "" && root["child_clip_id"].asString() != Id()){
Clip* parentClip = (Clip *) ParentClip();
ChildClipId(root["child_clip_id"].asString());

if (root["child_clip_id"].asString() != parentClip->Id())
ChildClipId(root["child_clip_id"].asString());
}

// Set the Keyframes by the given JSON object
Expand Down

0 comments on commit 4d5bf9b

Please sign in to comment.