I don't think I'd ever be able to exhaust the possibilities of AS or lua scripting. Granted there are things scripting can't do, but man, all the things it can do is awesome.
Man, I love me some lua scripting
Moderators: Víctor Paredes, Belgarath, slowtiger
- synthsin75
- Posts: 10363
- Joined: Mon Jan 14, 2008 2:20 pm
- Location: Oklahoma
- Contact:
Man, I love me some lua scripting
Just needed to make all of my bone names unique so I could manage them easier (had a bunch of duplicate names). Took like four minutes to write a script to do this. It's just amazing to be able to do that.
I don't think I'd ever be able to exhaust the possibilities of AS or lua scripting. Granted there are things scripting can't do, but man, all the things it can do is awesome.

I don't think I'd ever be able to exhaust the possibilities of AS or lua scripting. Granted there are things scripting can't do, but man, all the things it can do is awesome.
- synthsin75
- Posts: 10363
- Joined: Mon Jan 14, 2008 2:20 pm
- Location: Oklahoma
- Contact:
Even better would be a scrpt that will instantly name the bones in any rig you have created in AS say the root bone, left1, left2, left3, right1, right2, right3 etc ...maybe this script could allow you type in your preferences for bone names too?
Just a seed for an idea that would be very time saving.
D.K
Just a seed for an idea that would be very time saving.
D.K
- synthsin75
- Posts: 10363
- Joined: Mon Jan 14, 2008 2:20 pm
- Location: Oklahoma
- Contact:
That's all beyond my scripting ability right now. I know Genete has a script or two that generates bones, but I have no idea how to do that yet.
It might be possible to modify the add bone tool so that you have some control over the automatic naming. Like checking a left or right checkbox to add 'left' or 'right' to the end of each bone's name as they are created.
That might help with Vern's flip bones script, but it's very low on my priorities.
It might be possible to modify the add bone tool so that you have some control over the automatic naming. Like checking a left or right checkbox to add 'left' or 'right' to the end of each bone's name as they are created.
That might help with Vern's flip bones script, but it's very low on my priorities.
Hi sythnsin75.....Sorry, please bear with me i'm just trying to understand a bit about Lua scripting....
You say your script can rename bones and it was easy to write?
Can the script name bones that have no names as in a freshly created bone rig?
If not....is it easy to adjust the script to do this or is this a harder task than I am assuming?
Cheers
D.K
You say your script can rename bones and it was easy to write?
Can the script name bones that have no names as in a freshly created bone rig?
If not....is it easy to adjust the script to do this or is this a harder task than I am assuming?
Cheers
D.K
- synthsin75
- Posts: 10363
- Joined: Mon Jan 14, 2008 2:20 pm
- Location: Oklahoma
- Contact:
This script renames bones (with or without originally having names). But it doesn't do this in any specified order. It just cycles through them and names them 1, 2, 3, ...etc. Very simple.
Yes, this could name (by numbering) bones in a newly created rig. Right now it is only a menu script so it has to be run after all the bones are created, although it can be rerun after any additions.
The hard part would be to try to specify what bones get what names (like left and right). It is beyond my scripting ability to tell whether a bone is a left arm or right foot. If I had to guess, I'd say this is probably hard even for the scripting gurus.
Like I said, I only needed this to make all of the names unique after doing a lot of copy/paste bones.
If it were made into a tool then you could have a checkbox for adding a left or right extension to the numbering (like "3 left"). Then since I did this to work on only selected bones you could select all of the bone for one side, rename, and then do the same for the other side.
I guess I could add a dialog to choose the extension though. That wouldn't be too hard.
Yes, this could name (by numbering) bones in a newly created rig. Right now it is only a menu script so it has to be run after all the bones are created, although it can be rerun after any additions.
The hard part would be to try to specify what bones get what names (like left and right). It is beyond my scripting ability to tell whether a bone is a left arm or right foot. If I had to guess, I'd say this is probably hard even for the scripting gurus.
Like I said, I only needed this to make all of the names unique after doing a lot of copy/paste bones.
If it were made into a tool then you could have a checkbox for adding a left or right extension to the numbering (like "3 left"). Then since I did this to work on only selected bones you could select all of the bone for one side, rename, and then do the same for the other side.
I guess I could add a dialog to choose the extension though. That wouldn't be too hard.
I would be really interested in using your script just to name bones synthsin75.
Is it hard get the script to identify the root bone?
Maybe the script names the bones in the same way each time staring with the root bone? Assuming it does, you could probably have it create the first bone name as root?
Cheers
D.K
Is it hard get the script to identify the root bone?
Maybe the script names the bones in the same way each time staring with the root bone? Assuming it does, you could probably have it create the first bone name as root?
Cheers
D.K
- synthsin75
- Posts: 10363
- Joined: Mon Jan 14, 2008 2:20 pm
- Location: Oklahoma
- Contact:
- synthsin75
- Posts: 10363
- Joined: Mon Jan 14, 2008 2:20 pm
- Location: Oklahoma
- Contact:
http://www.mediafire.com/?munlcxeytzd
Here it is, but I'm not real sure how much better this is than enabling 'auto-name bones and shapes' in the preferences. Like I said, I only needed this because I had too many bones with duplicate names.

Here it is, but I'm not real sure how much better this is than enabling 'auto-name bones and shapes' in the preferences. Like I said, I only needed this because I had too many bones with duplicate names.
- synthsin75
- Posts: 10363
- Joined: Mon Jan 14, 2008 2:20 pm
- Location: Oklahoma
- Contact: