Set the parent effect from which this properties will be set to
| 559 | |
| 560 | // Set the parent effect from which this properties will be set to |
| 561 | void EffectBase::SetParentEffect(std::string parentEffect_id) { |
| 562 | |
| 563 | // Get parent Timeline |
| 564 | Timeline* parentTimeline = static_cast<Timeline *>(ParentTimeline()); |
| 565 | |
| 566 | if (parentTimeline){ |
| 567 | |
| 568 | // Get a pointer to the parentEffect |
| 569 | EffectBase* parentEffectPtr = parentTimeline->GetClipEffect(parentEffect_id); |
| 570 | |
| 571 | if (parentEffectPtr){ |
| 572 | // Set the parent Effect |
| 573 | parentEffect = parentEffectPtr; |
| 574 | |
| 575 | // Set the properties of this effect with the parent effect's properties |
| 576 | Json::Value EffectJSON = parentEffect->JsonValue(); |
| 577 | EffectJSON["id"] = this->Id(); |
| 578 | EffectJSON["parent_effect_id"] = this->info.parent_effect_id; |
| 579 | this->SetJsonValue(EffectJSON); |
| 580 | } |
| 581 | } |
| 582 | return; |
| 583 | } |
| 584 | |
| 585 | // Return the ID of this effect's parent clip |
| 586 | std::string EffectBase::ParentClipId() const{ |
nothing calls this directly
no test coverage detected