Message 1 of 11
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everybody I wrote a script that allows me to smart bake and kill constraints to a selected object in the scene. It works as intended, the only problem is that it doesnt remove the blendParent label node in the channel box.
this is the script:
#Bake and kill constraint def FD_simple_SmartBake(): #loc list userSel = [] len(userSel) # get the user selection sel = mc.ls(sl=1) userSel.append(sel) if len(sel) != 0: #for loc in LocList: # mc.select (loc, add=1) start = mc.playbackOptions(q=True, min=True) end = mc.playbackOptions(q=True, max=True) mc.bakeResults(sm=1, sr=1, t=(start, end)) else: mc.warning('Please make a selection') for obj in sel: mc.delete(cn=1) FD_simple_SmartBake()
if I just run the code to kill the constraint mc.delete(cn=1) without all the function, it works fine and remove the blendParent label from the channel box as well.... Something stupid I think but i dont understand why
Any help would be greatly appreciated
Thanks
Flys
Solved! Go to Solution.