Closed Ambica2022 closed 1 year ago
Hi @Ambica2022,
have a look at src/artery/storyboard/EffectStack.cc which handles the active effects.
Hi @Ambica2022,
have a look at src/artery/storyboard/EffectStack.cc which handles the active effects.
Hi @riebl ,
Thank you. I guess that effects are added to the stack automatically when applied from .py file and try to remove the effects from a DENM use case(.cc) file as follows.
void Stationary::handleStoryboardTrigger(const StoryboardSignal& signal) { EffectStack mEs; mEs.removeEffectsByStory(signal.getStory()); ... .... .... }
the error is
Is anything considered wrong from my code?
Regards, Ambica
The Storyboard
module maintains the effect stacks for each vehicle internally. Manually removing effects applied by a story a not part of the concept. Instead, you should modify the triggering conditions of the story which has originally applied the effect: When its conditions are no longer met, the effect stack will be updated accordingly.
Your code snippet just tries to modify an EffectStack
object locally created in your method. That will definitely not work.
Last but not least, regarding the shown error message: The environment model does not link to the storyboard because both are independent features. Hence, you cannot call storyboard code from the environment model. However, your model which depends on both can do this without problems. This is a problem in your code organisation.
Thank you Riebl.
Hi,
How to reapply or stop the storyboard effects? I tried with removeEffect() from StopEffect class and it is giving error as StopEffect has no method called removeEffect()....but actually it does have along with applyEffect() and reapplyEffect() methods.
Can anyone have experience with this. Thank you.
Regards, Ambica