Difference between revisions of "Property"
Jump to navigation
Jump to search
Line 4: | Line 4: | ||
{| class="wikitable" | {| class="wikitable" | ||
− | + Silhouette Property Types | + | |+ Silhouette Property Types |
! scope="col" | Type | ! scope="col" | Type | ||
! scope="col" | Description | ! scope="col" | Description | ||
Line 43: | Line 43: | ||
|A slider or spin-box with with min/max range | |A slider or spin-box with with min/max range | ||
|Integer or Float | |Integer or Float | ||
+ | |align="center" | ✓ | ||
+ | |- | ||
+ | |Objects | ||
+ | |An object list | ||
+ | |List of [[Object]] | ||
+ | | | ||
+ | |- | ||
+ | |Path | ||
+ | |A shape spline path | ||
+ | |[[ShapePath]] | ||
|align="center" | ✓ | |align="center" | ✓ | ||
|- | |- | ||
Line 65: | Line 75: | ||
| | | | ||
|} | |} | ||
+ | |||
=== Attributes === | === Attributes === | ||
Revision as of 20:20, 20 November 2012
A Property is a single constant or animated parameter. Silhouette supports many types of properties.
Property Types
Type | Description | Data-type | Animated |
---|---|---|---|
Boolean | On/Off check-box | Bool | |
Color | RGBA color picker | Color | ✓ |
Flags | A bit-mask with multiple check boxes | Integer | |
Join | An object link | Object | |
List | List of predefined options | Integer | |
Matrix | A transform matrix | Matrix | ✓ |
Number | A slider or spin-box with with min/max range | Integer or Float | ✓ |
Objects | An object list | List of Object | |
Path | A shape spline path | ShapePath | ✓ |
Point | X/Y point | Point3D | ✓ |
Source | A data source | Source | |
StreamRef | A stream reference | Integer | |
String | A UTF-8 string | String |
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 |
---|---|
__init__(label, menu=None, type=Action, extension=None) | Constructor - Initializes the base class. The menu can be listed separately or prefixed to the label with the '|' character. |
available() | Should return True (the default) if the Action is available. The Action should examine the current state in this method and assert (with an optional error message) that conditions are good for execution. |
execute(path=None) | Called to execute the Action. UI Actions should be undoable. Importer/Exporter actions are passed the path to the file to operate on. |
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 |