## OCO

Methods to load and create OCO (Open Cut Out) Documents and armatures

View Source DuAEF_Duik_api.jsxinc, line 14590

# Members

Type: `string`

#### # static Bone

Some bone identifierss

##### Properties:

Name | Type | Description
--- | --- | ---
`CUSTOM` | `string` |
`TIP` | `string` |
`CLAVICLE` | `string` |
`HUMERUS` | `string` |
`RADIUS` | `string` |
`CARPUS` | `string` |
`FINGER` | `string` |
`HEEL` | `string` |
`FEMUR` | `string` |
`TIBIA` | `string` |
`TARSUS` | `string` |
`TOE` | `string` |
`HIPS` | `string` |
`SPINE` | `string` |
`TORSO` | `string` |
`NECK` | `string` |
`SKULL_TIP` | `string` |
`SKULL` | `string` |
`TAIL_ROOT` | `string` |
`TAIL_MID` | `string` |
`TAIL_END` | `string` |
`FEATHER` | `string` |
`SNAKE_SPINE_ROOT` | `string` |
`SNAKE_SPINE_MID` | `string` |
`SNAKE_SPINE_END` | `string` |
`FISH_SPINE_ROOT` | `string` |
`FISH_SPINE_MID` | `string` |
`FISH_SPINE_END` | `string` |
`HAIR_ROOT` | `string` |
`HAIR_MID` | `string` |
`HAIR_END` | `string` |
`FIN` | `string` |
`FIN_FISHBONE` | `string` |

View Source DuAEF_Duik_api.jsxinc, line 14628

Type: `string`

#### # static ImageEncoding

How images are encoded in the OCO file

##### Properties:

Name | Type | Description
--- | --- | ---
`PNG_BASE64` | `string` |
`RELATIVE_PATH` | `string` |
`ABSOLUTE_PATH` | `string` |

View Source DuAEF_Duik_api.jsxinc, line 14720

Type: `string`

#### # static libraryPath

The path where the OCO Library is stored. This is in the User Documents/OCO/OCO Library if the script has write access in this folder.
In rare cases on MacOS we can't write files in the documents folder. In this case the default library path in a temp folder.
You can change this path to a custom path before using the OCO API.

View Source DuAEF_Duik_api.jsxinc, line 14733

Type: `string`

#### # static Limb

Predefined limbs

##### Properties:

Name | Type | Description
--- | --- | ---
`SPINE` | `string` |
`ARM` | `string` |
`LEG` | `string` |
`TAIL` | `string` |
`WING` | `string` |
`HAIR` | `string` |
`SNAKE_SPINE` | `string` |
`FISH_SPINE` | `string` |
`FIN` | `string` |
`CUSTOM` | `string` |

View Source DuAEF_Duik_api.jsxinc, line 14611

Type: `string`

#### # static LimbType

Types of limbs

##### Properties:

Name | Type | Description
--- | --- | ---
`HOMINOID` | `string` |
`PLANTIGRADE` | `string` |
`DIGITIGRADE` | `string` |
`UNGULATE` | `string` |
`ARTHROPOD` | `string` |
`CUSTOM` | `string` |

View Source DuAEF_Duik_api.jsxinc, line 14668

Type: `string`

#### # static Location

Locations for the limbs. Use these with `OCO.Side` to differenciate similar limbs,
for example, a leg can be Front-Right, Front-Left, Back-Right, Back-Left, etc.

##### Properties:

Name | Type | Description
--- | --- | ---
`FRONT` | `string` |
`BACK` | `string` |
`TAIL` | `string` |
`MIDDLE` | `string` |
`ABOVE` | `string` |
`UNDER` | `string` |
`NONE` | `string` |

View Source DuAEF_Duik_api.jsxinc, line 14693

Type: `string`

#### # static Side

Sides for the limbs Use these with `OCO.Location` to differenciate similar limbs,
for example, a leg can be Front-Right, Front-Left, Back-Right, Back-Left, etc.

##### Properties:

Name | Type | Description
--- | --- | ---
`LEFT` | `string` |
`RIGHT` | `string` |
`NONE` | `string` |

View Source DuAEF_Duik_api.jsxinc, line 14682

Type: `string`

#### # static Type

Types of OCO armatures

##### Properties:

Name | Type | Description
--- | --- | ---
`META` | `string` | A meta-rig, used to automatically create a default armature to be used with an auto-rig.
`CHARACTER` | `string` | An actual (rigged) character.

View Source DuAEF_Duik_api.jsxinc, line 14596

Type: `int`

#### # static View

View axis for limbs.

##### Properties:

Name | Type | Description
--- | --- | ---
`FRONT` | `int` |
`LEFT` | `int` |
`RIGHT` | `int` |
`BACK` | `int` |
`TOP` | `int` |
`BOTTOM` | `int` |

View Source DuAEF_Duik_api.jsxinc, line 14707

# Methods

#### # static _length(value1, value2) → {float}

Measures the vector length between two points

##### Parameters:

Name | Type | Description
--- | --- | ---
`value1` | `Array.<int>` | The first value
`value2` | `Array.<int>` | The second value

View Source DuAEF_Duik_api.jsxinc, line 15037

Returns:
The length
Type: `float`

#### # static getBounds(armature) → {Array.<float>}

Gets the boundaries of an armature (a chain of bones)

##### Parameters:

Name | Type | Description
--- | --- | ---
`armature` | `Array.<OCOBone>` | The chain of bones

View Source DuAEF_Duik_api.jsxinc, line 14937

Returns:
[left, top, right, bottom]
Type: `Array.<float>`