Advertisement
yaotungyu

follicle pop bake

Oct 19th, 2021
913
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.14 KB | None | 0 0
  1. #bake follicle attached fk chain
  2. #check chain name
  3. selected_cns = 'Dinah_01:L_Whisker03_A_Drv_Prc'
  4. flc_driver = cmds.listConnections(selected_cns)[0]
  5. cmds.spaceLocator(n=selected_cns.replace('Drv_Prc','Flc_Loc'))
  6. cmds.parentConstraint(flc_driver,selected_cns.replace('Drv_Prc','Flc_Loc'))
  7. tmin = cmds.playbackOptions(min=1,q=1)
  8. tmax = cmds.playbackOptions(max=1,q=1)
  9. cmds.bakeResults(   selected_cns.replace('Drv_Prc','Flc_Loc'),
  10.                     time = (tmin,tmax),
  11.                     simulation=True,
  12.                     sampleBy=1,
  13.                     oversamplingRate=1,
  14.                     disableImplicitControl=True,
  15.                     preserveOutsideKeys=False,
  16.                     sparseAnimCurveBake=False,
  17.                     removeBakedAttributeFromLayer=False,
  18.                     removeBakedAnimFromLayer=False,
  19.                     bakeOnOverrideLayer=False,
  20.                     minimizeRotation=True,
  21.                     controlPoints=False,
  22.                     shape=True,
  23.                    
  24.                     )
  25. cmds.parentConstraint(selected_cns.replace('Drv_Prc','Flc_Loc'),selected_cns.replace('Drv_Prc','Cfx'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement