new $.oElement(id, oColumnObject)
openHarmony/openHarmony_element.js, line 62
The base class for the $.oElement.
Elements hold the drawings displayed by a "READ" Node or Drawing Node. They can be used to create new drawings, rename them, etc.
Elements hold the drawings displayed by a "READ" Node or Drawing Node. They can be used to create new drawings, rename them, etc.
Name | Type | Description |
---|---|---|
id |
int | The element ID. |
oColumnObject |
$.oColumn | The column object associated to the element. |
Properties:
Name | Type | Description |
---|---|---|
id |
int | The element ID. |
oColumnObject |
$.oColumn | The column object associated to the element. |
Members
-
drawingsArray.<$.oDrawing>
-
The drawings available in the element.
-
formatstring
-
The file format of the element.
-
namestring
-
The name of the element.
-
palettesArray.<$.oPalette>
-
The palettes linked to this element.
-
pathstring
-
The folder path of the element on the filesystem.
Methods
-
addDrawing(atFrame, name, filename, convertToTvg){$.oDrawing}
openHarmony/openHarmony_element.js, line 159 -
Adds a drawing to the element. Provide a filename to import an external file as a drawing.
Name Type Default Description atFrame
int 1 optional The frame at which to add the drawing on the $.oDrawingColumn. Values < 1 create no exposure. name
name optional The name of the drawing to add. filename
string optional Optionally, a path for a drawing file to use for this drawing. Can pass an oFile object as well. convertToTvg
bool false optional If the filename isn't a tvg file, specify if you want it converted (this doesn't vectorize the drawing). Returns:
Type Description $.oDrawing The added drawing -
duplicate(name){$.oElement}
openHarmony/openHarmony_element.js, line 278 -
Duplicate an element.
Name Type Description name
string optional The new name for the duplicated element. Returns:
Type Description $.oElement The duplicate element -
getDrawingById(id){$.oDrawing}
openHarmony/openHarmony_element.js, line 223 -
Gets a drawing object by the id.
Name Type Description id
string The id of the drawing to get. Returns:
Type Description $.oDrawing The drawing found by the search -
getDrawingByName(name){$.oDrawing}
openHarmony/openHarmony_element.js, line 208 -
Gets a drawing object by the name.
Name Type Description name
string The name of the drawing to get. Returns:
Type Description $.oDrawing The drawing found by the search -
linkPalette(oPaletteObject, listIndex){$.oPalette}
openHarmony/openHarmony_element.js, line 237 -
Link a provided palette to an element as an Element palette.
Name Type Description oPaletteObject
$.oPalette The oPalette object to link listIndex
int optional The index in the element palette list at which to add the newly linked palette Returns:
Type Description $.oPalette The linked element palette. -
unlinkPalette(oPaletteObject){bool}
openHarmony/openHarmony_element.js, line 253 -
If the palette passed as a parameter is linked to this element, it will be unlinked, and moved to the scene palette list.
Name Type Description oPaletteObject
$.oPalette Returns:
Type Description bool the success of the unlinking process.