Class: DuOCODoc

DuOCODoc

An Open Cut-Out character or meta-rig document.

new DuOCODoc(name)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 14149
Creates a new OCO Document.
Name Type Description
name string The name of the character or the meta rig

Members

staticDuOCODoc.centerOfMassArray.<float>

The coordinates of the center of mass of the character. [X, Y].

staticDuOCODoc.heightfloat

The height of the character. Should always be 1!

staticDuOCODoc.namestring

The name of this OCO Doc

staticDuOCODoc.typestring

The type of this OCO Doc

staticDuOCODoc.widthfloat

The width of the character.

Methods

staticDuOCODoc.fromComp(name, comp, empty, selectedLayers){DoOCODoc}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 32108
Creates an OCO doc from the given composition.
Name Type Default Description
name string optional The name of the character. If omitted, will use the comp name.
comp CompItem DuAEProject.getActiveComp() optional The composition
empty Boolean false optional Set to true to create an empty doc.
selectedLayers Boolean false optional If empty is true, will use only the selected layers
Returns:
Type Description
DoOCODoc The new doc

bounds(){Array.<float>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 14202
Gets the boundaries of the doc
Returns:
Type Description
Array.<float> [left, top, right, bottom]

fromPixels(point){Array.<float>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 15430
Converts a pixel coordinate in pixels to centimeters doc coordinates
Name Type Description
point Array.<int> The coordinate to convert
Returns:
Type Description
Array.<float> The coordinates in centimeters relative to the doc

newArm(type, side, shoulder, arm, forearm, hand, claws, position, location, view){DuOCOLimb}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 14265
Creates a new arm.
Name Type Default Description
type DuOCO.LimbType DuOCO.LimbType.HOMINOID optional The type of limb
side DuOCO.Side DuOCO.Side.LEFT optional The side
shoulder Boolean false optional Whether to create a shoulder
arm Boolean true optional Whether to create an arm / humerus
forearm Boolean true optional Whether to create a forearm
hand Boolean true optional Whether to create a hand
claws Boolean false optional Whether to add claws
position Array.<float> optional The position of the first bone of the arm.
If omitted, computed automatically according to the current character in the doc.
location DuOCO.Location DuOCO.Location.FRONT optional The location of the limb
view DuOCO.View optional The view
Returns:
Type Description
DuOCOLimb The arm

newFin(fishbones, position, view){DuOCOLimb}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 15318
Creates a new fin.
Name Type Default Description
fishbones int 5 optional Number of feathers
position Array.<float> optional The position of the first bone of the arm.
If omitted, computed automatically according to the current character in the doc.
view DuOCO.View DuOCO.View.RIGHT optional The view
Returns:
Type Description
DuOCOLimb The fin

newFishSpine(head, spine, position){DuOCOLimb}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 15236
Creates a new fish spine.
Name Type Default Description
head Boolean true optional Whether to create a head
spine int 3 optional Number of spine bones
position Array.<float> optional The position of the first bone of the spine.
If omitted, computed automatically according to the current character in the doc.
Returns:
Type Description
DuOCOLimb The fish spine

newHairStrand(numBones){DuOCOLimb}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 14939
Creates a new hair strand.
Name Type Default Description
numBones int 3 optional Number of hair bones
Returns:
Type Description
DuOCOLimb The hair

newLeg(type, side, thigh, calf, foot, claws, position, location, view){DuOCOLimb}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 14599
Creates a new leg.
Name Type Default Description
type DuOCO.LimbType DuOCO.LimbType.HOMINOID optional The type of limb
side DuOCO.Side DuOCO.Side.LEFT optional The side
thigh Boolean true optional Whether to create a thigh
calf Boolean true optional Whether to create a calf
foot Boolean true optional Whether to create a foot
claws Boolean false optional Whether to add claws
position Array.<float> optional The position of the first bone of the arm.
If omitted, computed automatically according to the current character in the doc.
location DuOCO.Location DuOCO.Location.BACK optional The location of the limb
view DuOCO.View optional The view
Returns:
Type Description
DuOCOLimb The leg

newLimb(limb, side, location, type){DuOCOLimb}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 14243
Creates a new limb and adds it to the doc
Name Type Default Description
limb DuOCO.Limb DuOCO.Limb.CUSTOM optional A Predefined limb
side DuOCO.Side DuOCO.Side.NONE optional The side of the limb
location DuOCO.Location DuOCO.Location.NONE optional The location of the limb
type DuOCO.LimbType DuOCO.LimbType.CUSTOM optional The type of the limb
Returns:
Type Description
DuOCOLimb The new limb

newSnakeSpine(head, spine, position){DuOCOLimb}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 15154
Creates a new snake spine.
Name Type Default Description
head Boolean true optional Whether to create a head
spine int 5 optional Number of spine bones
position Array.<float> optional The position of the first bone of the arm.
If omitted, computed automatically according to the current character in the doc.
Returns:
Type Description
DuOCOLimb The snake spine

newSpine(head, neck, spine, hips, position, view){DuOCOLimb}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 14790
Creates a new spine.
Name Type Default Description
head Boolean true optional Whether to create a head
neck int 1 optional Number of neck bones
spine int 2 optional Number of spine bones
hips Boolean true optional Whether to create hips
position Array.<float> optional The position of the first bone of the arm.
If omitted, computed automatically according to the current character in the doc.
view DuOCO.View optional The view
Returns:
Type Description
DuOCOLimb The spine

newTail(numBones){DuOCOLimb}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 14901
Creates a new tail.
Name Type Default Description
numBones int 3 optional Number of tail bones
Returns:
Type Description
DuOCOLimb The spine

newWing(side, arm, forearm, hand, feathers, position, view){DuOCOLimb}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 14991
Creates a new wing.
Name Type Default Description
side DuOCO.Side DuOCO.Side.LEFT optional The side
arm Boolean true optional Whether to create an arm / humerus
forearm Boolean true optional Whether to create a forearm
hand Boolean true optional Whether to create a hand
feathers int 5 optional Number of feathers
position Array.<float> optional The position of the first bone of the arm.
If omitted, computed automatically according to the current character in the doc.
view DuOCO.View DuOCO.View.TOP optional The view
Returns:
Type Description
DuOCOLimb The wing

toComp(comp, duration, float){Array.<Layer>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 32147
Creates the limbs and armatures in the comp
Name Type Default Description
comp CompItem optional The composition to use. If omitted, creates a new composition.
duration float 60.0 optional The duration of the new comp, in seconds.
float frameRate 24.0 optional The frame rate of the new comp.
Returns:
Type Description
Array.<Layer> The new layers

toPixels(point){Array.<int>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 15413
Converts a doc coordinate in centimeters to pixel coordinates
Name Type Description
point Array.<float> The coordinate to convert
Returns:
Type Description
Array.<int> The coordinates in pixels relative to the comp

updateSize()

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 14225
Updates the width and height of the character, according to the content.
This method should be called each time a limb/bone is added/removed/edited and the bounds may change.