PDA

View Full Version : Bone mirror problem


isthatcg
04-21-2008, 04:40 AM
I want to copy the right leg bone in the direction of Left through that script.
Problem has occured when I l turned R_Thigh_Bone to the Local X and executed that script.
How can I sovle that problem?




R_Thigh_Bone = $R_Thigh_Bone
R_Leg_Bone = $R_Leg_Bone
R_Leg_EndBone = $R_Leg_EndBone

L_ThighBone_X = R_Thigh_Bone.pos.x - $point01.pos.x
L_Leg_Bone_X = R_Leg_Bone.pos.x - $point01.pos.x
L_Leg_EndBone_X = R_Leg_EndBone.pos.x - $point01.pos.x
L_Thigh_Bone = bonesys.createbone [-L_ThighBone_X,R_Thigh_Bone.pos.y,R_Thigh_Bone.pos.z] [-L_Leg_Bone_X,R_Leg_Bone.pos.y,R_Leg_Bone.pos.z] -x_axis
L_Leg_Bone = bonesys.createbone [-L_Leg_Bone_X,R_Leg_Bone.pos.y,R_Leg_Bone.pos.z] [-L_Leg_EndBone_X,R_Leg_EndBone.pos.y,R_Leg_EndBone.pos.z] -x_axis
createEndBone L_Leg_Bone
L_Leg_EndBone = L_Leg_Bone.children[1]
L_Thigh_Bone.frontfin = on
L_Thigh_Bone.frontfinsize = 5
L_Thigh_Bone.sidefins = on
L_Thigh_Bone.sidefinssize = 5
L_Leg_Bone.frontfin = on
L_Leg_Bone.frontfinsize = 5
L_Leg_Bone.sidefins = on
L_Leg_Bone.sidefinssize = 5

L_Thigh_Bone.rotation = R_Thigh_Bone.rotation
L_Leg_Bone.rotation = R_Leg_Bone.rotation
L_Leg_Bone.parent = L_Thigh_Bone





http://isthatcg.com/data/BoneMirrorProblem.jpg

Fabiomussarela
04-22-2008, 12:30 PM
Hi, take a look at this: http://forums.cgsociety.org/showthread.php?f=98&t=598060&highlight=mirror+matrix

hope it helps.

RustyKnight
04-23-2008, 06:40 AM
I did something like this in an "auto rig" script I did some time ago...can't say I remember how, BUT I "borrowed" the code from the BoneTools script. If you have the time, you can dig around in there and see how they did it

Shane

CGTalk Moderation
04-23-2008, 06:40 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.