It is currently April 16th, 2024, 4:34 pm

Animation... need little help...

Get help with creating, editing & fixing problems with skins
User avatar
brax64
Posts: 172
Joined: July 8th, 2018, 8:05 pm

Re: Animation... need little help...

Post by brax64 »

balala wrote: August 3rd, 2020, 7:52 pm Well, I'm extremely surprised, because it definitely does work well for me ...
I'm sorry but I disagree, also for you is not working fine, it shows clearly that the values for iAlpha, tAlpha and iconY of the icon/rectangle, are not correct if you leave with the mouse prematurely:

If the cycle is running fine you should have at the start:
iAlpha=15
tAlpha=200
iconY=150
at the end of MouseOver action:
iAlpha=253
tAlpha=0
iconY=130
wait 3 seconds and the cycle revert to the start position

If you notice in your example, when you left the mouse prematurely the cycle did stops with:
iAlpha=127
tAlpha=104
iconY=134
again at
iAlpha=134
tAlpha=98
iconY=134
it complete properly only if you leave the mouse on the image long enough to complete the "MouseOverAction"...
User avatar
brax64
Posts: 172
Joined: July 8th, 2018, 8:05 pm

Re: Animation... need little help...

Post by brax64 »

dvo wrote: August 3rd, 2020, 8:20 pm i have the same issue with it and the same stops... and pc is fast enough with 32 gig ram /1070 gpu nvidia 8gig /nvme ssd 1tb z170a asus board
this should not be that slow..... :Whistle i edit video on it... but after lots of updatex it got like this... when i made it it was fluid... :-(
So do you think that we're hitting a Rainmeter limit with the kind of code I'm trying to run?
Honestly I did use similar animations that I've done for other skins before but they are running fine, yes sometime I saw as well some kind of "stepping" movement instead of fluid transitions, but here I'm facing an issue on how properly manage the MouseOver/MouseLeave actions...
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5391
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Animation... need little help...

Post by eclectic-tech »

I changed the location of the actions to disable the mouse actions and combined the transitions to move into the fade action timer.

This code will complete the cycle of fading out the temp, fading in the icon and text, wait 3 seconds, then fade out the icon and text, fading in the temp. The MouseOverAction is disabled during this transition. Once the animations are completed, the MouseOverAction is enabled.

vcloudshift.gif

Code: Select all

;If the cycle is running fine you should have at the start:
;iAlpha=15
;tAlpha=200
;iconY=150
;at the end of MouseOver action:
;iAlpha=253
;tAlpha=0
;iconY=130
;wait 3 seconds and the cycle revert to the start position

[Rainmeter]
Update=1000
AccurateText=1
AntiAlias=1

[Variables]
U=[!UpdateMeasureGroup Weather][!UpdateMeterGroup Weather][!Redraw]
tAlpha=200
iAlpha=15
C=140,140,140
ff=Neon 80s
Degrees=°
img=#@#VClouds Weather Icons\0.png
maxcycle=4

;=======================================
;              Animation
;=======================================

; [Cycle]
; Measure=Calc
; Formula=(Cycle+1)%(#maxcycle#+1)
; IfEqualValue=#maxcycle#
; IfEqualAction=[!EnableMouseAction Icon "MouseOverAction"][!PauseMeasure "Cycle"]

[FadeAlpha]
Measure=Plugin
Plugin=ActionTimer
Group=Weather

ActionList1=DisableMouseOver | Wait 50 | SlideUp | Repeat Rise,50,34 | Wait 3000 | SlideDown | Repeat Fall,50,34 | EnableMouseOver

DisableMouseOver=[!DisableMouseAction Icon "MouseOverAction"]
EnableMouseOver=[!EnableMouseAction Icon "MouseOverAction"]
Rise=[!SetVariable iAlpha (Min(#iAlpha#+7,255))][!SetVariable tAlpha (Max(#tAlpha#-6,0))]#U#
Fall=[!SetVariable iAlpha (Max(#iAlpha#-15,15))][!SetVariable tAlpha (Min(#tAlpha#+10,200))]#U#
SlideUp=[!CommandMeasure Transition "Stop 1"][!CommandMeasure Transition "Stop 2"][!CommandMeasure Transition "Execute 1"]
SlideDown=[!CommandMeasure Transition "Stop 1"][!CommandMeasure Transition "Stop 2"][!CommandMeasure Transition "Execute 2"]

IgnoreWarnings=1
UpdateDivider=-1
DynamicVariables=1

[Transition]
Measure=Plugin
Plugin=ActionTimer
Group=Weather
ActionList1=Wait 300 | Repeat MoveUp,40,20
MoveUp=[!SetOption Icon Y (Clamp([Icon:Y]-1,130,150))]#U#
ActionList2=Wait 300 | Repeat MoveDn,50,20
MoveDn=[!SetOption Icon Y (Clamp([Icon:Y]+1,130,150))]#U#
IgnoreWarnings=1
UpdateDivider=-1

[Icon]
Meter=Image
ImageName=#img#
SolidColor=0,0,0,1
Group=Weather
W=160
X=80
Y=150
PreserveAspectRatio=1
ImageAlpha=#iAlpha#
AntiAlias=1
DynamicVariables=1
MouseOverAction=[!CommandMeasure Transition "Stop 1"][!CommandMeasure Transition "Stop 2"][!CommandMeasure FadeAlpha "Stop 1"][!CommandMeasure FadeAlpha "Execute 1"]

[Temp]
Meter=String
Group=Weather
X=175
Y=185
FontSize=18
FontFace=#ff#
AntiAlias=1
FontColor=#C#,#tAlpha#
SolidColor=0,0,0,1
StringAlign=Center
DynamicVariables=1
Text=31#Degrees#C

[Cond]
Meter=String
Group=Weather
X=r
Y=30r
FontSize=10
FontFace=#ff#
AntiAlias=1
FontColor=#C#,#tAlpha#
SolidColor=0,0,0,1
StringAlign=Center
DynamicVariables=1
Text=Thunderstorm

[Narative1]
Meter=String
Group=Weather
X=r
Y=20r
W=200
H=34
FontSize=10
FontFace=#ff#
AntiAlias=1
FontColor=#C#,(#iAlpha#-53)
SolidColor=0,0,0,1
StringAlign=Center
DynamicVariables=1
ClipString=1
Text=Partly cloudy. Highs 30 to 32. Lows 18 to 20
You do not have the required permissions to view the files attached to this post.
User avatar
brax64
Posts: 172
Joined: July 8th, 2018, 8:05 pm

Re: Animation... need little help...

Post by brax64 »

eclectic-tech wrote: August 4th, 2020, 2:42 am I changed the location of the actions to disable the mouse actions and combined the transitions to move into the fade action timer.
...
Hi eclectic-tech
thank you very much, you did the magic!
Even tho I had to make a little modification from your original code:

Code: Select all

[FadeAlpha]
Measure=Plugin
Plugin=ActionTimer
Group=Weather

ActionList1=DisableMouseOver | Wait 50 | SlideUp | Repeat Rise,50,34 | Wait 3000 | SlideDown | Repeat Fall,50,34 | EnableMouseOver

DisableMouseOver=[!DisableMouseAction Icon "MouseOverAction"]
EnableMouseOver=[!EnableMouseAction Icon "MouseOverAction"]
Rise=[!SetVariable iAlpha (Min(#iAlpha#+7,255))][!SetVariable tAlpha (Max(#tAlpha#-6,0))]#U#
Fall=[!SetVariable iAlpha (Max(#iAlpha#-9,15))][!SetVariable tAlpha (Min(#tAlpha#+8,200))]#U#
SlideUp=[!CommandMeasure Transition "Stop 2"][!CommandMeasure Transition "Execute 1"]
;[!CommandMeasure Transition "Stop 1"]
SlideDown=[!CommandMeasure Transition "Stop 1"][!CommandMeasure Transition "Execute 2"]
;[!CommandMeasure Transition "Stop 2"]
IgnoreWarnings=1
UpdateDivider=-1
DynamicVariables=1
basically removed the [!CommandMeasure Transition "Stop 1"] from SlideUp and [!CommandMeasure Transition "Stop 2"] from SlideDown, because the 2nd part of the cycle was not running right, I mean that was fading out image and lower text, fading in upper text and ONLY AFTER moving down the image (instead to run both a the same time like it does for the 1st part of the cycle...)

Again, thanks a lot! Now I've learned a little bit more about messing up with action timers :)
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5391
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Animation... need little help...

Post by eclectic-tech »

Happy to help! :great: