Hi all,
I'm new to AS and the forum.. and using AS8.
I really want to animate separate keyframe in one track at a time ( ex: I just want to see the ball move , not to change its color _) It's there any way I can do that? ( may be with scripting, did anyone do something similar..)
I search though the forum and found one topic , but seems like it didn't tell the solution yet...
viewtopic.php?t=12430&postdays=0&postorder=asc&start=0
---------------------------------------------
Thought #1 : if I can't simply "disable" the keyframe of one track or even disable any keyframe at all in AS, I 've read somewhere
( exactly here: viewtopic.php?t=13935 )
what he did to save and modify the keyframes data is : he copy the keyframe to an invisible temporary track( or layer???)
Can you guys give me some advice, direction for doing such a request... I'm very appriciated that!!!
I'm not a Lua programer but a very strong Java programer so scripting will not be the hard part for me, I just want to ask if I could find an existing solution somewhere, or some direction ! Thank again!
How can I disable an animation track ( ex: The transalation)
Moderators: Víctor Paredes, Belgarath, slowtiger
- Víctor Paredes
- Site Admin
- Posts: 5815
- Joined: Wed Jan 26, 2005 12:18 am
- Location: Barcelona/Chile
- Contact:
I'm not sure if I understood, but try with this:
go to the program preferences and uncheck "consolidate timeline channels", that will let you look each channel with its own keyframes.
go to the program preferences and uncheck "consolidate timeline channels", that will let you look each channel with its own keyframes.






Moho co-owner
Previously Rigged animation supervisor: My father's dragon, Wolfwalkers & Star Wars Visions "Screecher's Reach"
My personal Youtube Channel
Oh, Sorry for my very bad English !selgin wrote:I'm not sure if I understood, but try with this:
go to the program preferences and uncheck "consolidate timeline channels", that will let you look each channel with its own keyframes.
I 've already known that I can "see" separated animation track, what I'm asking is how to disable/enable those tracks ( ex: Layer Translation, Shape Color ...etc)
Any script's property of the Keyframe object let me disable a single keyfreme or a whole track ?
Thank for quick reply.
Hi there... If I've understood it well, I suppose that (in its most simple incarnation) the layer/embedded script could start to look like follows:
So the above uncommented lines representing layer translation channels would force layer to stay "freezed" at its zero frame position, meanwhile its entire channel keyframes remain unaltered and ready to act again as soon as the corresponding channel line of code be commented or the script entirely removed.
Well, that's for the main layer transform channels but I think any other layer channel could be added similarly; point or bone animation channels, however, would require some more work, like iterations, etc....
I have separated axis in order to allow a little more control, so you can play to comment (--) whatever you want to experiment with different results and get the rough idea. Of course this is the very basics (more concretely the very basics of "my" personal starting point) so not sure if other ways could be possible or even more advisable. Of course it could/should be developed to something more advanced and/or flexible, but... well that would require time xP
Code: Select all
function LayerScript(moho)
if (moho.frame ~= 0) then
local currentLayer = moho.layer
local zeroTrans = currentLayer.fTranslation:GetValue(0)
local zeroScale = currentLayer.fScale:GetValue(0)
local zeroRotX = currentLayer.fRotationX:GetValue(0)
local zeroRotY = currentLayer.fRotationY:GetValue(0)
local zeroRotZ = currentLayer.fRotationZ:GetValue(0)
--LAYER TRANSLATION CHANNEL:
currentLayer.fTranslation.value.x = zeroTrans.x
currentLayer.fTranslation.value.y = zeroTrans.y
currentLayer.fTranslation.value.z = zeroTrans.z
--LAYER SCALE CHANNEL:
--currentLayer.fScale.value.x = zeroScale.x
--currentLayer.fScale.value.y = zeroScale.y
--currentLayer.fScale.value.z = zeroScale.z
--LAYER ROTATION CHANNEL:
--currentLayer.fRotationX.value = zeroRotX
--currentLayer.fRotationY.value = zeroRotY
--currentLayer.fRotationZ.value = zeroRotZ
end
end
Well, that's for the main layer transform channels but I think any other layer channel could be added similarly; point or bone animation channels, however, would require some more work, like iterations, etc....
I have separated axis in order to allow a little more control, so you can play to comment (--) whatever you want to experiment with different results and get the rough idea. Of course this is the very basics (more concretely the very basics of "my" personal starting point) so not sure if other ways could be possible or even more advisable. Of course it could/should be developed to something more advanced and/or flexible, but... well that would require time xP
...
Thank for your detail instrustion, really appriciate that!
Now I think I've get the idea, let me repeat once again:
1. Create a layer/embedded script
2. Let all the value of the current keyframe ( if ~=0 ) to be exatly equal to the value of frame "ZERO" in the current track.
3. Apply the script to the current layer??? ( is that right)
----------------------------------------------------------------------
If I want to have a button in the timeline to toogle the layer, is it possible, or I should make an extra menu/toolbar like
viewtopic.php?t=16862
Anyway, thank so much for your advise
Now I think I've get the idea, let me repeat once again:
1. Create a layer/embedded script
2. Let all the value of the current keyframe ( if ~=0 ) to be exatly equal to the value of frame "ZERO" in the current track.
3. Apply the script to the current layer??? ( is that right)
----------------------------------------------------------------------
If I want to have a button in the timeline to toogle the layer, is it possible, or I should make an extra menu/toolbar like
viewtopic.php?t=16862
Anyway, thank so much for your advise
You're welcome 
Well, that's basically the steps and behavior; the little trick here is to apply the frame 0 values (or whichever you want) at current frame "on the fly", I mean, not storing the value or affecting keyframes in any way, and fortunately that's precisely what that fWhatever kind of functions seems to do.
About to add a button or something so... well, only tool scripts can add buttons to the toolbar (in any case in Timeline), but if you try to use a tool script instead an embedded one for this matter, well, let's say that (in the hypothetical case it could be achieved) you'd start to move into the unofficial terrain and things would start to become much more complicated...
There is only one "official" (not sure if it could be considered like that) chance to add some UI controls to an embedded script, as you could start to study from
HERE but I think there is unresolved issues (I remember some "undo" problems, i.e.) and, anyway, I'm not totally sure if that would be useful for this particular case.
Well, besides that and as I still said, the solution could be much more complete and advanced (all you want or need indeed) cause precisely now ASP has much more and incredible ways to deal with animation channels than ever before (see "List Channel" menu script to get an idea). But the ways you can interact with embedded scripts are definitely limited, and you should make use of your imagination (using objects name to store customizable data, i.e.) or even some hacks to do the job (I always have wanted to study in deep the possibilities to stay some kind of tools and embedded scripts communication), but I think it's necessary to know very well how scripting interface and ASP works together and what are the "limits" to start with such a complicated stuff...
So... well, that was my thoughts and hope them help in some way,
Greetings & welcomed BTW

Well, that's basically the steps and behavior; the little trick here is to apply the frame 0 values (or whichever you want) at current frame "on the fly", I mean, not storing the value or affecting keyframes in any way, and fortunately that's precisely what that fWhatever kind of functions seems to do.
About to add a button or something so... well, only tool scripts can add buttons to the toolbar (in any case in Timeline), but if you try to use a tool script instead an embedded one for this matter, well, let's say that (in the hypothetical case it could be achieved) you'd start to move into the unofficial terrain and things would start to become much more complicated...
There is only one "official" (not sure if it could be considered like that) chance to add some UI controls to an embedded script, as you could start to study from

Well, besides that and as I still said, the solution could be much more complete and advanced (all you want or need indeed) cause precisely now ASP has much more and incredible ways to deal with animation channels than ever before (see "List Channel" menu script to get an idea). But the ways you can interact with embedded scripts are definitely limited, and you should make use of your imagination (using objects name to store customizable data, i.e.) or even some hacks to do the job (I always have wanted to study in deep the possibilities to stay some kind of tools and embedded scripts communication), but I think it's necessary to know very well how scripting interface and ASP works together and what are the "limits" to start with such a complicated stuff...
So... well, that was my thoughts and hope them help in some way,
Greetings & welcomed BTW

...
This work definitely needs our imagination :p ...
Anyway, my thoughts about the function :
1. Make an toolbar script to toogle the "Frezze/Unfrezze Current Animation Track"
2. This tool script, then do one of below functions:
A) in the first attemp is just simply add/remove an embedded script named "FrezzeAniTrack" ...
-------(?) this solution will hurt because it also remove any other embedded script ( because there is only one embedded script for one layer, am I right? )
-------> but it's still quickest way I test out the function by now.
B) I still think of the other way:
to store animation track key frames in one "invisible-temp" layer - or may be an "in-memory" layer , and then I deal with naming the two layers and copy 'n paste work.
-------------------------------------------------------------
I will take a look at the "official" embedded UI and the "List Channel" script, may be I will find something useful. Thank in advance, you 're so kind! :p
==============================================
Edit: anyway, what make it so HARDDDDD to make a "embedded script" interact with a toolbar,
I saw that in the translate tool, when I move the cursor, the X, and Y parameter still stay the same until I realease the button... is that the evidence of
"we can't refresh the toolbar, just it refresh itself by asking a global var"
In other programing language (I came from java and C#) ... we just do:
onMouseMove(){
...
global.ui.toolbar.find("MyToolbar").setParam("X",mouse.X); ??
}
or something like that? Is it possible in AS scripting?
Anyway, my thoughts about the function :
1. Make an toolbar script to toogle the "Frezze/Unfrezze Current Animation Track"
2. This tool script, then do one of below functions:
A) in the first attemp is just simply add/remove an embedded script named "FrezzeAniTrack" ...
-------(?) this solution will hurt because it also remove any other embedded script ( because there is only one embedded script for one layer, am I right? )
-------> but it's still quickest way I test out the function by now.
B) I still think of the other way:
to store animation track key frames in one "invisible-temp" layer - or may be an "in-memory" layer , and then I deal with naming the two layers and copy 'n paste work.
-------------------------------------------------------------
I will take a look at the "official" embedded UI and the "List Channel" script, may be I will find something useful. Thank in advance, you 're so kind! :p
==============================================
Edit: anyway, what make it so HARDDDDD to make a "embedded script" interact with a toolbar,
I saw that in the translate tool, when I move the cursor, the X, and Y parameter still stay the same until I realease the button... is that the evidence of
"we can't refresh the toolbar, just it refresh itself by asking a global var"
In other programing language (I came from java and C#) ... we just do:
onMouseMove(){
...
global.ui.toolbar.find("MyToolbar").setParam("X",mouse.X); ??
}
or something like that? Is it possible in AS scripting?
Hiii... Well, just in case someone still be interested, I've been working on this subject in a way which possibilities I always had wanted to explore since MC posted that "embedded UI" first approach; well, this is a simple way to interact with eScripts, and could be many and with much more possibilities... but, for this particular "Freeze Channels" case, this kind of control where there is no need to store data or settings can be more then enough. Just, a screen capture:
Greetings,
Ramón López.
PS: Yeah, atomix, I think that treat to get a "Toolbar" solution instead a "Dialogue" one for this cases can be much more complicated and, in someway, even limited (although I admit it would be coolest!); so I opted for the second one instead. Anyway, although maybe you be still aware, there is no such refresh/update limitation that you said, just try and have a look inside "lm_line_width.lua" tool to get an idea, it works differently as you suggested above (java & C#), but it's definitely possible (sorry for the delay about the info).
- - The Tool/Button (to install): rl_lost_fiddle_button_ASP8.1_20120126_2055b.zip (Click over the item and go to "File -> Download") or press right-top button: "Download 5KB".
- The eScript (to embedd): rl_freeze_channels_eScript.lua (Go to "File -> Download") or press right-top button: "Download 16KB".
Greetings,
Ramón López.
PS: Yeah, atomix, I think that treat to get a "Toolbar" solution instead a "Dialogue" one for this cases can be much more complicated and, in someway, even limited (although I admit it would be coolest!); so I opted for the second one instead. Anyway, although maybe you be still aware, there is no such refresh/update limitation that you said, just try and have a look inside "lm_line_width.lua" tool to get an idea, it works differently as you suggested above (java & C#), but it's definitely possible (sorry for the delay about the info).
...