Solved Sets Disc animation issue when moving between sets
#1
Hi Guys

I have an slide animation setup on sets discs. The animation works fine when scrolling from a (bluray DVD etc) to the sets.

When i have two sets beside one another in a list the slide animation doesnt display.

I've added condition="SubString(ListItem.Path,videodb://movies/sets,left) but not sure what else to add.

I post a clip of my issue. As you can see at the start when I scroll from dvd to set the discs slide out properly. Now if I scroll down to the next set notice the discs appear all at once without them sliding out in sequence. Thanks


Code:
<control type="group" id="25000">
               
                <animation type="WindowOpen" reversible="false">
                    <effect type="slide" start="-150,0" end="0,0" time="500" delay="500" tween="cubic" easing="out" />
                    <effect type="fade" start="0" end="100" time="500" delay="500" />
                </animation>
                <animation type="Visible" reversible="false">
                    <effect type="slide" start="-150,0" end="0,0" time="500" delay="500" tween="cubic" easing="out" />
                    <effect type="fade" start="0" end="100" time="500" delay="500" />
                </animation>
                <animation effect="fade" start="100" end="0" time="200">WindowClose</animation>
                <animation type="Hidden">
                    <effect type="slide" start="0,0" end="-150,0" time="300" tween="cubic" easing="out" />
                    <effect type="fade" start="100" end="0" time="200" />
                </animation>
               <visible>![IsEmpty(Window(Home).Property(SkinHelper.ListItem.0.Art.DiscArt)) | Skin.HasSetting(noposterlistdiscart)] + Window.IsActive(25) + SubString(ListItem.Path,videodb://movies/sets,left) + Control.IsVisible(9923) + Control.IsVisible(70)</visible>
                <control type="image">
                    <width>240</width>
                    <height>240</height>
                    <left>330</left>
                    <top>540</top>
                    <texture diffuse="cdart_diffuse.png" background="true">$INFO[Window(Home).Property(SkinHelper.ListItem.0.Art.DiscArt)]</texture>
                   <visible>!IsEmpty(Window(Home).Property(SkinHelper.ListItem.0.Art.DiscArt))</visible>
                    <animation effect="slide" start="-1140,0" end="0,0" delay="1000" time="2600" tween="cubic" easing="inout" condition="SubString(ListItem.Path,videodb://movies/sets,left)">Conditional</animation>
                    <animation effect="rotate" start="0" end="-360" center="auto" time="30000" delay="8000" loop="true" reversible="false" condition="SubString(ListItem.Path,videodb://movies/sets,left)">Conditional</animation>
                
                    </control>
                <control type="image">
                    <width>240</width>
                    <height>240</height>
                    <left>442</left>
                    <top>540</top>
                    <texture diffuse="cdart_diffuse.png" background="true">$INFO[Window(Home).Property(SkinHelper.ListItem.1.Art.DiscArt)]</texture>
                    <visible>!IsEmpty(Window(Home).Property(SkinHelper.ListItem.1.Art.DiscArt))</visible>
                    <animation effect="slide" start="-1252,0" end="0,0" delay="1100" time="2600" tween="cubic" easing="inout" condition="SubString(ListItem.Path,videodb://movies/sets,left)">Conditional</animation>
                    <animation effect="rotate" start="0" end="-360" center="auto" time="30000" delay="8000" loop="true" reversible="false" condition="SubString(ListItem.Path,videodb://movies/sets,left) ">Conditional</animation>
                </control>
                <control type="image">
                    <width>240</width>
                    <height>240</height>
                    <left>555</left>
                    <top>540</top>
                    <texture diffuse="cdart_diffuse.png" background="true">$INFO[Window(Home).Property(SkinHelper.ListItem.2.Art.DiscArt)]</texture>
                    <visible>!IsEmpty(Window(Home).Property(SkinHelper.ListItem.2.Art.DiscArt))</visible>
                    <animation effect="slide" start="-1365,0" end="0,0" delay="1200" time="2600" tween="cubic" easing="inout" condition="SubString(ListItem.Path,videodb://movies/sets,left)">Conditional</animation>
                    <animation effect="rotate" start="0" end="-360" center="auto" time="30000" delay="8000" loop="true" reversible="false" condition="SubString(ListItem.Path,videodb://movies/sets,left)">Conditional</animation>
                </control>
                <control type="image">
                    <width>240</width>
                    <height>240</height>
                    <left>652</left>
                    <top>540</top>
                    <texture diffuse="cdart_diffuse.png" background="true">$INFO[Window(Home).Property(SkinHelper.ListItem.3.Art.DiscArt)]</texture>
                    <visible>!IsEmpty(Window(Home).Property(SkinHelper.ListItem.3.Art.DiscArt))</visible>
                    <animation effect="slide" start="-1478,0" end="0,0" delay="1300" time="2600" tween="cubic" easing="inout" condition="SubString(ListItem.Path,videodb://movies/sets,left)">Conditional</animation>
                    <animation effect="rotate" start="0" end="-360" center="auto" time="30000" delay="8000" loop="true" reversible="false" condition="SubString(ListItem.Path,videodb://movies/sets,left)">Conditional</animation>
                </control>
                <control type="image">
                    <width>240</width>
                    <height>240</height>
                    <left>765</left>
                    <top>540</top>
                    <texture diffuse="cdart_diffuse.png" background="true">$INFO[Window(Home).Property(SkinHelper.ListItem.4.Art.DiscArt)]</texture>
                    <visible>!IsEmpty(Window(Home).Property(SkinHelper.ListItem.4.Art.DiscArt))</visible>
                    <animation effect="slide" start="-1590,0" end="0,0" delay="1400" time="2600" tween="cubic" easing="inout" condition="SubString(ListItem.Path,videodb://movies/sets,left)">Conditional</animation>
                    <animation effect="rotate" start="0" end="-360" center="auto" time="30000" delay="8000" loop="true" reversible="false" condition="SubString(ListItem.Path,videodb://movies/sets,left)">Conditional</animation>
                </control>
                <control type="image">
                    <width>240</width>
                    <height>240</height>
                    <left>878</left>
                    <top>540</top>
                    <texture diffuse="cdart_diffuse.png" background="true">$INFO[Window(Home).Property(SkinHelper.ListItem.5.Art.DiscArt)]</texture>
                    <visible>!IsEmpty(Window(Home).Property(SkinHelper.ListItem.5.Art.DiscArt))</visible>
                    <animation effect="slide" start="-1702,0" end="0,0" delay="1500" time="2600" tween="cubic" easing="inout" condition="SubString(ListItem.Path,videodb://movies/sets,left)">Conditional</animation>
                    <animation effect="rotate" start="0" end="-360" center="auto" time="30000" delay="8000" loop="true" reversible="false" condition="SubString(ListItem.Path,videodb://movies/sets,left)">Conditional</animation>
                </control>
                <control type="image">
                    <width>240</width>
                    <height>240</height>
                    <left>1005</left>
                    <top>540</top>
                    <texture diffuse="cdart_diffuse.png" background="true">$INFO[Window(Home).Property(SkinHelper.ListItem.6.Art.DiscArt)]</texture>
                    <visible>!IsEmpty(Window(Home).Property(SkinHelper.ListItem.6.Art.DiscArt))</visible>
                    <animation effect="slide" start="-1188,38" end="0,0" delay="1600" time="2600" tween="cubic" easing="inout" condition="SubString(ListItem.Path,videodb://movies/sets,left)">Conditional</animation>
                    <animation effect="rotate" start="0" end="-360" center="auto" time="30000" delay="8000" loop="true" reversible="false" condition="SubString(ListItem.Path,videodb://movies/sets,left)">Conditional</animation>
                </control>
                <control type="image">
                    <width>240</width>
                    <height>240</height>
                    <left>1118</left>
                    <top>540</top>
                    <texture diffuse="cdart_diffuse.png" background="true">$INFO[Window(Home).Property(SkinHelper.ListItem.7.Art.DiscArt)]</texture>
                    <visible>!IsEmpty(Window(Home).Property(SkinHelper.ListItem.7.Art.DiscArt))</visible>
                    <animation effect="slide" start="-1302,38" end="0,0" delay="1700" time="2600" tween="cubic" easing="inout" condition="SubString(ListItem.Path,videodb://movies/sets,left)">Conditional</animation>
                    <animation effect="rotate" start="0" end="-360" center="auto" time="30000" delay="8000" loop="true" reversible="false" condition="SubString(ListItem.Path,videodb://movies/sets,left)">Conditional</animation>
                </control>
                <control type="image">
                    <width>240</width>
                    <height>240</height>
                    <left>1230</left>
                    <top>540</top>
                    <texture diffuse="cdart_diffuse.png" background="true">$INFO[Window(Home).Property(SkinHelper.ListItem.8.Art.DiscArt)]</texture>
                    <visible>!IsEmpty(Window(Home).Property(SkinHelper.ListItem.8.Art.DiscArt))</visible>
                    <animation effect="slide" start="-1414,38" end="0,0" delay="1800" time="2600" tween="cubic" easing="inout" condition="SubString(ListItem.Path,videodb://movies/sets,left)">Conditional</animation>
                    <animation effect="rotate" start="0" end="-360" center="auto" time="30000" delay="8000" loop="true" reversible="false" condition="SubString(ListItem.Path,videodb://movies/sets,left)">Conditional</animation>
                </control>
                <control type="image">
                    <width>240</width>
                    <height>240</height>
                    <left>1342</left>
                    <top>540</top>
                    <texture diffuse="cdart_diffuse.png" background="true">$INFO[Window(Home).Property(SkinHelper.ListItem.9.Art.DiscArt)]</texture>
                    <visible>!IsEmpty(Window(Home).Property(SkinHelper.ListItem.9.Art.DiscArt))</visible>
                    <animation effect="slide" start="-1527,38" end="0,0" delay="1900" time="2600" tween="cubic" easing="inout" condition="SubString(ListItem.Path,videodb://movies/sets,left)">Conditional</animation>
                    <animation effect="rotate" start="0" end="-360" center="auto" time="30000" delay="8000" loop="true" reversible="false" condition="SubString(ListItem.Path,videodb://movies/sets,left)">Conditional</animation>
                </control>
            </control>
Reply
#2
You could try adding to the first <visible> (line 16)

+ !Container(xxx).OnNext + !Container(xxx).OnPrevious

where xxx stands for your own container number, and in addition setting all the animation conditions just to Visible
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#3
(2018-01-22, 01:16)manfeed Wrote: You could try adding to the first <visible> (line 16)

+ !Container(xxx).OnNext + !Container(xxx).OnPrevious

where xxx stands for your own container number, and in addition setting all the animation conditions just to Visible
Hi manfeed thanks for reply.

No luck with + !Container.OnNext + !Container.OnPrevious think i tried those before.

No luck with changing animations condition to visible, when i do that the discs no longer slide even when moving from dvd to set so have to keep the condition="SubString(ListItem.Path,videodb://movies/sets,left)  in.

Tried adding + !Container.OnScrollNext + !Container.OnScrollPrevious + !Container.Scrolling also no luck.

Hmm its a tricky one.

Are you able to test from your side?

No worries if not. Ill try few more options.

Thanks
Reply
#4
I did a dummy test and !Container(ID).OnNext + !Container(ID).OnPrevious with the animation set to visible worked fine for me.
You likely need to add reversible="false" to the animation. Also, remove the !IsEmpty discart check from the animation condition.

This is what worked for me in the disc image part (assuming your list id=50).
Code:
<animation effect="slide" start="-1414,38" end="0,0" delay="1000" time="2600" tween="cubic" easing="inout" reversible="false">Visible</animation>
<visible>!Container(50).OnNext + !Container(50).OnPrevious</visible>

If it is still not working, you might want to try removing your animation and visible conditions that are at the top for the whole group, and only animate each disc instead.

As an aside, what Kodi version are you using? Substring and IsEmpty were depreciated in Krypton and have been removed from Leia altogether. From Krypton onwards, you should be using String.Contains, String.StartsWith, String.EndsWith, and String.IsEmpty instead.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#5
Thanks @jurialmunkey  and @manfeed for your help

Got it working now Smile

I was using the code from old skin thats why it had the substring isempty tags, although they still work. Guess better change them for leia thanks for heads up.

Cheers again
Reply

Logout Mark Read Team Forum Stats Members Help
Sets Disc animation issue when moving between sets0