Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Import] Add "skip file" import option to skip (and exclude from export) importable formats, auto set it for the images used by bitmap font. #87972

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Feb 5, 2024

As mentioned in #87971 and #82254, bitmap fonts use external images, but can't use these images as external resources since in many cases image preprocessing is required.

This PR:

  • Adds "skip file" import option to skip (and exclude from export) importable formats (e.g, images).
  • Automatically set "skip file" import mode for the images used by bitmap font, to prevent exporting these images twice (as source Image/Texture2D end embedded processed image in the fontdata).

@bruvzg bruvzg added this to the 4.x milestone Feb 5, 2024
@bruvzg bruvzg marked this pull request as ready for review February 5, 2024 12:20
@bruvzg bruvzg requested review from a team as code owners February 5, 2024 12:20
@@ -153,7 +158,11 @@ void ImportDock::_add_keep_import_option(const String &p_importer_name) {
import_as->add_separator();
import_as->add_item(TTR("Keep File (No Import)"));
import_as->set_item_metadata(-1, "keep");
import_as->add_item(TTR("Skip File (No Import)"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be:

Suggested change
import_as->add_item(TTR("Skip File (No Import)"));
import_as->add_item(TTR("Skip File (No Export)"));

?
Or "No Import nor Export" but it starts being quite lengthy.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if No Import part is necessary, it's not adding any information. Maybe Keep File (exported as is) and Skip File (not exported)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed options to: Keep File (exported as is) and Skip File (not exported).

Also added some doc notes: godotengine/godot-docs#9089

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me, the added "Skip File" option seems potentially useful in other cases (e.g. source .blend files when you already have a .glb for the same scene).

I see we're lacking documentation about the existing "Keep File", would be good to add details about both options in https://docs.godotengine.org/en/latest/tutorials/assets_pipeline/import_process.html#changing-import-resource-type

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Mar 6, 2024
@Zireael07
Copy link
Contributor

(e.g. source .blend files when you already have a .glb for the same scene).

oh yeah please

…rt) importable formats, auto set it for the images used by bitmap font.
@akien-mga akien-mga merged commit 950d11b into godotengine:master Mar 13, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants