Difference between revisions of "Action"

From Silhouette Wiki
Jump to navigation Jump to search
(Created page with "== Action == All Actions must be derived from the '''Action''' base class, and should implement the <tt>available</tt> and <tt>execute</tt> methods. === Attributes === ''Th...")
 
Line 48: Line 48:
 
|-
 
|-
 
|Action
 
|Action
|A normal action - the default
+
|A normal action that appears in the Actions menu (the default)
 
|-
 
|-
 
|ShapeImporter
 
|ShapeImporter
Line 55: Line 55:
 
|ShapeExporter
 
|ShapeExporter
 
|An Action that should appear in the Shape Export menu
 
|An Action that should appear in the Shape Export menu
|-
 
|TrackerImporter
 
|An Action that should appear in the Tracker Import menu
 
|-
 
|TrackerExporter
 
|An Action that should appear in the Tracker Export menu
 
|-
 
|ShapeImporter
 
|An Action that should appear in the Shape Import menu
 
 
|-
 
|-
 
|Extension
 
|Extension
 
|An Action that implements core functionality is bound using some other means
 
|An Action that implements core functionality is bound using some other means
 
|}
 
|}

Revision as of 19:11, 18 November 2012

Action

All Actions must be derived from the Action base class, and should implement the available and execute methods.

Attributes

These attributes are read-only.

Name Description
actionType The Action Type
extension If the Action implements an importer or exporter, the file extension the action works with
id The Action class name
label The Action label that appears in the Actions menu

Methods

Name Description
action(name) Returns the Action with the given name
activeLayer() Return the active Layer, or None
activeNode() Return the active Node, or None
activeProject() Return the active Project, or None

Constants

Action Type

Name Description
Action A normal action that appears in the Actions menu (the default)
ShapeImporter An Action that should appear in the Shape Import menu
ShapeExporter An Action that should appear in the Shape Export menu
Extension An Action that implements core functionality is bound using some other means