It is currently May 5th, 2024, 2:52 pm

help with animation - i'm new here

Get help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 16200
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: help with animation - i'm new here

Post by balala »

LuciferVisuals wrote: April 25th, 2023, 8:46 pm Thank You So much, that works perfectly,
Great!
LuciferVisuals wrote: April 25th, 2023, 8:46 pm now I will spend some time working out exactly how it achieves it but I got your notes to read, but it works perfectly.
Feel free to come back with related questions, if any arises.
LuciferVisuals wrote: April 25th, 2023, 8:46 pm I'm Over the moon.
:thumbup:
LuciferVisuals wrote: April 25th, 2023, 8:46 pm AS a matter of interest the last thing I tried was to add [!RainmeterRefresh] .... to Gate Idle button (in my previous code) .... This did actually work, BUT it did not always work perfectly, sometimes you did not get the full Whoosh effect. So it was sort of OK but I knew it should be possible to get it perfect.
First: as described previously, you should not have to add [!RainmeterRefresh], but [!Refresh], since the !Rainmeter bang prefix has been deprectaed (see my previous post).
Secondly: as much as possible, refresh has to be avoided. The refresh is always a destructive operation. sometimes it has to be done, but in most cases you can (and should have to) avoid it. See here.
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: help with animation - i'm new here

Post by LuciferVisuals »

balala wrote: April 25th, 2023, 8:56 pm Great!
:thumbup:

First: as described previously, you should not have to add [!RainmeterRefresh], but [!Refresh], since the !Rainmeter bang prefix has been deprectaed (see my previous post).
Secondly: as much as possible, refresh has to be avoided. The refresh is always a destructive operation. sometimes it has to be done, but in most cases you can (and should have to) avoid it. See here.
Yeah that was before your last post when I ran out of logic and was trying things at random from the manual (that I am finally trying to understand) Anything that looked like it might work, I was willing to try and it's still in there, exactly like that, so I tried it, as i said big improvement, improved but not perfect.

But your last post was perfect, so refresh is out now, and now I have had a minute to look at your revision, what you did is obvious (WITH HIND SIGHT) and I better still I completely understand it, so that's a win-win and I'm totally happy about it.

Thanks again

Keith
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: help with animation - i'm new here

Post by LuciferVisuals »

balala wrote: April 25th, 2023, 8:56 pm Great!

Feel free to come back with related questions, if any arises.

:thumbup:

First: as described previously, you should not have to add [!RainmeterRefresh], but [!Refresh], since the !Rainmeter bang prefix has been deprectaed (see my previous post).
So in the following, which works perfectly BTW

Code: Select all

[Gate-Active]
Meter=Button
ButtonImage=#@#Buttons\Action-2.png
x=700
y=100
w=500
h=500
ButtonCommand=[!EnableMeasure "measureWhooshFrameCalc"][!RainmeterHideMeter Gate-Active][!RainmetershowMeter OsirisR][!RainmetershowMeter MeterWhooshFrame] [!RainmeterShowMeter meterBackgroundFrame] [!RainmeterShowMeter Gate-Idle] 
Should I remove all those Rainmeters as well? EG Should [!RainmeterShowMeter just become [!ShowMeter or is it just the Refresh where it's depreciated. ?

Keith
Last edited by balala on April 26th, 2023, 3:31 pm, edited 1 time in total.
Reason: Please use <code> tags whenever are you posting codes. It's the </> button.
User avatar
Yincognito
Rainmeter Sage
Posts: 7199
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: help with animation - i'm new here

Post by Yincognito »

LuciferVisuals wrote: April 25th, 2023, 9:18 pmShould I remove all those Rainmeters as well?
Yes. The fact that this form is deprecated doesn't depend on which option you use it. Plus, you shorten the code a bit as well this way.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: help with animation - i'm new here

Post by LuciferVisuals »

Yincognito wrote: April 25th, 2023, 10:58 pm Yes. The fact that this form is deprecated doesn't depend on which option you use it. Plus, you shorten the code a bit as well this way.
Thanks..... :-( Another little job to do, I think they should remove it from the manual, I finally forced myself to start wading through it, and it is still in there. I expect they have not got round to it yet. :uhuh:

But I'll get on it... BTW this now works perfectly, I'm going to do the close wormhole part now, which will be easy now I have the method exactly right.

Really been struggling finding images for the Iris, found several, worked on them all, but not happy with the results, so I might put that on hold for a bit, as the Rainmeter house keeping and tidying up is piling up. Not to mention the restructure I wanted to do. And the Star wars text, to which I can apply all the new code improvements, once I edit it and get new images..

Keith
User avatar
Yincognito
Rainmeter Sage
Posts: 7199
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: help with animation - i'm new here

Post by Yincognito »

LuciferVisuals wrote: April 26th, 2023, 7:20 amAnother little job to do, I think they should remove it from the manual, I finally forced myself to start wading through it, and it is still in there. I expect they have not got round to it yet. :uhuh:
Rainmeter is backwards compatible, so that's why the said forms are still mentioned, because they still work. Plus, they are already placed in the Deprecated Bangs section and not in the main ones, which is self explanatory. At this time, only older skins that weren't updated in ages use them, and that's the reason they still exist, so that even old skins could work in modern Rainmeter.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16200
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: help with animation - i'm new here

Post by balala »

LuciferVisuals wrote: April 25th, 2023, 9:12 pm But your last post was perfect, so refresh is out now, and now I have had a minute to look at your revision, what you did is obvious (WITH HIND SIGHT) and I better still I completely understand it, so that's a win-win and I'm totally happy about it.
I'm glad and you're welcome. :great:
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: help with animation - i'm new here

Post by LuciferVisuals »

Yincognito wrote: April 26th, 2023, 12:09 pm Rainmeter is backwards compatible, so that's why the said forms are still mentioned
Ah-So... TBH I have been dipping in and out of manual, searching for, or looking up, specific things, more like a reference work or dictionary. I hadn't noticed the depreciated reference. That explains why it's there, thanks for clarification.



K

Btw I think the Orville, was only intended to be one series.... Then after a break, a second series appeared, then I recently discovered a third. So I could be Seth MacFarlane the creator and one of the stars keeps getting talked into doing another by popular demand. You might wait a long time If you wait till its finished because he also created the television series Family Guy in 1999 and I think they are still making new ones. The Orville started in 2017, Three series so far, each stand alone, but I would not be surprised if there are more, Its seriously good, and seriously different, and if you like his humor its, also has a fair bit of adult humor.
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: help with animation - i'm new here

Post by LuciferVisuals »

balala wrote: April 25th, 2023, 8:56 pm Great!

Feel free to come back with related questions, if any arises.
That is finished and works perfectly, and I have managed to add the third animation yo it,which also works perfectly. This question is about a different animation (But similar) If you have seen star gate, the first three are the Whoosh effect when you turn the gate on, this stabilises into the pool of water effect, and the last was this water disappearing as you turn the gate off.....

That is all working perfectly and seamlessly.

This should be simple by comparison, but it is giving me problems. The Star gate has a metal Iris That from time to time they close over it,

I have made the animation clips of this 0 to 8 , ( I have made two sets, one for close the iris and a second set for open the iris) These are the same images in reverse order. I tried to use one set with a negative calc but that was not working at all, so I simplified the problem into two different animations, which works, but something is not perfect.

Notice it stops on frame 8 which works,That is not a mistake, when closing the iris I need it to stop on the last frame (so the iris is in the closed position at the end of the cycle). The same applies to opening it (because I made a second set of images in reverse order), so in that set the last one is Iris wide open.

This code works perfectly the first time you use it, it both closes the iris, and then opens it again, But it will not work a second time. Let me know if you want the images to play with this to see the problem. But it might be something obvious to you, it's very similar to the previous code, An I cannot see why it only works once.

Keith,

Code: Select all

 ;*********************  CLOSE IRIS *************************************** 
 [measurecloseIrisFrameCalc]
Measure=Loop
StartValue=0
EndValue=7
Increment=1
LoopCount=1
IfCondition=(#CURRENTSECTION#>=8)
IfTrueAction=[!DisableMeasure "#CURRENTSECTION#"][!Redraw]
Disabled=1

[metercloseIrisFrame]
meter=Image
ImageTint=255,255,255,255
x=220
y=225
w=700
h=700
ImageName="#@#closeIris\closeIris[measurecloseIrisFrameCalc].png"
DynamicVariables=1
Hidden=1
 ;*********************  open IRIS ***************************************
 [MeasureOpenIrisFrameCalc]
Measure=Loop
StartValue=0
EndValue=7
Increment=1
LoopCount=1
IfCondition=(#CURRENTSECTION#>=8)
IfTrueAction=[!DisableMeasure "#CURRENTSECTION#"][!Redraw]
Disabled=1
[meterOpenIrisFrame]
meter=Image
ImageTint=255,255,255,255
x=220
y=225
w=700
h=700
ImageName="#@#OpenIris\OpenIris[measureOpenIrisFrameCalc].png"
DynamicVariables=1
Hidden=1
;******************************************************************************************
[CloseIris]
 Meter=Button
 ButtonImage=#@#Buttons\Activate2.png
 X=650
 Y=825
 W=46
 H=46
ButtonCommand=[!EnableMeasure "measureCloseIrisFrameCalc"][!DisableMeasure "measureOpenIrisFrameCalc"][!HideMeter MeterOpenIrisFrame][!ShowMeter MeterCloseIrisFrame][!HideMeter closeIris][!ShowMeter openIris]
[OpenIris]   
;Was ACTivE
 Meter=Button
 ButtonImage=#@#Buttons\Activate2.png
 X=200
 Y=825
 W=46
 H=46
ButtonCommand=[!EnableMeasure "measureOpenIrisFrameCalc"][!DisableMeasure "measureCloseIrisFrameCalc"][!HideMeter MetercloseIrisFrame][!ShowMeter MeterOpenIrisFrame][!HideMeter openIris][!ShowMeter CloseIris]
Hidden=1
;******************************************************************************************************

Oh BTW, I removed all the [!Rainmeter.....etc from my code 960 OF THEM !!!! :twisted:

K
Last edited by Brian on April 29th, 2023, 5:07 am, edited 2 times in total.
Reason: Please use [code] tags. It's the </> button.
User avatar
Yincognito
Rainmeter Sage
Posts: 7199
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: help with animation - i'm new here

Post by Yincognito »

LuciferVisuals wrote: April 28th, 2023, 9:25 pmI tried to use one set with a negative calc but that was not working at all, so I simplified the problem into two different animations [...] And I cannot see why it only works once.
I'll let balala answer the specific question(s) if needed, I'm just going to point out the obvious: both the Loop measures and the Calc ones can be made to "ping pong" back and forth between values. The Calcs, as you guessed, do this via alternating between positive and negative incrementation (not sure why you didn't succeed with that one, cause it should have worked), and the Loops do this via alternating the value of the InvertMeasure option. Both of these are either alluded to or explicitly stated in the manual, especially in the case of Loops - check the 2nd example on that page, it's almost what you need.

What this means is that you don't necessarily need 2 sets of images, 2 Loops, etc. One is enough:

Code: Select all

[Rainmeter]
Update=500
DynamicWindowSize=1
AccurateText=1

[Variables]
Start=0
End=10
Step=1
Invert=0

---Measures---

[Loop]
Paused=1
Measure=Loop
StartValue=#Start#
EndValue=#End#
Increment=#Step#
LoopCount=1
InvertMeasure=#Invert#
;OnUpdateAction=[!SetVariable Invert ([#CURRENTSECTION#]=0+1?0:([#CURRENTSECTION#]=10-1?1:#Invert#))]
DynamicVariables=1

---Meters---

[Increment]
Meter=String
X=0
SolidColor=255,0,0,255
Padding=5,5,5,5
AntiAlias=1
Text=Increment
LeftMouseUpAction=[!PauseMeasure Loop][!SetVariable Invert 0][!UnpauseMeasure Loop]

[Value]
Meter=String
X=120
W=60
SolidColor=0,255,0,255
Padding=5,5,5,5
AntiAlias=1
StringAlign=Center
MeasureName=Loop

[Decrement]
Meter=String
X=170
SolidColor=0,0,255,255
Padding=5,5,5,5
AntiAlias=1
Text=Decrement
LeftMouseUpAction=[!PauseMeasure Loop][!SetVariable Invert 1][!UnpauseMeasure Loop]
LoopIncDec.jpg
This does what you need when it comes to measures, I'm guessing adapting / adjusting stuff for your buttons / other meters / scenario won't be a problem by now, if you prefer to do it this way. If you change the direction in the middle of the iteration, it will start from one of the interval bounds instead of continuing from where you were (like a Calc would do, for example), because this is how Loops behave (and one of the reasons they're not used so much otherwise).

P.S. I let the commented OnUpdateAction there because, along with the Invert variable, it's the shorter version what [MeasurePingPong] from the manual does, when it comes to a continuously updated measure (i.e. not paused or disabled). The +1 and -1 in the related conditional can be modified to +0 and -0 if staying for one more update on the interval bounds is desired. Naturally, since it's commented, you probably won't need it so it can be removed - it's there for reference, since in your case the pausing, measure inversion and unpausing do the same in the mouse actions.

P.S.S. Oh, and can you enclose the code you post between code tags like illustrated below? It would be much easier to follow that way:
Code.jpg
You do not have the required permissions to view the files attached to this post.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth