-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Expose 'Reimport' on right-click context menu in the FileSystem panel #75137
Conversation
eba47af
to
f0ef14e
Compare
f0ef14e
to
8fda7cb
Compare
Either the function needs to be changed or |
8fda7cb
to
94ccf91
Compare
I understand. I tested the import tab in the current version and found that when I try to import two different file types, the editor doesn't let me reimport them. To maintain consistency, I'll try to implement the same functionality as the editor. |
94ccf91
to
44921db
Compare
The implementation can be much simpler: bool resource_valid = true;
String main_extension;
for (int i = 0; i != p_paths.size(); ++i) {
String extension = p_paths[i].get_extension();
if (extension_list.has(extension)) {
if (main_extension.is_empty()) {
main_extension = extension
} else if (extension != main_extension) {
resource_valid = false;
break;
}
} else {
resource_valid = false;
break;
}
} |
44921db
to
f40a5fc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems useful.
Thanks! |
Hey, thank you very much for implementing this! Cool to see a proposal I made actually make it in! just tried this in the 4.2 dev3 snapshot. It seems like this doesn't work for all types? For instance, when using the https://github.com/Kiamo2/YATI plugin, .tmj files don't show Reimport This was actually the use case that I created the proposal for, to reimport my tilemaps easily. Another plugin I'm using, that I wrote myself, does have the Reimport option Any idea why it wouldn't show up for some resources? |
Maybe there is something wrong with the YATI implementation, like missing function or something. Doesn't it print any errors when used? Can you show the code of your plugin? |
I don't think I have errors from YATI but I can check later. This is my importer code which does show Reimport: https://github.com/dogboydog/YarnDonut/blob/godot4/addons/YarnDonut/Editor/YarnImporter.cs |
YATI returns "Node2D" in |
Thanks, I'll let the developer know. Edit: confirmed that was the issue, thank you |
Implement proposal: #6320
Bugsquad edit: