RSX Code Reference
    Preparing search index...

    Class MeshKeyWindow

    The MeshKeyWindow implements a KeyWindow to edit a Mesh.

    Hierarchy (View Summary)

    Index
    beginTutorial center clearUndoRedoHistory close createDefaultLayout createEditorWindow createTutorialFactory determineContentReadOnly didRedo didUndo dockDockableEditorWindow dockEditorWindow freezeDockableEditorWindow freezeEditorWindow getDockableEditorWindow getDockableLayout getResourceType getResourceTypeFriendlyName getScriptEditorWindow initializeInternal invalidateWindowTitle isEditedResource isUserListControlSupported isUsingMainToolBarStyle loadResourceFromUUID loadState lockKeyWindow onActionTriggeredRevert onActionTriggeredSave onActiveChanged onBoneSelected onCloseRequested onDestroy onEditorUpdate onEditorUpdateLate onGizmoDraw onInitialize onMeshDataChanged onPreviewSceneInitialized onResourceDirtyChanged onResourceDirtyStateChanged onResourceHandleChanged onResourceLoaded onResourceSaved onResourceStreamingFinalized onUndoRedoCommand onWindowDPIChanged onWindowFocusChanged onWindowResized openAnimationWindow openBoneInspectorWindow openDockableEditorWindow openEditorWindow openSkeletonTreeWindow raise recreateOnModuleReload redo resetLayout revert saveResource saveState screenToWindowPosition setDirtyState setDockableLayout setMaximumSize setMinimumSize setPosition setPositionInPixels setSize setSizeInPixels toggleToolbarItem undo unlockKeyWindow updateColliderTransformGizmos updateToolbarItemState updateToolbarItemStates willRedo willUndo windowToScreenPosition onLibraryEntryRemove openTypeScriptInternal openWindow openWithMesh openWithMeshUUID openWithResource openWithResourceUUID raiseOrCreateKeyWindow
    _colliderMoveGizmo: MoveInteractiveGizmo
    _colliderRotateGizmo: RotateInteractiveGizmo
    _meshData: MeshData
    _normalsRenderer: NormalsRenderer
    _outputLogWindow: OutputLogWindow

    The output log window.

    _previewWindow: ResourcePreviewWindow

    The window that manages the preview of the loaded resource.

    _resourceDiscussionWindow: ResourceDiscussionWindow

    The window that provides a discussion for the resource.

    _resourceHandle: ResourceHandle<Mesh>

    The resource that is currently being edited.

    _resourceInspectorWindow: ResourceInspectorWindow

    The window that inspects the loaded resource.

    _skeletonOutlinerWindow: SkeletonOutliner
    _skeletonSelectionGizmo: SkeletonBoneSelectionGizmo
    _toolSelector: UISegmentedButtonBase
    _vertexRenderer: VertexRenderer
    _viewportSettingsWindow: ViewportSettingsWindow

    The window that manages the viewport settings for the resource preview scene.

    _wireframeRenderer: WireframeRenderer
    onLibraryEntryRemove: (entry: LibraryEntry) => void

    Called by the project library whenever a library entry is removed.

    Type Declaration

    onResourcePropertyModified: (resource: Resource) => void

    Invoked when the user modified the resource in the UI.

    Type Declaration

      • (resource: Resource): void
      • Parameters

        • resource: Resource

          The resource resource

        Returns void

    onViewportSettingsModified: (
        viewportCameraSettings: ViewportCameraSettings,
    ) => void

    Invoked when the viewport camera settings have been modified.

    Type Declaration

    onViewportSettingsPopulateInspector: (fields: InspectorFieldContainer) => void

    Invoked when the viewport settings are populated.

    • get dpiScale(): number

      Returns the DPI scale factor.

      Returns number

      The DPI scale is in relation to a 1x base resolution of 75 DPI.

    • get height(): number

      Sets the height of the window in points.

      Returns number

    • set height(value: number): void

      Parameters

      • value: number

      Returns void

    • get heightInPixels(): number

      Sets the height of the window in pixels.

      Returns number

    • set heightInPixels(value: number): void

      Parameters

      • value: number

      Returns void

    • get icon(): Image

      Gets the icon for the window.

      Returns Image

    • set icon(value: Image): void

      Gets the icon for the window.

      Parameters

      Returns void

    • get isActive(): boolean

      Determines if the key window's tab is visible.

      Returns boolean

    • set isActive(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get isDestroyed(): boolean

      Determines whether the window has been destroyed or not.

      Returns boolean

    • get isFocused(): boolean

      Checks whether the window currently has keyboard focus.

      Returns boolean

    • set isFocused(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get isResourceDirty(): boolean

      Determines if the resource is dirty.

      Returns boolean

    • get keyWindow(): KeyWindowBase

      Gets the key window which owns this window.

      Returns KeyWindowBase

    • get left(): number

      Returns the X position of the window in screen coordinates in points.

      Returns number

    • get localShortcutContext(): ShortcutContext

      Specifies the local shortcut context. This context will be automatically disabled whenever the user switches focus from the context.

      Returns ShortcutContext

    • get owningContainerWindow(): EditorWindow

      Gets the window of the owning container. The owning container is window that serves as the host for one or multiple key windows.

      Returns EditorWindow

    • get position(): Immutable<rsx.UIPoint>

      Determines the position in which the key window is, in screen coordinates.

      Returns Immutable<rsx.UIPoint>

    • get renderWindow(): RenderWindow

      Gets the RenderWindow associated with this EditorWindow.

      Returns RenderWindow

    • get resource(): T

      Gets the resource or null, if not loaded.

      Returns T

    • get resourceHandle(): ResourceHandle<T>

      Gets the resource handle or null, if not handle assigend.

      Returns ResourceHandle<T>

    • get shortcutContext(): ShortcutContext

      Specifies the global shortcut context. This context will be always enabled as long as the window is active.

      Returns ShortcutContext

    • get styleSheet(): StyleSheet

      Sets the stylesheet for this window's UI surface.

      Returns StyleSheet

    • set styleSheet(value: StyleSheet): void

      Sets the stylesheet for this window's UI surface.

      Parameters

      Returns void

    • get toolBar(): UIToolBar

      Gets the primary tool bar element.

      Returns UIToolBar

    • get top(): number

      Returns the X position of the window in screen coordinates in points.

      Returns number

    • get ui(): UIPanel

      Returns UIPanel

    • get undoRedo(): UndoRedo

      Get the local undo redo of the key window.

      Returns UndoRedo

    • get width(): number

      Sets the width of the window in points.

      Returns number

    • set width(value: number): void

      Parameters

      • value: number

      Returns void

    • get widthInPixels(): number

      Sets the width of the window in pixels.

      Returns number

    • set widthInPixels(value: number): void

      Parameters

      • value: number

      Returns void

    • get windowTitle(): I18N

      Determines the human name to display on the window title or it's tab.

      Returns I18N

      A string that contains a human readable name for the key window.

    • set windowTitle(value: I18N): void

      Parameters

      Returns void

    • get current(): KeyWindow

      The currently active key window. Usually this value is null, but can be set to the current window inside an Update call or when calling an event callback for menu or toolbar items.

      Returns KeyWindow

    • Virtual

      A method called internally after the last action is redone.

      Returns void

    • Virtual

      A method called internally after the last action is undone.

      Returns void

    • Virtual

      Determines if the resource is being edited by this key window.

      Parameters

      Returns boolean

      Override this method if your key window tracks multiple resources.

    • Virtual

      Loads the key window state to the one represented by state.

      Parameters

      • stateObject: any

      Returns void

    • Updates the UI when a new bone has been selected

      Parameters

      • boneName: string

        The name of the selected bone

      Returns void

    • Virtual

      Method to override to implement destruction of custom windows. Called by the engine before the window is destroyed.

      Returns void

    • Virtual

      Method to override to implement custom behavior of a window, called by the engine once per frame.

      Returns void

    • Virtual

      Method to override to implement custom behavior of a window, called by the engine once per frame, once all the windows had their onEditorUpdate() method called.

      Returns void

    • Invoked when the gizmos are drawn.

      Returns void

    • Virtual

      Method to override to implement initialization of custom windows. Called by the engine after window creation.

      Parameters

      • options: any

      Returns void

    • Virtual

      Invoked when the dirty state of the resource changed.

      Parameters

      • isDirty: boolean

        True if the resource is dirty.

      Returns void

      The dirty state represents whether any change happened on the resource that has not yet been persisted to disk.

    • Virtual

      Triggered whenever the window gains or loses focus.

      Parameters

      • inFocus: boolean

        True if focus was gained, false otherwise.

      Returns void

    • Virtual

      Triggered whenever the window size changes.

      Parameters

      • width: number

        New width of the window in pixels.

      • height: number

        New height of the window in pixels.

      Returns void

    • Opens the animation window.

      Returns void

    • Opens the bone inspector window.

      Returns void

    • Opens the skeleton tree outliner window.

      Returns void

    • Virtual

      Determines if the key window must be recreated when the specified module is being reloaded. This is an important task to do if the key window edits classes from the module that is being reloaded. In that case, the key window must be recreated - otherwise, it references outdated classes which results in undefined behavior that can destabilize the application.

      The following are possible modules:

      • rsx - rsx.Editor - rsx.Project - rsx.Project.Editor

      Parameters

      • moduleName: string

        The fully qualified name of the module to be reloaded.

      Returns boolean

    • Executes the last command on the redo stack (last command we called undo on), re-applying its operation.

      Returns void

    • Saves the resource to its resource location.

      Parameters

      • isUserConfirmationRequired: boolean

        Determines if the user has to confirm the save operation.

      • OptionalonSuccess: () => void

        Action called when the operation succeeds.

      • OptionalonFailure: () => void

        Action called when saving the scene failed, or the user declined to save.

      Returns void

    • Virtual

      Saves the current key window state. This state can be persisted to disk or saved in memory and later restored by calling LoadState().

      Returns any

      An object that represents the KeyWindow saved state.

    • Virtual

      Changes the dirty state of the resource.

      Parameters

      • isDirty: boolean

        True if the resource is dirty.

      Returns void

      The dirty state represents whether any change happened on the resource that has not yet been persisted to disk.

    • Defines the window maximum width and height in points.

      Parameters

      • maxWidth: number
      • maxHeight: number

      Returns void

    • Defines the window minimum width and height in points.

      Parameters

      • minWidth: number

        The minimum width of the window in points.

      • minHeight: number

        The minimum height of the window in points.

      Returns void

    • Moves the window on the desktop. Coordinates are in screen space using points.

      Parameters

      • x: number
      • y: number

      Returns void

    • Moves the window on the desktop. Coordinates are in screen space using pixels.

      Parameters

      • x: number
      • y: number

      Returns void

    • Resizes the window using a width and height in points.

      Parameters

      • width: number
      • height: number

      Returns void

    • Resizes the window using a width and height in pixels.

      Parameters

      • width: number
      • height: number

      Returns void

    • Toggles an existing toolbar button into an on or off state which changes the visuals of the button.

      Parameters

      • name: string

        Name of the existing button to toggle.

      • isToggled: boolean

        True to toggle on, false to toggle off.

      Returns void

    • Executes the last command on the undo stack, undoing its operations.

      Returns void

    • Updates the bone collider transform gizmos.

      Returns void

    • Toggles an existing toolbar button into an on or off state which changes the visuals of the button.

      Parameters

      • name: string

        Name of the existing button to toggle.

      Returns void

    • Virtual

      A method called internally before the last action is redone.

      Returns void

    • Virtual

      A method called internally before the last action is undone.

      Returns void

    • Opens and creates a new KeyWindow of the specified type. If state is not null, loadState is also called with the given value for state.

      Type Parameters

      Parameters

      • type: ClassOf<T>
      • Optionalstate: any

        An optional initial state for the key window.

      Returns T

      An instance to the newly created key window.

    • Helper method that allows other resource key window implementations to raise an existing key window in case a resource is already opened in another window. All KeyWindows of type T will be tested against predicate. The first window that is encountered where predicate returns true is raised and returned. If no such window is found, createState is called. The result is used as a state for a new key window, which is then returned.

      Type Parameters

      Parameters

      • type: ClassOf<T>

        The type of KeyWindow to open

      • predicate: (window: T) => boolean

        A predicate that indicates if a given window can be raised. If this returns true for a window, that window will be raised and createState will not be called.

      • createState: () => any

        Function that is called when predicate returns false for all open KeyWindows of type T. It should return an object that can be used as a state for a key window of type T.

      Returns T

      The raised window, or if no window was raised the newly created one.

    onToolbarBuild: Event<[]>

    Event triggered when the toolbar is being built.

    onResize: Event<[]>

    Event triggered once the window is resized.

    onMove: Event<[]>

    Event triggered once the window is moved.

    onClose: Event<[]>

    Event triggered when the window is closed.

    onFocusChangedInternal: Event<[isFocused: boolean]>