Page 1 of 1
NO multiple layers/bones with the same name
Posted: Mon Feb 26, 2007 6:12 pm
by heyvern
I feel this a really big issue. It causes trouble not only in production but in scripting as well.
Layers and bones always have unique "internal" IDs that are invisible to the user. Forcing unique names (just like the styles palette does.

) would streamline scripting and also remove a lot of issues surrounding that.
This could be a problem with backwards compatibility down the road (keeping with the "road" metaphor, cross that bridge when we get to it)
However since the ID is not related to the name internally, AS could just append a number to the names of multiple items with the same name and it shouldn't have an effect on the file, unless there are layer scripts that target the names of bones.
I am not aware of any situation where having two bones or layers with identical names is useful. If others disagree with this I would love to hear about it.
-vern
Posted: Mon Feb 26, 2007 7:19 pm
by Genete
Hmmm... Let me think...
The main problem now is the backwards compatibility and the fact that the scripts use the name of the bone/layer (shape?) to locate it. Perhaps it would be better modify the scripts in order to manage internally the ID of the bone? So when you select a bone (with mouse or dropdown menu) it shows also its real name (its ID). Then the script should work only with the ID and not with the actual name. Really the actual name is only for human recognition. I prefer to keep the posibility of have identical name of a shape/bone/group_of_points/layer in the anme file.
I make a void vote. I don't know for the moment....
Rgds
Genete
Posted: Mon Feb 26, 2007 7:33 pm
by heyvern
As far as scripting is concerned, if an "old" file is opened and AS has to "rename" duplicate bones or layers, a number could be added to the front or the back thus avoiding any problems with an extension used in a layer script.
I would really like to know how or when duplicated names could be beneficial since they are, as you said, only used for user reference? It is very confusing for me when I have multiple bones or layers with the same name.
I already use a modified bone selection tool that displays the bone ID next to the bone name. I use this for "targeted" scripting for my rig.
-vern
Posted: Mon Feb 26, 2007 10:01 pm
by Genete
I already use a modified bone selection tool that displays the bone ID next to the bone name. I use this for "targeted" scripting for my rig.
Yeah! and I want to see it in action!!!. It is possible that you post the new version of copy/paste script?
Regarding to the main stuff, perhps I was confused. The identical name of the bone/shape etc. should be for a different layer. For example I want to have some characters with a bone called Left_Arm in every bone layer of every character. Or the bones's ID numeration is different for each layer????

Posted: Mon Feb 26, 2007 11:33 pm
by heyvern
Oh crud!
You are right. There might be situations where layers would have the same name.
How about bones then? Would you not want all the bones (if they have a name) to be unique?
As for the copy/paste script, this is where I have been stopped. I am using a text list to select the bones.
If bones have the same name the whole thing falls apart because I can't use the msg argument like it is done using a menu.
In the original copy/paste script the menu items are dynamically created. So each menu item has a unique
msg property that can be used to identify which bone it represents. This
msg is sent to AS when a menu is selected.
A text list ITEM
has no msg property. Only a label and an ID based on it's position in the list which is constantly changing. Just one msg for the whole thing. So there is no way to keep track of everything without a lot of extra coding... which I just haven't gotten to yet.
The custom bone tool I use has a bug in it which I haven't bothered fixing. I just avoid the situation that causes the bug which is easy for me... but I wouldn't expect everyone to do that.
Plus, the new bone select tool for AS works differently. I use mine for Moho on the Mac. I would need to modify the AS bone select tool to show the bone ID. It might be different and I would have to switch computers to really test it which is a bit of a pain to do at the moment (I spilled coffee on my PC keyboard and I'm waiting for it to dry out.

).
-vern