Skip to content

Instantly share code, notes, and snippets.

@Arahnoid
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Arahnoid/0cc0caff390fec5f9ca2 to your computer and use it in GitHub Desktop.
Save Arahnoid/0cc0caff390fec5f9ca2 to your computer and use it in GitHub Desktop.
raterizeLayerStyle PS Function
raterizeLayerStyle = ->
idrasterizeLayer = stringIDToTypeID('rasterizeLayer')
desc = new ActionDescriptor
idnull = charIDToTypeID('null')
ref = new ActionReference
idLyr = charIDToTypeID('Lyr ')
idOrdn = charIDToTypeID('Ordn')
idTrgt = charIDToTypeID('Trgt')
ref.putEnumerated idLyr, idOrdn, idTrgt
desc.putReference idnull, ref
idWhat = charIDToTypeID('What')
idrasterizeItem = stringIDToTypeID('rasterizeItem')
idlayerStyle = stringIDToTypeID('layerStyle')
desc.putEnumerated idWhat, idrasterizeItem, idlayerStyle
executeAction idrasterizeLayer, desc, DialogModes.NO
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment