Overview : when importing animations, some triggers and actions are deleted, but not the ones expected.
Details :
I load the example file : RealDash_animation_example.rd
I import the file in RD (Gallery > Load from file > Import)
I select the file to use it (Select file)
the animations are OK, they work perfectly on the 3 pages
note that the animations.xml file is not needed because the animations are already embedded within the “.rd” file
then, I add an action in the edit mode, and save the “.rd” file (within realdash, not the android folder) ( the action name is different from all actions names).
I load the “RealDash_animation_example_anim.xml” file
I import the file (Edit > File > Import animations… > Import)
I select the file, and RD says “Loaded 20 animations from xml” (“Select file”)
then, unfortunately, the action I created before no longer exists in the actions list (right list in the “triggers” page)
same results when I create new triggers before importing and selecting the animations xml file #1 If I do not save the modified .rd file, and if I remove the xml file within RD, then select the old .rd file, the .rd file is selected and the action I created before does exist. #2 OR, if I save the .rd file, actions and triggers I created before are lost forever…
Note that “dashboard actions” and “dashboard triggers” that were initially in the .rd file are not affected when selecting the animations xml file.
It seems that selecting the animations xml file delete old “animations triggers and actions” (that is correct) but also newly created “dashboard triggers and actions” …
Or maybe I’m doing something wrong ?
In fact, the question is : how do RD select the triggers and actions to be deleted before selecting an animations xml file ?
Realdashdev wrote, 3 years ago : “If animation file is found, all animations from the dashboard are removed and replaced by animations specified in XML.”
But an action with type=“set value” or “rotate value up”, for example, shouldn’t be removed, right ?
Version 2.6.6 : same results (I tried…) @realdashdev
New info :
when selecting the animations xml file
newly created actions are deleted
newly created triggers that use a deleted action are deleted too (even if they also use old actions that are not deleted)
newly created triggers that use only old actions are not deleted !!!
So, deletion of triggers seems to be a consequence of deleting their actions…
One idea : could it be possible to tag “animation actions and triggers” as “imported” when selecting a xml animation file, and then , before selecting the xml file again, delete only actions and triggers that were previously tagged as “imported” ?
Or, second solution, delete only actions and triggers that have the same name than those in the xml animation file ?
I understand it’s important to avoid duplicate actions and triggers, but the importing process deletes too many objects …
Some other infos that can help you, when selecting the animations xml file :
actions with type=“Fade gauge” are deleted , even if the gauge doesn’t appear in the xml file (and even if the action was initially created “by hand” within RD)
actions with type=“hide gauge” or “show gauge” are not deleted
triggers containing an action deleted in the previous step are also deleted, even if they contain other actions that still exist
Another issue concerns existing dashboards:
I use the default dashboard, it uses embedded animations
I create “page 2” with other infos
if I create an animations xml file for “page 2”, with only animations for gauges in page 2, when selecting this xml file, all animations for page1 (those of the default dashboard) are deleted… !
As you can see, there should be a process to choose which objects (actions&triggers) must be deleted or not before selecting the animations xml file…
Can someone say if these issues exist whith the windows version of ReadlDash ?
Of course they do. I do not know what you are trying to achieve, but I know how to solve this problem very simply.You can be consistent in your actions. This makes it much easier to manage the creation of dashboards.It is enough to think over all the XML animations that you want to use.When you complete these XML manipulations, then it will be time to create triggers and actions in RealDash itself.You just need to plan everything in advanceI hope you’ll take my advice. Instead of disrupting the functioning of a functioning mechanism.
With best wishes.
“Instead of disrupting the functioning of a functioning mechanism.”
Mmm, well, I must say testing is a part of my job, for over 25 years… Deleting objects that should not is not what I call “a functioning mechanism”.
I know that animations were not supposed to be available for standard users, but it doesn’t work as it should.
For example, if I want to add animations to the default dashboard (on a new page), it’s impossible since selecting my xml file will delete all existing animations. Or is it possible to have the initial xml animation file that I could modify with additional animations ?
Unfortunately, I have to disappoint you.Changing the animation file of the standard dashboard is prohibited. And that’s okay.In any other case, you can use the method given above. Best regards, friend.
Animation system was never indented to be public, just our own internal tool. That is a main reason it is what it is.
While we could argue if its better to have badly functioning animation system available, or no animation system at all, right now we have no plans to make it more “presentable”.
There is a logic, when you import an animation XML, ALL animation related triggers and actions are deleted and replaced by the ones from the XML. That is by design, you either provide all animations from the XML, or none at all. That is a clear statement and easy to understand, and we have no plans of making any kind of combine/integrate to existing functionality. If we put time and effort into this, it would be providing animation editor UI.
That being said, importing animation XML should not remove triggers or actions that are not related to animations in any way. We have never encountered that case, after over 50 fully animated public and private dashboards we have made. But we also have very specific way of working with the animations and may just not encounter the issue because of that.
I’m happy to say there’s a workaround to use both animations within the default dashboard AND additional animations on new added pages
MY SYNTHETIC TUTORIAL : #1 use the default dashboard and add pages with all neccessary new gauges #2 if you plan to use only “fade gauge” actions, you can create these actions within Realdash with their associated triggers → no need to use an animations xml file, and so, you keep the default animations working
OR #3.1 if you plan to use fade/position/morph actions, you MUST use an animations xml file : so, if “fade gauge” actions already exist in your pages, you must recreate them in the xml file, and delete them (and their triggers) in your dashboard (or let RD delete these actions/triggers for you next time you select an animations xml file) #3.2 complete your xml file and select it to test your animations
AND VERY IMPORTANT #3.3 use the “combine” function to combine your dashboard (that contains the initial page of the default dashboard) with the default dashboard #3.3.1 load the default dashboard and save it to a “new.rd” file #3.3.2 load your dashboard (with the animations working in your new pages but not in the default page) #3.3.3 combine with the new.rd dashboard : the default animations will work again and a new page1 is created (duplicate of your default page) #3.3.4 delete the new page1 : the gauges are deleted but the animations remain, and your “default page” will have its animations working again et voilà !