disguise developers

Designer Plugins

Plugins for Disguise Designer software.

TwoPoint5DAsset

A 2.5D asset, which contains multiple 2.5D plates.

The 2.5D asset can be loaded from or exported to a .2p5d file for reuse across different projects.
See https://developer.disguise.one/formats/2p5d/ for the .2p5d format specification for 2.5D assets.

Category: Stage

Base class: Object

Properties

alwaysShowInStage : bool

Show the asset in the stage, even when the editor is not open

depthMapMax : float

Maximum depth represented in the depth map (far plane), in metres.

depthMapMaxOriginal : float

Maximum depth represented in the depth map (near plane) when the asset was extracted, in metres.

depthMapMinOriginal : float

Minimum depth represented in the depth map (near plane) when the asset was extracted, in metres.

depthMapMinOverride : float

The minimum depth in metres used when interpreting depth maps from imported assets
Set to -1 to reload default value from file

UserName: Depth map minimum override

file : TwoPoint5DFile

The file path for the asset, when it has been loaded from a .2p5d file.

fovH : float

Horizontal field of view covered by the asset, in degrees

fovV : float

Vertical field of view covered by the asset, in degrees

isExtracted : bool

Whether the asset has been extracted from its .2p5d file.

maxDepth : float

Maximum depth of the plates in the asset, in metres

plates : List[TwoPoint5DPlate]

Array of plates which make up the 2.5D scene

UserName: Plates

Methods

decrementEditorRefCount(self)

Decrements the editor reference count.

Called when a relevant editor (e.g. 2.5D module or asset) is closed. If the reference count reaches 0, the asset becomes invisible in the stage.

depthMapMinHasChanged(self) -> bool

Whether the depth map minimum specified in depthMapMinOverride is valid and different to the original depth specified in depthMapMinOriginal.

exportToFile(self)

Exports the asset to a .2p5d file.
The file is saved as [asset name].2p5d within the project’s objects/2p5DFile folder.

extractFromFile(self, isPrimaryMachine: bool)

Extracts the asset from its corresponding 2.5D file.

Parameters:

hasFile(self) -> bool

Whether the asset has a .2p5d file within the project associated with it.

incrementEditorRefCount(self)

Increments the editor reference count.

Called when a relevant editor (e.g. 2.5D module or asset) is open. The asset becomes visible in the stage when the reference count is > 0.

onPlatesMoved(self, movedPlateIndices: List[int])

Called when the order of plates in the list has changed.

This function updates the depth of each plate based on its new position within the list to ensure that the plates are sorted in ascending order by depth.

Parameters:

renderPreview(self, resolution: Vec2, renderInGuiSpace: bool) -> DxTexture

Renders a preview of the asset from the eye point

Parameters:

Returns A texture containing the rendered preview.

sceneAspect(self) -> float

The aspect ratio (X/Y) of the scene, based on the vertical and horizontal extents of the 2.5D plates within the asset.