Skip to main content

KApplicationUI

kds-plugin-document / Exports / KApplicationUI

Interface: KApplicationUI

本接口代表酷大师的 UI 面板,如工具栏、菜单栏、属性栏等。

目前只提供了激活、抑制所有 UI 面板元素的方法

The KApplicationUI contains a number of methods for manipulating the application UI, such as tool bar, menu bar, resource panel, etc.

Table of contents

Methods

Methods

disableAll

disableAll(): void

抑制所有 UI 面板元素

Disable tool bar, menu bar, resource panel, etc.

Returns

void

Defined in

api.d.ts:599


enableAll

enableAll(): void

激活所有 UI 面板元素

Enable tool bar, menu bar, resource panel, etc.

Returns

void

Defined in

api.d.ts:590


getActivePluginEntrancePosition

getActivePluginEntrancePosition(): number[]

获取当前激活插件的入口位置

Get the position of the active plugin entrance

Returns

number[]

Defined in

api.d.ts:622


getSelectControlAxises

getSelectControlAxises(): KVector3d[]

获取SelectControl控件当前的三轴方向

get current axises of SelectControl

Returns

KVector3d[]

current axises of SelectControl: [axisX, axisY, axisZ]

Defined in

api.d.ts:737


injectMenuItems

injectMenuItems(menuItems): void

注入SelectMenu选项

inject menuItems to SelectMenu

Parameters

NameTypeDescription
menuItems{ disabledFilter?: () => boolean ; icon: string ; onClick: () => void ; title: string ; visibleFilter?: () => boolean }[]can't exceed 3 items,

Returns

void

Defined in

api.d.ts:667


injectToolItems

injectToolItems(menuItems): void

注入工具栏工具选项

inject toolItems to Tools Bar

Parameters

NameType
menuItems{ disabledFilter?: () => boolean ; icon: string ; onClick: () => void ; title: string ; visibleFilter?: () => boolean }[]

Returns

void

Defined in

api.d.ts:686


isShownInvisibleModel

isShownInvisibleModel(): boolean

获取当前“查看隐藏对象”是否打开

Get the status of "show all invisible models" is turned on or turned off.

Returns

boolean

Defined in

api.d.ts:614


showPopover

showPopover(position, option): void

在 UI 的某个二维坐标下显示 popover

Show popover in the UI at a two-dimensional coordinate

Parameters

NameTypeDescription
positionnumber[]The position of the popover mount point
optionKPopoverOptionThe option of the popover

Returns

void

Defined in

api.d.ts:631


showRealTimeMaterialEditor

showRealTimeMaterialEditor(materialId, onSaveRealtimeMaterial): void

显示实时材质编辑窗口

show realtime material edit dialog.

Parameters

NameTypeDescription
materialIdstringmaterial's id to edit.
onSaveRealtimeMaterial(error?: any, data?: any) => voidthe callback when material edit successful and has been saved.

Returns

void

Defined in

api.d.ts:701


switchToCurrentPluginAssetPanel

switchToCurrentPluginAssetPanel(): void

左侧导航栏切换到当前插件面板,仅限于支持multiView的插件

The left navigation bar switches to the current plugin panel, only for plugins with multiView settings.

Returns

void

Defined in

api.d.ts:654


toggleMaterialReplacePanel

toggleMaterialReplacePanel(visible, onSoftMaterialClick?): void

打开或者关闭材质替换面板

toggle the material replace panel

Parameters

NameTypeDescription
visiblebooleantrue to open and false to close
onSoftMaterialClick?(materialId: string, bgid: string) => voidis the callback when choose a soft material.

Returns

void

Defined in

api.d.ts:729


togglePaymentVisible

togglePaymentVisible(visible, config?): void

在酷大师中显示支付弹窗

show payment dialog in kooMaster

Parameters

NameTypeDescription
visiblebooleantrue to show or false to hidden
config?Objectparams for the payment type
config.feidstring-
config.hunterid?string-
config.kioidstring-
config.onClose?() => void-
config.onSuccess?(result: { obsOrderId: string }) => void-
config.titlestring-

Returns

void

Defined in

api.d.ts:710


togglePropertyPanelVisibility

togglePropertyPanelVisibility(visible): void

显示或者隐藏右侧属性栏

show or hidden the property panel on the right

Parameters

NameTypeDescription
visiblebooleantrue, turn on to show property panel, vice versa.

Returns

void

Defined in

api.d.ts:647


toggleShowInvisibleModel

toggleShowInvisibleModel(showInvisibleModel): void

打开或者关闭“查看隐藏对象”按钮

turn on/turn off the button to show/not show all invisible models.

Parameters

NameTypeDescription
showInvisibleModelboolean: true, turn on to show all invisible models, vice versa.

Returns

void

Defined in

api.d.ts:607


toggleSketchToolBar

toggleSketchToolBar(showSketchToolBar): void

显示或者隐藏工具栏

show or hidden the toolbar

Parameters

NameTypeDescription
showSketchToolBarbooleantrue, turn on to show toolbar, vice versa.

Returns

void

Defined in

api.d.ts:639