RSX Code Reference
    Preparing search index...

    Function sceneObjectAction

    • An attribute that can be added to a static method to create a new SceneObject action. SceneObject actions allow developers to extend toolbars and context menus for scene object specific actions such as select or duplicate.

      Whenever the associated key combination is pressed in an scene object editing context, the associated method will be invoked.

      Parameters

      • displayNameOrLambda:
            | string
            | (
                (
                    sceneObjects: SceneObject[],
                    sceneInstance: SceneInstance,
                    scenePickingData?: ScenePickInformation,
                ) => string
            )
      • requirePickData: boolean

        True to only display this action if ScenePickingData is available.

      • OptionalonIsVisible: (
            sceneObjects: SceneObject[],
            sceneInstance: SceneInstance,
            scenePickingData?: ScenePickInformation,
        ) => boolean

        An optional callback invoked to determine if the action should be visible.

      • OptionalshortcutModifier: EnumValue<ButtonModifier>

        A modifier key to bind the action to by default.

      • OptionalshortcutKey: EnumValue<ButtonCode>

        A key code to bind the action to by default.

      • Optionalflags: EnumValue<ShortcutBindingFlag>

        A set of optional flags to be given to the default key binding.

      • Optionalpriority: number

        An optional priority value for the new action.

      • Optionalplatform: EnumValue<ShortcutPlatformID>

        The platform for which this shortcut is enabled.

      Returns AttributeDecorator<Attribute>

      The method must have the following signature

      The scenePickingData is optional and may not be available in all contexts.