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
- disableAll
- enableAll
- getActivePluginEntrancePosition
- getSelectControlAxises
- injectMenuItems
- injectToolItems
- isShownInvisibleModel
- showPopover
- showRealTimeMaterialEditor
- switchToCurrentPluginAssetPanel
- toggleMaterialReplacePanel
- togglePaymentVisible
- togglePropertyPanelVisibility
- toggleShowInvisibleModel
- toggleSketchToolBar
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
current axises of SelectControl: [axisX, axisY, axisZ]
Defined in
api.d.ts:737
injectMenuItems
▸ injectMenuItems(menuItems
): void
注入SelectMenu选项
inject menuItems to SelectMenu
Parameters
Name | Type | Description |
---|---|---|
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
Name | Type |
---|---|
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
Name | Type | Description |
---|---|---|
position | number [] | The position of the popover mount point |
option | KPopoverOption | The option of the popover |
Returns
void
Defined in
api.d.ts:631
showRealTimeMaterialEditor
▸ showRealTimeMaterialEditor(materialId
, onSaveRealtimeMaterial
): void
显示实时材质编辑窗口
show realtime material edit dialog.
Parameters
Name | Type | Description |
---|---|---|
materialId | string | material's id to edit. |
onSaveRealtimeMaterial | (error? : any , data? : any ) => void | the 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
Name | Type | Description |
---|---|---|
visible | boolean | true to open and false to close |
onSoftMaterialClick? | (materialId : string , bgid : string ) => void | is 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
Name | Type | Description |
---|---|---|
visible | boolean | true to show or false to hidden |
config? | Object | params for the payment type |
config.feid | string | - |
config.hunterid? | string | - |
config.kioid | string | - |
config.onClose? | () => void | - |
config.onSuccess? | (result : { obsOrderId : string }) => void | - |
config.title | string | - |
Returns
void
Defined in
api.d.ts:710
togglePropertyPanelVisibility
▸ togglePropertyPanelVisibility(visible
): void
显示或者隐藏右侧属性栏
show or hidden the property panel on the right
Parameters
Name | Type | Description |
---|---|---|
visible | boolean | true, 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
Name | Type | Description |
---|---|---|
showInvisibleModel | boolean | : 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
Name | Type | Description |
---|---|---|
showSketchToolBar | boolean | true, turn on to show toolbar, vice versa. |
Returns
void
Defined in
api.d.ts:639