Thread Tools Display Modes
01-31-14, 01:24 PM   #1
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
Feature request: animations

This is a crosspost to http://www.wowinterface.com/forums/s...343#post290343


Currently a widget will be reset when an animation ends (to it's original position, angle, etc.).

An option/flag to retain the widgets position, angle, etc. at the end of an animation would be a great addition to the animation feature. For example to 'permanently' rotate a widget.

Thank you.
  Reply With Quote
01-31-14, 05:52 PM   #2
Choonstertwo
A Chromatic Dragonspawn
 
Choonstertwo's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2011
Posts: 194
This would quite a handy addition.
  Reply With Quote
02-01-14, 04:48 AM   #3
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
You mean like animationGroup:SetLooping("REPEAT"), or i'm not sure what do you mean.
  Reply With Quote
02-01-14, 07:26 AM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
No, he means that if you do:
Code:
local frame = CreateFrame("Frame")
frame:SetAlpha(0)

local group = frame:CreateAnimationGroup()

local anim = group:CreateAnimation("ALPHA")
anim:SetChange(1)
anim:SetDuration(1)

group:Play()
... the frame will fade in from 0% to 100% opacity over 1 second, but at the end of the 1 second, it will drop back to the original 0% opacity. He wants an option for it to remain at the 100% opacity state, without having to add an OnFinished script that manually applies that value. For an alpha animation, that's obviously easy, but for an animation group that's moving and rotating whole frames, for example, the whole point of using the animation is so that you don't have to do all the math yourself to move and rotate the frame, so it's annoying to have to manually duplicate the final state of the animation in an OnFinished script.

Looping would not help here, as a loop would just make the frame fade in and out repeatedly, which is not the desired behavior.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
02-01-14, 08:59 AM   #5
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
Yes, that's exactly what I was asking for.

At the moment I'm doing it via ag:SetEndDelay() and then pausing the animation at onFinish (which is fired if the animation itself is done and before the delay starts).

But I wouldn't consider this as a good practice. It's rather a bad hack than 'using a feature'.
I introduces some unwanted problems too.

It's even worse with rotating than with fading or translating. Afaik the animation is the only way to rotate a frame (let's say an action button that represents a clickable area). The only other way to rotate something is SetTexCoord(), which applies to textures only.

Last edited by Duugu : 02-01-14 at 10:04 AM.
  Reply With Quote
02-01-14, 09:54 AM   #6
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Phanx View Post
No, he means that if you do:
Code:
local frame = CreateFrame("Frame")
frame:SetAlpha(0)

local group = frame:CreateAnimationGroup()

local anim = group:CreateAnimation("ALPHA")
anim:SetChange(1)
anim:SetDuration(1)

group:Play()
... the frame will fade in from 0% to 100% opacity over 1 second, but at the end of the 1 second, it will drop back to the original 0% opacity. He wants an option for it to remain at the 100% opacity state, without having to add an OnFinished script that manually applies that value. For an alpha animation, that's obviously easy, but for an animation group that's moving and rotating whole frames, for example, the whole point of using the animation is so that you don't have to do all the math yourself to move and rotate the frame, so it's annoying to have to manually duplicate the final state of the animation in an OnFinished script.

Looping would not help here, as a loop would just make the frame fade in and out repeatedly, which is not the desired behavior.
I see, sadly animationgroups have so many issues with them, thats why so few developer uses it. They basically only created for the spell activation overlay effects, and it's even buggy there.
  Reply With Quote
02-01-14, 09:56 AM   #7
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Also you could add this to the list:

If you animate something with SetGradientAlpha added it drop it's colors during the animation.
  Reply With Quote

WoWInterface » Developer Discussions » Wish List » Feature request: animations

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off