From 1e32ef8d20f3803a76ef260f003de3162dd66cc8 Mon Sep 17 00:00:00 2001 From: Brenno Date: Thu, 8 Apr 2021 21:32:39 -0300 Subject: [PATCH] Fixed ObjectDetection crash (disabled effect parenting) --- src/EffectBase.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/EffectBase.cpp b/src/EffectBase.cpp index 6f51b45db..8f453ca50 100644 --- a/src/EffectBase.cpp +++ b/src/EffectBase.cpp @@ -132,12 +132,16 @@ void EffectBase::SetJsonValue(Json::Value root) { // Get the list of effects on the timeline std::list effects = parentTimeline->ClipEffects(); - // Loop through the effects - for (auto const& effect : effects){ - // Set the properties of all effects which parentEffect points to this - if (effect->info.parent_effect_id == this->Id()) - effect->SetJsonValue(root); - } + // TODO: Fix recursive call for Object Detection + + // // Loop through the effects and check if we have a child effect linked to this effect + // for (auto const& effect : effects){ + // // Set the properties of all effects which parentEffect points to this + // if ((effect->info.parent_effect_id == this->Id()) && (effect->Id() != this->Id())) + // std::cout<<"passou3 \n"; + + // effect->SetJsonValue(root); + // } } // Set this effect properties with the parent effect properties (except the id and parent_effect_id) @@ -218,5 +222,5 @@ std::string EffectBase::ParentClipId() const{ if(clip) return clip->Id(); else - return "None"; + return ""; } \ No newline at end of file