Class

OCOBone

OCOBone(name)

A bone contained in an OCO Limb.
Constructor

# new OCOBone(name)

Creates a new OCO Bone.
Parameters:
Name Type Description
name string The name

View Source DuAEF_DuGR_api.jsxinc, line 16721

Members

Boolean

# static attached

true if this bone is attached to its parent.

View Source DuAEF_DuGR_api.jsxinc, line 16744

Array.<OCOBone>

# static children

The child bones.

View Source DuAEF_DuGR_api.jsxinc, line 16751

Array.<OCOLimb>

# static limbs

The child limbs.

View Source DuAEF_DuGR_api.jsxinc, line 16758

string

# static name

The name of the bone

View Source DuAEF_DuGR_api.jsxinc, line 16723

OCO.Bone

# static type

The type of bone.

View Source DuAEF_DuGR_api.jsxinc, line 16765

float

# static x

The x coordinate of the bone

View Source DuAEF_DuGR_api.jsxinc, line 16730

float

# static y

The y coordinate of the bone

View Source DuAEF_DuGR_api.jsxinc, line 16737

# envelop

The envelop of the bone,
In a meta rig, this is a silhouette which will contain the design,and can be used to help locate the joint, link the design to the bone, etc.
In a rigged character, this should be a simple silhouette close to the artwork silhouette.

View Source DuAEF_DuGR_api.jsxinc, line 16778

Methods

# static fromObject(data) → {OCOBone}

Creates a bone from a js object.
Parameters:
Name Type Description
data Object The js object representing the bone

View Source DuAEF_DuGR_api.jsxinc, line 16908

The new bone
OCOBone

# length() → {int}

The length of the bone (this distance with its first child)

View Source DuAEF_DuGR_api.jsxinc, line 16798

The length
int

# numBones() → {int}

Counts the total number of child bones

View Source DuAEF_DuGR_api.jsxinc, line 16809

int

# toObject() → {Object}

Creates a js object containing this bone data.
This object could then be exported to JSON for example.

View Source DuAEF_DuGR_api.jsxinc, line 16873

the JS Object
Object

# translate(xopt, yopt, translateChildrenopt)

Translates the bone by [x, y] pixels
Parameters:
Name Type Attributes Default Description
x int <optional>
0 The horizontal offset
y int <optional>
0 The vertical offset
translateChildren bool <optional>
true If false, the children stay at their current location

View Source DuAEF_DuGR_api.jsxinc, line 16829

# translateTo(xopt, yopt, translateChildrenopt)

Translates the bone to the new coordinates
Parameters:
Name Type Attributes Default Description
x int <optional>
The new X value. If omitted, moves the layer vertically
y int <optional>
The new Y value. If omitted, moves the layer horizontally
translateChildren bool <optional>
true If false, the children stay at their current location

View Source DuAEF_DuGR_api.jsxinc, line 16850