Skip to content
This repository was archived by the owner on Jul 11, 2025. It is now read-only.
This repository was archived by the owner on Jul 11, 2025. It is now read-only.

Rework Object Previews / PreviewProviders #294

@ilexp

Description

@ilexp

The aim of this issue has shifted away from a distinct editor module and towards a (DualityEditor) preview panel control, which is incorporated in the Object Inspector (plugin). See the first comment for more information.

Summary

Object previews are currently embedded directly into the Object Inspector. This leads to code duplication and needless limitations. Replace this concept with a new "Object Preview" editor module that simply displays a preview of the currently selected object(s).

Analysis

  • With a custom (docking) editor module, previews can be adjusted by the user to fit any size, rather than being dependent on proprety editor sizes.
  • It would be a lot easier for custom Resources to display a preview, since all that is needed is a custom PreviewProvider, which is a lot easier to write and more versatile, as it is also used by ContentRef<T> property editors, etc.
  • A lot of custom PropertyEditor code could be removed or unified after implementing this.
    • TexturePreviewPropertyEditor / TextureContentPropertyEditor / TexturePropertyEditor
    • PixmapPreviewPropertyEditor / PixmapContentPropertyEditor / PixmapPropertyEditor
    • FontPreviewPropertyEditor / FontContentPropertyEditor / FontPropertyEditor
    • AudioDataPreviewPropertyEditor / AudioDataPropertyEditor
    • ImagePreviewPropertyEditor
  • Releasing this package would also require releasing a new installer .zip package, since the list of default packages will have to be extended.
  • Should multiple instances of an Object Preview module be allowed?
    • If yes, a selection coordination similar to the existing one in Object Inspector would be necessary.
    • If not, there will no longer be a convenient per-selection-group preview like currently in a multi-inspector situation.
    • Does this really add value? Questionable. Maybe limit to single-instance for now and extend later when needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Breaking ChangeBreaks binary or source compatibilityCleanupImproving form, keeping functionEditorArea: Duality editor or support librariesFeatureIt doesn't exist yet, but I want it

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions