Hi All,
I'm writing to you regarding the best way do add an ArtLayer with a script.
I already know that it is possible to add an Artlayer and then change the property layer.kind to TEXT.
But unfortunatly it isn't possible to add change this property to LayerKind.CURVES.
Here is an example
/** * Function to add a layer to a Document * @param {LayerKind} layer_kind, the type of the layer (CURVES, TEXT, SELECTIVECOLOR) * @param {Document|LayerSet} [obj = app.activeDocument] the obj which contains the new layer * @return {ArtLayer} layer the added layer * @todo add a better test to check if layer_kind is an enum of LayerKind * @toto add control the layer is background or not * @todo https://forums.adobe.com/thread/1601245 */ my.add = function (name, layer_kind, obj) { if (obj === undefined) { var obj = app.activeDocument; } if (typeof layer_kind !== 'object') { throw { name: 'InvalidArgumentError', message: 'you must enter a valid value for the param layer_kind [CURVES, TEXT, SELECTIVECOLOR, etc.]', fileName: $.fileName, lineNumber: $.line }; } var layer = obj.artLayers.add(); layer.kind = layer_kind; layer.name = name; return layer; }
So the only way to add different type of layer is to use Action Script listener?
I'm a bit confused because it would be much better to be able to change the layer.kind property.
In advance, thanks you very much for your Help.
Best regard.