Save and load bone animation to any file!!!
Moderators: Víctor Paredes, Belgarath, slowtiger
Save and load bone animation to any file!!!
My scripts are done... for now.
WooHooo!
These will work as buttons in AS Standard!!!!
viewtopic.php?t=7842
I couldn't sleep. I had to finish them up. This is THE MOST AMAZING THING I've ever done. These have to be the coolest scripts I've ever created.
Now you can save out bone animation that can be loaded into the bone layer of any file that has the same named bones as the original. You can save out actions that can be loaded back into your file or any other file with the same setup.
If you do a save as and make a cool animation but want to "add" it to another file that is already done, just save the animation, load it into the other file.
Back up all your cool "actions" and walk cycles. Tiny text files with all the motion.
I will continue to update it. right now it doesn't save directly to an action time line but I'll work on that.
-vern
WooHooo!
These will work as buttons in AS Standard!!!!
viewtopic.php?t=7842
I couldn't sleep. I had to finish them up. This is THE MOST AMAZING THING I've ever done. These have to be the coolest scripts I've ever created.
Now you can save out bone animation that can be loaded into the bone layer of any file that has the same named bones as the original. You can save out actions that can be loaded back into your file or any other file with the same setup.
If you do a save as and make a cool animation but want to "add" it to another file that is already done, just save the animation, load it into the other file.
Back up all your cool "actions" and walk cycles. Tiny text files with all the motion.
I will continue to update it. right now it doesn't save directly to an action time line but I'll work on that.
-vern
- synthsin75
- Posts: 10276
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Yes!! I'm going to put this to work right now (still have 20 scenes left to animate for a deadline of 7/8. This will be enormously useful to get this finished, as I already have actions defined for other characters that I will just copy to my new ones).
Thanks in advance for all the hard work! (And for sharing!)
Thanks in advance for all the hard work! (And for sharing!)
Yes, you could apply these actions to any size character. Scaling and rotation are relative to the size of the bones. Everything is actually.
Of course there would be some limitations on proportions. If a character was fat and short the actions might need adjusting but that's small compared to the agony of doing a cool animated sequence over again and again because you can't save those action files.
I'm already at the point now where I can't imagine NOT having this ability. This is a huge breakthrough for me. I'm so happy with it and excited about the potential. I already sent Mike the link to the scripts and said this should be part of the next version. It's just too cool.
-vern
Of course there would be some limitations on proportions. If a character was fat and short the actions might need adjusting but that's small compared to the agony of doing a cool animated sequence over again and again because you can't save those action files.
I'm already at the point now where I can't imagine NOT having this ability. This is a huge breakthrough for me. I'm so happy with it and excited about the potential. I already sent Mike the link to the scripts and said this should be part of the next version. It's just too cool.
-vern
- synthsin75
- Posts: 10276
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Oh yeah, I definitely second that. This script adds HUGE functionality. Hell, you should get paid so they can advertise it as a new feature. Aside from some smaller stuff, this is the only thing the AS bone system was really missing.
Mmm, while you're talking to MC you might push again for some more scripting access. Hell, even if it's just given to you for developement purposes.
Mmm, while you're talking to MC you might push again for some more scripting access. Hell, even if it's just given to you for developement purposes.
Well... I might as reveal WHY I created these scripts in the first place.
I plan to create character packs for sale on Content Paradise. DK started this whole thing. He had this idea for character packs with interchangeable parts, like heads, hands hair, lcothes props etc. I developed a PERFECT rig. It's awesome. But I wanted a really cool slick way to save and add animated actions. AS standard users don't have actions. It was going to be real pain to sell to that market because it was so limited. It was very frustrating at first.
AS Standard doesn't have menu scripts... I thought... until I stuck a "menu" script in the tool folder and used it as a button. It works the same way as a menu script! Why did they take it out? Makes no sense.
DK is really the inspiration for this whole thing. He is responsible for lighting the fire under my arse to development this cool bone rig and to write these scripts. Since then he has taken a back seat on the project so I'm on my own now with it (Woohooo! More money for Vern!).
I always planned to give away the scripts for use with my character packs.
These scripts are going to be instrumental in streamlining character creation. I have one to start with so far with a couple of different outfits and various head shapes.
I still have to do a bunch of animated actions for it, walk cycles, running, sitting, different poses, but now with these scripts it is SOOOOO much easier to transfer them from one file to another.
-vern
I plan to create character packs for sale on Content Paradise. DK started this whole thing. He had this idea for character packs with interchangeable parts, like heads, hands hair, lcothes props etc. I developed a PERFECT rig. It's awesome. But I wanted a really cool slick way to save and add animated actions. AS standard users don't have actions. It was going to be real pain to sell to that market because it was so limited. It was very frustrating at first.
AS Standard doesn't have menu scripts... I thought... until I stuck a "menu" script in the tool folder and used it as a button. It works the same way as a menu script! Why did they take it out? Makes no sense.
DK is really the inspiration for this whole thing. He is responsible for lighting the fire under my arse to development this cool bone rig and to write these scripts. Since then he has taken a back seat on the project so I'm on my own now with it (Woohooo! More money for Vern!).
I always planned to give away the scripts for use with my character packs.
These scripts are going to be instrumental in streamlining character creation. I have one to start with so far with a couple of different outfits and various head shapes.
I still have to do a bunch of animated actions for it, walk cycles, running, sitting, different poses, but now with these scripts it is SOOOOO much easier to transfer them from one file to another.
-vern
- Darramouss
- Posts: 96
- Joined: Fri May 23, 2008 2:34 am
- Location: Melbourne, Australia
Vern, you are a legend. I've told you that before, but this script requires me to repeat myself. My mind is already bubbling away with the possibilities this brings!!
Quick question for you. I know this sounds lazy but is there the possibility of a button that selects all check-boxes in a future release of the script?
Quick question for you. I know this sounds lazy but is there the possibility of a button that selects all check-boxes in a future release of the script?
Sheer will is my greatest talent - Sledge Hammer!
I'd buy one of your character packs just for the rig (or perhaps you could just sell the rig separately). And, of course, for your various animations.
You never have enough motions -- again, one of the things I'm used to coming from the 3D world. I have literally hundreds of walks I can adapt to any character in that software, and it makes a great jumping off point even if you only slightly modify it. But I've never tried to do anything like that with AS because there was no ability to easily transfer it to another character.
I'm off just now to try this out for the first time -- I have a great "sneak" I developed for a character and was dreading having to redo it again for another one (what I usually do is bring in the character on one layer and then eyeball the line up of each frame -- not a huge deal but very very tedious). This may well enable me to make my deadline!
You never have enough motions -- again, one of the things I'm used to coming from the 3D world. I have literally hundreds of walks I can adapt to any character in that software, and it makes a great jumping off point even if you only slightly modify it. But I've never tried to do anything like that with AS because there was no ability to easily transfer it to another character.
I'm off just now to try this out for the first time -- I have a great "sneak" I developed for a character and was dreading having to redo it again for another one (what I usually do is bring in the character on one layer and then eyeball the line up of each frame -- not a huge deal but very very tedious). This may well enable me to make my deadline!
Okay, first report -- it's going to be useful. Still a lot of rough edges (but that's to be expected).
The button save did not work for me -- load did. I could run both from the scripts menu though (and I did have them properly in my button, along with the text file edited -- the save button is there, it just doesn't do anything when I select it).
The other thing is that I tried to save an animation that went from 1 to 21 and no matter what I tried it would not load in that way. It loaded starting at frame 2 (so I just dragged it backwards correctly). Also, because of that the bones behaved oddly on the first key (on frame 2, which should have been frame 1). They tried to reverse themselves on one leg. But this corrected itself once I moved all the keys back.
I like that the dialog remembers what things you want to load -- don't change that. For me all I really want is bone rotations anyway.
All in all you probably saved me a good 30 minutes tonight (well, I spent five or ten minutes typing this and playing around... but it's worth it!)
The button save did not work for me -- load did. I could run both from the scripts menu though (and I did have them properly in my button, along with the text file edited -- the save button is there, it just doesn't do anything when I select it).
The other thing is that I tried to save an animation that went from 1 to 21 and no matter what I tried it would not load in that way. It loaded starting at frame 2 (so I just dragged it backwards correctly). Also, because of that the bones behaved oddly on the first key (on frame 2, which should have been frame 1). They tried to reverse themselves on one leg. But this corrected itself once I moved all the keys back.
I like that the dialog remembers what things you want to load -- don't change that. For me all I really want is bone rotations anyway.
All in all you probably saved me a good 30 minutes tonight (well, I spent five or ten minutes typing this and playing around... but it's worth it!)
First off let me warn you that sometimes the key frame interpolation comes in as "Step". Currently the default interpolation is "Linear". I want to fix that so the key interpolaton is copied correctly.
I encountered a file where several bones came in with "Step" interpolation which made the imported animation really wonky. Once I seleted all the frames and set them to smooth it was okay.
----------
Thanks for the info mkelly! Keep it coming! I will look into these bugs. I have not had a problem with the frames being offset. I've been playing with the script for hours and hours with different files.
Is there any way you could supply me with the files so I can see what is happening? Even just the animation file? (you could just paste it here. Open in a text editor and copy it.). It would be better to have the files you used.
Also I haven't seen the error you describe. I've used both scripts over and over and over on many different files with all kinds of complex setups for hours and haven't had any errors yet. If you could take a screen grab of it or write down what it says that would be helpful.
It could be that whatever caused the frames to offset might have caused the error. When the save button didn't work something may have been messed up. Maybe it is having the exact same scripts with the same variables both as a tool and a menu? Those scripts stay "open". If the variables are global they could be conflicting.
It might even be line enders on the saved file. One bad character the whole thing craps out. It could be too that you used some attribute I missed in my testing that is loading funny.
Currently I only have it installed as a menu script. The save script should work as a button just like the load script. Have to look into that.
The macton script was really messy. I plan to redo the code properly over the weekend. Make it "smaller" and more efficient. I will look into the issue of "garbage collection".
------------
There is a "flaw" I think in AS as to how bones rotate. The initial set up on frame 0 is important especially if you use any bone binding. the problem is that bone binding can "spin" a bone around 360 degrees if the rotation isn't correct on frame 0. Sometimes when you draw a bone and the rotation SHOULD be close to 0 it is actually "357" or close to "360" which is bad later on in the time line.
I am always encountering this issue and now it really shows up. A bone in one file might be -4 degrees, and 354 degrees in another file. It's a subtle issue when you draw the bone. It it pokes just a little bit under 0 degrees it tends to get wonky. I've been trying to avoid that. For instance 354 should really be -6 or whatever it is in real math.

I encountered a file where several bones came in with "Step" interpolation which made the imported animation really wonky. Once I seleted all the frames and set them to smooth it was okay.
----------
Thanks for the info mkelly! Keep it coming! I will look into these bugs. I have not had a problem with the frames being offset. I've been playing with the script for hours and hours with different files.
Is there any way you could supply me with the files so I can see what is happening? Even just the animation file? (you could just paste it here. Open in a text editor and copy it.). It would be better to have the files you used.
Also I haven't seen the error you describe. I've used both scripts over and over and over on many different files with all kinds of complex setups for hours and haven't had any errors yet. If you could take a screen grab of it or write down what it says that would be helpful.
It could be that whatever caused the frames to offset might have caused the error. When the save button didn't work something may have been messed up. Maybe it is having the exact same scripts with the same variables both as a tool and a menu? Those scripts stay "open". If the variables are global they could be conflicting.
It might even be line enders on the saved file. One bad character the whole thing craps out. It could be too that you used some attribute I missed in my testing that is loading funny.
Currently I only have it installed as a menu script. The save script should work as a button just like the load script. Have to look into that.
The macton script was really messy. I plan to redo the code properly over the weekend. Make it "smaller" and more efficient. I will look into the issue of "garbage collection".
------------
There is a "flaw" I think in AS as to how bones rotate. The initial set up on frame 0 is important especially if you use any bone binding. the problem is that bone binding can "spin" a bone around 360 degrees if the rotation isn't correct on frame 0. Sometimes when you draw a bone and the rotation SHOULD be close to 0 it is actually "357" or close to "360" which is bad later on in the time line.
I am always encountering this issue and now it really shows up. A bone in one file might be -4 degrees, and 354 degrees in another file. It's a subtle issue when you draw the bone. It it pokes just a little bit under 0 degrees it tends to get wonky. I've been trying to avoid that. For instance 354 should really be -6 or whatever it is in real math.

Absolutely. I was too lazy to put that in.Quick question for you. I know this sounds lazy but is there the possibility of a button that selects all check-boxes in a future release of the script?

I know what that is!!!!mkelley wrote:Ooops, one more thing. After I used your scripts and then went to work on an action I now get a consistent error message which seems to think it's still in the middle of a script. IOW, I don't think you've cleaned things up completely.
Dagnabbit! It's that stupid "action" code that LM put in all their tool scripts to prevent people from using some tools or scripts inside an action. I will take that out.
-vern