How can I exclude bones from the ART build control rig process

Hi,
Im sure I can do this with the pre build script but I have no idea how to do it.

What I have is a fully skinned character in the ART at the skin weight step.
For better visualisation I already build a control rig for the face of my character that is mainly driven by “set driven keys”.
When building the control rig these keys seem to get broken, the bones in question are leaf bones createt with the art and would not need any further controls created by the ART tool.
I tried temporary unparenting the bones I would like to be ignored but then I get a error stating that no object matches their names.

Could you help me by telling me what I would have to write in the pre/post execute MEL scipts for the bones in question to be ignored by the build control rig process in the ART Tool?

I realize that it would have been easier to set up the custom controls after building the rig.

Thanks for you’re time.

Hey there!

The current best way to do this would be to actually create these bones in a post script. That way, they are created after the rig is created.

This is super hacky, but it will work :slight_smile:
I would first create a locator for each of your joints you don’t want the tool to touch and point/orient constrain that locator to the corresponding joint. Name it the same as the joint with an “_loc” suffix or something. You’ll use this in the post script to position the created joints.

Then in a post script, you can do the following (in Python):

#create the joints like so:

#create our first joint, making sure nothing is selected when we create.
cmds.select(clear = True)
cmds.joint(name = "yourJointName1")
cmds.select(clear = True)

#position this joint
constraint = cmds.parentConstraint("yourJointName1_loc", "yourJointName1")[0]
cmds.delete(constraint)

#create a second joint
cmds.select(clear = True)
cmds.joint(name = "yourJointName2")
cmds.select(clear = True)

#position the second joint
constraint = cmds.parentConstraint("yourJointName2_loc", "yourJointName2")[0]
cmds.delete(constraint)

#then parent the joints how you want:
cmds.parent("yourJointName1", "yourJointName2")
cmds.parent("yourJointName2", "head")

Save that bit out as a python file and slot it into your post script. Holler at me if you run into any issues :slight_smile:

Thanks, I will try this and report back :slight_smile:

Finally found the time to try this but sadly I cant get it to work.
I only did what you said for a few bones to try it out but I get a “Post Script failed to execute properly” error.
Am I doing something wrong?

http://i4.minus.com/ibqf0WamweB4yl.PNG

http://i3.minus.com/ibtCnVcedDRdSs.PNG

 #create our first joint, making sure nothing is selected when we create.
 cmds.select(clear = True)
 cmds.joint(name = "jaw")
 cmds.select(clear = True)
 
 #position this joint
 constraint = cmds.parentConstraint("jaw_loc", "jaw")[0]
 cmds.delete(constraint)
 
 #create a second joint
 cmds.select(clear = True)
 cmds.joint(name = "jaw_end")
 cmds.select(clear = True)
 
 #position the second joint
 constraint = cmds.parentConstraint("jaw_end_loc", "jaw_end")[0]
 cmds.delete(constraint)
 
 #create a 3 joint
 cmds.select(clear = True)
 cmds.joint(name = "tongue02")
 cmds.select(clear = True)
 
 #position the 3 joint
 constraint = cmds.parentConstraint("tongue02_loc", "tongue02")[0]
 cmds.delete(constraint)
 
 #create a 4 joint
 cmds.select(clear = True)
 cmds.joint(name = "tongue03")
 cmds.select(clear = True)
 
 #position the 4 joint
 constraint = cmds.parentConstraint("tongue03_loc", "tongue03")[0]
 cmds.delete(constraint)
 
 #create a 5 joint
 cmds.select(clear = True)
 cmds.joint(name = "tongue01")
 cmds.select(clear = True)
 
 #position the 5 joint
 constraint = cmds.parentConstraint("tongue01_loc", "tongue01")[0]
 cmds.delete(constraint)
 
 #then parent the joints how you want:
 cmds.parent("tongue03", "tongue02")
 cmds.parent("tongue02", "tongue01")
 cmds.parent("tongue01", "jaw_end")
 cmds.parent("jaw_end", "jaw")
 cmds.parent("jaw", "head")

The rotation of the “jaw” bone is driven by a jaw controler via set driven keys.

noticed and fixed the typo in the tongue03_loc but sadly it didnt fix the problem