import pymel.core as pm
def addBasakFeathersForSubd():
# find basak feathersShapes
hair = pm.ls('CHR_basak_*_RENDER:mod_GRP:feather_hair_GRP')[0]
neck = pm.ls('CHR_basak_*_RENDER:mod_GRP:feather_neck_GRP')[0]
hairF = [i.getShape() for i in hair.getChildren()]
neckF = [i.getShape() for i in neck.getChildren()]
if not hairF or not neckF:
pm.error('Missing Basak feathers')
allF = hairF + neckF
# find the rsParam
rsMeshP = pm.ls('rsSubdiv_SET')[0]
if not rsMeshP:
pm.error('NO RShift meshParameters found')
# add feathers to set
for item in allF:
pm.select(item, r = True)
pm.sets( rsMeshP,forceElement = True )
addBasakFeathersForSubd()