app.activeDocument.selection.fill(fillColor); would fill any shape selection on the active layer if the layer is a normal layer a special layer type. Like you can not alter pixels in a smart object layer, Color can not be used in channels and mask etc. A layer that has a shape can be a shape layer which is a fill layer either solid or pattern and if layer that has a shape is not shape layer it has transparency. You can load a layers transparency as a selection and fill that. Transparency can have feathering
↧