Skip to content

Output parameters generated as const references #1471

@xkisu

Description

@xkisu

Godot version

4.2-stable

godot-cpp version

4.2-stable

System information

Godot v4.2.1.stable - macOS 14.4.1 - Vulkan (Forward+) - integrated Apple M1 - Apple M1 (8 Threads)

Issue description

The generated interface for both EditorImportPlugin::_import and EditorResourcePreviewGenerator::_generate have const-qualified parameters that are actually intended to be modified.

In the docs for EditorImportPlugin::_import, the platform_variants and gen_files parameters are suppose to be lists that can be used to inform the editor of additional files related to the import. Because they're const-qualified in the godot-cpp interface they can't be updated without a const_cast.

image

Same goes for EditorResourcePreviewGenerator::_generate's metadata parameter which is suppose to updated by the preview generator to provide any applicable metadata to EditorResourceTooltipPlugin::_make_tooltip_for_path for the editor tooltip.

image

Steps to reproduce

N/A

Minimal reproduction project

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaks compatbugThis has been identified as a bugtopic:gdextensionThis relates to the new Godot 4 extension implementation

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions