Skip to main content

LensStudio:PanelPlugin.EditorDescriptor

Class

Base descriptor class for editor plugins, extended by panel and editor plugin descriptor types.

Index

Example

// EditorDescriptor extends PanelDescriptor.
// It is the base descriptor for EditorPlugin — plugins that edit specific entities.
// EditorDescriptor adds no extra properties; it inherits everything from PanelDescriptor.
// EditorPlugin.Descriptor extends EditorDescriptor and adds canEdit(entity) callback.
const root = new Widget(parent);
const layout = new BoxLayout();
layout.setDirection(Direction.TopToBottom);
layout.spacing = 6;
root.layout = layout;

const title = new Label(root);
title.text = 'EditorDescriptor';
title.fontRole = FontRole.TitleBold;
layout.addWidget(title);

const desc = new Label(root);
desc.text = 'Marker subclass of PanelDescriptor used by EditorPlugin. Inherits: defaultDockState, defaultSize, isUnique, menuActionHierarchy, minimumSize, toolbarConfig.';
desc.wordWrap = true;
layout.addWidget(desc);

Extends

Extended by

Properties

defaultDockState

defaultDockState: DockState

Initial dock state of the panel when first opened.

Inherited from

PanelDescriptor.defaultDockState


defaultSize

defaultSize: Size

Default size of the panel when first created.

Inherited from

PanelDescriptor.defaultSize


dependencies

dependencies: InterfaceId[]

Array of interface IDs that this plugin requires to function.

Inherited from

PanelDescriptor.dependencies


description

description: string

Human-readable description of the plugin shown in the plugin manager.

Inherited from

PanelDescriptor.description


id

id: string

Unique identifier for the plugin, typically in reverse domain notation.

Inherited from

PanelDescriptor.id


intendedPlatforms

intendedPlatforms: TargetPlatform[]

Array of target platforms (Snapchat, Spectacles) where this plugin is intended to run.

Inherited from

PanelDescriptor.intendedPlatforms


interfaces

interfaces: InterfaceId[]

Array of interface IDs that this plugin provides or implements.

Inherited from

PanelDescriptor.interfaces


isUnique

isUnique: boolean

Whether only one instance of this panel can exist at a time.

Inherited from

PanelDescriptor.isUnique


menuActionHierarchy: string[]

Menu path segments used to place this panel in the application menu.

Inherited from

PanelDescriptor.menuActionHierarchy


minimumSize

minimumSize: Size

Minimum allowed size of the panel.

Inherited from

PanelDescriptor.minimumSize


name

name: string

Display name of the plugin.

Inherited from

PanelDescriptor.name


toolbarConfig?

optional toolbarConfig?: ToolbarConfig

Optional toolbar configuration to display in the panel.

Inherited from

PanelDescriptor.toolbarConfig

Methods

getTypeName()

static getTypeName(): string

Returns the type name of this class.

Returns

string

Overrides

PanelDescriptor.getTypeName


getTypeName()

getTypeName(): string

Returns the name of this object's type.

Returns

string

Inherited from

PanelDescriptor.getTypeName


isOfType()

isOfType(type): boolean

Returns true if the object is of the specified type.

Parameters

ParameterType
typestring

Returns

boolean

Inherited from

PanelDescriptor.isOfType


isSame()

isSame(other): boolean

Returns true if this object refers to the same instance as the given object.

Parameters

ParameterType
otherScriptObject

Returns

boolean

Inherited from

PanelDescriptor.isSame