I'm trying to adapt a script that matches the movement two bones from the same skeleton, intending to change it so that the bones don't need to be in the same folder as each other, but could be in neighbouring switch folders instead and still have one affect the other. However the documentation doesn't seem to mention any way of targeting a skeleton layer/object or casting from a layer to a skeleton.
Does anyone know a way it can be done? I tried some possible method names but I kept being told they were null so I'm not sure what to check next.
Selecting a different skeleton
Moderators: Víctor Paredes, Belgarath, slowtiger
Re: Selecting a different skeleton
So, basically you're creating a bone rig in a child layer and you want to synchronize the bones across other child layers.
My first question is "Why not just build the skeleton in the parent layer?" In other words, instead of building the skeleton in the Bone Layers, just make them in the switch.
I've already created a bone group tool that makes managing groups of bones easy so that should eliminate any clutter issues.
Code: Select all
SWITCH LAYER
BONE LAYER A
BONE LAYER B
BONE LAYER C
I've already created a bone group tool that makes managing groups of bones easy so that should eliminate any clutter issues.
Re: Selecting a different skeleton
Actually the structure is more like this:
The idea is to have two versions of the one leg so that it can be both in front of and behind other layers and it's easy to toggle them from one to the other and they'll still match each others movements.
Code: Select all
SWITCH LAYER A
BONE LAYER A
BONE LAYER B
SWITCH LAYER B
BONE LAYER A
BONE LAYER B
Re: Selecting a different skeleton
Code: Select all
CHARACTER BONE --PUT BONES HERE
SWITCH LAYER A
BONE LAYER A
BONE LAYER B
SWITCH LAYER B
BONE LAYER A
BONE LAYER B
Re: Selecting a different skeleton
Because of the way the character is designed there's a bunch of bones on that layer already. We do have a way of making it work with the original script and a compromise on the layer structure, it just seems odd that I can't find a way to make Anime Studio look at the bones of a layer I found by code.
Re: Selecting a different skeleton
This is why I suggested bone groups. You can hide and reveal groups of bones at a time, solving the bone clutter issue.GaryC wrote:Because of the way the character is designed there's a bunch of bones on that layer already.
You could just use layer sorting or depth sorting and avoid having duplicate layers lagging your project file.GaryC wrote:We do have a way of making it work with the original script and a compromise on the layer structure,
You can, you just have to find a bone layer and then cycle through the bones to find the one you're searching for. You'll have to change the active layer though.GaryC wrote:it just seems odd that I can't find a way to make Anime Studio look at the bones of a layer I found by code.
Code: Select all
moho:SetSelLayer(bonelayer)
moho:Skeleton():Bone(id)