The LayerManager JavaScript class. Access the layers of a given panel. More...
Panel Layer Manipulation | |
int | numberOfLayers (String &panelId) |
Return the number of layers in a panel. More... | |
bool | addVectorLayer (String &panelId, QVariant &siblingLayerId, bool before, String &suggestedName) |
Add a vector layer. More... | |
bool | addBitmapLayer (String &panelId, QVariant &siblingLayerId, bool before, String &suggestedName) |
Add a bitmap layer. More... | |
bool | addGroupLayer (String &panelId, QVariant &siblingLayerId, bool before, String &suggestedName) |
Add a group layer. More... | |
bool | moveLayerInGroup (String &panelId, QVariant &layerId, QVariant &groupId=QVariant()) |
Move a layer at the end of a group layer. More... | |
bool | moveLayerBeforeLayer (String &panelId, QVariant &layerId, QVariant &siblingLayerId) |
Move layer before the sibbling layer (in the same group) More... | |
int | groupOfLayer (String &panelId, QVariant &layerId) |
Return the group index of a layer. More... | |
bool | isVectorLayer (String &panelId, QVariant &layerId) |
Return true if a layer is a vector layer. More... | |
bool | is3DLayer (String &panelId, QVariant &layerId) |
Return true if a layer is a 3D layer. More... | |
bool | isBitmapLayer (String &panelId, QVariant &layerId) |
Return true if a layer is a bitmap. More... | |
bool | isGroupLayer (String &panelId, QVariant &layerId) |
Return true if a layer is a group layer. More... | |
bool | deleteLayer (String &panelId, QVariant &layerId) |
Delete a given layer. More... | |
bool | renameLayer (String &panelId, QVariant &layerId, String &suggestedName) |
Rename a given layer. More... | |
String | layerName (String &panelId, int index) |
Return the name of a layer. More... | |
int | layerIndexFromName (String &panelId, String &layerName) |
Return the index of layer named layerName. More... | |
bool | importImageAsLayer (String &panelId, String &fullPathAndFileName, String &multiLayerOption="AskUser") |
Import image and creates a new layer at index 0, returns if successful. More... | |
bool | setLayerVisible (String &panelId, QVariant &layerId, bool visible) |
Set the visibility flag of the layers of a panel. More... | |
bool | layerVisibility (String &panelId, QVariant &layerId) |
Get the visibility flag of the layers of a panel. More... | |
bool | setLayerLock (String &panelId, QVariant &layerId, bool lock) |
Set the lock flag of the layers of a panel. More... | |
bool | getLayerLock (String &panelId, QVariant &layerId) |
Get the lock flag of the layers of a panel. More... | |
bool | setLayerOpacity (String &panelId, QVariant &layerId, double opacity, int frame=-1) |
Set a layer's opacity. More... | |
double | layerOpacity (String &panelId, QVariant &layerId, int frame=-1) |
Get layers opacity value. More... | |
bool | setLayerAlignment (String &panelId, QVariant &layerId, String &alignment) |
Set a layer's alignment value. More... | |
String | layerAlignment (String &panelId, QVariant &layerId) |
Get a layer's alignment value. More... | |
String | getLayerDrawingName (String &panelId, QVariant &layerId, bool fullPath) |
Get the path to a layer's drawing. More... | |
int | getLayerElementId (String &panelId, QVariant &layerId) |
Return the element id of the layer. May be useful when using the element and Drawing global objects. More... | |
bool | generateMatteLayer (String &panelId, QVariant &layerId, double radius, bool copyStrokes, bool replaceLayer) |
Generate a new drawing layer making a matte from the given layer. The matte will be of the current selected color. More... | |
bool | generateMatteLayer (String &panelId, QVariant &layerId, double radius, bool copyStrokes, bool replaceLayer, unsigned int red, unsigned int green, unsigned int blue) |
Generate a new drawing layer making a matte from the given layer. The matte will be of the given color. More... | |
bool | generateMatte (String &panelId, QVariant &layerId, QScriptValue options) |
Generate matte from a given layer to a new drawing layer or directly on the source layer. More... | |
bool | isShared (String &panelId, QVariant &layerId) |
Look at the the given Layer and return if it is shared. More... | |
bool | isShared (QScriptValue layer) |
Look at the the given Layer and return if it is shared. More... | |
int | mergeLayers (String &panelId, QScriptValue &layers, String &newLayerName) |
Merge the given Layers into a single panel. More... | |
QScriptValue | mergeLayers (QScriptValue layers, String &newLayerName) |
Merge the given Layers into a single panel. More... | |
bool | isEmpty (String &panelId, QVariant &layerId) |
Look at the given layer and return if it is empty or not. A layer is empty if it has no drawing. More... | |
bool | isEmpty (QScriptValue layer) |
Look at the given layer and return if it is empty or not. A layer is empty if it has no drawing. More... | |
void | applyBlurToBitmap (String &panelId, QVariant &layerId, bool skipDialog=false) |
Apply a blur effect to the given bitmap layer. More... | |
void | applyRadialZoomBlurToBitmap (String &panelId, QVariant &layerId, bool skipDialog=false) |
Apply a radial zoom blur effect to the given bitmap layer. More... | |
void | applyDirectionalBlurToBitmap (String &panelId, QVariant &layerId, bool skipDialog=false) |
Apply a directional blur effect to the given bitmap layer. More... | |
The LayerManager JavaScript class. Access the layers of a given panel.
|
slot |
Add a bitmap layer.
panelId | - unique id of the panel |
siblingLayerId | - id (index or name) of sibling layer |
before | - whether new layer is before or after sibling layer |
suggestedName | - suggested Name |
|
slot |
Add a group layer.
panelId | - unique id of the panel |
siblingLayerId | - id (index or name) of sibling layer |
before | - whether new layer is before or after sibling layer |
suggestedName | - suggested Name |
|
slot |
Add a vector layer.
panelId | - unique id of the panel |
siblingLayerId | - id (index or name) of sibling layer |
before | - whether new layer is before or after sibling layer |
suggestedName | - suggested Name |
|
slot |
Apply a blur effect to the given bitmap layer.
panelId | - The unique id of the panel |
layerId | - id (index or name) of layer |
skipDialog | - Skip the blur dialog and use the previously used blur settings. By default this is false |
|
slot |
Apply a directional blur effect to the given bitmap layer.
panelId | - The unique id of the panel |
layerId | - id (index or name) of layer |
skipDialog | - Skip the blur dialog and use the previously used blur settings. By default this is false |
|
slot |
Apply a radial zoom blur effect to the given bitmap layer.
panelId | - The unique id of the panel |
layerId | - id (index or name) of layer |
skipDialog | - Skip the blur dialog and use the previously used blur settings. By default this is false |
|
slot |
Delete a given layer.
panelId | - uniqueId of the panel |
layerId | - id (index or name) of layer |
|
slot |
Generate matte from a given layer to a new drawing layer or directly on the source layer.
panelId | - The unique id of the panel | ||||||||||||||||||
layerId | - id (index or name) of layer | ||||||||||||||||||
options | - Options used to generate the matte. The option object has the following properties:
|
|
slot |
Generate a new drawing layer making a matte from the given layer. The matte will be of the current selected color.
panelId | - The unique id of the panel |
layerId | - id (index or name) of layer |
radius | - The matte radius |
copyStrokes | - Set to true to copy the strokes |
replaceLayer | - Set to true to replace the existing layer by one with the same name, false to keep both |
|
slot |
Generate a new drawing layer making a matte from the given layer. The matte will be of the given color.
panelId | - The unique id of the panel |
layerId | - id (index or name) of layer |
radius | - The matte radius |
copyStrokes | - Set to true to copy the strokes |
replaceLayer | - Set to true to replace the existing layer by one with the same name, false to keep both |
red | - The red channel value (0..255) for the matte. A value higher than 255 will be clamped. |
green | - The green channel value (0..255) for the matte. A value higher than 255 will be clamped. |
blue | - The blue channel value (0..255) for the matte. A value higher than 255 will be clamped. |
|
slot |
Get the path to a layer's drawing.
panelId | - unique id of the panel |
layerId | - id (index or name) of layer |
fullPath | - boolean to determine if the returned path is the full path or the file name |
|
slot |
Return the element id of the layer. May be useful when using the element and Drawing global objects.
panelId | - unique id of the panel |
layerId | - id (index or name) of layer |
|
slot |
Get the lock flag of the layers of a panel.
panelId | - unique id of the panel |
layerId | - id (index or name) of layer |
|
slot |
Return the group index of a layer.
panelId | - unique id of the panel |
layerId | - id (index or name) of layer |
|
slot |
Import image and creates a new layer at index 0, returns if successful.
panelId | - unique id of the panel |
fullPathAndFileName | - absolute path to image file |
multiLayerOption | - how to handle multi layer image
|
|
slot |
Return true if a layer is a 3D layer.
panelId | - unique id of the panel |
layerId | - id (index or name) of layer |
|
slot |
Return true if a layer is a bitmap.
panelId | - unique id of the panel |
layerId | - id (index or name) of layer |
|
slot |
Look at the given layer and return if it is empty or not. A layer is empty if it has no drawing.
panelId | - The unique id of the panel |
layerId | - id (index or name) of layer |
|
slot |
Look at the given layer and return if it is empty or not. A layer is empty if it has no drawing.
layer | - an object with the name [String] and panelId properties [String]. |
|
slot |
Return true if a layer is a group layer.
panelId | - unique id of the panel |
layerId | - id (index or name) of layer |
|
slot |
Look at the the given Layer and return if it is shared.
panelId | - The unique id of the panel |
layerId | - id (index or name) of layer |
|
slot |
Look at the the given Layer and return if it is shared.
layer | a layer is defined by those properties: frame, panelId, name. |
|
slot |
Return true if a layer is a vector layer.
panelId | - unique id of the panel |
layerId | - id (index or name) of layer |
|
slot |
Get a layer's alignment value.
panelId | - unique id of the panel |
layerId | - id (index or name) of layer |
|
slot |
Return the index of layer named layerName.
panelId | - unique id of the panel |
layerName | - name of the layer |
|
slot |
Return the name of a layer.
panelId | - unique id of the panel |
index | - index of the layer |
|
slot |
Get layers opacity value.
panelId | - unique id of the panel |
layerId | - id (index or name) of layer |
frame | - specify frame (-1 will use current frame) |
|
slot |
Get the visibility flag of the layers of a panel.
panelId | - unique id of the panel |
layerId | - id (index or name) of layer |
|
slot |
Merge the given Layers into a single panel.
panelId | - The unique id of the panel |
layers | - an array of layer's id (index or name) |
newLayerName | - new name of the layer created from the merge. |
|
slot |
Merge the given Layers into a single panel.
layers | - an array of objects with the name [String] and panelId properties [String]. |
newLayerName | - new name of the layer created from the merge. |
|
slot |
Move layer before the sibbling layer (in the same group)
panelId | - unique id of the panel |
layerId | - id (index or name) of layer |
siblingLayerId | - id (index or name) of sibling layer |
|
slot |
Move a layer at the end of a group layer.
panelId | - unique id of the panel |
layerId | - id (index or name) of layer |
groupId | - id (index or name) of group layer |
|
slot |
Return the number of layers in a panel.
panelId | - unique id of the panel |
|
slot |
Rename a given layer.
panelId | - unique id of the panel |
layerId | - id (index or name) of layer |
suggestedName | - suggested name |
|
slot |
Set a layer's alignment value.
panelId | - unique id of the panel |
layerId | - id (index or name) of layer |
alignment | - The alignment options are: "No Alignment", "Face Camera" and "Pin to Camera". |
|
slot |
Set the lock flag of the layers of a panel.
panelId | - unique id of the panel |
layerId | - id (index or name) of layer |
lock | - boolean flag |
|
slot |
Set a layer's opacity.
panelId | - unique id of the panel |
layerId | - id (index or name) of layer |
opacity | - value between 0 and 100 |
frame | - specify frame (-1 will use current frame) |
|
slot |
Set the visibility flag of the layers of a panel.
panelId | - unique id of the panel |
layerId | - id (index or name) of layer |
visible | - boolean flag |